Samuel Pitoiset
370e392313
radv: fix adding the BO to cmdbuf list when emitting buffer markers
...
Found by inspection.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32840 >
2025-01-03 08:19:23 +00:00
David Rosca
3474978d52
radv: Fix sampling from image layers of video decode target
...
Video decode target needs custom height alignment, but tex descriptor
still needs to be set to the original size the image was created with.
This makes the descriptor wrong for layer > 0, so we need to calculate
the layer offset and add it to bo address for this case.
Fixes: 5deb476095 ("radv: align video images internal width/height inside the driver.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32069 >
2025-01-03 01:28:07 +00:00
David Rosca
9d477fae68
radv/video: Remove dt_field_mode handling code
...
This would be used for decoding into interlaced buffer, but since
that's not support it is a dead code.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32069 >
2025-01-03 01:28:07 +00:00
David Rosca
ca0cb78869
radv/video: Use correct array index for decode target and DPB images
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12057
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32069 >
2025-01-03 01:28:07 +00:00
David Rosca
8dabb480e2
radv/video: Fix DPB tier2 surface params
...
Fixes: 3e2c768aa8 ("radv/vcn: enable dynamic dpb tier 2 for h264/h265 on navi21+")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32069 >
2025-01-03 01:28:07 +00:00
Marek Olšák
7fbca998b1
amd: optimize atomics before lowering intrinsics
...
ac_nir_lower_intrinsics_to_args will lower most system values.
I have to keep the divergence analysis in ACO, otherwise it goes haywire.
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:56 +00:00
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