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
Marek Olšák
f2923168ba
radeonsi: merge si_ps_key_update_framebuffer_blend & .._update_blend_rasterizer
...
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:01 +00:00
Marek Olšák
a29218b557
radeonsi/gfx11: always set MSAA_NUM_SAMPLES=0 for DCC_DECOMPRESS
...
hw requirement
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
Marek Olšák
8532cb8e7e
radeonsi: deduplicate VS/TES/GS update code
...
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:01 +00:00
Marek Olšák
711c4bddb2
radeonsi/gfx11: use new packet EVENT_WRITE_ZPASS
...
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:01 +00:00
Marek Olšák
4664b22f65
radeonsi/gfx11: move the PIXEL_PIPE_STAT_CONTROL event into the GFX preambles
...
Both the normal and shadowing preamable should do this.
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
Marek Olšák
383269238d
radeonsi/gfx11: fix blend->cb_target_mask dependency for shader keys
...
Shader keys only use cb_target_enabled_4bit. This may cause shaders to be
updated less often, but otherwise no change in behavior.
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:01 +00:00
Marek Olšák
d5ff270e0b
radeonsi/gfx11: adjust ACCUM_* fields for tessellation
...
based on PAL
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:01 +00:00
Marek Olšák
0b4b309fc6
radeonsi/gfx11: add a comment why we use PRIM_GRP_SIZE <= 252
...
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:01 +00:00
Marek Olšák
d21850f753
radeonsi/gfx11: remove the INST_PREF_SIZE workaround
...
The hw does the right thing automatically. (i.e. enables or disables
the feature)
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:01 +00:00
Marek Olšák
f6c30af00c
radeonsi: implement RB+ depth-only rendering for better perf
...
The explanation is in the last change of this commit.
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