Illia Abernikhin
aa4ac5ff8b
utils: Merge util/debug.* into util/u_debug.* and remove util/debug.*
...
Rename env_var_as_unsigned() -> debug_get_num_option(), because duplicate
Rename env_var_as_bool() -> debug_get_bool_option(), because duplicate
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7177
Signed-off-by: Illia Abernikhin <illia.abernikhin@globallogic.com >
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19336 >
2022-11-02 07:25:39 +00:00
Yiwei Zhang
a408f5cafe
venus: add VK_EXT_depth_clip_control support
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19285 >
2022-10-27 00:22:30 +00:00
Yiwei Zhang
8f7b5bf34b
venus: add VK_EXT_primitives_generated_query support
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19285 >
2022-10-27 00:22:30 +00:00
Yiwei Zhang
4f22fb117d
venus: sync to latest venus protocol headers
...
This brings in:
- VK_KHR_push_descriptor
- VK_EXT_depth_clip_control
- VK_EXT_primitives_generated_query
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19285 >
2022-10-27 00:22:30 +00:00
Yiwei Zhang
4f2471e8c6
venus: handle VkAndroidHardwareBufferFormatProperties2ANDROID
...
Fixes: 4d80ccbf2d ("venus: Enable VK_KHR_format_feature_flags2")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19287 >
2022-10-27 00:08:00 +00:00
Yiwei Zhang
1c010da083
venus: remove redundant codes
...
This is some left over from prior 1.3 effort.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19287 >
2022-10-27 00:08:00 +00:00
Simon Fels
210f19b004
venus: drop duplicated YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT
...
The extensions is added twice which will cause the encoder to run into a
stack overflow in vn_encode_VkPhysicalDeviceFeatures2_pnext_partial when
supported by the host driver.
Signed-off-by: Simon Fels <simon.fels@canonical.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19208 >
2022-10-20 21:38:44 +00:00
Yonggang Luo
44ccaca41d
util/mesa/wide: Rename _SIMPLE_MTX_INITIALIZER_NP to SIMPLE_MTX_INITIALIZER
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18393 >
2022-10-14 03:27:41 +00:00
Yiwei Zhang
5fa7c53631
venus: avoid accessing local var in VN_ADD_EXT_TO_PNEXT_OF
...
This boring refactor:
- makes it consistent for extension name alias
- shortens the line a bit to not further regress line width
- applies macro when possible to be consistent
- removes some redundant empty lines
v2: rebase
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chad Versace <chadversary@chromium.org > (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18993 >
2022-10-13 05:35:26 +00:00
Chad Versace
f8f4648cac
venus: Enable Vulkan 1.3
...
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19046 >
2022-10-12 16:59:21 -07:00
Chad Versace
85a6a2461d
venus: Enable VK_KHR_synchronization2
...
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19046 >
2022-10-12 16:59:20 -07:00
Chad Versace
58eb3ac666
venus: Refactor vn_command_buffer_builder temp storage
...
Easy refactor. Change the storage type from `VkImageMemoryBarrier *` to
`void *`. Prepares for VK_KHR_synchronization2.
The patch series is cleaner with this refactor. I promise.
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19046 >
2022-10-12 16:59:20 -07:00
Chad Versace
7daedd2a30
venus: Add vn_queue_wait_idle_before_present()
...
Trivial refactor.
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19046 >
2022-10-12 16:59:20 -07:00
Chad Versace
cc1407df44
venus: Change signature of vn_get_fence_feedback_cmd
...
Trivial refactor.
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19046 >
2022-10-12 16:59:20 -07:00
Chad Versace
e469bedb95
venus/queue: Rename some local vars
...
Reduces noise in following patches.
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19046 >
2022-10-12 16:59:19 -07:00
Yiwei Zhang
1048eaffd5
venus: move vendor ext to bottom and sort the ext list
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18940 >
2022-10-03 19:31:23 +00:00
Dawn Han
23f5936ec6
venus: Update mutable descriptor struct type
...
Signed-off-by: Dawn Han <dawnhan@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18766 >
2022-10-01 00:50:15 +00:00
Dawn Han
0737ad8f86
venus: support the promoted VK_EXT_mutable_descriptor_type
...
Signed-off-by: Dawn Han <dawnhan@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18766 >
2022-10-01 00:50:15 +00:00
Corentin Noël
086b620793
virgl: Add TEXTURE_SHADOW_LOD capability support
...
Bind PIPE_CAP_TEXTURE_SHADOW_LOD with its value so that we are not using
non-existing GLSL on host side.
Rename VIRGL_CAP_FAKE_FP64 into VIRGL_CAP_HOST_IS_GLES
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18296 >
2022-09-29 15:06:29 +00:00
Chia-I Wu
ee2e01c0ef
venus: fix VkImageFormatListCreateInfo for AHB
...
In vn_physical_device_fix_image_format_info,
local_info->list.viewFormatCount is unintialized when has_format_list is
false. We need to check has_format_list first.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18792 >
2022-09-24 21:40:39 +00:00
Yiwei Zhang
373bc6f1d5
venus: ensure to clear VkPipelineCreationFeedback::flags if needed
...
Fixes: d0cb99e96a ("venus: Enable VK_EXT_pipeline_creation_feedback")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18741 >
2022-09-22 19:54:26 +00:00
Juston Li
fc1ff335d9
venus: use buffer cache for vkGetDeviceBufferMemoryRequirements
...
Align with vkGetBufferMemoryRequirements2 and utilize the cache for
retrieving memory requirements before trying the host call.
Fixes
dEQP-VK.api.invariance.memory_requirements_matching
dEQP-VK.memory.requirements.create_info.buffer.regular
Signed-off-by: Juston Li <justonli@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18603 >
2022-09-15 20:35:18 +00:00
Chad Versace
0ca7f923c5
venus: Use VkPhysicalDeviceVulkan13{Features,Properties}
...
Add the structs to vn_physical_device, just like we do for the 1.1 and
1.2 structs.
Prepares for Vulkan 1.3 enablement. No intended change in behavior.
Tested with gpu Intel Tigerlake on CrOS device volteer.
I tested only a small subset of dEQP because this branch only touches
the code for VkPhysicalDevice{Features2,Properties2}.
vulkan-cts-1.3.3.0
dEQP-VK.api.info.*
dEQP-VK.api.smoke.*
pass/skip/fail = 3796/9/0
I tested Dota 2 on borealis on volteer, with non-Proton Vulkan. The
game launches and reaches the main menu. Same with Hades with DX on
Proton 7.
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18158 >
2022-09-14 15:32:22 +00:00
Chad Versace
3a366f1055
venus: Fix features/properties for unavailable extensions
...
In vn_physical_device_init_features() and
vn_physical_device_init_properties(), we queried many extension structs
even if the extension was unavailable. Afterwards we copied the
undefined values from the extension structs into the core structs.
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18158 >
2022-09-14 15:32:22 +00:00
Chad Versace
ca687bc263
venus: Add macros VN_SET_CORE_*
...
Used to refactor vn_physical_device.c. The new code easier to read and
has less duplication.
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18158 >
2022-09-14 15:32:22 +00:00
Chad Versace
5932358447
venus: Refactor VN_ADD_TO_PNEXT
...
Motivation is easier sorting and readability.
- In VN_ADD_TO_PNEXT_OF, re-arrange params to allow sorting. Param1 is
invariant in each block. Param2 is sType.
- In VN_ADD_EXT_TO_PNEXT_OF, make its initial params match those of
VN_ADD_TO_PNEXT_OF.
- Then sort the macro calls.
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18158 >
2022-09-14 15:32:22 +00:00
Chad Versace
7c02730ed3
venus: Rename some feature/property structs
...
Make the variable name more closely match the type name.
This also allows them to sort correctly.
argb_4444_formats -> _4444_formats
eight_bit_storage -> _8bit_storage
sixteen_bit_storage -> _16bit_storage
While touching vn_physical_device.[ch], also run clang-format.
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18158 >
2022-09-14 15:32:22 +00:00
Yiwei Zhang
e9b995ecf4
venus: ignore pInheritanceInfo if not secondary command buffer
...
TEST: no segfault in dEQP-VK.api.command_buffers.bad_inheritance_info_random
Fixes: 6f5289df53 ("venus: refactor VkCommandBufferBeginInfo fixups to function")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18583 >
2022-09-13 23:19:54 +00:00
Juston Li
a6e6ffb703
venus: add support for VK_EXT_multi_draw
...
Test:
./deqp-vk -n dEQP-VK.draw.*multi_draw*
Test run totals:
Passed: 11520/11520 (100.0%)
Failed: 0/11520 (0.0%)
Not supported: 0/11520 (0.0%)
Warnings: 0/11520 (0.0%)
Waived: 0/11520 (0.0%)
Signed-off-by: Juston Li <justonli@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18304 >
2022-09-13 19:20:55 +00:00
Juston Li
99378c8873
venus: sync to latest venus protocol headers
...
- v1.3.227 update
- added VK_EXT_multi_draw
Signed-off-by: Juston Li <justonli@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18304 >
2022-09-13 19:20:55 +00:00
Yiwei Zhang
fb756d7949
venus: avoid fixing pipeline if not derivative
...
Fixes: 33e791bc02 ("venus/pipeline: Ignore basePipelineHandle")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chad Versace <chadversary@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18555 >
2022-09-12 22:10:45 +00:00
Yiwei Zhang
84a0056033
venus: zero out the pipeline handles
...
We only have to zero out the handles on failure, which is missed. For
pipelines, we can just do it at the beginning for simplicity.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chad Versace <chadversary@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18555 >
2022-09-12 22:10:45 +00:00
Yiwei Zhang
d8809b5edc
venus: vn_ResetDescriptorPool to reset mutable type states
...
Fixes: de5879447b ("Track bitset when create descriptor pool")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chad Versace <chadversary@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18555 >
2022-09-12 22:10:45 +00:00
Yiwei Zhang
a49f3069f4
venus: fix an oob in descriptor pool state restoration
...
Fixes: de5879447b ("Track bitset when create descriptor pool")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chad Versace <chadversary@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18555 >
2022-09-12 22:10:45 +00:00
Gert Wollny
95cea62a9b
virgl: Report CONSTANT_BUFFER_SIZE according to GL_MAX_UNIFORM_BLOCK_SIZE
...
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS may not report a size that
is useful to calculate the supported UBO size. Use the value
GL_MAX_UNIFORM_BLOCK_SIZE instead when the host supports this.
Related: https://gitlab.freedesktop.org/virgl/virglrenderer/-/issues/286
Fixes: 5b683ba19a
virgl: Only progagate the uniform numbers if the numbers are actually right
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18512 >
2022-09-10 15:23:57 +00:00
Yiwei Zhang
63703de443
venus: force synchronous submission for external signal semaphore
...
This is to ensure semaphore export under globalFencing represents the
correct submission.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18475 >
2022-09-08 21:46:40 +00:00
Yiwei Zhang
0a3647fb88
venus: clean up vn_QueueSubmit
...
and ensure all submissions are synchronous upon NO_ASYNC_QUEUE_SUBMIT
No other intended change in behavior.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18475 >
2022-09-08 21:46:40 +00:00
Chad Versace
d0cb99e96a
venus: Enable VK_EXT_pipeline_creation_feedback
...
Implement natively by always returning invalid feedback. This is a legal
(but useless) implementation according to the spec.
In the future, I want to return the real feedback values from the host,
but that requires changes to the venus protocol. The protocol does not
know that the VkPipelineCreationFeedback structs in the
VkGraphicsPipelineCreateInfo pNext are output parameters. Before
VK_EXT_pipeline_creation_feedback, the pNext chain was input-only.
Tested with `dEQP-VK.pipeline.*.creation_feedback.*`.
The tests in vulkan-cts-1.3.3.0 are buggy. I submitted a fix to dEQP
upstream; see below.
Results with the bug:
Passed: 0/30 ( 0.0%)
Failed: 12/30 (40.0%)
Not supported: 18/30 (60.0%)
Warnings: 0/30 ( 0.0%)
Results with bugfix:
Passed: 12/30 (40.0%)
Failed: 0/30 ( 0.0%)
Not supported: 18/30 (60.0%)
Warnings: 0/30 ( 0.0%)
See: https://gerrit.khronos.org/c/vk-gl-cts/+/10086
See: https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/909
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Signed-off-by: Chad Versace <chadversary@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18035 >
2022-09-08 19:13:51 +00:00
Gert Wollny
1d8627deed
virgl: Add some formats that the CTS uses
...
Otherwise running the CTS emits lots of warnings about
these formats missing in the drivers format table.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18462 >
2022-09-08 06:38:48 +00:00
Yiwei Zhang
4ae4e4362c
venus: double the abort timeout
...
To avoid bumping abort timeout too much. This change also doubles the
busy wait cycles, which would further reduce unnecessary sleeps for
synchronous calls. Ultimately, after we fix the fencing and push all
roundtrip waiting to the renderer side as well as we fixing the abort
logic, we can live with busy wait alone here.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18472 >
2022-09-07 18:48:07 +00:00
Tomeu Vizoso
0704926a9c
Revert "Revert "Revert "ci: set venus on lavapipe to manual due to flakes"""
...
Now the flakiness might have been fixed for good.
This reverts commit e51c5a18ad .
Acked-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18454 >
2022-09-07 09:18:49 +00:00
Yiwei Zhang
d399685da5
venus: enable KHR_driver_properties on Android
...
Venus has a driver id now and Android cts has been patched.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18447 >
2022-09-06 19:52:26 +00:00
Yiwei Zhang
61e899a181
venus: enable zink required extensions on Android
...
Below extensions are enabled:
- VK_KHR_external_memory_fd
- VK_EXT_external_memory_dma_buf
- VK_EXT_image_drm_format_modifier
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18447 >
2022-09-06 19:52:26 +00:00
Yiwei Zhang
ac95ecd044
venus: some clang format fixes
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18447 >
2022-09-06 19:52:26 +00:00
Erik Faye-Lund
e51c5a18ad
Revert "Revert "ci: set venus on lavapipe to manual due to flakes""
...
This reverts commit 55e99a22f3 .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18433 >
2022-09-06 13:47:39 +02:00
Tomeu Vizoso
55e99a22f3
Revert "ci: set venus on lavapipe to manual due to flakes"
...
Issue should be fixed now.
This reverts commit a03ce740bb .
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18414 >
2022-09-05 14:13:03 +02:00
David Heidelberg
a03ce740bb
ci: set venus on lavapipe to manual due to flakes
...
Flakes too often, see https://gitlab.freedesktop.org/mesa/mesa/-/issues/7093
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18405 >
2022-09-03 22:27:51 +02:00
Dawn Han
2a2766ce18
Enable .VALVE_mutable_descriptor_type in physical_device
...
Signed-off-by: Dawn Han <dawnhan@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17505 >
2022-09-02 21:15:43 +00:00
Dawn Han
de5879447b
Track bitset when create descriptor pool
...
Signed-off-by: Dawn Han <dawnhan@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17505 >
2022-09-02 21:15:43 +00:00
Dawn Han
d5f116feb5
Update bitset when init descriptor layout.
...
Signed-off-by: Dawn Han <dawnhan@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17505 >
2022-09-02 21:15:43 +00:00