Commit Graph

62 Commits

Author SHA1 Message Date
Eric Anholt 424d5e4e11 turnip: Disable timestamp queries for now.
They're not implemented, and not critical to bring up immediately.  Avoids
failures in the CTS when nothing gets written to the query.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2019-11-27 10:05:59 -08:00
Jonathan Marek 01cae57c80 freedreno: add Adreno 640 ID
A640 seems to work without any other changes (glmark and vkcube).

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-11-11 20:46:01 -05:00
Bas Nieuwenhuizen 72f858fc07 turnip: Remove _mesa_locale_init/fini calls.
The resulting locale is not used for Vulkan, and it is not reference
counted, giving issues when multiple instances are created.

CC: 19.2 19.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2019-10-31 09:47:56 +00:00
Jonathan Marek f1efc9a1c8 turnip: basic msaa working
Not perfect but gets through some tests.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-15 07:56:20 -04:00
Jonathan Marek 8626d33986 turnip: add anisotropy and compressed formats to device features
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-15 07:56:19 -04:00
Jonathan Marek ffbffe19f9 turnip: improve sampler descriptor
Fixes anisotropy and shadow texture

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-15 07:56:19 -04:00
Jonathan Marek eef195c9cc turnip: fix segmentation fault in events
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-15 07:56:19 -04:00
Jonathan Marek 5f2fb904a1 turnip: implement sampler state
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Acked-by: Eric Anholt <eric@anholt.net>
2019-09-26 17:18:13 -04:00
Bas Nieuwenhuizen 7999e10cab tu: Set up glsl types.
Addresses this assert:

deqp-vk: ../mesa-freedreno-9999/src/compiler/glsl_types.cpp:1244: static const glsl_type *glsl_type::get_interface_instance(const glsl_struct_field *, unsigned int, enum glsl_interface_packing, bool, const char *): Assertion `glsl_type_users > 0' failed.

running dEQP-VK.api.smoke.triangle .

Fixes: 624789e370 "compiler/glsl: handle case where we have multiple users for types"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-09-18 16:51:18 +02:00
Vinson Lee d4e70be739 freedreno: Fix GCC build error.
../src/freedreno/vulkan/tu_device.c:900:4: error: initializer element is not constant
    .minImageTransferGranularity = (VkExtent3D) { 1, 1, 1 },
    ^

Suggested-by: Kristian Høgsberg <krh@bitplanet.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110698
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Rob Clark <robdclark@gmail.com>
2019-06-03 16:46:54 -07:00
Eric Anholt 18d11cb4dc freedreno: Move msm_drm.h to the same spot as other DRM uapi.
The new location matches other drivers, and has a README about the rules
for updating it.

Reviewed-by: Rob Clark <robdclark@gmail.com>
2019-05-14 11:51:55 -07:00
Eric Engestrom 0cff98c8a0 turnip: update to use the new features struct names
These were updated in version 1.1.106 of vulkan.h to make more sense
with the extension names.  We may as well keep with the times.

See also: 90108deb27 "anv: Update to use the new features struct names"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
2019-04-30 16:55:38 +01:00
Emil Velikov 1a9367c134 turnip: drop dead close(master_fd)
The fd is -1, thus the block of if (fd != -1) close(fd) is dead code.

Cc: Chad Versace <chadversary@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2019-04-26 11:26:33 +01:00
Chia-I Wu 24af64baa5 turnip: preliminary support for Wayland WSI 2019-03-11 10:02:13 -07:00
Chad Versace 6cb5fd0d71 turnip: Use Vulkan 1.1 names instead of KHR
That is, drop KHR from all tokens that were promoted to Vulkan 1.1.
The consistency makes ctags more useful (it now jumps directly to the
real definitions in vulkan_core.h instead of the typedefs); and it makes
the code slightly less verbose.
2019-03-11 10:02:13 -07:00
Chia-I Wu 970a8fec96 turnip: preliminary support for shader modules
Save SPIR-V in tu_shader_module.  Tranlation to NIR happens in
tu_shader_create, and compilation to binary code happens in
tu_shader_compile.  Both will be called during pipeline creation.
2019-03-11 10:02:13 -07:00
Chia-I Wu b8a5e10d0d turnip: mark IBs for dumping
Includes IBs in kernel cmdbuf dumps.
2019-03-11 10:02:13 -07:00
Bas Nieuwenhuizen 7238471587 turnip: Add buffer memory binding. 2019-03-11 10:02:13 -07:00
Chia-I Wu 68c27ea92b turnip: preliminary support for fences
This should be quite complete feature-wise.  External fences are
still missing.  We probably also want to add a simpler path to
tu_WaitForFences for when fenceCount == 1.
2019-03-11 10:02:13 -07:00
Chia-I Wu 6545461041 turnip: add support for VK_KHR_external_memory_{fd,dma_buf} 2019-03-11 10:02:13 -07:00
Chia-I Wu de89436216 turnip: add functions to import/export prime fd
Add tu_bo_init_dmabuf, tu_bo_export_dmabuf, tu_gem_import_dmabuf,
and tu_gem_export_dmabuf.
2019-03-11 10:02:13 -07:00
Chia-I Wu 7c4483de0e turnip: preliminary support for tu_GetRenderAreaGranularity
Set it to tile alignments, 32x32 on 6xx.
2019-03-11 10:02:13 -07:00
Chia-I Wu 992ecdd40e turnip: preliminary support for tu_BindImageMemory2 2019-03-11 10:01:41 -07:00
Chia-I Wu ef49b07b83 turnip: add cmdbuf->bo_list to bo_list in queue submit 2019-03-11 10:01:41 -07:00
Chia-I Wu 7ad01913bd turnip: build drm_msm_gem_submit_bo array directly
Build drm_msm_gem_submit_bo array directly in tu_bo_list.  We might
change this again, but this is good enough for now.

There are other issues as well, such as not using
VkAllocationCallbacks and sloppy error checking.  We should revisit
this in the near future.  Same to tu_cs.
2019-03-11 10:01:41 -07:00
Chia-I Wu 45120127ea turnip: run sed and clang-format on tu_cs 2019-03-11 10:01:41 -07:00
Kristian H. Kristensen 0801019d33 turnip: Only get bo offset when we need to mmap
The offset we get from MSM_INFO_GET_OFFSET is an offset into the drm fd
for the purpose of mmaping the buffer.
2019-03-11 10:01:41 -07:00
Chia-I Wu 2e684cb800 turnip: preliminary support for tu_QueueWaitIdle
This creates a new fd on each queue submit.  I do not go with
DRM_IOCTL_MSM_WAIT_FENCE solely because the path is marked legacy.
Otherwise, we can use the  fence id rather than requesting a fence
fd until external fences are supported and enabled.
2019-03-11 10:01:41 -07:00
Chia-I Wu 3809e6cf63 turnip: add wrappers around DRM_MSM_SUBMITQUEUE_*
Add tu_drm_submitqueue_new and tu_drm_submitqueue_close.
2019-03-11 10:01:41 -07:00
Chia-I Wu fcf24f47aa turnip: add wrappers around DRM_MSM_GET_PARAM
Add tu_drm_get_gpu_id and tu_drm_get_gmem_size.
2019-03-11 10:01:41 -07:00
Chia-I Wu a25a803127 turnip: remove unnecessary libfreedreno_drm dep
Remove libfreedreno_drm dep and unused fd_device.
2019-03-11 10:01:41 -07:00
Chia-I Wu 91232c52fe turnip: use msm_drm.h from inc_freedreno
The recent change to msm_drm.h changed the APIs in an incompatible
way.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen 4f32869e3d turnip: Shorten primary_cmd_stream name.
It really is too long.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen abe352525d turnip: Implement submission. 2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen 65e0e79054 turnip: Add msm queue support. 2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen 48b65201a6 turnip: Implement some UUIDs. 2019-03-11 10:01:41 -07:00
Chia-I Wu d30baaaba6 turnip: add .clang-format
Add and apply .clang-format.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen 6401ad389e turnip: Implement pipe-less param query. 2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen 3d99dd55a0 turnip: Stop hardcoding the msm version check. 2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen 603354cffa turnip: Fix memory mapping. 2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen 426f6e46a8 turnip: Fix bo allocation after we stopped using libdrm_freedreno ...
Al this figuring out new errors is why I don't like reinventing the
wheel.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen f0a24e123f turnip: Add 630 to the list. 2019-03-11 10:01:41 -07:00
Chad Versace bf709dfe3f turnip: Fix 'unused' warnings
Now turnip builds without warnings on my machine.
2019-03-11 10:01:41 -07:00
Chad Versace 359e9016c5 turnip: Replace fd_bo with tu_bo
(olv, after rebase) remove inc_drm_uapi
2019-03-11 10:01:33 -07:00
Chad Versace eb16ec715f turnip: Use vk_errorf() for initialization error messages
This small cleanup better prepares turnip for VK_EXT_debug_report.
2019-03-11 10:01:33 -07:00
Chad Versace cca208a033 turnip: Require DRM device version >= 1.3
Because the driver will require support for iova.
2019-03-11 10:01:33 -07:00
Chad Versace 5486943ed9 turnip: Fix indentation 2019-03-11 10:01:33 -07:00
Chad Versace 99a5de14cb turnip: Fix a real -Wmaybe-uninitialized 2019-03-11 10:01:33 -07:00
Chad Versace 75f2c8458b turnip: Use vk_outarray in all relevant public functions 2019-03-11 10:01:33 -07:00
Chad Versace 3ec87d56bd turnip: Fix result of vkEnumerate*ExtensionProperties
Given an unsupported layer name, the functions must return
VK_ERROR_LAYER_NOT_PRESENT.
2019-03-11 10:01:33 -07:00