Marek Olšák
e0d449dd40
amd: set the correct LLVM processor name for gfx1036
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22084 >
2023-03-29 20:36:09 +00:00
Marek Olšák
0b6a7cba0b
amd: rename GFX1036 -> RAPHAEL_MENDOCINO
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22084 >
2023-03-29 20:36:09 +00:00
Marek Olšák
52b6886992
amd: update addrlib
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22084 >
2023-03-29 20:36:09 +00:00
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
b0cae2fafe
ac/nir: Remove ac_nir_apply_first_task_to_task_shader.
...
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
3093622f35
ac/nir/ngg: Remove NV_mesh_shader support.
...
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
Georg Lehmann
fd3ea4ffc2
aco: clean up to_mad_mix
...
These instructions are 32bit, so they don't support opsel anyway.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22103 >
2023-03-28 23:30:08 +00:00
Samuel Pitoiset
51237a6508
radv/ci: update CI lists for Polaris10 and Pitcairn
...
Recent ac/surface changes fixed those.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22127 >
2023-03-28 22:56:15 +00:00
Qiang Yu
c182154456
ac/nir: add ac_nir_lower_ps
...
Lower ps output to nir_export_amd.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552 >
2023-03-28 19:57:11 +00:00
Qiang Yu
67f295f1e2
aco: implement float16 nir_op_pack_(s|u)norm_2x16
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552 >
2023-03-28 19:57:11 +00:00
Qiang Yu
3df1c4455e
ac/llvm: implement float16 nir_op_pack_(s|u)norm_2x16
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552 >
2023-03-28 19:57:11 +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
Georg Lehmann
16c03fd756
aco/util: override default assignment operator for bitfield helpers
...
Otherwise, the default assignment operator copies the whole uint,
not just few bits we are interested in.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: e7559da757 ("aco: add bitfield array helper classes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22154 >
2023-03-28 10:49:07 +00:00
Georg Lehmann
ed03696ed9
aco/ir: fix copy paste bug in convert_to_SDWA
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 60cd3ba39f ("aco: copy abs/neg with assignment")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22154 >
2023-03-28 10:49:07 +00:00
Friedrich Vock
1979e551a8
aco: Swap operands for v_and_b32 in RT prolog
...
The second operand must be a VGPR, only the first can be a literal.
With a literal, this code was wrongly assembled and resulted in artifacts on GFX11.
Fixes: 6446b79168 ("aco: implement select_rt_prolog()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8642
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22142 >
2023-03-28 09:16:56 +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
Marek Olšák
5d8f0c570e
amd/llvm: remove no-op code for vec3 loads in ac_build_tbuffer_load
...
Formatted loads always support vec3, so this code didn't do anything.
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22117 >
2023-03-27 22:38:07 +00:00
Marek Olšák
03c97b212e
amd/llvm: fix handling of unsupported vec3 loads on gfx6
...
VMEM loads promoted from vec3 to vec4 didn't trim the vector, thus
returning vec4 on gfx6 and vec3 on later generations, which callers
don't expect.
SMEM loads were adding an extra component on gfx6, causing same issues.
Fixes: 82919e2d - amd: lower subdword UBO loads in NIR
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8693
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22117 >
2023-03-27 22:38:07 +00:00
Georg Lehmann
dde7c5506c
aco: make .clang-format usable with tests
...
Code between BEGIN_TEST and END_TEST should be indented,
and comments used by the test itself should not be reformatted.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22122 >
2023-03-27 20:43:22 +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