Timur Kristóf
b688a6d227
nir: Remove IB address and stride intrinsics.
...
RADV used these to emulate firstTask for NV_mesh_shader.
They are no longer needed.
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
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
Timur Kristóf
faf8375fc3
radv: Don't expose NV_mesh_shader and don't use it in CI.
...
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
dd855c7772
radv: determine and store the next graphics stage to radv_shader_info
...
This will be useful in many cases.
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
84faaca38a
radv: stop using the pipeline for emitting shaders
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095 >
2023-03-29 02:20:50 +00:00
Samuel Pitoiset
8f9b0088ab
radv: pass the ES shader to radv_pipeline_emit_hw_ngg()
...
This allows to remove the radv_pipeline dependency.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095 >
2023-03-29 02:20:50 +00:00
Samuel Pitoiset
69da185793
radv: use the ES type to apply a workaround for NGG on GFX10
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095 >
2023-03-29 02:20:50 +00:00
Samuel Pitoiset
73ac2a22ec
radv: use the shader info stage to simplify emitting NGG shaders
...
Instead of relying on the pipeline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095 >
2023-03-29 02:20:50 +00:00
Samuel Pitoiset
09d713ee53
radv: stop using the pipeline for emitting PS inputs
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095 >
2023-03-29 02:20:50 +00:00
Samuel Pitoiset
168f282908
radv: add radv_get_last_vgt_shader() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095 >
2023-03-29 02:20:50 +00:00
Samuel Pitoiset
5c3c80be45
radv: emit the GS copy shader outside of radv_pipeline_emit_hw_gs()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095 >
2023-03-29 02:20:50 +00:00
Samuel Pitoiset
d071e36851
radv: stop using get_vs_output_info() when emitting VS/NGG shaders
...
It's always the current shader outinfo struct.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22095 >
2023-03-29 02:20:50 +00:00
Konstantin Seurer
b69ec8bde3
radv/rt: Refactor rq_load lowering
...
This just gets rid of all the bcsel emissions.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21455 >
2023-03-28 16:55:30 +00:00
Pierre-Eric Pelloux-Prayer
c1050b5330
radv: add RADV_DEBUG=extra_md
...
This enables the use of UMD metadata v2. This allows tools (eg umr)
import buffers.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21984 >
2023-03-28 15:17:28 +00:00
Pierre-Eric Pelloux-Prayer
7f94b80001
ac/surface: introduce umd metadata v2
...
Update the metadata format. For gfx8- chips nothing change.
For gfx9 chips:
* for textures without a valid modifier a dw is added at index=10
containing the stride
* for textures with a valid modifier the modifier is stored at
index 10 and 11. Then the number of planes is stored at 12.
Then for each plane the offset and the stride are stored.
The goal here is to be able to create textures from dmabuf from
umr - without these changes this is impossible because these
values can't be guessed.
The new layout is compatible with version=1 so old/new UMD can
be used together without issues and isn't used by default.
For radeonsi, it will be possible to use it with a AMD_DEBUG=...
option.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21984 >
2023-03-28 15:17:28 +00:00
Pierre-Eric Pelloux-Prayer
4abb911bd2
amd/surface: rename metadata functions
...
Use more specific verbs to avoid confusion:
set -> apply
get -> compute
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21984 >
2023-03-28 15:17:28 +00:00
Timur Kristóf
fd1e27a8f8
radv: Fix swizzled VS input loads when some components are unused.
...
Fix how out-of-bounds loads are decided.
It was incorrect because it mismatched the swizzle.
The decision is now made using the loaded num_components.
Fixes: 27c8131978
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8712
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22124 >
2023-03-28 08:37:28 +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
Bas Nieuwenhuizen
0f045d43d6
ac/surface,radv: Opt out of stencil adjust.
...
We never implemented it, and having broken mipmaps works out better
for applications and CTS. Actually implementing stencil adjust is
going to be a major pain due to stuff like the GENERAL layout.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21869 >
2023-03-25 18:15:08 +00:00
Bas Nieuwenhuizen
71a50bdaad
ac/surface,radv: Avoid pitch weirdness if image not used for rendertarget.
...
Literally no point to it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21869 >
2023-03-25 18:15:08 +00:00
Daniel Schürmann
56b6ca411f
radv/rt: Fix VK_KHR_pipeline_executable_properties
...
We don't provide executable properties for the prolog shader.
Fixes: f123d65e9f ('radv/rt: use prolog for raytracing shaders')
Fixes: dEQP-VK.pipeline.monolithic.shader_module_identifier.pipeline_from_id.ray_tracing_libs.*
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22111 >
2023-03-24 19:50:46 +00:00
Daniel Schürmann
2cf6813c19
radv: fix radv_shader_binary member fields to 32 bit.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22029 >
2023-03-24 19:03:29 +00:00
Daniel Schürmann
3806cd83f2
radv: skip pipeline caching with RADV_DEBUG=shaders
...
in order to create reproducible cache entries.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22029 >
2023-03-24 19:03:29 +00:00
Daniel Schürmann
493d93f26c
radv: refactor shader_compile()
...
- change the return type to radv_shader_binary *
- setup options at the caller side
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22029 >
2023-03-24 19:03:29 +00:00
Daniel Schürmann
5051980ff8
radv: remove radv_create_gs_copy_shader()
...
We can replace the call with radv_shader_nir_to_asm().
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22029 >
2023-03-24 19:03:29 +00:00
Daniel Schürmann
55caea6453
radv: move gl_shader_stage from radv_binary to radv_shader_info
...
This way, both radv_shader and radv_shader_binary, provide the stage.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22029 >
2023-03-24 19:03:29 +00:00
Daniel Schürmann
2c8d101c71
radv: separate radv_capture_shader_executable_info() from radv_shader_create()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22029 >
2023-03-24 19:03:29 +00:00
Daniel Schürmann
43ad3d3917
radv: inline radv_postprocess_config()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22029 >
2023-03-24 19:03:29 +00:00