Samuel Pitoiset
53b2b30d0b
radv: remove radv_graphics_pipeline::next_vertex_stage
...
Use the active stages bitfield instead.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22192 >
2023-03-30 11:21:18 +00:00
Samuel Pitoiset
f224e9f1a5
radv: remove radv_graphics_pipeline::last_vertex_attrib_bit
...
Use the VS shader info instead.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22192 >
2023-03-30 11:21:18 +00:00
Samuel Pitoiset
99bca4cb50
radv: remove radv_graphics_pipeline::use_per_attribute_vb_descs
...
Use the VS shader info instead.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22192 >
2023-03-30 11:21:18 +00:00
Timur Kristóf
a677fc5999
radv: Clean up emitting zero mesh shader draw id.
...
When task shaders are also used,
the draw id is undefined in mesh shaders.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22139 >
2023-03-29 15:08:55 +00:00
Timur Kristóf
8a426be553
radv: Remove first_task and ib_addr/ib_stride.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22139 >
2023-03-29 15:08:55 +00:00
Timur Kristóf
945384b504
radv: Remove NV_mesh_shader API entrypoints.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22139 >
2023-03-29 15:08:55 +00:00
Samuel Pitoiset
a19fd0f634
radv: replace pipeline->force_vrs_per_vertex during cmdbuf recording
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
09f81e024c
radv: replace pipeline->is_ngg occurrences during cmdbuf recording
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
0e81ec98ce
radv: move user_data_0 to the shader info pass
...
Using the next stage is enough to determine the base reg.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
d109362a3d
radv: copy bound shaders to the cmdbuf state
...
To stop relying on the pipeline everywhere.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
16bd3664da
radv: move dirtying flags for mesh shading to radv_bind_pre_rast_shader()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
0fbe0c4d1b
radv: stop using last_vgt_api_stage_{locs} during cmdbuf recording
...
Use the last VGT shader instead.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
2dfe49a948
radv: determine the last VGT shader at pipeline bind time
...
And replace streamout_shader by last_vgt_shader which is similar.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
19c329f4f9
radv: keep track of active stages as part of the cmdbuf state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
6caa180dc7
radv: add an assertion about shader stage to radv_bind_pre_rast_shader()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
1f878334c0
radv: add radv_bind_shader() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
59a2a4f87f
radv: pass a shaders array to radv_get_shader()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
52fa8e1f61
radv: pass shader/base_reg to radv_emit_view_index_per_stage
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22128 >
2023-03-29 10:18:24 +00:00
Samuel Pitoiset
5bf6f6fed1
radv/rt: bind the pipeline stack when it's not dynamic
...
This overwrites the rt_stack_size cmdbuf state when a new rt pipeline
with a static stack size is bound.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22126 >
2023-03-28 06:56:14 +00:00
Samuel Pitoiset
e61d68ac8a
radv: move {esgs,gsvs}_ring_size to radv_legacy_gs_info
...
To update the ring info when a geometry shader is bound.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22134 >
2023-03-27 18:54:50 +00:00
Samuel Pitoiset
c1c8aa49c8
radv: rename gfx9_gs_info to radv_legacy_gs_info
...
This was misleading because it's also needed on GFX6-8.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22134 >
2023-03-27 18:54:50 +00:00
Samuel Pitoiset
cb9f94f84c
radv: stop checking dynamic states when emitting the guardband state
...
If the primitive topology is part of the PSO, it's copied at pipeline
bind time to the dynamic state, so this checks is unnecessary.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22105 >
2023-03-27 17:29:03 +00:00
Samuel Pitoiset
66fec16238
radv: add DI_PT_RECTLIST to si_conv_prim_to_gs_out()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22105 >
2023-03-27 17:29:02 +00:00
Samuel Pitoiset
8f6998ad8a
radv: separate the sample shading state between FS and graphics pipeline
...
Sample shading can be enabled inside the fragment shader and also
per-pipeline. Separate both cases to be able to enable sample shading
by only binding a FS.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22110 >
2023-03-27 09:29:12 +00:00
Samuel Pitoiset
774e055823
radv: move uses_user_sample_locations to radv_multisample_state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22110 >
2023-03-27 09:29:11 +00:00
Samuel Pitoiset
609edd6e96
radv: copy the multisample state to radv_cmd_state
...
To avoid relying on the pipeline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22110 >
2023-03-27 09:29:11 +00:00
Samuel Pitoiset
4dc40c3b64
radv: move radv_meta_* to a new folder
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22046 >
2023-03-27 06:27:49 +00:00
Samuel Pitoiset
879ddf9720
radv: rework binding shaders to cmdbuf by introducing new helpers
...
For future work.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22101 >
2023-03-24 16:21:49 +00:00
Samuel Pitoiset
af1bc7f4ce
radv: remove radv_pipeline::device completely
...
This is unecessary and this prevents using a ton of functions without
a radv_pipeline object.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22090 >
2023-03-24 13:48:40 +00:00
Samuel Pitoiset
d9e68f4e40
radv: pass a radv_shader to radv_emit_dispatch_packets()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22102 >
2023-03-24 12:43:51 +00:00
Samuel Pitoiset
d07c81d87e
radv: move cs_regalloc_hang_bug to radv_shader_info
...
This is more like a shader property.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22102 >
2023-03-24 12:43:51 +00:00
Timur Kristóf
36edbebe8b
radv: Adjust mesh draw packets for GFX11.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21409 >
2023-03-23 11:49:35 +00:00
Timur Kristóf
7cc9a72913
radv: Use new mesh shading packet defines.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21409 >
2023-03-23 11:49:35 +00:00
Samuel Pitoiset
0514c015e6
radv: use a separate compute path in radv_flush_constants()
...
radv_get_shader() will be a radv_graphics_pipeline only function.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21878 >
2023-03-21 20:36:12 +00:00
Samuel Pitoiset
e7bbd610b8
radv: pass shader/base_reg to radv_emit_userdata_address()
...
Preliminary work for moving the shaders array outside of radv_pipeline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21878 >
2023-03-21 20:36:12 +00:00
Samuel Pitoiset
1e3cac8d5e
radv: pass shader/base_reg to radv_emit_inline_push_consts()
...
Preliminary work for moving the shaders array outside of radv_pipeline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21878 >
2023-03-21 20:36:12 +00:00
Samuel Pitoiset
c2e71729af
radv: pass shader/base_reg to radv_emit_descriptor_pointers()
...
Preliminary work for moving the shaders array outside of radv_pipeline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21878 >
2023-03-21 20:36:12 +00:00
Samuel Pitoiset
d7c5b6fb94
radv: replace radv_lookup_user_sgpr() by radv_get_user_sgpr()
...
radv_get_user_sgpr() no longer relies on radv_pipeline which is
another step for moving the shaders array outside of it.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21878 >
2023-03-21 20:36:12 +00:00
Samuel Pitoiset
4066e3a951
radv: stop using radv_get_shader_shader() for task shaders
...
radv_get_shader() should only be used for VS or TES, no need to add
another indirection for task shaders. While we are at it, rename
compute_shader to task_shader.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21878 >
2023-03-21 20:36:12 +00:00
Samuel Pitoiset
83c20b95dd
radv: allow to return the PS epilog binary to the pipeline
...
To add it to the shaders cache.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21897 >
2023-03-21 13:53:59 +00:00
Samuel Pitoiset
8e84251cc7
radv: implement fullyCoveredFragmentShaderInputVariable
...
1 means INNER_COVERAGE.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21497 >
2023-03-21 08:44:09 +00:00
Benjamin Cheng
e57caf9893
radv: initialize cmd_buffer upload list earlier
...
When cs allocation fails in radv_create_cmd_buffer,
radv_destroy_cmd_buffer is called before returning
VK_ERROR_OUT_OF_HOST_MEMORY. At that point, the upload list is not
initalized yet, so SIGSEGV will occur when trying to iterate through the
upload bo list. Initialize the upload list earlier to avoid this.
Signed-off-by: Benjamin Cheng <ben@bcheng.me>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22016 >
2023-03-21 08:06:24 +00:00
Samuel Pitoiset
d750ad19fd
radv: fix NGG streamout with VS and GPL on GFX11
...
With GPL it's not possible to know the primitive topology when
compiling the pre-rasterization stages. For NGG, we use the maximum
number of vertices per prim and rely on the hardware to ignore the
extra bits for points/lines.
Though, this can't work for NGG streamout because the number of
vertices per prim is used to compute a streamout offset. The only
way to solve this is to pass the number of vertices per prim through
a new user SGPR.
This fixes a bunch of streamout tests with Zink/RADV on GFX11.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21833 >
2023-03-20 17:47:03 +00:00
Tatsuyuki Ishi
0cde42a506
radv: Wait for shader uploads asynchronously.
...
This introduces tracking of the required semaphore values in pipelines,
which is then propagated to cmd_buffers on bind. Each queue also keeps
track the maximum count it has waited for, so that we can avoid the waiting
overhead once all the shaders are loaded and referenced.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16271 >
2023-03-16 18:02:57 +00:00
Friedrich Vock
0569b350ed
radv: Emit RT shader VA user SGPR
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21780 >
2023-03-16 01:40:30 +00:00
Dave Airlie
040dc89b95
radv/trace: don't attempt to emit trace on non-graphics/compute queues
...
This will just break on video queues
Fixes: 9477f117f4 ("radv/video: add initial frameworking.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21671 >
2023-03-15 05:08:49 +00:00
Samuel Pitoiset
c186420b26
radv: add support for VRS attachment on GFX11
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333 >
2023-03-08 10:30:48 +00:00
Samuel Pitoiset
c356f1b4ed
radv: fix draw calls with 0-sized index buffers and robustness on NAVI10
...
The correct workaround is to bind an internal index buffer to handle
robustness2 correctly.
Fixes dEQP-VK.robustness.index_access.* in CTS 1.3.5.0 on NAVI10.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21471 >
2023-02-28 14:12:29 +00:00
Samuel Pitoiset
7c62f6fa01
radv: fix flushing non-coherent images in EndCommandBuffer()
...
The condition was inverted.
This doesn't fix anything known.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21549 >
2023-02-28 09:35:07 +00:00
Samuel Pitoiset
6750a9094f
radv: fix flushing non-coherent images inside secondaries on GFX9+
...
Fixes
dEQP-VK.draw.dynamic_rendering.complete_secondary_cmd_buff.multi_draw.mosaic.*
on VEGA10 (related to the use of HTILE).
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21549 >
2023-02-28 09:35:07 +00:00