Marek Olšák
5dd9171765
ac/nir: set upper ranges for range analysis while lowering system values
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
0d5b03f2b9
ac/nir: split local_invocation_ids to 3 separate VGPR inputs
...
so that we can set the upper range per VGPR.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
65d241c947
ac/nir: set arg_upper_bound_u32 for vs_rel_patch_id
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
1d9fbe5387
ac/nir: add helper ac_nir_load_arg_upper_bound
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
cfeaa45dc6
ac/nir: clean up ac_nir_lower_indirect_derefs
...
IO variables can't occur here anymore.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
ae22da2ff8
ac/nir: lower more loads in ac_nir_lower_intrinsics_to_args instead of drivers
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
dc8a40ff3e
ac/llvm: remove already lowered cases
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
ceb6f8fc32
amd: lower load_tess_rel_patch_id/primitive_id/tess_coord and overwrite.. in NIR
...
The overwrite instruction complicates it a little, which is why these
intrinsics are lowered together.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
61bfb4fa06
amd: lower load_subgroup_invocation in NIR
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
e69f47faee
amd: lower load_local_invocation_index in NIR
...
This is the last intrinsic that needed the LS VGPR bug workaround in ACO
and ac_nir_to_llvm.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
433ca6ba38
ac/nir: extract a load_subgroup_id lowered helper
...
this will be used in the next commit
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
342dcbdc8b
amd: lower load_vertex_id/instance_id and overwrite_vs_arguments in NIR
...
2 things complicate this:
- overwrite_vs_arguments_amd
- the LS VGPR bug workaround
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
66dd70adc5
amd: lower load_gs_wave_id_amd in NIR
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
923f59c971
amd: lower load_barycentric_at_offset in NIR
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
16ab05fad1
amd: lower load_barycentric_pixel/centroid/sample in NIR
...
radeonsi needs to preserve interp_mode in the arg load.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
a15e733a81
ac,radeonsi: move load_vector_arg flags to common code
...
This will be needed by lowering of barycentrics.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
7e83f6ca8b
amd: lower load_front_face in NIR
...
radeonsi must do this after si_lower_nir_abi, which optimizes front_face,
but doesn't lower it.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
6ad5225b2a
amd: lower load_frag_shading_rate in NIR
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
6d2e29ff6e
amd: lower load_sample_pos in NIR
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
110e474b4f
amd: lower load_sample_id in NIR
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
684c8da553
amd: lower load_invocation_id in NIR
...
ACO can't look for it because it's lowered there.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
d281240c57
amd: lower load_first_vertex/base_instance/draw_id/view_index in NIR
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
0d372b043b
amd: lower load_local_invocation_id in NIR
...
This is based on ACO.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
13cb5c7b72
amd: lower load_frag_coord in NIR
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
58cb155068
amd: lower load_pixel_coord in NIR
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
85c3b5159a
ac/nir: handle disabled PS VGPRs in ac_nir_load_arg_at_offset
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Marek Olšák
58b7b9ab15
radv: reduce maxGeometryShaderInvocations to 32
...
32 is the maximum for gfx12 and recommended by AMD for all hw with NGG.
It's not worth exposing more than 32 on older hw. It's better when all hw
exposes the same limit.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782 >
2025-01-02 17:36:55 +00:00
Georg Lehmann
272ff275fa
aco/insert_exec: reset top exec for p_discard_if
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12363
Fixes: 31f62a6123 ("aco/insert_exec: don't always reset top exec")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32830 >
2025-01-02 15:18:48 +00:00
Timur Kristóf
57c5962413
radv: Rename layer_input to reads_layer in PS info.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32641 >
2025-01-02 14:07:51 +00:00
Timur Kristóf
652a0b48bc
amd: Set lower_layer_fs_input_to_sysval in common code, not in drivers.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32641 >
2025-01-02 14:07:51 +00:00
Timur Kristóf
ed88616a12
ac/nir/ngg: Don't mark multiview layer output as varying.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32641 >
2025-01-02 14:07:51 +00:00
Timur Kristóf
dd00b3f527
radv: Implement FS layer ID input as a system value.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32641 >
2025-01-02 14:07:51 +00:00
Konstantin Seurer
407186994c
radv: Fix encoding empty acceleration structures
...
There will always be at least one internal node so the expectation that
there are more leaf nodes than internal nodes dows not hold when the
acceleration structure has no leaf nodes.
Fixes: f8b584d ("vulkan/runtime,radv: Add shared BVH building framework")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12302
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32820 >
2025-01-02 13:07:33 +01:00
Georg Lehmann
3da2d96bc5
aco/optimizer: fix signed extract of sub dword temps with SDWA
...
If an instruction didn't already use SDWA convert_to_SDWA in apply_extract
will add ubyte0/uword0 selections for v1b/v2b operands. This loses information
that the instruction doesn't care about the high bits and makes the next
apply_extract_twice fail.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 6cb9d39bc2 ("aco: combine extracts with sub-dword definitions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32803 >
2025-01-02 09:33:18 +00:00
Marek Olšák
c21bc65ba7
nir/opt_load_store_vectorize: make hole_size signed to indicate overlapping loads
...
A negative hole size means the loads overlap. This will be used by drivers
to handle overlapping loads in the callback easily.
Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32699 >
2025-01-01 00:03:55 +00:00
Timur Kristóf
01bf998e17
aco: Update documentation
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32766 >
2024-12-31 23:01:23 +00:00
Samuel Pitoiset
f528c9e8f5
radv/meta: stop initializing RT accel structs
...
They are already always compiled on-demand.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32809 >
2024-12-31 12:54:11 +01:00
Samuel Pitoiset
853c99260b
radv/meta: move initializing emulated astc to radv_device_init_meta()
...
For consistency with emulated etc2.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32809 >
2024-12-31 12:54:11 +01:00
Samuel Pitoiset
422d64d7ee
radv/meta: always initialize emulated etc2 on-demand
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32809 >
2024-12-31 12:54:11 +01:00
Samuel Pitoiset
1e75b6dfb8
radv/meta: remove a workaround for building accel structs with LLVM
...
This is no longer needded and this will allow us to compile the meta
pipelines on-demand.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32818 >
2024-12-31 11:34:40 +00:00
Samuel Pitoiset
18013300b6
radv: disable RT with LLVM completely
...
This has never been useful and only few RT extensions were enabled
anyways. This will allow us to remove a workaround for compiling
meta pipelines for accel structs.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32818 >
2024-12-31 11:34:40 +00:00
Samuel Pitoiset
58c5766199
radv: fix destroying DGC pipelines
...
They weren't destroyed at all.
Fixes: 9f8684359f ("radv: implement VK_EXT_device_generated_commands")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32816 >
2024-12-31 10:57:46 +00:00
Samuel Pitoiset
09b8ed4dd4
radv/meta: remove unused radv_meta_create_xxx() helpers
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805 >
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
aa709ca32c
radv/meta: convert the blit2d GFX pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805 >
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
19c1397855
radv/meta: use only one push constant range for blit2d pipelines
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805 >
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
8a104de180
radv/meta: convert the resolve GFX pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805 >
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
bc5c37fef8
radv/meta: convert the clear GFX pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805 >
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
64676f52b2
radv/meta: convert the blit GFX pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805 >
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
b3c587e429
radv/meta: convert the fast-clear GFX pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805 >
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
015e3e34a7
radv/meta: convert the HW resolve GFX pipelines to vk_meta
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805 >
2024-12-31 10:32:50 +00:00