Commit graph

224142 commits

Author SHA1 Message Date
Valentine Burley
cc8a53393c ci/android: Update Cuttlefish build
- Switch 'drm_nctx_guest_angle' GPU mode to skiavk, as Turnip now
  supports multiple graphics queues
- Update Mesa to latest main, 1a9a0a15f7 ("ir3: lower undef booleans to
  zero")
- Update virglrenderer to latest main, d2357f2a ("amend missing line
  breaks")

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42152>
2026-06-11 05:50:11 +00:00
Jianxun Zhang
2a681c4f8b intel/decoder: Print more information in shader's headline
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Print out the kernel start pointer (KSP) and the hash of
referenced shader in its headline. This saves some search
in GPU hang dumps,  base on the work of

72bc74f0be and
fd11e4b4d3

An example from a decoded GPU hang dump:

0xeffeffefe19c:  0x10000002:  MI_STORE_DATA_IMM
0xeffeffefe19c:  0x10000002 : Dword 0
    DWord Length: 2
    Force Write Completion Check : false
    Store Qword: 0
    Use Global GTT: false
0xeffeffefe1a0:  0xffe000c0 : Dword 1
    Core Mode Enable: 0
0xeffeffefe1a4:  0x0000effe : Dword 2
    Address: 0xeffeffe000c0
0xeffeffefe1a8:  0x82f94895 : Dword 3 <--- No need to search here
0xeffeffefe1ac:  0x72080025 : Dword 4
    Immediate Data: 2197375125
0xeffeffefe1ac:  0x72080025:  COMPUTE_WALKER
0xeffeffefe1ac:  0x72080025 : Dword 0
...
    body: <struct COMPUTE_WALKER_BODY>
...
    Interface Descriptor: <struct INTERFACE_DESCRIPTOR_DATA>
...
0xeffeffefe1f4:  0x00001f40 : Dword 0
    Kernel Start Pointer: 0x00001f40 <--- No need to search here
...
0xeffeffefe244:  0x00000000 : Dword 37
    Inline Data[7]: 0

Referenced compute shader (ksp: 0x1f40 hash: 0x7208002582f94895): <- ksp & hash printed here
send(1)         g3UD            g2UD            nullUD ...
                ugm MsgDesc: ( load, a64, d32, V64, ...
add(1)          g16<2>UD        g2<0,1,0>UD     0x00000100UD

Note: Shader hash output rquires 'ANV_DEBUG=shader-hash' when running
the workload.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40418>
2026-06-11 03:28:29 +00:00
Faith Ekstrand
e74b92b3da kraid/v9: Allow immediates in logic ops
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42154>
2026-06-11 03:12:39 +00:00
Faith Ekstrand
1ef1039d77 kraid: Add None logic and shift ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42154>
2026-06-11 03:12:39 +00:00
Faith Ekstrand
f85690de83 kraid/v9: Add the rest of the shift/lop ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42154>
2026-06-11 03:12:39 +00:00
Faith Ekstrand
bd47f511f7 kraid/v9: Rework the shift_lop encode macro
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42154>
2026-06-11 03:12:39 +00:00
Faith Ekstrand
c2709e8289 kraid/v9: Fix encoding of high register numbers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42154>
2026-06-11 03:12:39 +00:00
Faith Ekstrand
57696fe0e2 kraid: Split DataType into two enums
This splits DataType in two: A PartialDataType, which can have some
members unspecified, and DataType, which is always fully specified.
Eventually, we may want separate SrcType and DstType but for now we'll
leave them together.  The important thing here, though, is that, once
you get a DataType, you no longer need to check if various bits of it
actually exist.  bits() and comps() now always return non-zero values
which don't need to be wrapped in Option.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42154>
2026-06-11 03:12:39 +00:00
Faith Ekstrand
3bed44c1f8 kraid/builder: Store the model in builders
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42154>
2026-06-11 03:12:39 +00:00
Faith Ekstrand
cc6862e926 kraid: Add map_instrs() methods to Shader and BasicBlock
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42154>
2026-06-11 03:12:39 +00:00
Faith Ekstrand
841da57900 kraid: Make SrcRef PartialEq
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42154>
2026-06-11 03:12:39 +00:00
Faith Ekstrand
af8b5ee30b kraid: Make SrcRef::Imm32 explicitly non-zero
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42154>
2026-06-11 03:12:39 +00:00
Calder Young
814369e1ea anv: Enable support for VK_EXT_device_fault/VK_KHR_device_fault
Enables support for device fault extensions if scratch page is disabled.

The address infos include the list of VM faults queried from the logical
device. Due to limitations in the API, atomic faults will always have an
addressType of write. Extra details about addresses are provided through
the "description" field when the KHR extension is used.

The vendor fault infos include status codes to differentiate between
physical hardware loss or a banned queue. If the fault is related to a
specific queue, the family index, queue index, and flags of the faulted
queue are provided through a vendor fault code and can be used to find
the queue handle using vkGetDeviceQueue.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41318>
2026-06-11 02:45:00 +00:00
Calder Young
6fd3962cfa anv: Print page faults whenever a queue gets banned
Prints the page faults to STDERR whenever a banned queue is detected for
added visibility to developers.

Currently, the only way to get this information without using the device
fault extension is to increase the kernel logging verbosity and check dmesg
after a lost device. In my opinion its a lot more convenient for all parties
involved if the driver could just print this directly to the log instead.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41318>
2026-06-11 02:44:59 +00:00
Calder Young
249c227fa4 anv: Add function to get the list of page faults
Adds function to get the list of page faults, returns NULL if the KMD
is too old or if there was an error retrieving the data.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41318>
2026-06-11 02:44:58 +00:00
Calder Young
39a0d76f64 intel: Add common utils for page fault reporting
Adds some data types and functions for getting the list of page faults
from the KMD using the intel common library.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41318>
2026-06-11 02:44:57 +00:00
Calder Young
5074524788 anv: Track more error codes from certain IOCTLs
The KMDs don't give us a way to query most failure types, we have to track
the error code that was returned by the failing IOCTL to figure out when we
have a PXP invalidation or if the device got disconnected.

These hooks will also give us a place to make the driver to automatically
dump some details about a lost device to the console (such as page fault
addresses) for more visibility to developers.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41318>
2026-06-11 02:44:57 +00:00
nyanmisaka
9dfa65db44 intel/dev: update PTL device names
Ref: https://www.intel.com/content/www/us/en/products/sku/245531/intel-core-ultra-5-processor-338h-18m-cache-up-to-4-70-ghz/specifications.html
Ref: https://www.intel.com/content/www/us/en/products/sku/245523/intel-core-ultra-x7-processor-368h-18m-cache-up-to-5-00-ghz/specifications.html

Fixes: efa7aa4e ("intel/dev: Add PTL PCI IDs (with FORCE_PROBE set)")
Fixes: d84d7b78 ("intel/dev: Add PTL PCI IDs 0xb084-0xb087")
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39931>
2026-06-11 01:02:57 +00:00
Faith Ekstrand
3ebe2b61e8 nvk: Advertise VK_NV_shader_atomic_float16_vector
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37888>
2026-06-11 00:23:36 +00:00
Faith Ekstrand
a3fcccb47b nak/from_nir: Handle f16v2 atomics
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37888>
2026-06-11 00:23:36 +00:00
Faith Ekstrand
b1fe47e944 nak: Rename AtomType::F16x2 to F16v2
This is more consistent with the SrcType.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37888>
2026-06-11 00:23:36 +00:00
Sid Pranjale
0e7eda7f23 nak/nir: lower f16vec2 shared atomics
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37888>
2026-06-11 00:23:35 +00:00
Faith Ekstrand
1a58186ef5 nak/nir: Lower f16vec4 atomics to 2xf16v2
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37888>
2026-06-11 00:23:35 +00:00
Faith Ekstrand
112d5521e5 spirv,nir: Add support for AtomicFloat16VectorNV
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37888>
2026-06-11 00:23:34 +00:00
Faith Ekstrand
c6a98cb2d0 nir: Allow atomic intrinsics to have multiple components
v2 (Sid): Handle image and ssbo atomics having only one component in
          ir3, glsl, pco, and zink

Co-authored-by: Sid Pranjale <sidpranjale127@protonmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37888>
2026-06-11 00:23:34 +00:00
Nanley Chery
28aba5fba4 anv: Set TRANSFER_DST_BIT for HiZ operations
VK_IMAGE_USAGE_TRANSFER_DST_BIT is needed to recognize a surface as a
destination in get_blorp_surf_for_anv_image(). Set this image usage for
HiZ operations to correct the MOCS programming on gfx12.0.

Fixes: 08e82b28e8 ("anv: use the correct MOCS for depth destinations")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42122>
2026-06-10 23:23:59 +00:00
José Roberto de Souza
56d7d5522c anv: Replace va.scratch_surface_state_pool access with a function
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:20 +00:00
José Roberto de Souza
c58b2f0d40 anv: Replace va.binding_table_pool access with a function
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:20 +00:00
José Roberto de Souza
8a563ad905 anv: Replace va.aux_tt_pool access with a function
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:19 +00:00
José Roberto de Souza
1b32e33c01 anv: Replace va.push_descriptor_buffer_pool access with a function
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:19 +00:00
José Roberto de Souza
31377140f9 anv: Replace va.indirect_push_descriptor_pool access with a function
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:18 +00:00
José Roberto de Souza
f6c0ef6a26 anv: Replace va.dynamic_state_pool access with a function
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:17 +00:00
José Roberto de Souza
f745f87711 anv: Replace va.internal_surface_state_pool access with a function
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:16 +00:00
José Roberto de Souza
1c3ed6d5bf anv: Replace va.dynamic_visible_pool access with a function
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:16 +00:00
José Roberto de Souza
1ffdbe276d anv: Replace va.indirect_descriptor_pool access with a function
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:15 +00:00
José Roberto de Souza
ad18acf2f4 anv: Replace va.bindless_surface_state_pool access with a function
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:14 +00:00
José Roberto de Souza
224c60e9ab anv: Use anv_device_get_push_descriptor_buffer_pool()
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:14 +00:00
José Roberto de Souza
7e0d7d2609 anv: Use anv_device_get_indirect_push_descriptor_pool()
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:13 +00:00
José Roberto de Souza
9ef38baad8 anv: Use anv_device_get_bindless_surface_state_pool()
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:13 +00:00
José Roberto de Souza
9713a94ca3 anv: Use anv_device_get_internal_surface_state_pool()
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:12 +00:00
José Roberto de Souza
ce49340a13 anv: Use anv_device_get_scratch_surface_state_pool()
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:12 +00:00
José Roberto de Souza
0c061693d9 anv: Use anv_device_get_binding_table_pool()
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:11 +00:00
José Roberto de Souza
eaf4ec54f4 anv: Use anv_device_get_dynamic_state_pool()
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:11 +00:00
José Roberto de Souza
dfa0f7a26a anv: Use anv_device_get_aux_tt_pool()
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:10 +00:00
José Roberto de Souza
dbf64e9ad5 anv: Use anv_device_get_general_state_pool()
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:10 +00:00
José Roberto de Souza
9d06679d89 anv: Add function to get each anv_state_pool
Xe3P will allow us to reduce the number of anv_state_pool in use, this will
improve performance as it will result in less uAPI calls to allocate memory
and less memory waste in anv_state_pool with not much use.

As this will be a run-time decision, here I'm adding a function to get each
anv_state_pool, then we can just change the function and all the callers will
use the correct anv_state_pool.

Next patches will replace directly access to each anv_state_pool by
a function call in the next patches.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
2026-06-10 22:49:10 +00:00
Julien Schueller
fd616bab71 glx: avoid crash on glXBindTexImageEXT when no texture target set
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
If a GLXPixmap is created without GLX_TEXTURE_TARGET_EXT,
textureTarget remains 0. Calling glXBindTexImageEXT on such a
drawable would pass 0 to _mesa_get_current_tex_object(), triggering
an internal implementation error and a null-pointer segfault.

Return early when textureTarget is 0 - the drawable was never set
up for texturing, so bind is a no-op.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Assisted-by: DeepSeek V4 Flash
Closes: #58
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42093>
2026-06-10 20:57:35 +00:00
Benjamin Cheng
69c7f6d456 radv/video: Use {min,max}_qp caps from ac
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42136>
2026-06-10 20:34:33 +00:00
Benjamin Cheng
880fbcbeee ac/video: Add {min,max}_qp to video enc caps
Signed-off-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42136>
2026-06-10 20:34:33 +00:00
Benjamin Cheng
c2e76e111d radv/video: Report MULTIPLE_SLICE_SEGMENTS_PER_TILE_BIT
VCN supports one tile only, but with multiple slice segments.

Cc: mesa-stable
Signed-off-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42136>
2026-06-10 20:34:33 +00:00