Yiwei Zhang
2ed4f04869
venus: use in_render_pass to skip present_src counting
...
It's an early return also benefiting dynamic rendering. We then no
longer need to track the legacy pass from inheritance info.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24103 >
2023-07-22 01:49:43 +00:00
Yiwei Zhang
e47da97be6
venus: refactor more cmd states into cmd builder
...
This change:
- adds helpers for cmd begin/end rendering
- simplifies cmd reset
- updates ordering to align with cmd builder
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24103 >
2023-07-22 01:49:43 +00:00
Yiwei Zhang
10c791619c
venus: avoid redundant tracking of render pass
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24103 >
2023-07-22 01:49:43 +00:00
Yiwei Zhang
540242f9ff
venus: add helpers to track subpass view mask
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24103 >
2023-07-22 01:49:43 +00:00
Yiwei Zhang
311a0eeb21
venus: cleanup vn_cmd_begin_render_pass usage
...
For secondary command buffers, vn_cmd_begin_render_pass was only used to
track inherited render pass previously. So we clean it up.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24103 >
2023-07-22 01:49:43 +00:00
Yiwei Zhang
81b69f8e8b
venus: use tracked queue_family_index from the cmd pool
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24103 >
2023-07-22 01:49:43 +00:00
Yiwei Zhang
72728f83ed
venus: remove redundant fb tracking from cmd builder
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24103 >
2023-07-22 01:49:43 +00:00
Yiwei Zhang
f0b5a6335d
venus: move transient storage from cmd to pool
...
The storage is for command scope usage, so it fits better for the pool.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24103 >
2023-07-22 01:49:43 +00:00
Yiwei Zhang
566df7821b
venus: log and doc the broken query feedback in suspended render pass
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24103 >
2023-07-22 01:49:43 +00:00
Yiwei Zhang
d13bf8f6b1
venus: fix cmd state leak across implicit reset
...
Reset cmd states during vkBeginCommandBuffer regardless of the
VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT for simplicity.
Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24103 >
2023-07-22 01:49:42 +00:00
Yiwei Zhang
a9f058d614
venus: fix a cmd builder render_pass state leak across reset
...
Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24103 >
2023-07-22 01:49:42 +00:00
Yiwei Zhang
fd9a0ecc86
ci/venus: update venus-lavapipe expectations
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24263 >
2023-07-21 17:11:26 +00:00
Boyuan Zhang
7eff5cdbac
virgl: Add vp9 picture desc
...
Define vp9 picture and slice parameters.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com >
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn >
Signed-off-by: Huang Rui <ray.huang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22108 >
2023-07-19 07:06:38 +00:00
Honglei Huang
9cbb7cb13b
virgl/video: Add more pipe type in virgl formats convert table
...
Add Y8_400_UNORM, YUYV, Y8_U8_V8_444_UNORM,
R8G8_R8B8_UNORM into virgl_formats_conv_table to fix
the resource create fail issue.
Signed-off-by: Honglei Huang <honglei1.huang@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com >
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com >
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn >
Signed-off-by: Huang Rui <ray.huang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22108 >
2023-07-19 07:06:38 +00:00
Honglei Huang
e1b8e4d7fc
virgl/video: Add support for jpeg decoding
...
Implement for virgl jpeg decoding.
Signed-off-by: Honglei Huang <honghuan@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com >
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com >
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn >
Signed-off-by: Huang Rui <ray.huang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22108 >
2023-07-19 07:06:38 +00:00
Honglei Huang
dad4b79ee0
virgl/video: Add support for vc1 decoding
...
Implement for virgl vc1 decoding.
Signed-off-by: Honglei Huang <honglei1.huang@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com >
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com >
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn >
Signed-off-by: Huang Rui <ray.huang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22108 >
2023-07-19 07:06:37 +00:00
Honglei Huang
deafeab1ee
virgl/video: Add support for mpeg12 decoding
...
Implement for mpeg12 virgl video decoding.
Signed-off-by: Honglei Huang <honglei1.huang@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com >
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com >
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn >
Signed-off-by: Huang Rui <ray.huang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22108 >
2023-07-19 07:06:37 +00:00
Eric Engestrom
c99f10eb54
ci: move virtio files rules to src/virtio/ci/gitlab-ci.yml
...
Signed-off-by: Eric Engestrom <eric@igalia.com >
Acked-by: David Heidelberg <david.heidelberg@collabora.com >
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24099 >
2023-07-18 23:07:52 +00:00
Yiwei Zhang
0e9affd267
venus: reduce to use 4K mem suballoc align on platforms known to fit
...
This is a workaround for low ram arm devices before fixing:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/9351
Test: patch to prior higher limit 16384 and run
dEQP-VK.api.object_management.max_concurrent.query_pool
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24219 >
2023-07-18 19:38:34 +00:00
Yiwei Zhang
a151d26513
venus: refactor query feedback cmd record
...
Now copy and reset are similar enough to unify.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24130 >
2023-07-12 22:32:45 +00:00
Yiwei Zhang
ed79b30639
venus: add a missing barrier before copying query feedback
...
The 1st sync scope of vkCmdCopyQueryPoolResults is not sufficient to
cover transfer writes against query feedback buffer. We must ensure
ordering against prior query reset cmd where the feedback buffer fill
gets injected.
Fixes: de4593faa1 ("venus: add query pool feedback cmds")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24130 >
2023-07-12 22:32:45 +00:00
Yiwei Zhang
7b44880e3e
venus: ensure consistency of query overflow behavior
...
Fixes: e6cffa1f0e ("venus: use feedback for vkGetQueryPoolResults")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24123 >
2023-07-12 21:18:06 +00:00
Yiwei Zhang
c55d43df04
venus: handle query feedback creation failure
...
Fixes: e6cffa1f0e ("venus: use feedback for vkGetQueryPoolResults")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24123 >
2023-07-12 21:18:06 +00:00
Yiwei Zhang
75fd29036f
venus: recheck valid bit after acquiring lock to init ahb mem type bits
...
Fixes: 432ffaf10a ("venus: refactor ahb buffer mem type bits cache to be lazy")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24033 >
2023-07-07 00:03:35 +00:00
Yiwei Zhang
26d83ae255
venus: refactor query batch handling
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24009 >
2023-07-06 22:36:48 +00:00
Yiwei Zhang
c3ad8c2f94
venus: cache query batches at cmd pool
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24009 >
2023-07-06 22:36:48 +00:00
Yiwei Zhang
a74b606142
venus: refactor vn_cmd_add_query_feedback and miscs
...
There's no functional changes:
1. remove unused function arg and use snake case
2. do early return for direct recording (avoid dup feedback checks)
3. use vk_alloc instead of vk_zalloc if applicable
4. move local struct closer to usage, and use assignment
5. convert secondary cmd in_render_pass condition check to assert
6. avoid redundant list_del upon freeing up
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24009 >
2023-07-06 22:36:48 +00:00
Yiwei Zhang
5889995fbd
venus: cmd to reuse alloc copy from cmd pool
...
Directly use the alloc callback upon pool reset/destroy since the compat
is blessed by the spec.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24009 >
2023-07-06 22:36:48 +00:00
Yiwei Zhang
81aa680b3c
venus: track pool in cmd and track device in pool
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24009 >
2023-07-06 22:36:48 +00:00
Yiwei Zhang
fe4cf26687
venus: fix leaks from tracked present src images
...
The cmd can be reset and freed during render pass recording as well.
Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24009 >
2023-07-06 22:36:48 +00:00
Yiwei Zhang
ee3f17ca79
venus: fix a cmd tmp storage leak
...
When the pool is destroyed, cmds are implicitly freed. Cmd level allocs
have to be cleaned up to avoid leak.
Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24009 >
2023-07-06 22:36:47 +00:00
Yiwei Zhang
87b99bf470
venus: extend VkBuffer cache to cover concurrent sharing
...
vkd3d-proton always use concurrent sharing when there exists multiple
queue families, and all queue families are used. This change adds the
exact simple case to the existing cache.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23916 >
2023-07-06 21:29:32 +00:00
Yiwei Zhang
1e17234260
venus: refactor buffer cache related bits
...
Simplify returns and reorder inits.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23916 >
2023-07-06 21:29:32 +00:00
Yiwei Zhang
432ffaf10a
venus: refactor ahb buffer mem type bits cache to be lazy
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23916 >
2023-07-06 21:29:31 +00:00
Juston Li
e6cffa1f0e
venus: use feedback for vkGetQueryPoolResults
...
Create a feedback buffer for each query pool and retrieve the query
results from the buffer instead of a roundtrip call in
vkGetQueryPoolResults.
VK_QUERY_RESULT_WAIT_BIT queries will poll until the queries are
available in the feedback buffer.
Query results in the feedback buffer are always VK_QUERY_RESULT_64_BIT
and if needed converted to what the app requests at
vkGetQueryPoolResults time.
Signed-off-by: Juston Li <justonli@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23348 >
2023-06-30 18:50:52 +00:00
Juston Li
38b1c39b59
venus: batch query feedback and defer until after render pass
...
vkCmdCopyQueryPoolResults cannot be called within a render pass so batch
and defer the query feedback copies until after the render pass.
Secondary command buffers inside render passes also have their query
feedback copies batched when recorded. When the secondary command buffer
is recorded via vkCmdExecuteCommands, it's batch is merged into the
primary command buffer's batch and is defered until the render pass ends.
If multiview is enabled, vkCmdCopyQueryPoolResults needs to copy
additional queries matching the number of bits set in viewMask.
Signed-off-by: Juston Li <justonli@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23348 >
2023-06-30 18:50:52 +00:00
Juston Li
e96428d588
venus: track render pass
...
vkCmdCopyQueryPoolResults cannot be called within a render pass/or
while the render pass is suspended so track when commands are inside
a render pass. Also track whether a secondary command buffer is
considered to be entirely inside a render pass.
Signed-off-by: Juston Li <justonli@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23348 >
2023-06-30 18:50:52 +00:00
Juston Li
fb537262c2
venus: track viewMask
...
Per spec 1.3.255: "If queries are used while executing a render pass
instance that has multiview enabled, the query uses N consecutive query
indices in the query pool (starting at query) where N is the number of
bits set in the view mask in the subpass the query is used in."
track viewMask so query feedback can copy the correct amount of queries
when multiview is enabled.
viewMask is passed in for vkCmdBeginRendering but for legacy
vkCmdBeginRenderPass/2 they are set by vkCreateRenderPass for each
subpass.
Signed-off-by: Juston Li <justonli@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23348 >
2023-06-30 18:50:52 +00:00
Juston Li
de4593faa1
venus: add query pool feedback cmds
...
Add feedback commands to write query results into a coherent buffer to
optimize out roundtrip vkGetQueryPoolResults that poll until a result
is available.
Queries are available after vkCmdEndQuery or vkCmdWriteTimeStamp, so
append a vkCmdCopyQueryPoolResults to copy to query results to our
coherent buffer.
The coherent buffer also needs to be cleared after vkCmdResetQueryPool
so append vkCmdFillBuffer.
Signed-off-by: Juston Li <justonli@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23348 >
2023-06-30 18:50:52 +00:00
Juston Li
5d88a3db8b
venus: expose vn_feedback_buffer_create()
...
For query pool feedback, which are variable in size depending on the
query type and being contiguous will allow for simpler copies/clears.
Signed-off-by: Juston Li <justonli@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23348 >
2023-06-30 18:50:52 +00:00
Juston Li
a26a51d1d4
venus: factor out flush barrier cmd
...
generic device->host flush that will be re-used by query feedback
Signed-off-by: Juston Li <justonli@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23348 >
2023-06-30 18:50:52 +00:00
Konstantin Seurer
1eca25cacc
venus/ci: Update fails
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828 >
2023-06-30 12:56:35 +00:00
Lina Versace
98c8d7b7cf
venus: Fix detection of push descriptor set
...
- Fix null deref. VkPipelineLayoutCreateInfo::pSetLayouts is allowed to
contain VK_NULL_HANDLE.
- The loop 'break' was misplaced.
Fixes crash in
dEQP-VK.pipeline.pipeline_library.graphics_library.fast.0_00_11_11 after
VK_EXT_graphics_pipeline_library is enabled in a later patch.
Fixes: 91966f2eff ("venus: extend lifetime of push descriptor set layout")
Signed-off-by: Lina Versace <linyaa@google.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Dawn Han <dawnhan@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23810 >
2023-06-22 20:37:01 +00:00
Lina Versace
a2fc3213f8
venus: Advertise 1.3 in ICD file
...
It was still advertising 1.2.
Signed-off-by: Lina Versace <linyaa@google.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23808 >
2023-06-22 19:02:40 +00:00
Yiwei Zhang
2f729ff6aa
venus: suballocate feedback slot with feedback buffer alignment
...
Venus sync feedback design relies on concurrent host device resource
access. To avoid device flush overwriting host writes, we must
suballocate the slots with a minimum size of the buffer alignment.
Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23633 >
2023-06-22 18:34:44 +00:00
Juston Li
106e97a43a
venus: enable VK_EXT_color_write_enable
...
Signed-off-by: Juston Li <justonli@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23510 >
2023-06-08 21:08:13 +00:00
Juston Li
ca0b781132
venus: enable VK_EXT_shader_subgroup_ballot
...
Signed-off-by: Juston Li <justonli@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23510 >
2023-06-08 21:08:13 +00:00
Juston Li
5f2d38ac3c
venus: enable VK_EXT_fragment_shader_interlock
...
Signed-off-by: Juston Li <justonli@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23510 >
2023-06-08 21:08:13 +00:00
Juston Li
6e4c93886d
venus: enable VK_EXT_border_color_swizzle
...
Signed-off-by: Juston Li <justonli@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23510 >
2023-06-08 21:08:13 +00:00
Juston Li
e217b3093c
venus: enable VK_KHR_shader_clock
...
Signed-off-by: Juston Li <justonli@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23510 >
2023-06-08 21:08:13 +00:00