platform/upstream/mesa.git
11 months agonir/opt_large_constants: Handle small float arrays
Konstantin Seurer [Mon, 17 Jul 2023 13:08:43 +0000 (15:08 +0200)]
nir/opt_large_constants: Handle small float arrays

Handles small arrays of integer, positive floats.

RADV fossils:

Totals from 65 (0.05% of 131205) affected shaders:
Instrs: 30001 -> 29936 (-0.22%); split: -0.39%, +0.18%
CodeSize: 165676 -> 164996 (-0.41%); split: -0.53%, +0.12%
Latency: 126873 -> 127178 (+0.24%); split: -0.29%, +0.53%
InvThroughput: 26640 -> 26895 (+0.96%); split: -0.48%, +1.44%
VClause: 425 -> 371 (-12.71%)
SClause: 982 -> 981 (-0.10%); split: -0.92%, +0.81%
Copies: 2072 -> 1939 (-6.42%); split: -6.52%, +0.10%
PreVGPRs: 1553 -> 1537 (-1.03%)

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9000>

11 months agonir/opt_large_constants: Add Small constant handling
Faith Ekstrand [Mon, 17 Jul 2023 12:42:37 +0000 (14:42 +0200)]
nir/opt_large_constants: Add Small constant handling

Adds handling for constant arrays that can be lowered to
'(imm >> bit_index) & bit_mask' instead of constant loads.

RADV fossils:

Totals from 70 (0.05% of 131205) affected shaders:
Instrs: 31441 -> 31260 (-0.58%); split: -0.59%, +0.02%
CodeSize: 172104 -> 170568 (-0.89%)
VGPRs: 2608 -> 2616 (+0.31%)
Latency: 296687 -> 280859 (-5.33%); split: -5.34%, +0.00%
InvThroughput: 65491 -> 65696 (+0.31%); split: -0.11%, +0.42%
VClause: 671 -> 646 (-3.73%)
SClause: 1014 -> 964 (-4.93%)
Copies: 1742 -> 1564 (-10.22%); split: -10.51%, +0.29%
PreSGPRs: 2039 -> 2036 (-0.15%)
PreVGPRs: 2014 -> 2017 (+0.15%)

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9000>

11 months agonir/large_constants: Add read/write_const_values helpers
Faith Ekstrand [Mon, 17 Jul 2023 17:07:07 +0000 (12:07 -0500)]
nir/large_constants: Add read/write_const_values helpers

The write helper is just pulling code we already have out into a helper
and flipping the order of the loop and the switch.  The read helper will
be useful in the next commit where we add small constant support.  This
keeps the two helpers right next to each other in the file where they're
easy to compare and we can ensure that they stay in sync.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9000>

11 months agonir/large_constants: Use nir_component_mask_t
Faith Ekstrand [Mon, 17 Jul 2023 17:05:48 +0000 (12:05 -0500)]
nir/large_constants: Use nir_component_mask_t

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9000>

11 months agonil: Add support for G8B8_G8R8_UNORM and B8G8_R8G8_UNORM
Mohamed Ahmed [Thu, 10 Aug 2023 17:38:48 +0000 (20:38 +0300)]
nil: Add support for G8B8_G8R8_UNORM and B8G8_R8G8_UNORM

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24614>

11 months agonvk: Enable MIDPOINT_CHROMA_SAMPLES_BIT for multi-planar formats only
Mohamed Ahmed [Fri, 11 Aug 2023 19:29:05 +0000 (22:29 +0300)]
nvk: Enable MIDPOINT_CHROMA_SAMPLES_BIT for multi-planar formats only

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24614>

11 months agonvk: Enable SEPARATE_RECONSTRUCTION_FILTER_BIT for multi-planar formats only
Mohamed Ahmed [Thu, 10 Aug 2023 16:44:01 +0000 (19:44 +0300)]
nvk: Enable SEPARATE_RECONSTRUCTION_FILTER_BIT for multi-planar formats only

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24614>

11 months agonir: Clean up nir_op_is_vec() and its callers
Faith Ekstrand [Tue, 15 Aug 2023 15:59:11 +0000 (10:59 -0500)]
nir: Clean up nir_op_is_vec() and its callers

The nir_op_is_vec() helper I added in 842338e2f0bd ("nir: Add a
nir_op_is_vec helper") treats nir_op_mov as a vec even though the
semanitcs of the two are different.  In retrospect, this was a mistake
as the previous three fixup commits show.  This commit splits the helper
into two: nir_op_is_vec() and nir_op_is_vec_or_mov() and uses the
appropriate helper at each call site.  Hopefully, this rename will
encurage any future users of these helpers to think about nir_op_mov as
separate from nir_op_vecN and we can avoid these bugs.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24704>

11 months agonir: Don't handle nir_op_mov in get_undef_mask in opt_undef
Faith Ekstrand [Tue, 15 Aug 2023 16:27:49 +0000 (11:27 -0500)]
nir: Don't handle nir_op_mov in get_undef_mask in opt_undef

It's unnecessary because earlier parts of the pass will ensure that a
mov of undef is turned into an undef.  It's also wrong because
nir_op_mov has different semantics from nir_op_vecN when it comes to how
sources map to destination components.

Fixes: 5f26c21e6246 ("nir: Expand opt_undef to handle undef channels in a store intrinsic")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24704>

11 months agonir: Handle nir_op_mov properly in opt_shrink_vectors
Faith Ekstrand [Tue, 15 Aug 2023 16:19:00 +0000 (11:19 -0500)]
nir: Handle nir_op_mov properly in opt_shrink_vectors

If the opcode is a mov, it falls into the nir_alu_src_is_trivial_ssa
case, not the vec case.

Fixes: 94eff7ccd866 ("nir: shrink phi nodes in nir_opt_shrink_vectors")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24704>

11 months agonir: Fix nir_op_mov handling in nir_collect_src_uniforms
Faith Ekstrand [Tue, 15 Aug 2023 16:07:36 +0000 (11:07 -0500)]
nir: Fix nir_op_mov handling in nir_collect_src_uniforms

For mov we need to follow the swizzle for the destination component, not
grab swizzle[0] for some random source.

Fixes: a406fff78a57 ("nir/inline_uniforms: support vector uniform")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24704>

11 months agonir: Rework nir_scalar_chase_movs a bit
Faith Ekstrand [Tue, 15 Aug 2023 15:21:10 +0000 (10:21 -0500)]
nir: Rework nir_scalar_chase_movs a bit

The cases in the if are the same as the cases we're using for the early
break.  Just check the things and break if it's not a handleable case.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24704>

11 months agoradv: vectorize scratch access
Rhys Perry [Wed, 26 Jul 2023 18:42:00 +0000 (19:42 +0100)]
radv: vectorize scratch access

fossil-db (gfx1100):
Totals from 20 (0.01% of 133461) affected shaders:
Instrs: 49421 -> 49134 (-0.58%)
CodeSize: 251668 -> 249604 (-0.82%); split: -0.83%, +0.01%
Latency: 178126 -> 178412 (+0.16%); split: -0.16%, +0.32%
InvThroughput: 23565 -> 23646 (+0.34%); split: -0.05%, +0.39%
VClause: 957 -> 943 (-1.46%)
Copies: 5770 -> 5801 (+0.54%); split: -0.36%, +0.90%
PreVGPRs: 1368 -> 1359 (-0.66%)

Regressions seem to be a couple of cases of bad RA luck.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24350>

11 months agoradv: vectorize RT stack access
Rhys Perry [Wed, 26 Jul 2023 15:15:35 +0000 (16:15 +0100)]
radv: vectorize RT stack access

fossil-db (gfx1100):
Totals from 10 (0.01% of 133461) affected shaders:
MaxWaves: 176 -> 174 (-1.14%)
Instrs: 39260 -> 38710 (-1.40%)
CodeSize: 202272 -> 197288 (-2.46%)
VGPRs: 888 -> 900 (+1.35%)
Latency: 82306 -> 81762 (-0.66%); split: -0.68%, +0.02%
InvThroughput: 11182 -> 11158 (-0.21%); split: -0.52%, +0.30%
VClause: 721 -> 700 (-2.91%)
SClause: 1147 -> 1148 (+0.09%); split: -0.17%, +0.26%
Copies: 3625 -> 3891 (+7.34%)
PreVGPRs: 819 -> 845 (+3.17%); split: -0.37%, +3.54%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24350>

11 months agonir/opt_load_store_vectorize: support scratch access
Rhys Perry [Wed, 26 Jul 2023 18:41:18 +0000 (19:41 +0100)]
nir/opt_load_store_vectorize: support scratch access

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24350>

11 months agonir/lower_shader_calls: fix align_offset
Rhys Perry [Wed, 26 Jul 2023 16:01:44 +0000 (17:01 +0100)]
nir/lower_shader_calls: fix align_offset

I don't think this does anything at the moment, because all accesses are
scalar aligned.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24350>

11 months agoradv/gfx11: re-enable 0001/1110 clear values
Rhys Perry [Mon, 31 Jul 2023 11:30:41 +0000 (12:30 +0100)]
radv/gfx11: re-enable 0001/1110 clear values

Since 87444bb7ab4b27b1394af2ac2592110b6500352b, vi_alpha_is_on_msb always
returned false here. The new version matches radeonsi.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24400>

11 months agoradv: support 128bpp comp-to-single with all colors
Rhys Perry [Fri, 28 Jul 2023 17:38:23 +0000 (18:38 +0100)]
radv: support 128bpp comp-to-single with all colors

Previously, it was restricted to clear colors where R==G==B, but it seems
to work if that isn't the case.

This restriction was probably a leftover from before comp-to-single.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24400>

11 months agoradv: fix 128bpp comp-to-single clears
Rhys Perry [Fri, 28 Jul 2023 17:09:33 +0000 (18:09 +0100)]
radv: fix 128bpp comp-to-single clears

We were clearing GB to A, instead of R.

This fixes some red tinting in Overwatch 2 when shadow quality is set to
"Ultra".

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fixes: 7451eb1d6112 ("radv: implement DCC fast clears with comp-to-single")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9446
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24400>

11 months agoradv: disable 64-bit color attachments
Rhys Perry [Fri, 28 Jul 2023 19:59:07 +0000 (20:59 +0100)]
radv: disable 64-bit color attachments

These work in some circumstances (dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_16_to_64.scalar9_tessc),
but I'm not sure if they work in all, blending certainly doesn't work and
this probably wasn't intended in the first place.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fixes: 01bd012edd20 ("amd: fix 64-bit integer color image clears")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24400>

11 months agomeson: Rename dri-vdpau.dyn to dri.dyn
Feng Jiang [Wed, 9 Aug 2023 01:42:16 +0000 (09:42 +0800)]
meson: Rename dri-vdpau.dyn to dri.dyn

File 'src/gallium/targets/dri-vdpau.dyn' is now shared by multiple
targets and not just VDPAU, so renamed it to 'dri.dyn' as suggested
by Marek Olšák.

Related link:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23177#note_2030493

Suggested-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24569>

11 months agoturnip: Move sysmem clears to the first subpass that uses them.
Emma Anholt [Mon, 1 Aug 2022 23:45:10 +0000 (16:45 -0700)]
turnip: Move sysmem clears to the first subpass that uses them.

This is a partial fix for the case where
VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT and the aliased attachment clears
the attachment that was last used in a previous subpass (we have to move
the stores to the last used subpass, as well).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20994>

11 months agoturnip: Move gmem clears and loads to the first subpass that uses them.
Emma Anholt [Mon, 1 Aug 2022 23:45:10 +0000 (16:45 -0700)]
turnip: Move gmem clears and loads to the first subpass that uses them.

This will help us share gmem space between attachments that aren't used at
the same time.  It's also a correctness fix for
VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT, because they're supposed to
happen at the first subpass using the attachment, not the start of the
renderpass.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20994>

11 months agoturnip: Save the renderpass's clear values in the cmdbuf state.
Emma Anholt [Wed, 5 Oct 2022 21:34:29 +0000 (14:34 -0700)]
turnip: Save the renderpass's clear values in the cmdbuf state.

For delaying clears to subpass begin time, I needed to save these until
later.  Turns out this cleans up a good bit of threading these values all
through the command buffer setup.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20994>

11 months agoturnip: Skip emitting empty CP_COND_REG_EXEC.
Emma Anholt [Tue, 30 Aug 2022 22:30:27 +0000 (15:30 -0700)]
turnip: Skip emitting empty CP_COND_REG_EXEC.

If we ended up emitting no code to be conditionally run, then drop the
whole conditional exec packet.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20994>

11 months agoturnip: Track the first/last subpass an attachment is used in.
Emma Anholt [Mon, 1 Aug 2022 19:30:03 +0000 (12:30 -0700)]
turnip: Track the first/last subpass an attachment is used in.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20994>

11 months agovulkan/util: Make multialloc succeed with 0 allocations.
Emma Anholt [Thu, 6 Oct 2022 15:59:29 +0000 (08:59 -0700)]
vulkan/util: Make multialloc succeed with 0 allocations.

I wanted to use it for the attachments and clear values of a
vkCmdBeginRenderPass(), but both can be 0 count.  In that case, we would
end up with vk_default_alloc(0,0) because nothing had set the alignment,
and assertion fail instead of allocating 0 bytes.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20994>

11 months agoRevert "intel/fs: only avoid SIMD32 if strictly inferior in throughput"
Matt Turner [Thu, 10 Aug 2023 18:12:24 +0000 (14:12 -0400)]
Revert "intel/fs: only avoid SIMD32 if strictly inferior in throughput"

This reverts commit 6b494745be0900a67004d6f3e4b730c3cd67da79.

The logic is not entirely correct: the comparison is between two
static-analysis estimates of a dynamic system with variables that aren't
captured by the shader source, so using ">" will always have greater potential
to cause regressions whenever the performance difference between the two builds
is something not captured by the static model, no matter how much the model is
improved.

Reference: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9262
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24615>

11 months agoiris: ensure stalling pipe control before fast clear
Lionel Landwerlin [Wed, 16 Aug 2023 08:28:24 +0000 (11:28 +0300)]
iris: ensure stalling pipe control before fast clear

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 87149cc545 ("blorp: update and move fast clear PIPE_CONTROLs to drivers")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24718>

11 months agoetnaviv: fix null pointer dereference
Christian Gmeiner [Wed, 16 Aug 2023 07:57:18 +0000 (09:57 +0200)]
etnaviv: fix null pointer dereference

Fixes: 734b15186bf ("etnaviv: Stop passing around nir_dest")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24717>

11 months agodocs: upgrade bootstrap to 5.3.1
Erik Faye-Lund [Mon, 14 Aug 2023 14:02:02 +0000 (16:02 +0200)]
docs: upgrade bootstrap to 5.3.1

Bootstrap 5.3.1 is out, implementing the color fix we introduced to make
dark-mode more readable. So let's update to that, and drop our override.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24670>

11 months agonouveau: add exported GEM handles to the global list
Dor Askayo [Fri, 11 Aug 2023 21:14:23 +0000 (00:14 +0300)]
nouveau: add exported GEM handles to the global list

Adding GEM handles to the global list is necessary to allow
maintaining a single reference count for handles that are shared
between multiple buffer objects.

Since exported handles can end up being shared with other buffer
objects, as in the case that drmPrimeHandleToFD() and gbm_bo_import()
are called externally to Mesa, they too must be added to the global
list.

Unfortunately, doing this properly requires a new libdrm API. Use
the best possible option for now.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9552

Signed-off-by: Dor Askayo <dor.askayo@gmail.com>
Acked-by: Karol Herbst <git@karolherbst.de>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24648>

11 months agonv50/ir: Remove few nvc0 specific defines from nv50-specific header.
Andrew Randrianasulu [Wed, 21 Oct 2020 20:10:52 +0000 (23:10 +0300)]
nv50/ir: Remove few nvc0 specific defines from nv50-specific header.

Compile, and run-tested on nv92

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7259>

11 months agonv50: fix code uploads bigger than 0x10000 bytes
Karol Herbst [Tue, 15 Aug 2023 15:12:01 +0000 (17:12 +0200)]
nv50: fix code uploads bigger than 0x10000 bytes

The hardware has a max limit on how much data we can upload in one go via
the 2D engine. Just split the uploads up.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9571
Acked-by: M Henning <drawoc@darkrefraction.com>
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24706>

11 months agoradeonsi: remove unused arg of get_tcs_tes_buffer_address
Qiang Yu [Wed, 2 Aug 2023 08:17:00 +0000 (16:17 +0800)]
radeonsi: remove unused arg of get_tcs_tes_buffer_address

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Sigend-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24443>

11 months agoradeonsi: part mode standalone tcs support aco compile
Qiang Yu [Tue, 25 Jul 2023 01:15:11 +0000 (09:15 +0800)]
radeonsi: part mode standalone tcs support aco compile

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/24443>

11 months agoradeonsi: add si_aco_build_shader_part
Qiang Yu [Mon, 24 Jul 2023 13:14:19 +0000 (21:14 +0800)]
radeonsi: add si_aco_build_shader_part

Now it only has tcs epilog build, will add more prolog/epilog to it.

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/24443>

11 months agoradeonsi: change si_fill_aco_options args
Qiang Yu [Mon, 24 Jul 2023 12:36:12 +0000 (20:36 +0800)]
radeonsi: change si_fill_aco_options args

Prepare to be shared with prolog/epilog generation which
does not have si_shader param.

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/24443>

11 months agoradeonsi: add si_get_tcs_epilog_args
Qiang Yu [Mon, 24 Jul 2023 06:56:48 +0000 (14:56 +0800)]
radeonsi: add si_get_tcs_epilog_args

For shared with aco tcs epilog creation.

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/24443>

11 months agoradeonsi: remove separate_prolog arg from prolog/epilog build
Qiang Yu [Sat, 22 Jul 2023 14:40:52 +0000 (22:40 +0800)]
radeonsi: remove separate_prolog arg from prolog/epilog build

It's always true.

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/24443>

11 months agoradeonsi: extract si_llvm_build_shader_part
Qiang Yu [Sat, 22 Jul 2023 14:34:54 +0000 (22:34 +0800)]
radeonsi: extract si_llvm_build_shader_part

Prepare for aco code path.

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/24443>

11 months agoradeonsi: fill part mode tcs aco shader info
Qiang Yu [Sat, 22 Jul 2023 07:58:07 +0000 (15:58 +0800)]
radeonsi: fill part mode tcs aco shader info

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/24443>

11 months agoradeonsi: share si_get_tcs_out_patch_stride with aco
Qiang Yu [Sat, 22 Jul 2023 07:43:54 +0000 (15:43 +0800)]
radeonsi: share si_get_tcs_out_patch_stride with aco

Move it out of llvm to be shared with aco.

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/24443>

11 months agoradeonsi: support upload multi part shader binary
Qiang Yu [Thu, 20 Jul 2023 08:53:55 +0000 (16:53 +0800)]
radeonsi: support upload multi part shader binary

Need to split shader binary into exec and data part, then combine
exec and data of all shader parts separately. So const data symbols
in code need to be relocated.

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/24443>

11 months agoradeonsi: add exec_size to shader binary
Qiang Yu [Thu, 20 Jul 2023 13:15:57 +0000 (21:15 +0800)]
radeonsi: add exec_size to shader binary

Used by aco binary to split exec code and const data when combine
multi part shader binary.

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/24443>

11 months agoaco: use semantic location as io temp index
Qiang Yu [Thu, 10 Aug 2023 07:19:46 +0000 (15:19 +0800)]
aco: use semantic location as io temp index

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24442>

11 months agoac/nir/tess: move tess factor output out of control flow
Qiang Yu [Wed, 2 Aug 2023 08:08:09 +0000 (16:08 +0800)]
ac/nir/tess: move tess factor output out of control flow

For radeonsi aco compile which can't handle outputs without
nir_lower_io_to_temporaries().

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24442>

11 months agoaco,radeonsi: save const addr to symbol
Qiang Yu [Thu, 20 Jul 2023 09:50:36 +0000 (17:50 +0800)]
aco,radeonsi: save const addr to symbol

For radeonsi to relocation const data when combine multiple
shader parts to a single one. So the final shader binary will
begin with exec code of all parts then const data.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24442>

11 months agoaco: skip scratch init when no scratch arg provide
Qiang Yu [Tue, 25 Jul 2023 03:19:47 +0000 (11:19 +0800)]
aco: skip scratch init when no scratch arg provide

epilog does not use scratch so has no scratch arg.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24442>

11 months agoaco: don't emit s_endpgm for tcs with epilog
Qiang Yu [Tue, 25 Jul 2023 06:00:17 +0000 (14:00 +0800)]
aco: don't emit s_endpgm for tcs with epilog

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24442>

11 months agoaco: add tcs epilog generation for radeonsi
Qiang Yu [Sat, 25 Mar 2023 01:31:03 +0000 (09:31 +0800)]
aco: add tcs epilog generation for radeonsi

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24442>

11 months agoaco: add pending_lds_access option for insert waitcnt
Qiang Yu [Tue, 15 Aug 2023 07:24:09 +0000 (15:24 +0800)]
aco: add pending_lds_access option for insert waitcnt

For tcs epilog to add p_barrier at the beginning to sync
main shader part tess factor LDS write.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24442>

11 months agoaco: allow tcs with epilog to keep nir store output instruction
Qiang Yu [Thu, 20 Jul 2023 03:41:00 +0000 (11:41 +0800)]
aco: allow tcs with epilog to keep nir store output instruction

Used to same tess factor outputs.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24442>

11 months agoaco: add tcs end regs for epilog usage
Qiang Yu [Thu, 20 Jul 2023 02:16:29 +0000 (10:16 +0800)]
aco: add tcs end regs for epilog usage

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24442>

11 months agoaco: move jump to epilog out of ic_merged_wave_info
Qiang Yu [Wed, 2 Aug 2023 09:12:09 +0000 (17:12 +0800)]
aco: move jump to epilog out of ic_merged_wave_info

TCS may be wrapped with if/else when merged shader. Jump
to epilog or end with regs should not be inside it.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24442>

11 months agoaco: add p_end_with_regs pseudo instruction
Qiang Yu [Fri, 7 Jul 2023 07:50:13 +0000 (15:50 +0800)]
aco: add p_end_with_regs pseudo instruction

Used by radeonsi shader parts to pass args from one part to another.
It has variable number of operands to reserve fixed registers with
wanted value.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24442>

11 months agoaux/trace: trace video_buffer method return vals
Julia Tatz [Fri, 4 Aug 2023 01:28:31 +0000 (21:28 -0400)]
aux/trace: trace video_buffer method return vals

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24482>

11 months agoaux/trace: unwrap refrence frames in picture_desc
Julia Tatz [Fri, 4 Aug 2023 01:28:26 +0000 (21:28 -0400)]
aux/trace: unwrap refrence frames in picture_desc

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24482>

11 months agoaux/trace: wrap video_codec & video_buffer
Julia Tatz [Fri, 4 Aug 2023 01:28:20 +0000 (21:28 -0400)]
aux/trace: wrap video_codec & video_buffer

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24482>

11 months agoaux/trace: add context video methods
Julia Tatz [Fri, 4 Aug 2023 01:28:16 +0000 (21:28 -0400)]
aux/trace: add context video methods

Preliminary support without wrapping video_codec or video_buffer

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24482>

11 months agoaux/trace: add screen video methods
Julia Tatz [Fri, 4 Aug 2023 01:28:09 +0000 (21:28 -0400)]
aux/trace: add screen video methods

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24482>

11 months agoaux/trace: fix set_hw_atomic_buffers method name
Julia Tatz [Sat, 29 Jul 2023 23:42:33 +0000 (19:42 -0400)]
aux/trace: fix set_hw_atomic_buffers method name

Fixes: b2dc63ed8ce ("aux/trace: Add pipe_context::set_hw_atomic_buffers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24482>

11 months agoaux/trace: move trace_sample_view logic
Julia Tatz [Sat, 29 Jul 2023 23:35:55 +0000 (19:35 -0400)]
aux/trace: move trace_sample_view logic

it's defined in tr_texture, so it makes sense and is more
re-usable to have it's logic there.
Also documented the magic number used for private refcounting

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24482>

11 months agoaux/trace: deduplicate enum dump macro work
Julia Tatz [Sat, 29 Jul 2023 19:26:53 +0000 (15:26 -0400)]
aux/trace: deduplicate enum dump macro work

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24482>

11 months agoaux/trace: skip multi-line comments in enums2names
Julia Tatz [Sat, 8 Jul 2023 19:59:52 +0000 (15:59 -0400)]
aux/trace: skip multi-line comments in enums2names

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24482>

11 months agogallium/dri: fix dri2_from_names
Julia Tatz [Thu, 10 Aug 2023 02:35:56 +0000 (22:35 -0400)]
gallium/dri: fix dri2_from_names

`createImageFromNames` uses fourcc, not dri_image_formats

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8547
Fixes: 433ca3127a3 ("st/dri: replace format conversion functions with single mapping table")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24597>

11 months agointel/isl: Remove Wa_22011186057
José Roberto de Souza [Tue, 15 Aug 2023 16:01:24 +0000 (09:01 -0700)]
intel/isl: Remove Wa_22011186057

This is a ADL-P workaround of a pre-production stepping, with RPL-P
already being sold we can remove this workaround.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24699>

11 months agointel/isl: Remove unknown workaround
José Roberto de Souza [Mon, 14 Aug 2023 21:00:27 +0000 (14:00 -0700)]
intel/isl: Remove unknown workaround

The way this workaround is implemented, it is being applied to all
gfx 12 platforms(TGL, ADL, RKL, RPL, DG1, DG2 and MTL) but it was
supposed to be fixed in TGL B0.
Unfortunately I did not found any workaround number that would match it.

But as all released platforms don't ship to customers with revision == 0
this workaround was never being applied and can be safely removed.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24699>

11 months agonir: s/nir_instr_ssa_def/nir_instr_def/
Faith Ekstrand [Tue, 15 Aug 2023 17:05:54 +0000 (12:05 -0500)]
nir: s/nir_instr_ssa_def/nir_instr_def/

Generated by sed:

    sed -i -e 's/nir_instr_ssa_def/nir_instr_def/g' src/**/*.h src/**/*.c src/**/*.cpp

Suggested-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24703>

11 months agonir: s/live_ssa_def/live_def/
Faith Ekstrand [Tue, 15 Aug 2023 15:11:43 +0000 (10:11 -0500)]
nir: s/live_ssa_def/live_def/

Generated mostly with sed:

    sed -i -e 's/live_ssa_def/live_def/g' src/compiler/nir/nir.h src/compiler/nir/*.c

Plus three fixups in various Intel drivers.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24703>

11 months agonir s/nir_get_ssa_scalar/nir_get_scalar/
Faith Ekstrand [Tue, 15 Aug 2023 15:07:24 +0000 (10:07 -0500)]
nir s/nir_get_ssa_scalar/nir_get_scalar/

Generated with sed:

    sed -i -e 's/nir_get_ssa_scalar/nir_get_scalar/g' src/**/*.h src/**/*.c src/**/*.cpp

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24703>

11 months agonir: Rename nir_instr_type_ssa_undef to nir_instr_type_undef
Faith Ekstrand [Tue, 15 Aug 2023 14:59:06 +0000 (09:59 -0500)]
nir: Rename nir_instr_type_ssa_undef to nir_instr_type_undef

We already renamed the type, we just need to rename the enum and the
casting helper functions.

Generated with sed:

    sed -i -e 's/nir_instr_type_ssa_undef/nir_instr_type_undef/g' src/**/*.h src/**/*.c src/**/*.cpp
    sed -i -e 's/nir_instr_as_ssa_undef/nir_instr_as_undef/g' src/**/*.h src/**/*.c src/**/*.cpp

and two tiny whitespace fixups in lima.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24703>

11 months agozink: use real A8_UNORM when possible
Mike Blumenkrantz [Thu, 10 Aug 2023 13:48:01 +0000 (09:48 -0400)]
zink: use real A8_UNORM when possible

this is tricky because drivers are exposing their native support, but
that support may not fit the specific needs of the format

as such, (almost) every use of format where alpha emulation workarounds are
present now need to add a second layer of workarounds in order to handle
the case of possibly-genuine A8 (which might also be emulated A8 even if
the driver supports A8 for some things)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24685>

11 months agozink: use maintenance5
Mike Blumenkrantz [Thu, 10 Aug 2023 12:58:01 +0000 (08:58 -0400)]
zink: use maintenance5

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24685>

11 months agozink: add maintenance extensions to profile
Mike Blumenkrantz [Thu, 10 Aug 2023 13:43:00 +0000 (09:43 -0400)]
zink: add maintenance extensions to profile

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24685>

11 months agozink: split create_ici to init and eval
Mike Blumenkrantz [Thu, 10 Aug 2023 12:50:18 +0000 (08:50 -0400)]
zink: split create_ici to init and eval

no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24685>

11 months agozink: remove unused param from create_ici
Mike Blumenkrantz [Thu, 10 Aug 2023 12:46:10 +0000 (08:46 -0400)]
zink: remove unused param from create_ici

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24685>

11 months agonir: Assert that nir_ssa_for_src components matches
Alyssa Rosenzweig [Sat, 12 Aug 2023 20:36:52 +0000 (16:36 -0400)]
nir: Assert that nir_ssa_for_src components matches

In prep for removing the helper.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24654>

11 months agobroadcom/compiler: Use nir_trim_vector explicitly
Alyssa Rosenzweig [Sun, 13 Aug 2023 14:58:02 +0000 (10:58 -0400)]
broadcom/compiler: Use nir_trim_vector explicitly

...when trying to ignore components. Trim functionality with nir_ssa_for_src is
deprecated.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24654>

11 months agolvp,nir/lower_input_attachments: Use nir_trim_vector
Alyssa Rosenzweig [Sun, 13 Aug 2023 13:27:28 +0000 (09:27 -0400)]
lvp,nir/lower_input_attachments: Use nir_trim_vector

Make the trimming obvious. We will lock down ssa_for_src soon.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24654>

11 months agoaux/trace: print bindless handles as pointers
Mike Blumenkrantz [Mon, 14 Aug 2023 15:38:59 +0000 (11:38 -0400)]
aux/trace: print bindless handles as pointers

this makes traces using bindless ops easier to read/diff

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24679>

11 months agopanfrost: Pack stride at CSO create time on v9
Alyssa Rosenzweig [Mon, 14 Aug 2023 20:08:07 +0000 (16:08 -0400)]
panfrost: Pack stride at CSO create time on v9

Now that the stride is in the CSO, there's no merging needed at draw-time. The
whole descriptor could probably be uploaded at CSO create time but I didn't want
to deal with that right now, this isn't even my driver anymore I just like
deleting code.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24680>

11 months agomesa: Enable ARB_texture_border_clamp in GL Core
Sylvain Munaut [Sun, 13 Aug 2023 06:06:44 +0000 (08:06 +0200)]
mesa: Enable ARB_texture_border_clamp in GL Core

According to the GL3 spec, only the `CLAMP` mode was deprecated,
the `CLAMP_TO_EDGE` and `CLAMP_TO_BORDER_ARB` are not, so this
extension should be advertised.

As a side note, Davinci Resolve uses a Core profile and tests for
that extension so it fixes an issue with that app.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24660>

11 months agozink: ci updates
Mike Blumenkrantz [Tue, 15 Aug 2023 11:22:09 +0000 (07:22 -0400)]
zink: ci updates

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>

11 months agozink: remove pipe_stream_output from function params
Mike Blumenkrantz [Mon, 7 Aug 2023 17:36:08 +0000 (13:36 -0400)]
zink: remove pipe_stream_output from function params

this is no longer used at all

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>

11 months agozink: stop using pipe_stream_output
Mike Blumenkrantz [Mon, 7 Aug 2023 14:44:13 +0000 (10:44 -0400)]
zink: stop using pipe_stream_output

nir_xfb_info is much cleaner and simpler to use

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>

11 months agozink: delete all the extra gross xfb handling
Mike Blumenkrantz [Fri, 4 Aug 2023 19:47:24 +0000 (15:47 -0400)]
zink: delete all the extra gross xfb handling

xfb outputs should always be inlined into the base variables now,
so there's no need for anything further here

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>

11 months agozink: fix clip/cull dist xfb inlining
Mike Blumenkrantz [Fri, 4 Aug 2023 19:14:21 +0000 (15:14 -0400)]
zink: fix clip/cull dist xfb inlining

these are compact arrays which don't take up slots according to normal
array i/o sizing rules

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>

11 months agozink: delete lower_64bit_vertex_attribs pass
Mike Blumenkrantz [Fri, 4 Aug 2023 18:50:11 +0000 (14:50 -0400)]
zink: delete lower_64bit_vertex_attribs pass

this is no longer useful

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>

11 months agozink: delete split_blocks pass
Mike Blumenkrantz [Fri, 4 Aug 2023 18:43:58 +0000 (14:43 -0400)]
zink: delete split_blocks pass

this is no longer useful

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>

11 months agontt: handle interp intrinsics as derefs
Mike Blumenkrantz [Thu, 10 Aug 2023 21:20:16 +0000 (17:20 -0400)]
ntt: handle interp intrinsics as derefs

this fixes usage_mask gathering for fs inputs

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>

11 months agozink: stop lowering indirect derefs
Mike Blumenkrantz [Fri, 28 Jul 2023 12:18:57 +0000 (08:18 -0400)]
zink: stop lowering indirect derefs

this is no longer necessary

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>

11 months agozink: use lowered io (kinda) for i/o vars
Mike Blumenkrantz [Thu, 27 Jul 2023 17:47:13 +0000 (13:47 -0400)]
zink: use lowered io (kinda) for i/o vars

this runs io lowering on shader create, which is a huge pita
and waste of time since it requires then re-creating all the deref io later,
but it also makes the variables simpler by eliminating struct awfulness
(which was already eliminated by the split_blocks pass, but who's keeping
track) and will enable future use of some bizarro inter-stage linker thing

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>

11 months agozink: add a mode param to find_var_with_location_frac
Mike Blumenkrantz [Fri, 28 Jul 2023 11:23:25 +0000 (07:23 -0400)]
zink: add a mode param to find_var_with_location_frac

no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>

11 months agozink: move fragcolor lowering further along the compile process
Mike Blumenkrantz [Thu, 27 Jul 2023 17:43:58 +0000 (13:43 -0400)]
zink: move fragcolor lowering further along the compile process

no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>

11 months agonir/zink: fix gs emulation xfb_info sizing
Mike Blumenkrantz [Mon, 7 Aug 2023 18:18:56 +0000 (14:18 -0400)]
nir/zink: fix gs emulation xfb_info sizing

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>

11 months agoci/freedreno: document another a530 flake batch
David Heidelberg [Tue, 15 Aug 2023 10:59:27 +0000 (12:59 +0200)]
ci/freedreno: document another a530 flake batch

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24694>

11 months agoaco: don't create sendmsg(dealloc_vgprs) if scratch is used
Rhys Perry [Fri, 11 Aug 2023 19:58:32 +0000 (20:58 +0100)]
aco: don't create sendmsg(dealloc_vgprs) if scratch is used

LLVM does something similar: https://reviews.llvm.org/D153295

fossil-db (gfx1100):
Totals from 21 (0.02% of 133461) affected shaders:
Instrs: 147428 -> 147396 (-0.02%)
CodeSize: 797188 -> 797060 (-0.02%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 2930317cea53 ("aco/gfx11: deallocate VGPRs at the end of the shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24669>

11 months agoradv/rt: Rename traversal_shader to traversal_shader_addr
Konstantin Seurer [Fri, 11 Aug 2023 08:51:47 +0000 (10:51 +0200)]
radv/rt: Rename traversal_shader to traversal_shader_addr

It's more in line with shader_addr and uniform_shader_addr as well as
the user data name.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23565>

11 months agoradv/rt: Rename shader_pc and next_shader
Konstantin Seurer [Sat, 10 Jun 2023 09:37:14 +0000 (11:37 +0200)]
radv/rt: Rename shader_pc and next_shader

The names basically had the same meaning. Changing them to
uniform_shader_addr and shader_addr makes it clear, that
uniform_shader_addr is the jump target and shader_addr is the next
shader executed by this invocation.

The next_ prefix is dropped since both are input and output variables.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23565>