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
Dawn Han
7039467522
Increase enum type in vn_descriptor_set.
...
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
Igor Torrente
1ebfa00bc5
venus: Fix dEQP-VK.pipeline.timestamp.calibrated.host_domain_test failure
...
The current implementation is getting its clock value from the host
and this value is not guaranteed to be the same as the VM guest.
This commit implements the CLOCK_MONOTONIC[_RAW] natively.
Signed-off-by: Igor Torrente <igor.torrente@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18281 >
2022-09-02 00:54:24 +00:00
Renato Pereyra
f5a81bb1d0
venus: Increase vn_relax sleep time
...
After the recent Venus changes to fence feedback, the performance drop from
increasing this setting are now negligible while DX games still experience a
sizable decrease in CPU utilization.
Signed-off-by: Renato Pereyra <renatopereyra@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18357 >
2022-09-01 00:50:39 +00:00
Yiwei Zhang
2c84690349
venus/ci: mark a test as flake
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18355 >
2022-08-31 22:21:58 +00:00
Yiwei Zhang
0e0e5d1f20
venus: allow no external memory handle when renderers lacks support
...
This is to make vtest happy.
Fixes: 9c5a7ffbd8 ("venus: fix external memory ext filtering")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18331 >
2022-08-31 03:13:39 +00:00
Chad Versace
6d0c86c777
venus: Enable VK_EXT_tooling_info
...
Implement it locally with the common implementation.
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/18000 >
2022-08-30 08:09:55 +00:00
Chad Versace
2bf2a05312
venus: Enable VK_EXT_private_data
...
Implement it as hybrid native/passthrough as a workaround until venus
learns how to deep surgery on pNext chains. Eventually, we want to
implement it purely natively. For details, see the big code comment.
See: https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/908
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Signed-off-by: Chad Versace <chadversary@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000 >
2022-08-30 08:09:55 +00:00
Chad Versace
4d80ccbf2d
venus: Enable VK_KHR_format_feature_flags2
...
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/18000 >
2022-08-30 08:09:55 +00:00
Chad Versace
fc2d37882c
venus: Enable VK_EXT_ycbcr_2plane_444_formats
...
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/18000 >
2022-08-30 08:09:55 +00:00
Chad Versace
ea273dd8b9
venus: Enable VK_EXT_texel_buffer_alignment
...
The patch looks asymmetic because the extension was promoted to 1.3 but
not its feature struct.
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/18000 >
2022-08-30 08:09:55 +00:00
Chad Versace
246f29d0b1
venus: Enable VK_EXT_subgroup_size_control
...
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/18000 >
2022-08-30 08:09:55 +00:00
Chad Versace
c01f0bbbec
venus: Enable VK_KHR_zero_initialize_workgroup_memory
...
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/18000 >
2022-08-30 08:09:55 +00:00
Chad Versace
23a424f6e3
venus: Enable VK_KHR_shader_terminate_invocation
...
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/18000 >
2022-08-30 08:09:55 +00:00
Chad Versace
8fbc12feb2
venus: Enable VK_KHR_shader_non_semantic_info
...
This extension has no Vulkan API, only SPIR-V API.
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/18000 >
2022-08-30 08:09:55 +00:00
Chad Versace
1951eb2dad
venus: Enable VK_KHR_shader_integer_dot_product
...
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/18000 >
2022-08-30 08:09:55 +00:00
Chad Versace
1985afdde5
venus: Simplify vn_GetPhysicalDeviceProperties2
...
Reduce approximately 220 lines to 80.
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/18000 >
2022-08-30 08:09:55 +00:00
Chad Versace
7d1fb018f2
venus: Simplify vn_GetPhysicalDeviceFeatures2
...
Reduce approximately 300 lines to 60.
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/18000 >
2022-08-30 08:09:55 +00:00
Chad Versace
3ed2c58047
venus: Sort passthrough extensions
...
Only the Vulkan 1.3 extensions were unsorted.
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/18000 >
2022-08-30 08:09:55 +00:00
Gert Wollny
be012932d0
virgl: Fix ubsan warnings:
...
virgl_screen.c:313:55: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
virgl_screen.c:682:27: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
virgl_encode.c:481:7: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18231 >
2022-08-29 05:44:22 +00:00
Juston Li
c1871cfde4
venus: add support for VK_EXT_primitive_topology_list_restart
...
See:
virgl/virglrenderer!902
olv/venus-protocol!46
Test:
./deqp-vk -n dEQP-VK.pipeline.monolithic.input_assembly.primitive_restart.*
Test run totals:
Passed: 55/55 (100.0%)
Failed: 0/55 (0.0%)
Not supported: 0/55 (0.0%)
Warnings: 0/55 (0.0%)
Waived: 0/55 (0.0%)
Signed-off-by: Juston Li <justonli@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18283 >
2022-08-26 16:30:51 -07:00
Juston Li
46509e8060
venus: sync venus protocol headers for VK_EXT_primitive_topology_list_restart
...
Signed-off-by: Juston Li <justonli@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18283 >
2022-08-26 16:03:30 -07:00
Chia-I Wu
05baeef69c
venus: use MESA_TRACE_*
...
Acked-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18260 >
2022-08-26 21:47:44 +00:00
Yiwei Zhang
ce0e13155d
venus: avoid scrubing wsi/external sempahores
...
When the renderer supports sync_fd import for the binary semaphore,
venus can import the special signaled payload to the semaphore instead
of scrubing it. This avoids the bugs w.r.t timeline semaphore and device
group submission in the legacy scrub path.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975 >
2022-08-25 20:18:28 +00:00
Yiwei Zhang
7cf59d6982
venus: re-implement sync_fd external sempahore
...
sync_wait is deferred to a submission that waits on the semaphore.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975 >
2022-08-25 20:18:28 +00:00
Yiwei Zhang
4da0ac54cf
venus: re-implement sync_fd external fence
...
Instead of waiting for signal before importing, we are able to retain
the imported sync file and handle the fence related commands on the
driver side.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975 >
2022-08-25 20:18:28 +00:00
Yiwei Zhang
db9fa4be04
venus: query renderer sync_fd props to fill the feature stubs
...
This change enables the fixed code paths.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975 >
2022-08-25 20:18:28 +00:00
Yiwei Zhang
3518c31098
venus: fix vn_GetSemaphoreFdKHR
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975 >
2022-08-25 20:18:28 +00:00
Yiwei Zhang
adac798598
venus: fix vn_GetFenceFdKHR
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975 >
2022-08-25 20:18:28 +00:00
Yiwei Zhang
b21e4a7990
venus: put android wsi on the sub-optimal path
...
Simplify Android wsi to only use performant path if fixed sync_fd fence
support is enabled. This removes hacky codes and allows us to deprecate
a special ring wait code path as well.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975 >
2022-08-25 20:18:28 +00:00
Yiwei Zhang
64f9fbb9ea
venus: stub out renderer sync_fd fencing features
...
With syncFdFencing feature, venus starts forwarding renderer sync_fd
fencing support. The driver side now can track the renderer sync_fd
fencing features. This change adds the initial stubs.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975 >
2022-08-25 20:18:28 +00:00
Yiwei Zhang
1498b0877b
venus: sync to latest venus protocol headers for syncFdFencing
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975 >
2022-08-25 20:18:28 +00:00
Yiwei Zhang
88a5146d95
venus: avoid pre-allocating the feedback pool
...
Now that we don't create fence upon device creation, let's also defer
the feedback pool grow to the first event or non-external fence
creation. This makes venus device creation lighter and is good for CI.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975 >
2022-08-25 20:18:28 +00:00
Yiwei Zhang
81b44b4931
venus: lazily create queue wait fence and make it non-external
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975 >
2022-08-25 20:18:28 +00:00