Commit graph

201327 commits

Author SHA1 Message Date
Danylo Piliaiev
244e408341 ir3: Consider const alloc alignment in free space size calcs
The alignment was considered only for offset, but its users
(at least ir3_nir_opt_preamble) expect the size itself to also
be aligned.

Fixes tests:
  dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.struct_mixed_types.uniform_buffer_block_geom
  dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.struct_mixed_types.uniform_buffer_block_tessc
  dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.struct_mixed_types.uniform_buffer_block_tesse
  gmem-dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.struct_mixed_types.uniform_buffer_block_tesse

Fixes: 922ef8e720
("ir3: Make allocation of consts more generic and order independent")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33161>
2025-01-23 02:31:48 +00:00
Daniel Schürmann
1feb733cd4 Revert "nir: add nir_clear_divergence_info, use it in nir_opt_varyings"
This reverts commit 9d043e138d.

It is no longer needed. nir_convert_from_ssa() is now capable to
ignore divergence information.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33009>
2025-01-23 01:31:24 +00:00
Daniel Schürmann
f3be7ce01b nir/from_ssa: only consider divergence if requested
This pass used to unconditionally use divergence information
which forced the caller to either call divergence_analysis or
ensure that the divergence is properly reset.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33009>
2025-01-23 01:31:23 +00:00
Marek Olšák
e7214b9446 glapi: rename exported symbols so as not to conflict with old libglapi
libwaffle 1.7.0 has a hack that dlopen's libglapi with RTLD_GLOBAL, which
was meant to preload libglapi, but with this MR it overwrites libgallium's
own symbols, which breaks libgallium.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789>
2025-01-23 00:49:05 +00:00
Marek Olšák
6e3ee3a072 loader: improve the existing loader-libgallium non-matching version error
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789>
2025-01-23 00:49:05 +00:00
Marek Olšák
464dde302c glapi: remove the remap table
it's unused now

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789>
2025-01-23 00:49:05 +00:00
Marek Olšák
b22f682a31 glapi: stop using the remap table
The remap table adds an array lookup into 75% of CALL_* macros, which are
used to call GL functions through the dispatch table. Removing the array
lookup reduces overhead of dispatch table calls.

Since libglapi is now required to be from the same build as libgallium,
the remap table is no longer needed.

This change doesn't remove the remapping table. It only disables it.
Compare asm:

Before:
0000000000000000 <_mesa_unmarshal_Uniform1f>:
   0:   f3 0f 1e fa             endbr64
   4:   48 83 ec 08             sub    $0x8,%rsp
   8:   48 8b 05 00 00 00 00    mov    0x0(%rip),%rax        # f <_mesa_unmarshal_Uniform1f+0xf>
   f:   8b 4e 04                mov    0x4(%rsi),%ecx
  12:   31 d2                   xor    %edx,%edx
  14:   f3 0f 10 46 08          movss  0x8(%rsi),%xmm0
  19:   48 63 80 a8 01 00 00    movslq 0x1a8(%rax),%rax
  20:   85 c0                   test   %eax,%eax
  22:   78 08                   js     2c <_mesa_unmarshal_Uniform1f+0x2c>
  24:   48 8b 57 40             mov    0x40(%rdi),%rdx
  28:   48 8b 14 c2             mov    (%rdx,%rax,8),%rdx
  2c:   89 cf                   mov    %ecx,%edi
  2e:   ff d2                   call   *%rdx
  30:   b8 02 00 00 00          mov    $0x2,%eax
  35:   48 83 c4 08             add    $0x8,%rsp
  39:   c3                      ret

After:
0000000000000000 <_mesa_unmarshal_Uniform1f>:
   0:   f3 0f 1e fa             endbr64
   4:   48 89 f8                mov    %rdi,%rax
   7:   48 83 ec 08             sub    $0x8,%rsp
   b:   f3 0f 10 46 08          movss  0x8(%rsi),%xmm0
  10:   8b 7e 04                mov    0x4(%rsi),%edi
  13:   48 8b 40 40             mov    0x40(%rax),%rax
  17:   ff 90 10 10 00 00       call   *0x1010(%rax)
  1d:   b8 02 00 00 00          mov    $0x2,%eax
  22:   48 83 c4 08             add    $0x8,%rsp
  26:   c3                      ret

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789>
2025-01-23 00:49:05 +00:00
Marek Olšák
44bda7c258 dri: put shared-glapi into libgallium.*.so
so that we don't have to maintain a stable ABI for it.

This will allow removal of the remapping table to reduce CALL_* overhead
for GL dispatch tables.

Also we can now clean it up.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789>
2025-01-23 00:49:05 +00:00
Daniel Schürmann
08560b8ff8 aco/lower_branches: stitch linear blocks if there is exactly one successor with one predecessor
Totals from 12906 (16.26% of 79395) affected shaders: (Navi31)

Instrs: 22051521 -> 22049488 (-0.01%); split: -0.01%, +0.00%
CodeSize: 116591240 -> 116583920 (-0.01%)
Latency: 196625178 -> 196538410 (-0.04%); split: -0.04%, +0.00%
InvThroughput: 33943045 -> 33930615 (-0.04%); split: -0.04%, +0.00%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
c90ae5f773 aco: delete aco_jump_threading.cpp
This is now handled by lower_branches().

Totals from 47236 (59.49% of 79395) affected shaders: (Navi31)
Instrs: 29490400 -> 29490507 (+0.00%)
CodeSize: 152316812 -> 152317248 (+0.00%); split: -0.00%, +0.00%
Latency: 229665459 -> 229665106 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 36870605 -> 36870504 (-0.00%); split: -0.00%, +0.00%
Copies: 1966751 -> 2233467 (+13.56%)
SALU: 3122941 -> 3123048 (+0.00%)

Note, that only about 20 shaders are actually affected.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
c677809f25 aco/lower_branches: allow for non-fallthrough loop exits in try_merge_break_with_continue()
Totals from 211 (0.27% of 79395) affected shaders: (Navi31)

Instrs: 276961 -> 276545 (-0.15%)
CodeSize: 1404356 -> 1402248 (-0.15%)
Latency: 1344722 -> 1344887 (+0.01%); split: -0.00%, +0.01%
InvThroughput: 165624 -> 165622 (-0.00%); split: -0.00%, +0.00%
Branches: 6149 -> 5987 (-2.63%)
SALU: 25722 -> 25468 (-0.99%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
12656ea5f5 aco: move try_merge_break_with_continue() to lower_branches()
Totals from 3 (0.00% of 79395) affected shaders: (Navi31)

Instrs: 12888 -> 12882 (-0.05%)
Latency: 83253 -> 83246 (-0.01%)
InvThroughput: 9251 -> 9249 (-0.02%)
Branches: 483 -> 480 (-0.62%)
SALU: 1329 -> 1326 (-0.23%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
13ad3db43f aco/lower_branches: implement try_remove_simple_block() in lower_branches()
This is mostly the same as in jump_threading, but can handle
multiple predecessors.

Totals from 3523 (4.44% of 79395) affected shaders: (Navi31)

Instrs: 10244892 -> 10244753 (-0.00%); split: -0.00%, +0.00%
CodeSize: 54171500 -> 54168540 (-0.01%); split: -0.01%, +0.00%
Latency: 75070425 -> 75059570 (-0.01%); split: -0.02%, +0.00%
InvThroughput: 11606911 -> 11605767 (-0.01%); split: -0.01%, +0.00%
Branches: 331778 -> 331675 (-0.03%); split: -0.05%, +0.02%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
2b5a893e29 aco/lower_branches: do eliminate_useless_exec_writes_in_block() during branch lowering.
Totals from 728 (0.92% of 79395) affected shaders: (Navi31)

Instrs: 452926 -> 452161 (-0.17%)
CodeSize: 2255536 -> 2252504 (-0.13%)
Latency: 1683404 -> 1683470 (+0.00%); split: -0.01%, +0.01%
InvThroughput: 210887 -> 210888 (+0.00%); split: -0.00%, +0.00%
SALU: 77865 -> 77106 (-0.97%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
eecdb45d61 aco: consider s_cbranch_exec* instructions in needs_exec_mask()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
de1e38e214 aco/assembler: Find loop exits using the successor's loop nest depth
Previously, we just used the next block after a loop that
has a back-edge. This assumes that loop-exit blocks can
only be removed when falling through to the next block,
when in fact it can also be a jump to somewhere else,
in future even to some block before the actual loop.

12 (0.02% of 79395) affected shaders.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
29c63de062 aco/jump_threading: don't remove loop preheaders
They might be needed as convergence point in order to
insert code (e.g. for loop alignment, wait states, etc.).

Totals from 1 (0.00% of 79395) affected shaders:

CodeSize: 12672 -> 12716 (+0.35%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Lucas Stach
4bed508122 etnaviv: track TS flushed status as bool
TS can be valid and flushed at the same time when no compression is
used. This state is beneficial if we needed to flush TS to the base
surface (filling cleared tiles) for any reason, but still use TS
state to accelerate read requests into PE or TX caches.

The current seqno based tracking of the TS flush state has a major
drawback with the following sequence of events:
1. fast clear surface (TS is now valid)
2. flush TS (base surface tiles filled, TS still valid,
   flush seqno == surface seqno)
3. render to surface (surface seqno increased)
4. flush resource

Step 4 will now execute a full TS flush as the flush and surface seqnos
are different after rendering and TS is still valid, wasting memory
bandwidth to fill already filled tiled that are still marked as clear
in the TS state. If the TS has been flushed already, step 4 should be
a no-op.

Switch from the seqno based tracking to tracking the flush state itself,
marking the TS state un-/flushed as needed. With this boolean tracking
of the flush state step4 above will correctly see that the TS has already
been flushed since the last fast clear and skip the tile fill blit.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32956>
2025-01-22 23:50:00 +00:00
Erik Faye-Lund
d74f569035 pan/bi: bump iter_count to 2000
Without this, we fail to register-allocate the shader used in the
dEQP-VK.ssbo.phys.layout.random.8bit.scalar.78 VK-CTS test case.

Yeah, this sucks, but failing to compile sucks even more. We need a new
register allocator plan here.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33124>
2025-01-22 23:19:18 +00:00
Samuel Pitoiset
b4085df31c radv: re-emit streamout state for GFX12 when the user SGPR changes
This is more for consistency than a real fix.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33164>
2025-01-22 22:54:23 +00:00
Caterina Shablia
d46b80249b panvk: enable subgroupSizeControl
This is trivial for us, the hardware only ever supports a single
subgroup size.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:52 +00:00
Erik Faye-Lund
1a81bff6aa panvk: expose vk1.1 on v10 hardware
Subgroup ops were the last bit missing

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:52 +00:00
Erik Faye-Lund
ac05c2a2b8 panvk: expose subgroup operations
We can't use VK_SHADER_STAGE_ALL here, because we don't support geometry
and tesselation shaders. Additionally, the DDK doesn't support the
vertex stage, so let's not even try that for now; it probably won't
work.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:52 +00:00
Caterina Shablia
d2838f3ceb pan/bi: handle barriers with SUBGROUP scope
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:52 +00:00
Caterina Shablia
f77a50e45e pan/bi: add a MEMORY_BARRIER pseudo-instruction
This is purely a scheduling barrier for memory instructions. We
need this to implement subgroup barriers.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:52 +00:00
Caterina Shablia
39bd5cba68 pan/bi: lower the rest of subgroup ops using nir_lower_subgroups
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Caterina Shablia
d5c5528e06 pan/bi: lower some subgroup intrinsics
Lower vote_any, vote_all, load_subgroup_id, load_subgroup_size and
load_num_workgroups.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Caterina Shablia
1b59b9edee pan/bi: handle ballot, ballot_relaxed and as_uniform
Implement as_uniform with a simple mov, as the HW doesn't have
uniform registers (registers shared by all threads in the warp)
like some other hardware does.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Caterina Shablia
a73a0592d6 pan/bi: handle read_invocation
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Caterina Shablia
47ed7d90af pan/va: fix WMASK packing
WMASK's subgroup argument wasn't being encoded so we'd always
end up with a WMASK.subgroup2.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Caterina Shablia
a96de77f8b pan/bi: fix a typo
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Lars-Ivar Hesselberg Simonsen
7b949dd8c4 panvk: Use LD_VAR_BUF[_IMM] when possible
If we determine that the amount of varyings will fit within the 8-bit
offset of LD_VAR_BUF[_IMM], instruct the compiler to use it for varyings
and skip setting up Attribute Descriptors.

This should save a bit of memory and overhead in reading varyings.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32969>
2025-01-22 20:57:18 +00:00
Lars-Ivar Hesselberg Simonsen
de86641d3f panvk: Limit AD allocation to max var loads in v9+
Introduce a varying load count pass to get the maximum amount of varying
loads from a fragment shader (prior to optimization passes), in order to
only allocate as many Attribute Descriptors as required. This will
generally lead to smaller buffers in SRT0 for fragment shaders.

As the amount of ADs is now dynamic based on the shader, we need to
lower varying loads early for fragment shaders in v9+, as the amount of
ADs will determine the offset for dummy_sampler, required during
nir_lower_descriptors.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32969>
2025-01-22 20:57:18 +00:00
Lars-Ivar Hesselberg Simonsen
6d5ae5b3af panvk: Use LD_VAR[_IMM] + ADs for varyings
The current implementation uses LD_VAR_BUF[_IMM] to look up varyings,
which limits the number of varying components to 64 due to an 8-bit
offset value.

As this does not align to maxVertexOutputComponents (128), this change
replaces the use of LD_VAR_BUF[_IMM] with LD_VAR[_IMM] + Attribute
Descriptors, which do not have this limitation.

As allocating Attribute Descriptors is potentially expensive, this can
be further optimized by falling back to LD_VAR_BUF[_IMM] in cases where
we can ensure we do not use more than 64 varying components.

This change currently does not change behavior for gallium/panfrost,
though that should be done as well.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32969>
2025-01-22 20:57:18 +00:00
Lars-Ivar Hesselberg Simonsen
7881d19d01 pan/genxml: Fix vertex_packet Attribute on v9+
The fields "Attribute stride" and "Packet stride" are in the wrong
order, and "Packet stride" should not be shr() modified.

This has probably not shown up as an issue before due to the use of
LD_VAR_BUF[_IMM] for varyings, which does not require us to create
Attribute Descriptors with type vertex_packet.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32969>
2025-01-22 20:57:18 +00:00
Valentine Burley
d57beebc8d freedreno/ci: Update expectations
Most of these results changed in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33158>
2025-01-22 20:26:15 +00:00
Mike Blumenkrantz
e1e622dfb0 zink: fix viewport detection when switching last stage shaders
the previous code checked e.g., VS -> GS binding, but it did not
correctly handle VS -> VS in order to toggle viewport state

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33144>
2025-01-22 17:07:53 +00:00
duncan.hopkins
4fa9c7d241 zink: stop zink_set_primitive_emulation_keys producing geometry shaders on platforms that do not support them.
If line smooth, stipple, quad_prims and a collection of other things are needed, zink produces a geometry shader to create them.

This code is disabling that from happening when there is no geometry shader support.
This removes a constant barrage of validation issues when trying to draw basic triangles.
Some of this missing functionality will be added back in later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33059>
2025-01-22 16:41:31 +00:00
Martin Roukala (né Peres)
6a4c99adf1 radeonsi/ci: update the vangogh expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33128>
2025-01-22 16:10:55 +00:00
Martin Roukala (né Peres)
7f2d03b81b zink/ci: update RADV expectations
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33128>
2025-01-22 16:10:55 +00:00
Martin Roukala (né Peres)
78624c41e3 zink/ci: update nvk expectations
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33128>
2025-01-22 16:10:55 +00:00
Marek Olšák
c4a8790fd7 zink/ci: skip KHR-Single-GL46...SizedDeclarationsPrimitive due to random timeout
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33157>
2025-01-22 15:32:25 +00:00
Pierre-Eric Pelloux-Prayer
d27748a76f radeonsi: use ac_drm_device_get_cookie
Instead of the raw ac_drm_device pointer which will be different
for each call to ac_drm_device_initialize.

Fixes: a565f2994f ("amd: move all uses of libdrm_amdgpu to ac_linux_drm")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33081>
2025-01-22 14:55:56 +00:00
Pierre-Eric Pelloux-Prayer
6cee989915 amd: add ac_drm_device_get_cookie
This returns the underlying device pointer but as an opaque
uintptr_t.
This will be required because libdrm_amdgpu will return the
same device when called multiple times from the same process.

radeonsi relies on the pointer value to identify if the device
are the same and adjust the synchronisation logic based on that.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33081>
2025-01-22 14:55:56 +00:00
Erik Faye-Lund
ff91457761 pan/compiler: don't pass midgard_instruction by value
This is a large struct, so let's pass it by reference instead of by
value.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32851>
2025-01-22 13:50:44 +00:00
Erik Faye-Lund
80bacbba23 pan/midgard: constify pointers
This makes it easier to reason about what arguments are going to be
modified and what aren't.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32851>
2025-01-22 13:50:44 +00:00
Erik Faye-Lund
430f7e991f pan/midgard: use macros for mir_prev_op / mir_next_op
The benefit of macros here is that they don't care about constness,
which is going to be benefitial once we stricten constness a bit here.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32851>
2025-01-22 13:50:43 +00:00
David Rosca
a3871da932 radeonsi: Fix reporting support for AV1 Profile2
This reported support for Profile2 on all VCNs that support Profile0
and reported no supported formats if Profile2 was not supported.
Instead, we should not advertise the Profile2 at all if not supported.

Fixes: e359b3c525 ("radeonsi/vcn: support 12bit YUV420 AV1 decoding")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33092>
2025-01-22 13:17:50 +00:00
David Rosca
927f963726 gallium/auxiliary: Remove util_compute_blit
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:04 +00:00
David Rosca
762a86c937 frontends/va: Implement format conversions in PutImage/GetImage
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:04 +00:00