platform/upstream/mesa.git
17 months agoradv: Use const keyword more.
Timur Kristóf [Tue, 16 May 2023 00:57:54 +0000 (02:57 +0200)]
radv: Use const keyword more.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23053>

17 months agoac: Use const keyword for some function arguments.
Timur Kristóf [Tue, 16 May 2023 00:54:32 +0000 (02:54 +0200)]
ac: Use const keyword for some function arguments.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23053>

17 months agointel: infer scalar'ness locally for brw_vectorize_lower_mem_access
Rohan Garg [Wed, 17 May 2023 15:26:35 +0000 (17:26 +0200)]
intel: infer scalar'ness locally for brw_vectorize_lower_mem_access

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23098>

17 months agointel: update comments about non-existent function parameter
Rohan Garg [Wed, 17 May 2023 15:25:18 +0000 (17:25 +0200)]
intel: update comments about non-existent function parameter

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23098>

17 months agointel: drop unused is_scalar function parameter in brw_nir_apply_key
Rohan Garg [Wed, 17 May 2023 15:09:06 +0000 (17:09 +0200)]
intel: drop unused is_scalar function parameter in brw_nir_apply_key

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23098>

17 months agointel: infer scalar'ness locally for brw_postprocess_nir
Rohan Garg [Wed, 17 May 2023 14:44:17 +0000 (16:44 +0200)]
intel: infer scalar'ness locally for brw_postprocess_nir

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23098>

17 months agopvr: Fix transfer image clearing PBE packmodes
Oskar Rundgren [Tue, 16 May 2023 17:24:30 +0000 (18:24 +0100)]
pvr: Fix transfer image clearing PBE packmodes

The PBE input format must match format in clear color registers.
Fixes image clearing for following formats:
  - B4G4R4A4_UNORM_PACK16
  - A8B8G8R8_UNORM_PACK32
  - R5G6B5_UNORM_PACK16
  - A1R5G5B5_UNORM_PACK16
  - R8G8B8A8_SNORM
  - R8G8_UNORM
  - R8G8_SNORM
  - R8_UNORM
  - R8_SNORM
  - A2B10G10R10_UINT_PACK32 - only packmode U32 supported

For some of the norm formats the clear color register format was
changed from integer (pvr_float_to_sfixed) to float (pvr_float_to_f16).
This change was done to match the default PBE emit Norm settings.
An alternative way to fix this would have been to change the PBE
Norm setting.

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23082>

17 months agopvr: Use idalloc as the allocator for sync prims
Karmjit Mahil [Fri, 12 May 2023 14:49:35 +0000 (15:49 +0100)]
pvr: Use idalloc as the allocator for sync prims

Previously we allocated the sync prim at the end of the block and
also freed from the end. This is problematic if things are freed
out of order and some new ones allocated within the frees.

This commits uses the idalloc to keep track of the sync prim block
allocations.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23076>

17 months agopvr: Move pvrsrv sync prim code into new pvr_srv_sync_prim.{c,h}
Karmjit Mahil [Fri, 12 May 2023 12:43:51 +0000 (13:43 +0100)]
pvr: Move pvrsrv sync prim code into new pvr_srv_sync_prim.{c,h}

Some setup for later on when we'll start keeping track of sync
prim allocation with a proper allocator.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23076>

17 months agopvr: Add pvrsrvkm sync prim set bridge call
Karmjit Mahil [Fri, 12 May 2023 08:33:06 +0000 (09:33 +0100)]
pvr: Add pvrsrvkm sync prim set bridge call

To reuse a sync prim we'll need to set it to 0 so adding the
bridge call for that.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23076>

17 months agopvr: Simplify descriptor set layout dump separators
Matt Coster [Mon, 15 May 2023 08:25:27 +0000 (09:25 +0100)]
pvr: Simplify descriptor set layout dump separators

There's no need for macros here, and they make clang-format unhappy.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23028>

17 months agopvr: Add PVR_DEBUG=vk_desc option to dump descriptor set layouts
Matt Coster [Fri, 12 May 2023 14:18:10 +0000 (15:18 +0100)]
pvr: Add PVR_DEBUG=vk_desc option to dump descriptor set layouts

Prints on every call to vkCreate{DescriptorSet,Pipeline}Layout().

Previously, this could not be turned on or off at runtime, and was
dependent on DEBUG.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23028>

17 months agopvr: Remove bad assert in pvr_clear_attachments()
Matt Coster [Thu, 11 May 2023 13:59:45 +0000 (14:59 +0100)]
pvr: Remove bad assert in pvr_clear_attachments()

Fixes: dEQP-VK.renderpass.suballocation.formats.d16_unorm.input
  .dont_care.dont_care.clear
Fixes: dEQP-VK.renderpass.suballocation.formats.d32_sfloat.input
  .dont_care.dont_care.clear

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reported-by: James Glanville <james.glanville@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23024>

17 months agopvr: Return correct pbe_accum_format size for A2B10G10R10_UINT_PACK32
Matt Coster [Thu, 11 May 2023 13:29:28 +0000 (14:29 +0100)]
pvr: Return correct pbe_accum_format size for A2B10G10R10_UINT_PACK32

Fixes: dEQP-VK.renderpass.suballocation.formats.a2b10g10r10_uint_pack32
  .input.dont_care.dont_care.clear

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reported-by: James Glanville <james.glanville@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23024>

17 months agopvr: Set output_offset correctly in pvr_clear_color_attachment_static()
Matt Coster [Thu, 11 May 2023 13:29:53 +0000 (14:29 +0100)]
pvr: Set output_offset correctly in pvr_clear_color_attachment_static()

Fixes: dEQP-VK.renderpass.suballocation.formats.r16g16_sint.input
  .dont_care.dont_care.clear

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reported-by: James Glanville <james.glanville@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23024>

17 months agointel/compiler: Postpone most int64 lowering to brw_postprocess_nir
Kenneth Graunke [Fri, 12 May 2023 09:21:03 +0000 (02:21 -0700)]
intel/compiler: Postpone most int64 lowering to brw_postprocess_nir

Float conversions continue to be lowered early at the same time as
nir_lower_doubles, which we run early so we don't have to run it for
every shader key variant.  However, all other int64 lowering is now
done late, after nir_opt_load_store_vectorize(), allowing it to
comprehend basic arithmetic on 64-bit addresses.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23064>

17 months agonir: Add a variant of nir_lower_int64 for float conversions only
Kenneth Graunke [Fri, 12 May 2023 09:20:39 +0000 (02:20 -0700)]
nir: Add a variant of nir_lower_int64 for float conversions only

We'd like to postpone most int64 lowering until pretty late in the
process, because e.g. turning iadd@64 into (unpack + add-low + add-high
+ compare + b2i32 + repack) sequences makes it difficult for many
optimization passes to detect basic arithmetic patterns.  In particular,
nir_opt_load_store_vectorizer becomes unable to handle basic offset math
on 64-bit addresses.

We'd like to do double precision lowering earlier in the process,
however.  One snag is that nir_lower_int64's lower_2f and lower_f2 can
produce operations that may need lowering by nir_lower_doubles(), so
it's crucial to run those sets of lowering together.

To handle this, we make a new entrypoint that does nir_lower_int64
but skips everything except float conversions.  Note that the newly
produced instructions will still be lowered according to the full set
of int64 lowering options; this shouldn't be a huge deal.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23064>

17 months agopvr: Use the suballocator for queries
Karmjit Mahil [Mon, 15 May 2023 16:26:55 +0000 (17:26 +0100)]
pvr: Use the suballocator for queries

Fixes:
  dEQP-VK.api.object_management.max_concurrent.query_pool

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23071>

17 months agopvr: Fix vk_free() in vkCreateRenderPass2() error path
Karmjit Mahil [Fri, 5 May 2023 12:45:07 +0000 (13:45 +0100)]
pvr: Fix vk_free() in vkCreateRenderPass2() error path

There was a missing vk_free() and one at the wrong place.

Fixes:
  dEQP-VK.api.object_management.alloc_callback_fail.render_pass

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23070>

17 months agopvr: Fix possible allocation of 0 size
Karmjit Mahil [Fri, 5 May 2023 13:06:02 +0000 (14:06 +0100)]
pvr: Fix possible allocation of 0 size

Some tests had `input_count == 0` so the driver would attempt to
`vk_alloc()` a size of zero and error out. Add some checks to
prevent that.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23070>

17 months agopvr: Fix missing invalidation of the command buffer
Karmjit Mahil [Thu, 4 May 2023 13:26:35 +0000 (14:26 +0100)]
pvr: Fix missing invalidation of the command buffer

If the command buffer already had an error while recording, on
vkEndCommandBuffer() the command buffer wasn't being transitioned
to the invalid state.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23069>

17 months agopvr: Remove custom status in command buffer
Karmjit Mahil [Thu, 4 May 2023 13:17:28 +0000 (14:17 +0100)]
pvr: Remove custom status in command buffer

Some code still used our custom `status` field within the command
buffer. This could lead to unreliable error handling since we're
using the common vk_command_buffer handling.

This commit removes the field and changes the error paths to use
the common code instead.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23069>

17 months agoradv: fix a sync issue with primitives generated query and NGG/legacy
Samuel Pitoiset [Wed, 17 May 2023 13:55:12 +0000 (15:55 +0200)]
radv: fix a sync issue with primitives generated query and NGG/legacy

On RDNA1&2, the driver needs to support both NGG and legacy for
primitives generated query because we can't know that before starting
queries.

To get the query pool results, we check the availability bit wrote by
the SAMPLE_STREAMOUTSTATS packet but the GDS copy was emitted after,
which means the availability bit might be TRUE before the GDS copy is
actually done.

Fix this by emitting the GDS copy before to ensure the availability is
TRUE for both results.

This fixes recent updates in
dEQP-VK.transform_feedback.primitives_generated_query.* because the
tests no longer wait for the fence.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23080>

17 months agonir/lower_io: don't renumber VS inputs when not called from a linker
Marek Olšák [Thu, 4 May 2023 19:45:49 +0000 (15:45 -0400)]
nir/lower_io: don't renumber VS inputs when not called from a linker

This fixes a Nine regression. The comment explains it.

The new varying linking code will set true here.

Fixes: d29dd333 - nir: assign IO bases in nir_lower_io_passes
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8935

Reviewed-by: Timothy Arceri <tarceri@yahoo.com.au>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22859>

17 months agoloader/dri3: temporarily work around a crash when front is NULL
Konstantin Kharlamov [Thu, 18 May 2023 00:27:08 +0000 (03:27 +0300)]
loader/dri3: temporarily work around a crash when front is NULL

Commit c65bde7b1e introduced a regression where under certain
circumstances `front` may be NULL, thus leading to a crash. It's not
currently known what exactly causes `front` to become NULL, nor we can
revert the offending commit, because there had been too many unrelated
changes that now depend on this commit.

So until someone comes up with a proper fix, let's add a workaround so
instead of crashing we just return from the function early.

This commit was tested with the bug `8982` and helps with the crash
with no other noticeable problems.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8982
Fixes: c65bde7b1e ("frontend/dri: inline __DRIdrawable in dri_drawable, make __DRIdrawable opaque")
Cc: mesa-stable
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23093>

17 months agor600/sfn: use correct FS output location if not all outputs are used
Gert Wollny [Tue, 16 May 2023 16:41:09 +0000 (18:41 +0200)]
r600/sfn: use correct FS output location if not all outputs are used

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

Fixes 79ca456b4837b3bc21cf9ef3c03c505c4b4909f6
    r600/sfn: rewrite NIR backend

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23058>

17 months agor600/sfn: move kill handling fully to scheduling
Gert Wollny [Sun, 14 May 2023 12:48:51 +0000 (14:48 +0200)]
r600/sfn: move kill handling fully to scheduling

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23058>

17 months agor600/sfn: add dependencies for kill instructions
Gert Wollny [Wed, 17 May 2023 06:07:51 +0000 (08:07 +0200)]
r600/sfn: add dependencies for kill instructions

GDS and image instructions have side effects, so they can't be
reordered with kill instructions.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23058>

17 months agor600/sfn: move kill instruction test to alu instruction
Gert Wollny [Wed, 17 May 2023 06:08:22 +0000 (08:08 +0200)]
r600/sfn: move kill instruction test to alu instruction

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23058>

17 months agoglsl: Delete dead intrinsics
Jesse Natalie [Mon, 15 May 2023 22:53:46 +0000 (15:53 -0700)]
glsl: Delete dead intrinsics

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23041>

17 months agomesa/main: Exit early when trying to create an unsupported context API
Jordan Justen [Wed, 17 May 2023 01:46:50 +0000 (18:46 -0700)]
mesa/main: Exit early when trying to create an unsupported context API

Fixes: adbe8b6c17a ("mesa: optimize out _mesa_is_desktop_gl*() and _mesa_is_gles*() calls when not built")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9038
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23068>

17 months agovtn: add more info to bitcast bit size error message
Mike Blumenkrantz [Thu, 11 May 2023 14:21:18 +0000 (10:21 -0400)]
vtn: add more info to bitcast bit size error message

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22932>

17 months agovtn: print spirv ids for type mismatch in bcsel
Mike Blumenkrantz [Tue, 9 May 2023 20:50:06 +0000 (16:50 -0400)]
vtn: print spirv ids for type mismatch in bcsel

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22932>

17 months agovtn: print spirv id for type mismatch error
Mike Blumenkrantz [Tue, 9 May 2023 20:19:41 +0000 (16:19 -0400)]
vtn: print spirv id for type mismatch error

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22932>

17 months agovtn: add spirv index to type mismatch error for debugging
Mike Blumenkrantz [Tue, 9 May 2023 15:51:55 +0000 (11:51 -0400)]
vtn: add spirv index to type mismatch error for debugging

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22932>

17 months agonir: Drop unused argument from nir_ssa_dest_init_for_type
Alyssa Rosenzweig [Wed, 17 May 2023 13:26:20 +0000 (09:26 -0400)]
nir: Drop unused argument from nir_ssa_dest_init_for_type

Similar to nir_ssa_dest_init, but with fewer call sites to churn through.

This was done with the help of Coccinelle:

   @@
   expression A, B, C, D;
   @@

   -nir_ssa_dest_init_for_type(A, B, C, D);
   +nir_ssa_dest_init_for_type(A, B, C);

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23078>

17 months agonir: Drop unused name from nir_ssa_dest_init
Alyssa Rosenzweig [Wed, 17 May 2023 13:08:22 +0000 (09:08 -0400)]
nir: Drop unused name from nir_ssa_dest_init

Since 624e799cc34 ("nir: Drop nir_ssa_def::name and nir_register::name"), SSA
defs don't have names, making the name argument unused. Drop it from the
signature and fix the call sites. This was done with the help of the following
Coccinelle semantic patch:

    @@
    expression A, B, C, D, E;
    @@

    -nir_ssa_dest_init(A, B, C, D, E);
    +nir_ssa_dest_init(A, B, C, D);

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23078>

17 months agospirv: Improve the 'ID is the wrong kind of value' error messages
Caio Oliveira [Fri, 12 May 2023 00:05:26 +0000 (17:05 -0700)]
spirv: Improve the 'ID is the wrong kind of value' error messages

Include the expected and actual values in the errors -- since
very frequently we care about them to diagnose issues.

Since these helpers are meant to be inlined, also pull the
failure code out of the way into a separate function (not meant to
be inlined).  This way, extra calls to to_string will not harm
the existing client code size.  Verified this with GCC release build.

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

17 months agoanv: mark images compressed for untracked layout/access
Lionel Landwerlin [Fri, 12 May 2023 13:20:57 +0000 (16:20 +0300)]
anv: mark images compressed for untracked layout/access

Most of the compressed writes are tracked by the driver, for
instances :
   - blorp writes
   - render target writes

But we don't have any tracking for storage images (which have gained
compression support on DG2+). So inspect the layout transition and
when we see a layout/access that can do writes outside of our driver
tracking, update the image state tracking.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8946
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22988>

17 months agoci/v3d: add flaking opengl 1.1@depthstencil-default_fb-drawpixels-float-and-ushort
David Heidelberg [Wed, 17 May 2023 20:34:08 +0000 (22:34 +0200)]
ci/v3d: add flaking opengl 1.1@depthstencil-default_fb-drawpixels-float-and-ushort

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

17 months agovulkan/pipeline_cache: don't log warnings for client-invisible caches
Daniel Schürmann [Fri, 12 May 2023 10:19:14 +0000 (12:19 +0200)]
vulkan/pipeline_cache: don't log warnings for client-invisible caches

Fixes: d3f06cf5ce0764b37a03a0f2bfbb109a4d75884d ('vulkan/pipeline_cache: don't log warnings for internal caches')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22986>

17 months agodocs/rusticl: add Contributing section
norablackcat [Tue, 16 May 2023 11:18:45 +0000 (05:18 -0600)]
docs/rusticl: add Contributing section

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

17 months agospirv: Fix gl_spirv_validation when OpLine with strings is present
Caio Oliveira [Thu, 11 May 2023 21:33:46 +0000 (14:33 -0700)]
spirv: Fix gl_spirv_validation when OpLine with strings is present

Fix issue by handling the OpString instructions when walking through
the preamble for validation.

The gl_spirv_validation() creates a vtn_builder() and walks the
instructions looking for a subset of the information.  However
our current way to walk the instructions will also perform tracking
of OpLine/OpNoLine, that may make references to OpString instructions
that were being previously ignored by gl_spirv_validation().
This would cause the parsing to fail.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9004
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22973>

17 months agospirv: Extract vtn_handle_debug_text() helper
Caio Oliveira [Thu, 11 May 2023 21:32:45 +0000 (14:32 -0700)]
spirv: Extract vtn_handle_debug_text() helper

This will be later used by gl_spirv handling.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22973>

17 months agodocs/venus: update vtest instructions
Yiwei Zhang [Wed, 17 May 2023 17:49:21 +0000 (10:49 -0700)]
docs/venus: update vtest instructions

This is to reflect the latest steps after an issue with render server in
vtest has been fixed:
https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1115

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23083>

17 months agoiris: Set CS stall bit during HIZ_CCS_WT surface fast clear
Sagar Ghuge [Tue, 16 May 2023 21:39:12 +0000 (14:39 -0700)]
iris: Set CS stall bit during HIZ_CCS_WT surface fast clear

It make sense to enable CS stall so that it guarantees that the fast
clear will start after tile cache flush has completed.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23063>

17 months agoanv: Set CS stall bit during HIZ_CCS_WT surface fast clear
Sagar Ghuge [Tue, 16 May 2023 18:25:33 +0000 (11:25 -0700)]
anv: Set CS stall bit during HIZ_CCS_WT surface fast clear

It make sense to enable CS stall so that it guarantees that the fast
clear will start after tile cache flush has completed.

cc: mesa-stable
closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9030

Fixes: e488773b ("anv: Fast clear depth/stencil surface in vkCmdClearAttachments"
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23063>

17 months agoUprev Piglit to d8c08d123fadb986e9a8a7887b922ff63fcff52e
Collabora's Gfx CI Team [Wed, 17 May 2023 00:04:34 +0000 (00:04 +0000)]
Uprev Piglit to d8c08d123fadb986e9a8a7887b922ff63fcff52e
https://gitlab.freedesktop.org/mesa/piglit/-/compare/536975d94a40cf76a69fcfa786c2513eccd0c989...d8c08d123fadb986e9a8a7887b922ff63fcff52e

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

17 months agoAdd checks for NULL dxil_validator
Luca Bacci [Mon, 27 Mar 2023 15:53:11 +0000 (17:53 +0200)]
Add checks for NULL dxil_validator

Fixes https://gitlab.freedesktop.org/mesa/mesa/-/issues/8718

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

17 months agoanv: put private binding BOs into execlists
Lionel Landwerlin [Thu, 11 May 2023 09:43:00 +0000 (12:43 +0300)]
anv: put private binding BOs into execlists

Not doing so all the reads/writes go to the scratch page on i915.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: f9fa09ec92 ("anv/image: Add ANV_IMAGE_MEMORY_BINDING_PRIVATE")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22957>

17 months agointel/dev: remove dg2 0x5698 pci id
Jonathan Gray [Fri, 12 May 2023 11:57:17 +0000 (21:57 +1000)]
intel/dev: remove dg2 0x5698 pci id

0x5698 is now reserved for future use

From Matt Roper in linux
3a38be31ec82 ("drm/i915/dg2: Drop one PCI ID")

Fixes: 65c9a810eed ("intel/pci_ids: Add dg2 0x5698 pci-id")
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22985>

17 months agoanv: drop duplicated nir_opt_dce passes
Rohan Garg [Wed, 17 May 2023 12:01:06 +0000 (14:01 +0200)]
anv: drop duplicated nir_opt_dce passes

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23075>

17 months agoanv: use the common vulkan runtime to do the heavy lifting
Rohan Garg [Wed, 17 May 2023 12:00:37 +0000 (14:00 +0200)]
anv: use the common vulkan runtime to do the heavy lifting

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23075>

17 months agozink: add feedback loop usage for swapchains
Mike Blumenkrantz [Thu, 11 May 2023 14:33:35 +0000 (10:33 -0400)]
zink: add feedback loop usage for swapchains

affects:
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_linear_filter_color_blit

cc: mesa-stable

Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22959>

17 months agovulkan/wsi: add feedback loop usage to swapchain caps if supported
Mike Blumenkrantz [Thu, 11 May 2023 14:42:15 +0000 (10:42 -0400)]
vulkan/wsi: add feedback loop usage to swapchain caps if supported

this is needed by some apps

cc: mesa-stable

Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22959>

17 months agopvr: Fix deferred_control_stream_flags
James Glanville [Thu, 11 May 2023 12:29:28 +0000 (13:29 +0100)]
pvr: Fix deferred_control_stream_flags

Signed-off-by: James Glanville <james.glanville@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22958>

17 months agopvr: Fix seg fault on unused ds attachment
James Glanville [Thu, 11 May 2023 12:29:10 +0000 (13:29 +0100)]
pvr: Fix seg fault on unused ds attachment

Fixes:
  dEQP-VK.renderpass.suballocation.formats.r16g16_sint.input
    .dont_care.dont_care.self_dep_clear

Signed-off-by: James Glanville <james.glanville@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22958>

17 months agopvr: Transfer image to buffer dest rect
Oskar Rundgren [Wed, 10 May 2023 10:45:17 +0000 (11:45 +0100)]
pvr: Transfer image to buffer dest rect

In copy to buffer region, set dest rect to region size.
The rectangle must be block size adjusted in case of block compressed
format.

Fix test: dEQP-VK.api.copy_and_blit.core.image_to_buffer.regions

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22958>

17 months agopvr: Transfer optimisation remove unused features from API
Oskar Rundgren [Tue, 9 May 2023 15:21:46 +0000 (16:21 +0100)]
pvr: Transfer optimisation remove unused features from API

The transfer command "struct pvr_transfer_cmd" has support for
features not used by Vulkan: colour key, pattern, rop blit and
alpha blending

The whole "struct pvr_transfer_blit" can be removed. Also all code
related to transfer alpha blending can be removed.

This is an optimisation and doesn't fix any dEQP tests.

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22958>

17 months agopvr: Transfer check valid source address mask
Oskar Rundgren [Mon, 8 May 2023 20:14:15 +0000 (21:14 +0100)]
pvr: Transfer check valid source address mask

The mask should be inverted.

Fixes tests in dEQP-VK.api.copy_and_blit.* using the texel unwind workaround.

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22958>

17 months agopvr: fix texel unwind workaround mappings
Oskar Rundgren [Sun, 7 May 2023 11:53:01 +0000 (12:53 +0100)]
pvr: fix texel unwind workaround mappings

Fix the rectangle mappings used with texel unwind workaround (unaligned address).

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22958>

17 months agopvr: Transfer remove byte unwind workaround
Oskar Rundgren [Sun, 7 May 2023 15:48:54 +0000 (16:48 +0100)]
pvr: Transfer remove byte unwind workaround

The byte unwind workaround can be used when source texture virtual
address doesn't meet HW requirements (is unaligned) and the pixel
format can't be changed i.e. destination is compressed. If
destination texture is not compressed the simpler texel extend
workaround can be used.

Currently byte unwind workaround has bugs so removing the
workaround fixes tests in
dEQP-VK.api.copy_and_blit.core.blit_image.simple_tests.* when they
instead use texel extend workaround.

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22958>

17 months agopvr: Transfer support flipped rectangle mapping
Oskar Rundgren [Sun, 7 May 2023 13:31:13 +0000 (14:31 +0100)]
pvr: Transfer support flipped rectangle mapping

The rectangles in "struct pvr_rect_mapping" are unsigned so a
flipped rectangle mapping isn't possible. Add new struct members
flip_x and flip_y to specify flipped mapping.

Add support for flipped rectangles in transfer copy blit path.
Support for flipped rectangles in the clip blit path is not done
in this change.

The new booleans are false by default because transfer command
"struct pvr_transfer_cmd" is zeroed on allocation in
pvr_transfer_cmd_alloc (pvr_blit.c).

Fixes:
  dEQP test case: dEQP-VK.api.copy_and_blit.core.blit_image.simple_tests
    .mirror_xy.nearest

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22958>

17 months agopvr: Transfer block compressed with 3d twiddled layout
Oskar Rundgren [Sun, 7 May 2023 18:02:54 +0000 (19:02 +0100)]
pvr: Transfer block compressed with 3d twiddled layout

Block compressed formats with 3d twiddled memory layout not supported.

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22958>

17 months agopvr: Transfer ignore non zero stride for twiddled surface
Oskar Rundgren [Sun, 7 May 2023 16:00:11 +0000 (17:00 +0100)]
pvr: Transfer ignore non zero stride for twiddled surface

Twiddled surfaces don't use stride but printing info about ignored
stride is not useful on debug driver.

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22958>

17 months agopvr: PBE fix mesa pipe swizzle conversion
Oskar Rundgren [Sun, 7 May 2023 20:00:27 +0000 (21:00 +0100)]
pvr: PBE fix mesa pipe swizzle conversion

The swizzle of pipe formats is described in
"struct util_format_description". The struct has array
"unsigned char swizzle[4];". The index of the array is the colour
channel  (in the order R, G, B and A). The value is what position
the colour channel is sourced from.

In PBE register settings (REG_SWIZ_CHAN[0-3]) the register index is
output channel position (and not colour). The colours are in the PBE
source channels - SWIZ_SOURCE_CHAN0 typically red.

The function pvr_get_pbe_hw_swizzle doesn't translate the swizzle
correctly. Remove function and replace with switch for each colour.
This could be done in a for loop, but there is just as much code
in the loop, it involves pointers and it's less readable for humans.
That's why I opted for this implementation.

Fixed test:
  dEQP-VK.api.copy_and_blit.core.image_to_image
    .all_formats.color.2d.r4g4b4a4_unorm_pack16.b4g4r4a4_unorm_pack16
and other with this pixel format.

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22958>

17 months agoradv: fix resetting VRS if the graphics pipeline doesn't enable it
Samuel Pitoiset [Tue, 16 May 2023 10:14:24 +0000 (12:14 +0200)]
radv: fix resetting VRS if the graphics pipeline doesn't enable it

Otherwise the VRS state isn't reset and the graphics pipeline might
still use the previous VRS state. The VRS state will only be re-emitted
if it's different when the pipeline is bound.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9005
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23052>

17 months agollvmpipe: only include old Transform includes when needed
Pierre-Eric Pelloux-Prayer [Fri, 12 May 2023 07:58:26 +0000 (09:58 +0200)]
llvmpipe: only include old Transform includes when needed

This fixes building with recent LLVM where these 2 .h files
were removed.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8671
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22980>

17 months agoradv: fix emitting VRS state with a null fragment shader
Samuel Pitoiset [Tue, 16 May 2023 09:58:42 +0000 (11:58 +0200)]
radv: fix emitting VRS state with a null fragment shader

Found this while debugging a VRS issue with Valhalla.

Fixes: 87245c6e8e6 ("radv: handle NULL fragment shaders when recording cmdbuf")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23050>

17 months agollvmpipe/cs: refactor cs generator args to use an enum
Dave Airlie [Tue, 16 May 2023 07:36:43 +0000 (17:36 +1000)]
llvmpipe/cs: refactor cs generator args to use an enum

This was horror I should have cleaned up before, clean it up before
mesh shaders make it worse.

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>

17 months agodraw: move to use common sampler/image binding code
Dave Airlie [Thu, 4 May 2023 20:44:55 +0000 (06:44 +1000)]
draw: move to use common sampler/image binding code

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>

17 months agollvmpipe: move to common sampler/image binding code
Dave Airlie [Thu, 4 May 2023 20:39:44 +0000 (06:39 +1000)]
llvmpipe: move to common sampler/image binding code

This leaves the cache stuff in place, but we should consider trying
to consolidate that.

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>

17 months agogallivm: add common code for sample/image tracking.
Dave Airlie [Thu, 4 May 2023 20:36:25 +0000 (06:36 +1000)]
gallivm: add common code for sample/image tracking.

Now that the other code is consoldiated it makes sense to just
consolidate this binding code between the drivers and core

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>

17 months agogallivm/draw/llvmpipe: consolidate the sampler/image dynamic state fns
Dave Airlie [Sat, 27 Aug 2022 00:01:20 +0000 (10:01 +1000)]
gallivm/draw/llvmpipe: consolidate the sampler/image dynamic state fns

These can all be the same now.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>

17 months agogallivm: refactor common resources out of contexts
Dave Airlie [Fri, 26 Aug 2022 20:35:43 +0000 (06:35 +1000)]
gallivm: refactor common resources out of contexts

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>

17 months agollvmpipe: refactor fs/cs jit structure members.
Dave Airlie [Fri, 26 Aug 2022 07:17:34 +0000 (17:17 +1000)]
llvmpipe: refactor fs/cs jit structure members.

This lines them up just like the draw ones.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>

17 months agodraw: align common members in jit context structs.
Dave Airlie [Fri, 26 Aug 2022 07:06:59 +0000 (17:06 +1000)]
draw: align common members in jit context structs.

this makes all the structs have the same baseline members for
resources and aniso_filter_table.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>

17 months agofreedreno: implement GL_ARB_indirect_parameters
Amber [Tue, 28 Feb 2023 13:19:19 +0000 (14:19 +0100)]
freedreno: implement GL_ARB_indirect_parameters

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

17 months agoir3, freedreno: implement GL_ARB_shader_draw_parameters
Amber [Tue, 28 Feb 2023 13:14:35 +0000 (14:14 +0100)]
ir3, freedreno: implement GL_ARB_shader_draw_parameters

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

17 months agonir: Remove legacy atomics
Alyssa Rosenzweig [Mon, 15 May 2023 15:04:57 +0000 (11:04 -0400)]
nir: Remove legacy atomics

The intrinsics are now totally dead and can be removed.

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

17 months agonir/opt_uniform_atomics: Drop legacy atomics
Alyssa Rosenzweig [Mon, 15 May 2023 15:15:50 +0000 (11:15 -0400)]
nir/opt_uniform_atomics: Drop legacy atomics

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

17 months agonir/opt_load_store_vectorize: Reclaim ATOMIC
Alyssa Rosenzweig [Mon, 15 May 2023 15:07:20 +0000 (11:07 -0400)]
nir/opt_load_store_vectorize: Reclaim ATOMIC

NEW_ATOMIC isn't so new anymore.

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

17 months agonir/validate: Drop legacy atomics
Alyssa Rosenzweig [Mon, 15 May 2023 14:32:20 +0000 (10:32 -0400)]
nir/validate: Drop legacy atomics

We duplicated the validation for unified vs legacy atomics, so drop the unused
latter set.

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

17 months agonir/lower_task_shader: Drop legacy atomics
Alyssa Rosenzweig [Mon, 15 May 2023 14:31:50 +0000 (10:31 -0400)]
nir/lower_task_shader: Drop legacy atomics

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

17 months agonir/lower_io: Drop legacy atomics
Alyssa Rosenzweig [Mon, 15 May 2023 14:31:11 +0000 (10:31 -0400)]
nir/lower_io: Drop legacy atomics

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

17 months agonir: Drop legacy atomics in simple cases
Alyssa Rosenzweig [Mon, 15 May 2023 14:30:28 +0000 (10:30 -0400)]
nir: Drop legacy atomics in simple cases

This commit drops legacy atomic support from core passes where we can simply
delete switch cases with no other changes. As such it's separated from the
more complex pass-specific commits for ease of review.

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

17 months agontt: Stop handling legacy atomics
Alyssa Rosenzweig [Mon, 15 May 2023 14:20:29 +0000 (10:20 -0400)]
ntt: Stop handling legacy atomics

Not seen.

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

17 months agonir: Drop nir_lower_legacy_atomics
Alyssa Rosenzweig [Mon, 15 May 2023 14:19:20 +0000 (10:19 -0400)]
nir: Drop nir_lower_legacy_atomics

No more users.

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

17 months agotreewide: Stop lowering legacy atomics
Alyssa Rosenzweig [Mon, 15 May 2023 14:18:18 +0000 (10:18 -0400)]
treewide: Stop lowering legacy atomics

There are no more producers of legacy atomics so these calls are inert.

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

17 months agoac: Produce unified atomic
Alyssa Rosenzweig [Mon, 15 May 2023 15:22:15 +0000 (11:22 -0400)]
ac: Produce unified atomic

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

17 months agointel: Produce unified atomics
Alyssa Rosenzweig [Mon, 15 May 2023 15:19:04 +0000 (11:19 -0400)]
intel: Produce unified atomics

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

17 months agovtn: Produce unified atomics
Alyssa Rosenzweig [Mon, 15 May 2023 14:16:12 +0000 (10:16 -0400)]
vtn: Produce unified atomics

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

17 months agomesa/st: Produce unified atomics
Alyssa Rosenzweig [Mon, 15 May 2023 15:27:15 +0000 (11:27 -0400)]
mesa/st: Produce unified atomics

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

17 months agonir/lower_printf: Produce unified atomic
Alyssa Rosenzweig [Mon, 15 May 2023 15:14:31 +0000 (11:14 -0400)]
nir/lower_printf: Produce unified atomic

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

17 months agonir/lower_atomics_to_ssbo: Produce unified atomics
Alyssa Rosenzweig [Fri, 12 May 2023 15:13:46 +0000 (11:13 -0400)]
nir/lower_atomics_to_ssbo: Produce unified atomics

This could be simplified if we unified also atomic counters, but that's out of
scope for this series.

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

17 months agoglsl/nir: Produce unified atomics
Alyssa Rosenzweig [Fri, 12 May 2023 13:14:30 +0000 (09:14 -0400)]
glsl/nir: Produce unified atomics

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

17 months agolavapipe: Lower legacy atomics sooner
Alyssa Rosenzweig [Mon, 15 May 2023 13:05:47 +0000 (09:05 -0400)]
lavapipe: Lower legacy atomics sooner

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23036>

17 months agov3dv: Lower legacy atomics earlier
Alyssa Rosenzweig [Mon, 15 May 2023 13:02:57 +0000 (09:02 -0400)]
v3dv: Lower legacy atomics earlier

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

17 months agotu: Lower legacy atomics earlier
Alyssa Rosenzweig [Mon, 15 May 2023 13:01:12 +0000 (09:01 -0400)]
tu: Lower legacy atomics earlier

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23036>

17 months agopanvk: Lower legacy atomics earlier
Alyssa Rosenzweig [Mon, 15 May 2023 12:58:45 +0000 (08:58 -0400)]
panvk: Lower legacy atomics earlier

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23036>