763 Commits

Author SHA1 Message Date
Luigi Santivetti
09f096c8df pvr: really free memory in subpass render init
Fixes: 10b6a0d567 ("pvr: Add support for generating render pass hw setup data.")
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
(cherry picked from commit 9651d73671)
2024-10-28 15:49:41 +01:00
Iliyan Dinev
5284b3fcf3 pvr: fix mipmap alignment for non-32bpp textures
There is no alignment necessary between mip levels.

Fixes test cases:
  dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_non_square_fastest
  dEQP-GLES2.functional.texture.mipmap.2d.generate.a8_non_square_nicest
  dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_non_square_fastest
  dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_non_square_nicest
  dEQP-GLES3.functional.texture.mipmap.2d.generate.a8_non_square_fastest
  dEQP-GLES3.functional.texture.mipmap.2d.generate.a8_non_square_nicest
  dEQP-GLES3.functional.texture.mipmap.2d.generate.l8_non_square_fastest
  dEQP-GLES3.functional.texture.mipmap.2d.generate.l8_non_square_nicest

Fixes: 8991e64641 ("pvr: Add a Vulkan driver for Imagination Technologies...")
Signed-off-by: Iliyan Dinev <iliyan.dinev@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
(cherry picked from commit 1d0f23752c)
2024-10-28 15:49:40 +01:00
Luigi Santivetti
f51aef816f pvr: fix calculation for textures z position fractional part
The fractional part of the z position will only be used with linear or bi-linear
filtering. Otherwise it is safe to discard the original fractional value and
reset it to 0.5.

Fixes: 480bdff4b5 ("pvr: Add support to process transfer and blit cmds")
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
(cherry picked from commit 1b67637fa0)
2024-10-28 15:49:40 +01:00
Frank Binns
14e183bca1 pvr: fix image size calculation when mipLevels is 1
When calculating the size of an image, the driver was always factoring in space
for a full mip chain. However, this isn't necessary when mipLevels is 1 and this
resulted in applications needing to allocate more memory for these images than
is strictly necessary. Fix this by calculating the size of additional mip levels
(those greater than mipLevels) when more than 1 mip level has been requested.

Fixes: 2a3aa6da50 ("pvr: Fix cubemap layer stride")
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
(cherry picked from commit 5ef9c552b2)
2024-10-28 15:49:39 +01:00
Matt Coster
2e0bc63f05 pvr: Fix reordering of sub-cmds when performing ds subtile alignment
The use of list_move_to() meant that the first transfer sub-command wasn't being
correctly placed before the target graphics sub-command.

Fixes: d1b17a5edc ("pvr: Implement ZLS subtile alignment")
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
(cherry picked from commit fbca3d64ad)
2024-10-28 15:49:38 +01:00
Matt Coster
bce34bc45e pvr: Fix ds subtile alignment NULL pointer dereference
pvr_cmd_buffer_end_sub_cmd() sets the current sub-command to NULL. This was
causing list_move_to(), which is called immediately after this, to access a NULL
pointer. Fix this by storing the current sub command before calling
pve_cmd_buffer_end_sub_cmd() so that this can be used instead when modifying the
list.

Fixes: d1b17a5edc ("pvr: Implement ZLS subtile alignment")
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
(cherry picked from commit 6ba3c5263d)
2024-10-28 15:49:38 +01:00
Daniel Schürmann
5aac8d24fb aco/spill: fix faulty assertions
By unintentionally using integer division for score(), these
assertions were likely to be raised by accident.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31769>
(cherry picked from commit 30d85b23ef)
2024-10-28 15:49:34 +01:00
Eric Engestrom
2533e38af6 .pick_status.json: Update to 6775524c69 2024-10-28 15:49:29 +01:00
Rohan Garg
cb1b63cb7e anv: Xe2+ doesn't need the special flush for sparse
Fixes: 4aa3b2d ('anv: LNL+ doesn't need the special flush for sparse')
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31737>
(cherry picked from commit 2a34b492d8)
2024-10-23 12:58:14 +02:00
Tapani Pälli
40ca28af98 anv: implement VF_STATISTICS emit for Wa_16012775297
Emit dummy VF_STATISTICS state before each VF state.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31759>
(cherry picked from commit dddd765553)
2024-10-23 12:58:13 +02:00
Tapani Pälli
1a3141acc3 iris: implement VF_STATISTICS emit for Wa_16012775297
Emit dummy VF_STATISTICS state before each VF state.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31759>
(cherry picked from commit 9465d6e3d7)
2024-10-23 12:58:13 +02:00
Chia-I Wu
fcfb957ad5 panvk: fix descriptor set layout hash
Save the hash to layout->vk.blake3, rather than the unused layout->hash.

Fixes: 73518dc169 ("panvk: Add Valhall DescriptorSetLayout implementation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31773>
(cherry picked from commit c23f7a2562)
2024-10-23 12:58:12 +02:00
David Rosca
2f2b79a495 frontends/va: Fix parsing leb128 when using more than 4 bytes
Bit shift would go over 32 bits. Also add assert for maximum
value as allowed by spec.

Fixes coverity issue 1469252 Bad bit shift operation

Fixes: 5edbecb856 ("frontends/va: adding va av1 encoding functions")
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31622>
(cherry picked from commit 2cb3c2e8d5)
2024-10-23 12:58:10 +02:00
Eric Engestrom
e9884d1624 .pick_status.json: Update to d5581b1124 2024-10-23 12:58:07 +02:00
Karol Herbst
6a8666794d radeonsi: move si_compute::global_buffers to si_context
si_set_global_binding is a context function, but it touches the bound
compute program. As radeonsi also advertizes PIPE_CAP_SHAREABLE_SHADERS
this function is supposed to be safe when the same compute state object is
bound to multiple contexts at once.

In order to fix this data race global_buffers is moved to si_context so it
becomes context private data instead.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31672>
(cherry picked from commit 1798597637)
2024-10-22 15:59:55 +02:00
Rhys Perry
ef95d2b1b2 radv: fix output statistic for fragment shaders
This is a per-component bit mask (0xf for each output).

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: 0e0c2574d1 ("radv: Add shader stats for inputs and outputs.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31593>
(cherry picked from commit 9784165de5)
2024-10-22 15:59:54 +02:00
Georg Lehmann
bd1821feb2 aco: fix 64bit extract_i8/extract_i16
The old code only sign extended to 32bit, with a zero hi half.

Fixes: 1f2518ef9f ("aco: implement nir_op_extract/nir_op_insert")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31734>
(cherry picked from commit 10951bb11a)
2024-10-22 15:59:54 +02:00
Mike Blumenkrantz
ea84fd963c vdpau: fail context create if driver does not support video
not all drivers support this, and forcing them to implement stubs
is not how gallium works

cc: mesa-stable

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31736>
(cherry picked from commit b4e18fb188)
2024-10-22 15:59:52 +02:00
Mike Blumenkrantz
e688ecb61b va: fail context create if driver does not support video
not all drivers support this, and forcing them to implement stubs
is not how gallium works

cc: mesa-stable

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31736>
(cherry picked from commit fd0b20e8e8)
2024-10-22 15:59:51 +02:00
Pierre-Eric Pelloux-Prayer
b5a6e63cbd ac/surface: fix determination of gfx12_enable_dcc
For surfaces without a modifier, the surf_size check wasn't
necessary, but it was also invalid since surf_size is set later
(in gfx12_compute_miptree).

Since it's not required anyway, drop this check.

Fixes: 060d5dacfd ("ac: add gfx12 DCC shared code")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31683>
(cherry picked from commit 5607c7ee49)
2024-10-22 15:59:51 +02:00
Pierre-Eric Pelloux-Prayer
8e3c36524f radeonsi: fix radeon_canonicalize_bo_flags domain handling
ffs(VRAM, GTT) returns the GTT bit as it's the smaller.

Simplify the code by explicitely selecting VRAM when both
domains are active, otherwise assert that only 1 bit is set.

Fixes: 593f72aa21 ("winsys/amdgpu-radeon: rework how we describe heaps")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31683>
(cherry picked from commit 19fa5561be)
2024-10-22 15:59:50 +02:00
Pierre-Eric Pelloux-Prayer
4abcd9d978 radeonsi/gfx12: fill missing dcc tiling info
Display DCC support has been enabled in 0bb83a4060 but this TODO
was forgotten.
Now that the kernel is fixed, we can set the related fields.

Fixes: 0bb83a4060 ("ac/surface: finish display DCC for gfx12")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31683>
(cherry picked from commit bb08596645)
2024-10-22 15:59:49 +02:00
Pavel Ondračka
eb40b92691 nir/nir_group_loads: reduce chance of max_distance check overflow
Helps for the case when max_distance is set to ~0, where the pass would now
only create groups of two loads together due to overflow. Found while
experimenting with this pass on r300, however the only driver currently
affected is i915.

With i915 this change gains around 20 shaders in my small shader-db
(most notably some GLMark2, Unigine Tropics, Tesseract, Amnesia) at
the expense of increased register pressure in few other cases.
I'm assuming this is a good deal for such old HW, and this seems like what
was intended when the pass was introduced to i915, but anyway this
could be tweaked further driver side with a more optimized max_distance
value. Only shader-db tested.

Relevant i915 shader-db stats (lpt):
total tex_indirect in shared programs: 1529 -> 1493 (-2.35%)
tex_indirect in affected programs: 96 -> 60 (-37.50%)
helped: 29
HURT: 2
total temps in shared programs: 3015 -> 3200 (6.14%)
temps in affected programs: 465 -> 650 (39.78%)
helped: 1
HURT: 91

GAINED: 20

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: GKraats <vd.kraats@hccnet.nl>
Fixes: 33b4eb149e
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31529>
(cherry picked from commit 33c8dc4f18)
2024-10-22 15:59:48 +02:00
Lionel Landwerlin
3dc3ec9301 isl: fix range_B_tile end_tile_B value
Quoting the documentation :

   "The returned range is a half-open interval where all of the
    addresses within the subimage are < end_tile_B."

This is obviously not true with images smaller than a logical tile.
Currently the code return 1.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24276>
(cherry picked from commit bcc820950d)
2024-10-22 15:59:48 +02:00
Paulo Zanoni
70432dfcfd anv/trtt: fix the creation of sparse buffers of size 2^32 on 32bit systems
When the VkBuffer is of size 2^32 (which matches maxBufferSize), we
have vm_bind->size set to 2^32, which is fine because it fits in an
uint64_t. What is not fine is the 'i' variable being size_t, because
on 32bit systems it will loop forever since it will always be smaller
than 2^32.

Credits to Iván for not only reporting it, but also coming up with the
solution at the same time as I did, then testing it.

Cc: mesa-stable
Reported-by: Iván Briano <ivan.briano@intel.com>
Reviewed-by: Iván Briano <ivan.briano@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31698>
(cherry picked from commit da396a49a0)
2024-10-22 15:59:47 +02:00
Lionel Landwerlin
62d11bb250 elk: Don't apply discard_if condition opt if it can change results
Replicates the change from 57344052b6 ("intel/brw: Don't apply
discard_if condition opt if it can change results")

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0ba9497e66 ("intel/fs: Improve discard_if code generation")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31604>
(cherry picked from commit 608d521086)
2024-10-22 15:59:46 +02:00
Iván Briano
a0c910607f hasvk: fix non matching image/view format attachment resolve
Port of 5a7e58a430 ("anv: fix non matching image/view format attachment resolve")
to hasvk.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31696>
(cherry picked from commit 8423998d69)
2024-10-22 15:59:44 +02:00
Eric Engestrom
c493976106 .pick_status.json: Mark 1dc125338e as denominated 2024-10-22 15:59:43 +02:00
Zan Dobersek
6b58431edd zink: fix bo_export caching
When creating and caching the bo_export object for a given zink_bo, the
screen file descriptor was used. Since no buffer object's file descriptor
would match that, bo_export objects were continuously added to the exports
list and no bo_export was effectively picked from the cache. Using the
buffer object's file descriptor avoids that.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: b0fe621459 ("zink: add back kms handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31715>
(cherry picked from commit b44480e86a)
2024-10-22 12:40:51 +02:00
Anil Hiranniah
dd9c41beee panfrost: Fix a memory leak in the CSF backend
The geometry BO should be released in csf_cleanup_context().

Fixes: 447075eeee ("panfrost: Add support for the CSF job frontend")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31705>
(cherry picked from commit 3d066e5ef1)
2024-10-22 12:40:50 +02:00
Lionel Landwerlin
421848fb8b anv: use stage mask to deduce cs/pb-stall requirements
When flushing the render target cache for future operations, we need a
stall at pixel scoreboard. We likely didn't see any issue until now
because a change in render target added the pb-stall.

When using a 2 compute shaders with the following pattern :
  vkCmdDispatch()
  vkCmdPipelineBarrier() ImageBarrier with (src|dst)AccessMask=0 & identical layout
  vkCmdDispatch()

we should ensure that the first dispatch is completed before executing
the second one, otherwise they can race to on resource accesses. This
fixes failures in some new CTS tests.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31676>
(cherry picked from commit ea2bbe3271)
2024-10-22 12:40:49 +02:00
Christian Gmeiner
7569a01b8b etnaviv: nir: Enforce stricter swizzle for virtual scalar x register
This change enforces stricter swizzle behavior for the virtual scalar x
register, addressing a regression encountered in piglit's
spec@glsl-1.10@execution@derivatives@glsl-derivs-abs-sign test.
The regression occurred after switching to derivative intrinsics.

CC: mesa-stable
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31034>
(cherry picked from commit 5a15b36a64)
2024-10-22 12:40:47 +02:00
Eric Engestrom
7e718ab576 .pick_status.json: Update to 0bffe8ec05 2024-10-22 12:40:38 +02:00
Paulo Zanoni
d53e1c07bd anv/trtt: fix error handling when adding binds
We're missing a check for 'result' in the middle of a loop and we have
an unnecessary check for 'result' after the loop.

Fixes: 7da5b1caef ("anv: move trtt submissions over to the anv_async_submit")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30953>
(cherry picked from commit aea9ac47d2)
2024-10-16 15:21:11 +02:00
Paulo Zanoni
a24d356a17 anv/trtt: set every entry to NULL when we create an L2 table
When we create sparse resources the first thing we do is a NULL bind
on them, as the Vulkan spec mandates certain behavior even for unbound
sparse resources. We do this with the minimal effort possible: if we
can get away with marking an L2 pointer as NULL in the L3 table, we
just do it and return, instead of going all the way to creating L1
tables and marking all the final entries as NULL.

The strategy we were using had a bug that could lead to previously
created NULL entries not being marked as NULL anymore. Let's give an
example:

 (before proceeding, keep in mind that a NULL entry in the L3 and L2
  tables has bit 1 set, it does *not* have the value 0)

 - Create a 64mb buffer that uses an entire L1 table (needs to be
   properly aligned), which triggers a NULL bind.
     - Our algorithm will just set the L3 entry (pointing to the L2
       table) as NULL.
 - Create a 64kb buffer that uses the same L2 table (but a different
   L1 table).
     - The NULL bind triggered won't do anything as the L2 table is
       already NULL.
 - Bind the first buffer to actual memory. This will end up creating
   the L2 table and the L1 table. The only entry we will set in the L2
   table will be the one pointing to the L1 table. All the other
   values will be 0 (so they won't have neither the NULL or Invalid
   bits set: access to them will lead to page faults).
 - Try to use the second buffer, which is still unbound. It was
   relying on the fact that its L2 table pointer was NULL, but now
   it's not anymore, so the page walker will fetch the L1 entries in
   the L2 table and they will all be zero instead of having the NULL
   bit set.

The fix is pretty simple: whenever we create a new L2 table, set every
entry to NULL (except the one we're about to set to non-NULL). This
preserves behavior for every other NULL resource relying on the L3
entry being set to NULL.

We don't need to do this for the L1 table because its entries are
different and instead of having bits to signal NULL entries we have
a special TR-TT register that we can set that gets compared to check
if an entry is NULL, and we conveniently program it to 0: see
ANV_TRTT_L1_NULL_TILE_VAL.

I am not aware of any real workloads that are triggering this
behavior, I found this issue while investigating something else,
running a custom sparse program in our pre-silicon environment, and it
told us about the page faults.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30953>
(cherry picked from commit 4c366ef67b)
2024-10-16 15:21:11 +02:00
Kenneth Graunke
52d70cb73d intel/brw: Use whole 512-bit registers in constant combining on Xe2
Xe2 increased the register size from 256-bits to 512-bits.  So we can
store 32 16-bit values in a register, rather than 16 values.  Prior to
this patch, we hadn't updated the pass, so the second half of each of
our registers was unused.

Backport-to: 24.2
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31499>
(cherry picked from commit 4cb67cb07a)
2024-10-16 15:21:11 +02:00
Kenneth Graunke
8562a40d5d intel/brw: Delete more Gfx8 code from brw_fs_combine_constants
These platforms are supported by elk, not brw.

Backport-to: 24.2
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31499>
(cherry picked from commit d9e5022650)
2024-10-16 15:21:11 +02:00
Kenneth Graunke
1f2d6b6aa2 intel/brw: Fix register and builder size in emit_barrier() for Xe2
We were manually allocating 1 REG_SIZE for the barrier payload, which is
only half a register on Xe2.  This should eventually get allocated to a
whole register anyway, but it's awkward in the meantime.  Also, we were
zero-initializing the header using group(8, 0) which only initialized
half the register.  The rest of the fields are Reserved MBZ, so they're
likely unused and unread anyway - but it's better to zero-initialize
them so we don't get random undefined, miserable-to-debug behavior.

Backport-to: 24.2
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31499>
(cherry picked from commit dea61b7399)
2024-10-16 15:21:11 +02:00
Kenneth Graunke
6fde580e83 intel/brw: Make a ubld temporary in emit_barrier()
Saves typing .exec_all() in a lot of places.

Backport-to: 24.2
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31499>
(cherry picked from commit 7c9eb8b289)
2024-10-16 15:21:11 +02:00
Kenneth Graunke
f1d66fdb08 intel/brw: Delete Gfx7-8 code from emit_barrier()
Those are supported by elk, not brw.

Backport-to: 24.2
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31499>
(cherry picked from commit a9d9488788)
2024-10-16 15:21:11 +02:00
Eric Engestrom
9ea8248060 .pick_status.json: Mark c747c1e1f4 as denominated 2024-10-16 15:21:11 +02:00
Danylo Piliaiev
5b50c4e9a1 nir/opt_16b_tex_image: Sign extension should matter for texel buffer txf
Texel buffer could be arbitrary large, so the assumption being made in
the following comment is wrong:

 "Zero-extension (u16) and sign-extension (i16) have
  the same behavior here - txf returns 0 if bit 15 is set
  because it's out of bounds and the higher bits don't matter."

Sign extension should matter for GLSL_SAMPLER_DIM_BUF.

This fixes the case of doing texelFetch with u16 offset:

  uniform itextureBuffer s1;
  uint16_t offset = some_ssbo.offset;
  value = texelFetch(s1, offset).x;

If the offset is higher than s16 optimization incorrectly
left it as 16b.

In spirv the above glsl is translated into:

  %22 = OpLoad %ushort %21
  %23 = OpUConvert %uint %22
  %24 = OpBitcast %int %23
  %26 = OpImageFetch %v4int %16 %24

Cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31664>
(cherry picked from commit 7b09fc98fb)
2024-10-16 15:21:11 +02:00
Timothy Arceri
bde3e18d65 nir/glsl: set deref cast mode for blocks during function inlining
More cast fixes this time for UBO and SSBO. Which were missing testing
previously.

Fixes: d681cf96fb ("nir/glsl: set deref cast mode during function inlining")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11587

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31668>
(cherry picked from commit aa7c59e02c)
2024-10-16 15:21:11 +02:00
Marek Olšák
8ada91f65b radeonsi: set the valid buffer range for bindless image buffers
This was missing.

Cc: mesa-stable

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31651>
(cherry picked from commit 2272db2ac6)
2024-10-16 15:21:11 +02:00
Marek Olšák
da09a3e97a gallium/u_threaded: fix crash in tc_create_image_handle due to resource == NULL
Fixes: 3df9d8ed80 - gallium/u_threaded: implement pipelined partial buffer uploads using CPU storage
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12020

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31651>
(cherry picked from commit 88f057eb53)
2024-10-16 15:21:11 +02:00
Eric Engestrom
e3d729523a .pick_status.json: Update to 7b09fc98fb 2024-10-16 15:21:11 +02:00
Faith Ekstrand
97fcf87677 nvk: Advertise 64-bit atomics on buffer views
We also add an nvk_format_supports_atomics() helper.  This helper lives
in NVK for now because it's not just about the format and hardware but
also about whether or not we have compiler support in NAK.

Fixes: 1d10de539c ("nvk: Implement VK_EXT_shader_image_atomic_int64")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31633>
(cherry picked from commit c2684968de)
2024-10-16 15:21:11 +02:00
Marek Olšák
224fe5adb7 nir/opt_vectorize_io: fix stack buffer overflow with 16-bit output stores
uncovered by unrelated work

Fixes: 2514999c9c - nir: add nir_opt_vectorize_io, vectorizing lowered IO

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31644>
(cherry picked from commit 64c4d29e65)
2024-10-16 15:21:11 +02:00
Timothy Arceri
fec4dadd55 nir/glsl: set cast mode for image during function inlining
Fixes: d681cf96fb ("nir/glsl: set deref cast mode during function inlining")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11980

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31554>
(cherry picked from commit 46facf9037)
2024-10-16 15:21:11 +02:00
Alessandro Astone
3cd62ed4d8 panvk: Add missing headers to android platform
Fixes: 2de95773b9 ("panvk: Kill panvk_private.h")

Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31610>
(cherry picked from commit 2c79e01259)
2024-10-16 15:21:11 +02:00