Commit graph

212849 commits

Author SHA1 Message Date
Simon Perretta
cd9d55201f pco: use interpolated input intrinsics for shader io
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37540>
2025-09-27 23:45:54 +01:00
Simon Perretta
b111b8a844 pvr, pco: implement prerequisites for sampleRateShading
- Implement load_interpolated_input and friends.
- Optimize load_barycentric_* cases that can be simplified.
- Initial support for non-standard sample locations.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37540>
2025-09-27 23:45:54 +01:00
Simon Perretta
83aecc8f3f mesa/st, nir: commonize unlower_io_to_vars pass
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37540>
2025-09-27 23:45:54 +01:00
Emma Anholt
4531b8ace4 treewide: Make exported DRM FDs read-write.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Without this, somebody trying to map a buffer for write by the CPU would
fail.  This is not common to do in hardware driver environments, but it
shouldn't be disallowed, and there's no downside to allowing it.

I did skip virgl, because that's one where I don't know for sure if there
wouldn't be a downside to allowing RDWR (there are other virt exports
where RDWR is gated on a mappable flag).

This is a follow-up to !37088 to keep copy and paste from introducing the
same bug anywhere else.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37339>
2025-09-27 19:46:14 +00:00
Faith Ekstrand
8ef811b02a spirv: Add support for OpBitcast in OpSpecConstantOp
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is required for OpenCL but not Vulkan.  This fixes a bunch of
OpenCL CTS fails using the SPIR-V back-end in LLVM as opposed to
SPIRV-LLVM-Translator.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37555>
2025-09-27 13:45:12 +00:00
Marek Olšák
7df6431bf7 gallium/u_threaded: remove refcounting for buffer_subdata
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37568>
2025-09-26 23:43:53 +00:00
Marek Olšák
5b688ec078 gallium/u_threaded: remove refcounting for buffer_unmap
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37568>
2025-09-26 23:43:53 +00:00
Marek Olšák
4749325e08 gallium/u_threaded: remove refcounting for get_query_result_resource
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37568>
2025-09-26 23:43:52 +00:00
Marek Olšák
85db3e7de5 gallium/u_threaded: remove refcounting for draw mesh indirect buffers
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37568>
2025-09-26 23:43:52 +00:00
Marek Olšák
381a88fdbd gallium/u_threaded: remove refcounting for clear_buffer
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37568>
2025-09-26 23:43:52 +00:00
Marek Olšák
08c3edac48 gallium/u_threaded: remove refcounting for dispatch compute indirect buffers
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37568>
2025-09-26 23:43:52 +00:00
Marek Olšák
9d15ef96ca gallium/u_threaded: remove refcounting for draw indirect buffers
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37568>
2025-09-26 23:43:52 +00:00
Yiwei Zhang
80126bccf8 panvk: use os_get_option instead of getenv
...so that the options work on Android

Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37591>
2025-09-26 22:52:38 +00:00
Sergi Blanch Torne
114666733c Revert "ci: Fix for GitLab 18.2.2 upgrade"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit ece0d4f998.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37599>
2025-09-26 21:38:36 +00:00
Sergi Blanch Torne
d027f1b336 Revert "ci: Temporarily hardcode S3 artifact path"
This reverts commit a693539ff9.

It was modified in 8803388d15

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37599>
2025-09-26 21:38:36 +00:00
Aleksi Sapon
583526ba2c wsi/metal: fix cleanup on swapchain image creation failure
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33779>
2025-09-26 20:59:35 +00:00
Aleksi Sapon
fd045ac99c wsi/metal: add support for color spaces
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33779>
2025-09-26 20:59:35 +00:00
Aleksi Sapon
f022754647 wsi/metal: move VkFormat -> MTLPixelFormat conversion to wsi_common_metal_layer.m
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33779>
2025-09-26 20:59:34 +00:00
Mel Henning
d32e6f2842 nak: Implement bitfield_extract with OpSgxt
on sm70+ where we don't have a native bfe instruction. This
implementation is fewer instructions than the nir lowering.

This also implements the bfe semantics that vkd3d-proton wants. d3d12
wants specific behavior for out-of-bounds ibfe like
bitfieldExtract(-1, 15, 20) while spirv considers this undefined
behavior. Tested with VKD3D_TEST_FILTER=test_shader_instructions

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13795
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37592>
2025-09-26 20:38:04 +00:00
Mel Henning
c8116679c3 nak: Add OpSgxt
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37592>
2025-09-26 20:38:04 +00:00
Mary Guillemard
1c08e7766e nouveau/headers: Handle unbound sub channels in vk_push_print
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
In case of a unbound subchannel usage, the hardware will route it to the
GPFIFO class.

NVIDIA blobs use this and this was causing an assertion to be fired up
in nv_push_dump.

This adds support for that and also add mapping for cls_gpfifo in
nv_push_dump.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37475>
2025-09-26 19:40:47 +00:00
Mary Guillemard
03869631db nouveau/headers: Import Blackwell host class headers
From nvidia-open-kernel-modules as they missing on open-gpu-doc at the
moment.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37475>
2025-09-26 19:40:47 +00:00
Mary Guillemard
5e9ddffd4a nouveau/headers: Properly set subchannel 3 to 2D engine in vk_push_print
Fixes: 4bb256e5ac ("nouveau: Handle subchannels better in nv_push_print()")
Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37475>
2025-09-26 19:40:47 +00:00
Mel Henning
f8b269e799 nouveau/headers: Use previous method for default
If a given generation hasn't removed any methods, then the default case
can defer to the previous generation without changing the output at all.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37475>
2025-09-26 19:40:47 +00:00
Mel Henning
246b96829f nouveau/headers: Deduplicate push dump impls
Note that this changes the output so it lists the method as being in the
class where it most recently changed rather than always in the class of
the running gpu. Personally, I find this more useful than the old
behavior.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37475>
2025-09-26 19:40:47 +00:00
Mel Henning
e471f20587 nouveau/headers: Split out "cases" in template
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37475>
2025-09-26 19:40:46 +00:00
Mel Henning
7b8017a4b4 nouveau/headers: Mark vk_push_print as cold
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37475>
2025-09-26 19:40:45 +00:00
Mel Henning
e7a62d5eff util/macros: Add ATTRIBUTE_COLD
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37475>
2025-09-26 19:40:45 +00:00
Mary Guillemard
7790f98487 nouveau/headers: Add Blackwell support to nv_push_dump
Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37475>
2025-09-26 19:40:45 +00:00
Mary Guillemard
9dccedc043 nouveau/headers: Include class headers instead of redefining class ids
Also clean up headers.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37475>
2025-09-26 19:40:44 +00:00
Mary Guillemard
b1f97c2778 nouveau/headers: Handle more gpfifo classes in vk_push_print
A good chunk of it excluding AMPERE B (header have a typo on some struct
making it clash with AMPERE A def)

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37475>
2025-09-26 19:40:44 +00:00
Mary Guillemard
fe44e8a7fa nouveau/headers: Handle all 3D classes in vk_push_print
We now handle from BLACKWELL_B down to FERMI_A (FERMI_B is excluded as we are missing the tex header)

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37475>
2025-09-26 19:40:43 +00:00
Mary Guillemard
4b985017dd nouveau/headers: Handle all DMA classes in vk_push_print
We now handle from BLACKWELL_DMA_COPY_B down to GT212_DMA_COPY.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37475>
2025-09-26 19:40:43 +00:00
Mary Guillemard
d7f226a3b2 nouveau/headers: Handle all compute classes in vk_push_print
We now handle from BLACKWELL_COMPUTE_B down to FERMI_COMPUTE_A.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37475>
2025-09-26 19:40:42 +00:00
Mary Guillemard
3a2b53f47f nouveau/headers: Autogenerate push method dumpers
Instead of typing this in nv_push.c, we now generate it based on the
class headers that are generated.

This makes it that we never have human errors in any of the checks and
allow to just support parsing everything we can.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37475>
2025-09-26 19:40:42 +00:00
Jordan Justen
be61c12f3e anv: Use image view base-layer in can_fast_clear_color_att()
We currently only support fast clearing the first layer of an image.
Attachments use VkImageView which can specify a base-layer of the view
for an image attachment.

Fixes: 44351d67f8 ("anv: Change params of anv_can_fast_clear_color_view")
Ref: https://projects.blender.org/blender/blender/issues/141181
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37562>
2025-09-26 19:15:22 +00:00
Aleksi Sapon
8949473023 nir: Fix nir.h MSVC compilation for C++ source files
This kind of C initializer is not accepted by MSVC in C++ mode.

Fixed: 75292ae7 ("nir: Fix gnu-empty-initializer warning ")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37604>
2025-09-26 18:25:22 +00:00
Mel Henning
094804131e nak: Fix divergence test for redux availability
nak's divergence differs slightly from nir's divergence. Fix the test to
match what the backend will use, since we need to allocate a ureg.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13964
Fixes: 295373f29f ("nak: Implement nir_intrinsic_reduce with REDUX")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37585>
2025-09-26 18:07:04 +00:00
Konstantin Seurer
bb3e401cca Revert "lavapipe/ci: Disable stack-use-after-return detection for ASan"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit 44d161a7a0.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37416>
2025-09-26 17:27:32 +00:00
Konstantin Seurer
9094b404d5 vulkan/cmd_queue: Handle struct arrays with pNext
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37416>
2025-09-26 17:27:32 +00:00
Konstantin Seurer
c76da351b0 vulkan/cmd_queue: Handle internal structs
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37416>
2025-09-26 17:27:32 +00:00
Konstantin Seurer
b02ef48e9d vulkan/cmd_queue: Remove unused variable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37416>
2025-09-26 17:27:31 +00:00
Mike Blumenkrantz
b3b2daa28d lavapipe: VK_KHR_copy_memory_indirect
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37589>
2025-09-26 17:05:53 +00:00
Mike Blumenkrantz
010cd37e50 lavapipe: handle aspected depth/stencil memory->image HIC transfers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37589>
2025-09-26 17:05:52 +00:00
Mike Blumenkrantz
daa276b605 lavapipe: move copy_depth_box to lvp_image.c
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37589>
2025-09-26 17:05:52 +00:00
José Roberto de Souza
141a225ca1 intel/brw: Use ASR over SHR for SHADER_OPCODE_ISUB_SAT
src[1]/src0 is signed and Xe2+ SHR don't support operations over signed
data types so lets switch this over ASR that supports signed data
types.

Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37557>
2025-09-26 16:44:24 +00:00
José Roberto de Souza
c45f442d5c intel/decode: Add support to new version of Xe KMD devcoredump with canonical addresses
Customers suggested that Xe KMD should change all possible interfaces
visible to users to canonical address, with that we need some changes
to keep the decode of devcoredump working.

A old version of the tool will not be able to decode secondary batch
buffers when parsing a new version of the file but the new version of
this tool will be able to parse both versions of devcoredump file.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37570>
2025-09-26 16:15:53 +00:00
Danylo Piliaiev
24235bcac3 tu/perfetto: Use a separate track for VK_EXT_debug_utils labels
Labels set via VK_EXT_debug_utils are in a separate track due to the
following part of the spec:
 "An application may open a debug label region in one command buffer and
  close it in another, or otherwise split debug label regions across
  multiple command buffers or multiple queue submissions."

This means labels can start in one renderpass and end in another command
buffer, which breaks our assumption that stages can be modeled as a stack.
While applications aren't expected to use labels in such extreme ways,
even simpler cases can break our assumptions.

Having annotations in a separate track prevents the main track(s) from
entering an invalid state.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37028>
2025-09-26 15:45:21 +00:00
Georg Lehmann
46a4569c22 nir/opt_undef: prefer 0 over NaN for pack_half_2x16_rtz_split
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Using NaN doesn't usually allow any extra optimizations, and 0 is an inline
constant on AMD hw where this opcode is used with undef for fragment shader
exports.

Foz-DB GFX1201:
Totals from 889 (1.11% of 80287) affected shaders:
Instrs: 1676365 -> 1676348 (-0.00%)
CodeSize: 8827040 -> 8821760 (-0.06%)
Latency: 13346728 -> 13346699 (-0.00%)
InvThroughput: 1799283 -> 1799262 (-0.00%)
Copies: 108125 -> 108102 (-0.02%)
VALU: 974875 -> 974852 (-0.00%)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37552>
2025-09-26 15:11:26 +00:00
Georg Lehmann
a7f8c6ed60 radv: call nir_opt_undef late too
Foz-DB GFX1201:
Totals from 2263 (2.82% of 80287) affected shaders:
MaxWaves: 57164 -> 57016 (-0.26%); split: +0.04%, -0.30%
Instrs: 2711595 -> 2678247 (-1.23%); split: -1.23%, +0.00%
CodeSize: 14066656 -> 13929720 (-0.97%); split: -1.01%, +0.03%
VGPRs: 139452 -> 140004 (+0.40%); split: -0.03%, +0.42%
Latency: 15902794 -> 15875935 (-0.17%); split: -0.17%, +0.00%
InvThroughput: 2179122 -> 2165716 (-0.62%); split: -0.62%, +0.00%
SClause: 61416 -> 61477 (+0.10%); split: -0.01%, +0.11%
Copies: 169781 -> 175175 (+3.18%); split: -0.05%, +3.22%
Branches: 53491 -> 53469 (-0.04%)
PreSGPRs: 114087 -> 114086 (-0.00%)
PreVGPRs: 115702 -> 115697 (-0.00%)
VALU: 1555907 -> 1535514 (-1.31%); split: -1.31%, +0.00%
SALU: 362560 -> 353803 (-2.42%)
SMEM: 106263 -> 106259 (-0.00%)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37552>
2025-09-26 15:11:26 +00:00