Samuel Pitoiset
981f512037
radv: emit the PS epilog after the graphics pipeline
...
Otherwise, SPI_SHADER_PGM_RSRC1_PS is overwritten when the graphics
pipeline is emitted.
Fixes: 5c362cde33 ("radv: update PS num_vgprs in case of epilogs rather than overallocating VGPRs")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22310 >
2023-04-05 14:48:00 +00:00
Samuel Pitoiset
9085c9d43e
radv: fix VS prologs with GPL and static binding stride
...
When a graphics pipeline library is created with only the vertex input
state, the driver binds this state at pipeline bind time. Though the
vertex binding stride is not necessarily dynamic, in this case the
pipeline stride should be used.
This fixes GPU hangs with recent
dEQP-VK.pipeline.fast_linked_library.vertex_input.*.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22285 >
2023-04-05 07:18:37 +00:00
Daniel Schürmann
5c362cde33
radv: update PS num_vgprs in case of epilogs rather than overallocating VGPRs
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22267 >
2023-04-04 18:35:43 +00:00
Rhys Perry
f92994bb83
radv/gfx11: improve RT scratch allocation
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22232 >
2023-04-03 16:35:17 +00:00
Timur Kristóf
50e9a8f7c2
radv: Use linear_dispatch info in GFX11 task/mesh draw packet.
...
This helps the CP (command processor) optimize mesh shader
dispatch when Y = Z = 1.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22222 >
2023-04-03 15:36:02 +00:00
Samuel Pitoiset
e98aded527
radv: fix binding raytracing/compute pipelines
...
If a compute pipeline is bound after a raytracing pipeline, the
computes shader slot (aka RT prolog) will be overwritten.
To fix this, move the RT prolog outside of the compute shader slot.
Fixes: d109362a3d ("radv: copy bound shaders to the cmdbuf state")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22235 >
2023-03-31 18:29:05 +00:00
Samuel Pitoiset
56493a5f8a
radv: add the raygen shader BO to the cmdbuf list
...
Found by inspection.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22235 >
2023-03-31 18:29:05 +00:00
Timur Kristóf
61003e3600
radv: Use radv_get_shader to get vertex shader when binding pipeline.
...
The shaders[MESA_SHADER_VERTEX] can be NULL for merged shaders.
Fixes: b2ac40e734
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8749
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/22229 >
2023-03-31 16:42:39 +00:00
Samuel Pitoiset
f8558d1fb5
radv: configure PA_SC_MODE_CNTL_1 during cmdbuf recording
...
Two graphics pipeline parameters need to be copied to the cmdbuf
state.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22218 >
2023-03-31 16:07:11 +00:00
Samuel Pitoiset
66da73e863
radv: set PS_ITER_SAMPLE(1) for sample shading during cmdbuf recording
...
This shouldn't be configured in the pipeline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22218 >
2023-03-31 16:07:11 +00:00
Samuel Pitoiset
b750fe4c6a
radv: copy db_render_control to the cmdbuf state
...
This register is only used for meta operations.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22218 >
2023-03-31 16:07:11 +00:00
Samuel Pitoiset
56b98bb36d
radv: add dynamic support for rectangles enable/mode
...
This is in VK_EXT_discard_rectangles version 2.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21360 >
2023-03-31 07:59:18 +00:00
Samuel Pitoiset
552f877b2d
radv: fix sample shading when a new fragment shader is bound
...
Sample shading can be enabled from the pipeline and from the fragment
shader, in that case we need to re-emit some states.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22215 >
2023-03-31 07:09:15 +00:00
Samuel Pitoiset
373c6346f5
radv: add push constant state to the cmdbuf state
...
Push constants are handled per bind point internally. Using a separate
structure in the cmdbuf state would allow us to update it easily
without relying on bound pipelines.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22209 >
2023-03-30 20:41:23 +00:00
Samuel Pitoiset
a0baefa033
radv: copy need_indirect_descriptor_sets to radv_cmd_state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22209 >
2023-03-30 20:41:23 +00:00
Samuel Pitoiset
15f1d5cc8f
radv: copy ia_multi_vgt_param to the cmdbuf state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22194 >
2023-03-30 11:43:06 +00:00
Samuel Pitoiset
0daffade14
radv: copy uses_{drawid,baseinstance} to the cmdbuf state
...
As well as the vertex user sgpr info. This also needs to be copied
for merged shaders (ie. VS+TCS).
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22194 >
2023-03-30 11:43:06 +00:00
Samuel Pitoiset
8fd915098d
radv: copy rast_prim to the cmdbuf state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22194 >
2023-03-30 11:43:06 +00:00
Samuel Pitoiset
6ee8d33ef4
radv: add a helper that returns the current rasterized primitive
...
For tess/geom/mesh the rasterized primitive is part of the shader
info and primitive topology should be ignored.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22194 >
2023-03-30 11:43:06 +00:00
Samuel Pitoiset
b0a007583d
radv: copy custom blend mode to the cmdbuf state
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22194 >
2023-03-30 11:43:06 +00:00
Samuel Pitoiset
bc39fa9500
radv: rework emitting inner coverage when a fragment shader is bound
...
To stop relying on the pipeline. The state is now flagged when a new
fragment shader with a different inner coverage setting is bound.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22194 >
2023-03-30 11:43:06 +00:00
Samuel Pitoiset
5231643900
radv: remove radv_graphics_pipeline::vb_desc_alloc_size
...
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:19 +00:00
Samuel Pitoiset
b2ac40e734
radv: remove radv_graphics_pipeline::vb_desc_usage_mask
...
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:19 +00:00
Samuel Pitoiset
c7784f1409
radv: remove radv_graphics_pipeline::can_use_simple_input
...
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:19 +00:00
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