Qiang Yu
f6b194b648
nir,ac/llvm,aco,radv,radeonsi: remove nir_export_vertex_amd
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:44 +00:00
Qiang Yu
f44872c7b6
nir,ac/llvm,aco: remove nir_export_primitive_amd
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:44 +00:00
Qiang Yu
aea109e25d
ac/nir/ngg,radv: ms use ac_nir_export_(primitive|position|parameter)
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:44 +00:00
Qiang Yu
80d928c20e
ac/nir/ngg: gs use ac_nir_export_(position|parameter)
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:44 +00:00
Qiang Yu
bae5a3157f
ac/nir/ngg: prepare gather_vs_outputs to be used by gs
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:44 +00:00
Qiang Yu
80506be31b
ac/nir/ngg,radv,radeonsi: nogs use ac_nir_export_(position|parameter)
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:44 +00:00
Qiang Yu
f084e9bbe8
ac/nir/ngg: change clipdist_neg_mask_var type to uint32
...
ACO does not support 8bit ALU ops.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:44 +00:00
Qiang Yu
d798214c7b
ac/nir/ngg: fix clip dist culling mask uninitialized
...
Fixes: f75452918b ("ac/nir/ngg: support clipdist culling")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:44 +00:00
Qiang Yu
7c41cdb81f
ac/nir,radv,radeonsi: gs copy shader use ac_nir_export_(position|parameter)
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:44 +00:00
Qiang Yu
7308637bb4
ac/nir,radv,radeonsi: legacy vs use ac_nir_export_(position|parameter)
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:44 +00:00
Qiang Yu
df8c93a9f3
radeonsi: set nr_pos_exports outside of llvm translation
...
This can save an abi interface when we share position export
code with RADV.
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/20691 >
2023-02-03 12:27:43 +00:00
Qiang Yu
048d4de5e5
radeonsi: remove the extra handling for VS/TES primitive id
...
We have moved si_nir_assign_param_offsets before output lowering
pass, so there won't be primitive id store output when VS/TES here.
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/20691 >
2023-02-03 12:27:43 +00:00
Qiang Yu
59135678cf
radeonsi: update outputs written nir info
...
We may remove some outputs when si_nir_kill_outputs and
ac_nir_optimize_outputs, so update the outputs written
info for output lower pass to skip manipulating these
outputs.
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/20691 >
2023-02-03 12:27:43 +00:00
Qiang Yu
dcccd94faf
radeonsi: clamp vertex color in legacy gs instead of gs copy shader
...
gs copy shader is going to emit nir_export_amd directly so this vertex
color clamp pass which apply to nir_store_output will not work.
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/20691 >
2023-02-03 12:27:43 +00:00
Qiang Yu
601ad9e0a9
amd,radeonsi: implement nir_load_force_vrs_rates_amd in driver abi
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:43 +00:00
Qiang Yu
58988c3239
ac/nir: add force_vrs to ac_nir_export_position
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:43 +00:00
Qiang Yu
daa12b1ab1
ac/nir: add ac_nir_export_parameter
...
For last VGT stage to export parameter outputs.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:43 +00:00
Qiang Yu
f823581dd4
ac/nir: add ac_nir_export_position
...
Used by last VGT stage to export position related outputs.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:43 +00:00
Qiang Yu
e9268b2c06
ac/nir: gs and nogs use ac_nir_export_primitive
...
Mesh shader primitive export is left unchanged because it needs
extra changes for per primitive output export when export
primitive.
Mesh shader will use second channel of primitive export.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:43 +00:00
Qiang Yu
8331842258
aco: implement nir_export_amd
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:43 +00:00
Qiang Yu
5fe4dd3d68
ac/llvm: implement nir_export_amd
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:43 +00:00
Qiang Yu
5f24d58549
nir: add nir_export_amd intrinsic
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
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/20691 >
2023-02-03 12:27:43 +00:00
Timur Kristóf
9af3a31744
ac/nir/cull: Alway remove zero-area triangles in face culling.
...
The face culling algorithm should have been disabled for
conservative overestimation because it already
(mistakenly) removed some close-to-zero area triangles.
Now that the driver disables it in that case,
let's always remove zero-area triangles.
This only costs +2 SALU instructions.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20987 >
2023-02-03 09:39:54 +00:00
Timur Kristóf
3508597aa1
radv: Disable NGG culling when conservative overestimation is used.
...
Even when small primitive culling is disabled, the face culling algorithm
in ac_nir_cull can delete tiny triangles when their area is almost zero.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20987 >
2023-02-03 09:39:54 +00:00
Constantine Shablya
9b3b7e5091
anv: handle ATTACHMENT_OPTIMAL layout
...
Closes : #8216
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21066 >
2023-02-03 09:17:03 +00:00
Yonggang Luo
b1a33789b8
util: Implement util_iround with lrintf unconditionally
...
Because the place that called util_iround are always ensured
that INT_MIN <= f <= INT_MAX
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19978 >
2023-02-03 04:00:17 +00:00
Mike Blumenkrantz
e82369d06b
zink: enable bindless texture with ZINK_DESCRIPTORS=db
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21085 >
2023-02-03 02:12:33 +00:00
Mike Blumenkrantz
99ba529fee
zink: implement descriptor buffer handling of bindless texture
...
pretty straightforward, just lazily allocating the context-based db
and then writing updates to it on-demand
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21085 >
2023-02-03 02:12:33 +00:00
Mike Blumenkrantz
6b49dec675
zink: add a flag to indicate whether a descriptor buffer is bound
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21085 >
2023-02-03 02:12:33 +00:00
Mike Blumenkrantz
f81a4e904c
zink: break out descriptor binding into separate function
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21085 >
2023-02-03 02:12:33 +00:00
Mike Blumenkrantz
362b8792e7
zink: set VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT on compute pipelines
...
same as gfx
Fixes: 7ab5c5d36d ("zink: use EXT_descriptor_buffer with ZINK_DESCRIPTORS=db")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21085 >
2023-02-03 02:12:33 +00:00
Mike Blumenkrantz
e471b4360d
zink: skip updating descriptor buffer sets that aren't active
...
this is a no-op and illegal
Fixes: 7ab5c5d36d ("zink: use EXT_descriptor_buffer with ZINK_DESCRIPTORS=db")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21085 >
2023-02-03 02:12:33 +00:00
Mike Blumenkrantz
933f1dc50b
zink: fix bindless struct member comments
...
this was a bit confusing having the overall substruct comment which
was occasionally wrong
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21085 >
2023-02-03 02:12:33 +00:00
Mike Blumenkrantz
f382922f08
zink: make bindless buffer_infos a union
...
prep for descriptor buffer handling
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21085 >
2023-02-03 02:12:33 +00:00
Mike Blumenkrantz
dc60d373c9
zink: enable PIPE_CAP_ALLOW_GLTHREAD_BUFFER_SUBDATA_OPT
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21073 >
2023-02-03 01:52:56 +00:00
Marek Olšák
b8f6758bae
amd/ci: update sanctuary trace sha1
...
I guess it's because RB+ blending is now more precise.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
3ba1b18c90
radeonsi: set sampler COMPAT_MODE in the corresponding branch
...
no functional change
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
60a3f0667f
radeonsi: call ac_init_llvm_once before any util_queue initialization
...
The winsys uses util_queue, which calls atexit, so do it before the winsys
is created.
Cc: stable
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
da7dfbe3b8
amd/llvm: fix LLVM 15 & 16 crashes in SelectionDAG.cpp
...
Cc: stable
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
0c0b978938
radeonsi: set NEVER as the depth compare func if depth compare is disabled
...
Fixes: 0c6e56c391 - mesa: (more) correctly handle incomplete depth textures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
35a18134a3
amd/registers: remove confusing definitions from gfx10-rsrc.json
...
this will never be used and shouldn't have been added
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
1d8d223f08
amd: document OOB behavior on gfx11
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
76472c850b
amd: fix typo in shadowed uconfig registers on gfx11
...
It used an invalid offset, which hung.
Fixes: f24f8665db - ac: implement register shadowing for gfx11
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
35fa57dfae
amd: sort and re-indent packet definitions
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
8d9e18974f
amd: update late_alloc_wave64 for gfx11
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
76e3437c1e
amd: update the cache size for gfx1103_r1
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
2cdb6be86c
amd: change pbb_max_alloc_count for gfx11
...
based on PAL
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
bfc37e7c63
amd: unify and tune the attribute ring size for gfx11
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
e25f08baf2
radeonsi: never set INTERPOLATE_COMP_Z
...
based on PAL
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:02 +00:00
Marek Olšák
d087b3ec3c
radeonsi: determine alpha_to_coverage robustly in si_update_framebuffer_blend_rasterizer
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21041 >
2023-02-03 00:18:01 +00:00