Commit graph

223598 commits

Author SHA1 Message Date
Samuel Pitoiset
52176d43c0 radv/amdgpu: allow RADV_PERFTEST=localbos with virtio
VM_ALWAYS_VALID should be supported now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41960>
2026-06-03 08:22:39 +00:00
Valentine Burley
879dd9ca8c tu: Advertise VK_KHR_internally_synchronized_queues
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is implemented in common code in d8ef386f98 ("vulkan: add support
for VK_KHR_internally_synchronized_queues").

Passes dEQP-VK.synchronization2.internally_synchronized_queues.*

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41926>
2026-06-03 06:21:30 +00:00
Olivia Lee
f1c30d65e1 pan/v13: implement CS udiv
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This will be used for CmdDrawByteCountIndirect on v13, which requires
dividing the byte count by the vertex stride to get the number of
vertices in the draw.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41655>
2026-06-03 01:12:23 +00:00
Olivia Lee
ab34d3af23 pan/v13: implement constant integer multiplication CS helper
All we really need for udiv32 is a 32x32->64 multiply, but the most
efficient way to implement that is to move the 32-bit reg into a 64-bit
reg anyway. So, I figured it simpler to just have the caller do that
than passing a scratch reg into the helper.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41655>
2026-06-03 01:12:23 +00:00
Olivia Lee
d505009ef0 pan/v13: add CS builder functions for shift instructions
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41655>
2026-06-03 01:12:23 +00:00
Olivia Lee
9d90d33776 pan/v13: add CS builder functions for reg/reg add and sub instructions
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41655>
2026-06-03 01:12:23 +00:00
Olivia Lee
b4ae8e548f pan/csf: rename immediate CS add builder functions
v13 adds some register add/sub instructions, and I'd like to use
cs_{add,sub}{32,64} for those to match the naming convention for other
reg/reg instructions. So the existing immediate functions are renamed to
cs_add_imm{32,64}, matching the name of the actual instruction.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41655>
2026-06-03 01:12:23 +00:00
Nanley Chery
2581ae572b anv: Allow partial depth fast clears on gfx12+
Not sure if any workload uses this. This mostly allows us to document
the functionality of HSD 22011236099 on gfx20+.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41712>
2026-06-03 00:51:29 +00:00
Nanley Chery
6f7baf4e7d anv: Skip some CCS performance warnings on gfx9-11
These platforms don't support CCS on MCS/HIZ/STC. There's nothing we can
do about this. So, stop warning about it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41712>
2026-06-03 00:51:28 +00:00
Nanley Chery
888ea50760 anv: Dedent a closing curly brace
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41712>
2026-06-03 00:51:28 +00:00
Nanley Chery
ee40162321 intel/isl: Fix the initial state HiZ state for Xe2+
HSD 22011236099 actually states that there are no illegal values for HiZ
for partial clear operations. Other operations (e.g., copies) may still
result in corruption without a preceding ambiguate.

Fixes: a13aab1859 ("intel/isl: Update the initial HiZ state for Xe2+")
Related: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40987
Tested-by: Nataraj Deshpande <nataraj.deshpande@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41712>
2026-06-03 00:51:27 +00:00
Caio Oliveira
94fc269270 jay: Add INTEL_DEBUG=mda support
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41897>
2026-06-03 00:24:49 +00:00
Caio Oliveira
6701351645 jay: Unify macro for NIR passes
This is a preparation for enabling INTEL_DEBUG=mda in Jay.  Since we are
changing the passes to use a new macro, go ahead and use new JAY_NIR_*
macros so we don't have to rename them again when their implementation
gets decoupled from BRW.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41897>
2026-06-03 00:24:49 +00:00
Yiwei Zhang
bff4e7e4c1 tu: fix to report device memory with heapIndex
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The report data requires VkDeviceMemoryReportCallbackDataEXT::heapIndex
instead of memory type index. Meanwhile, turnip only supports a single
tu_memory_heap and doesn't have a type-to-heap mapping. So here we fix
to report constant 0 for heapIndex.

Fixes: 6d69d7e6bf ("tu: Implement VK_EXT_device_memory_report")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41974>
2026-06-02 23:53:48 +00:00
Yiwei Zhang
02fd326b4a panvk: fix to report device memory with heapIndex
The report data requires VkDeviceMemoryReportCallbackDataEXT::heapIndex
instead of memory type index.

Fixes: c6ff8ce373 ("panvk: support VK_EXT_device_memory_report")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41974>
2026-06-02 23:53:48 +00:00
Mel Henning
e68c9b791c compiler/rust: Fix inline wrapper include dir
This follows the same pattern rusticl uses to handle this. See 36a18208f7

Fixes: b60694b91e ("compiler/rust: Add a float16 wrapper")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15586
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41964>
2026-06-02 22:53:26 +00:00
Daivik Bhatia
990d76eae6 v3dv: Implement and enable nullDescriptor support
Handle null descriptors by emitting zeroed descriptor state.
When the nullDescriptor feature is enabled, a dedicated null_bo is
allocated. Null image descriptors now pack a TEXTURE_SHADER_STATE whose
base address points to this BO, ensuring that the TMU reads from valid
memory.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40485>
2026-06-02 22:29:00 +00:00
Daivik Bhatia
6aed7d2988 broadcom/compiler: add support for null descriptors
Add `v3d_nir_lower_null_descriptors` NIR pass to bypass operations
if the descriptor size is zero, returning 0 where necessary.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40485>
2026-06-02 22:29:00 +00:00
Paulo Zanoni
a268f79ce1 intel/tools: fix stall_csv_filename maybe-unitialized error
On Release builds, I get this:

../../src/intel/tools/intel_eu_stall_viewer.cpp: In function ‘int main(int, char**)’:
../../src/intel/tools/intel_eu_stall_viewer.cpp:269:27: warning: ‘stall_csv_filename’ may be used uninitialized [-Wmaybe-uninitialized]
  269 |    if (!shaders_directory || !stall_csv_filename) {
      |        ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
../../src/intel/tools/intel_eu_stall_viewer.cpp:244:43: note: ‘stall_csv_filename’ was declared here
  244 |    const char *shaders_directory = NULL, *stall_csv_filename;

We can't expect gcc to understand that it's a required argument.

This "fixes" b795a1a20c ("intel/tools: add eu stall viewer").

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41946>
2026-06-02 22:01:01 +00:00
Faith Ekstrand
84e29bbdc2 kraid: Box ops inside Op
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We found this to be a good balanc in NAK.  Instr itself is inlined and
so is the op discriminant but the contents of the op is boxed.  This
means we can determine what op something is without chasing a pointer
but still get to mostly copy pointers as we modify instruction lists.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
c64e968bf8 kraid/isa: Handle field restrictions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
6f214056ce kraid: Add a Model::op_src_supports_imm32() query
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
6cf32abe6b kraid: Make Instruction::get_info() more ergonamic
Since it's returning an Option<&InstructionInfo> anyway, we can handle
the try_into() on behalf of the caller.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
8a2160c611 kraid: Implement nir_op_f2f*
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
ef16712025 kraid: Map H01 and B0123 to None in the encoder
These are an annoying special case.  In order to keep things consistent
and let us pass in None when we don't want any swizzling and ensure that
None both means "Don't swizzle because this instruction can't" and the
identity swizzle, we need to pick a canonical form.  We're already using
None for missing values so it makes sense to canonicalize to None.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
b4947b2a14 kraid: Be more lax about immediates
Instead of asserting that the swizzle replicates, look at the actual
value we're swizzling.  This lets us get away with putting immediates
in 8 and 16-bit ops in more cases.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
0c51b7ffe9 kraid: Implement nir_op_extract_*
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
aa766b8f76 kraid: Add a 16-bit ALU lowering pass
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
b56bf05075 kraid: Add a SrcRef::Zero
While special constants may, in theory, depend on the hardware
generation, we're always guaranteed a free constant zero.  It's
convenient to have this at a higher level in the IR.  Zeros also
don't count towards FAU and special constant read limits so there's
no real risk in special-casing them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
ebe91b02c4 kraid: Implement nir_op_u2u/i2i
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
cd679dbc5d kraid: Support signless IAdd
Signed and unsigned types are only allowed for IADD and not IADD_IMM so
it's simpler if we support signless for regular IADD.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
1ad7ddf076 kraid: Claim we use 64 registers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
f6ed151807 kraid: Implement OpCSel and nir_op_[ui]min/max
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
247e561445 kraid: Clean up the data type mess in the encoder
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
d5a92e5322 kraid/isa: Emit TryFrom<DataType> for all data-type-like enums
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
ac4d8d31ab kraid/isa: Add a special case in to_snake/camel_case() for data types
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
2d849e184c kraid: Use instruction info to implement op_is_message()
This was a lot of plumbing but now we know for sure 100% of the time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
e644edab7a kraid: Break v9 instruction encoding out into traits
This is modeled, again, after what we're doing in NAK.  The new traits
also allow us to query instruction info from the ISA XML.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:27 +00:00
Faith Ekstrand
afb7fb0287 krai/isa: Expose a new InstructionInfo struct per-instruction
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:26 +00:00
Faith Ekstrand
c8cd650898 kraid: Implement integer comparisons
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:26 +00:00
Faith Ekstrand
7e6993a72f kraid: Implement shifts and logic ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:26 +00:00
Faith Ekstrand
d771ba7908 kraid: Add a very dumb message slot assignment pass
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:26 +00:00
Faith Ekstrand
60c3690165 kraid: Add a lower_small_constants() pass
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:26 +00:00
Faith Ekstrand
80ef2aa42e kraid: Add a SmallConstant struct and a Model::small_constants() hook
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:26 +00:00
Faith Ekstrand
4c1d579db4 kraid/isa: Specially handle small_constant_t
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:26 +00:00
Faith Ekstrand
348fd5d3e0 kraid: Add the start of a v9 encoder
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:26 +00:00
Faith Ekstrand
0a4cd88f67 kraid/isa: Add support for field modifiers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:26 +00:00
Faith Ekstrand
b5147b070c kraid/isa: Add an encoder for instructions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:26 +00:00
Faith Ekstrand
c2be5255e5 kraid/isa: Add an encoder for expressiosn
These are parsed into a tree and then the resulting tree implements
ToTokens so we can tokenize it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:26 +00:00
Faith Ekstrand
eeae8938cf kraid/isa: Generate enums with [Try]Encode/Decode
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41841>
2026-06-02 21:19:26 +00:00