Qiang Yu
39d2bf5e68
mesa: implement mesh shader draw calls
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976 >
2025-09-03 10:21:17 +08:00
Qiang Yu
e8a817f196
mesa: handle mesh shader in state management
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976 >
2025-09-03 10:21:17 +08:00
Qiang Yu
a47c70ce42
mesa: add mesh shader states
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976 >
2025-09-03 10:21:17 +08:00
Qiang Yu
6459dacb8b
gallium: cso context support mesh shader
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976 >
2025-09-03 10:21:16 +08:00
Qiang Yu
bbd97a59c0
mesa: use bitset for driver states tracker
...
We are going to add 16 mesh shader states, but existing
states run out of all bits of uint64_t. So use bitset to
extend the capacity.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976 >
2025-09-03 10:21:16 +08:00
Lionel Landwerlin
0e198f796c
anv/utrace: avoid memseting timestamp buffers by using tracepoint flags
...
Using the flag we can deduce how the timestamp was written and avoid
guessing when reading back.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13806
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37111 >
2025-09-02 21:59:56 +00:00
Lionel Landwerlin
f262865a90
anv: fix pipeline barriers with pre-rasterization stages
...
Pre-rasterization stages need a CS stall if they need to wait on the
flushes from a PIPE_CONTROL.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37132 >
2025-09-02 20:13:11 +00:00
Gurchetan Singh
8a9baab791
mesa3d: util: rust: add proper stubs
...
Fixes some errors when compiling on non-traditional platforms.
Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37097 >
2025-09-02 19:37:19 +00:00
Gurchetan Singh
68f957292e
util: rust: fix some warnings
...
Fixes some warnings.
21 | pub fn new(data: &[u8]) -> Reader {
| ^^^^^ ------ the same lifetime is hidden here
| |
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
= note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
|
21 | pub fn new(data: &[u8]) -> Reader<'_> {
| ++++
Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37097 >
2025-09-02 19:37:19 +00:00
Daniel Schürmann
fcf8899c9e
radv/rt: use ACCESS_CAN_REORDER when loading SBT entries
...
Totals from 56 (0.07% of 79839) affected shaders: (Navi48)
Instrs: 2790220 -> 2790130 (-0.00%); split: -0.00%, +0.00%
CodeSize: 14704952 -> 14704292 (-0.00%)
Latency: 13994383 -> 13953444 (-0.29%); split: -0.29%, +0.00%
InvThroughput: 2717973 -> 2710748 (-0.27%); split: -0.27%, +0.00%
VClause: 68783 -> 68687 (-0.14%)
SClause: 51910 -> 52007 (+0.19%)
Copies: 223192 -> 223190 (-0.00%); split: -0.01%, +0.01%
VALU: 1557513 -> 1557451 (-0.00%); split: -0.00%, +0.00%
VMEM: 118789 -> 118692 (-0.08%)
SMEM: 66498 -> 66595 (+0.15%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36933 >
2025-09-02 19:07:30 +00:00
sarbes
d0b134a71e
lima: clean up unused PP struct
...
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36541 >
2025-09-02 18:44:36 +00:00
Pierre-Eric Pelloux-Prayer
9171461565
radeonsi/sqtt: retry a frame capture after reiszing the buffer
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36930 >
2025-09-02 17:46:47 +00:00
Pierre-Eric Pelloux-Prayer
cd5f77f6c2
radeonsi: sync harder on finish
...
With the threaded submit code, there's a small window where
the fence can be signalled but the buffer lists cleanup code
from amdgpu_cs_submit_ib has not executed yet.
This is harmless in general, because num_active_ioctls is
an optimization.
When the glFinish is called though, it's best to avoid this
inconsistencies because it can create odd behavior as shown
by the flakes being fixed by this commit.
The test runs a query, uses glFinish and expect the results
to be available. Since results availability depends on
num_active_ioctls, it made the test flaky.
Fix this by syncing when PIPE_FLUSH_HINT_FINISH is set.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36930 >
2025-09-02 17:46:46 +00:00
Mike Blumenkrantz
b536e38607
kopper: unwrap screen before checking cpu flag
...
this otherwise may access the trace screen and return garbage
Fixes: 316bf3bd8a ("kopper, dri: remove trace_screen_unwrap")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37140 >
2025-09-02 17:01:38 +00:00
Alyssa Ross
6f8cdd8a3c
gfxstream: guest: don't use transitional LFS64 API
...
musl removed the LFS64 APIs like mmap64(), which were intended to be a
transitional measure multiple decades ago, causing a build failure
here. Since virtio-gpu sizes and offsets are 64-bit, we do still want
to make sure that we're using 64-bit mmap here, so I've added
-D_FILE_OFFSET_BITS=64, which will ensure that off_t is always 64-bit
in gfxstream guest, and which is generally the modern solution here.
With this change, I am able to build gfxstream with musl.
Fixes: fec8e296a3 ("Make VirtGpu* interfaces")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37086 >
2025-09-02 16:45:20 +00:00
Simon Perretta
880098158d
nir/nir_lower_calls_to_builtins: trivially handle IA64 mangled functions
...
Using __attribute__((overloadable)) when declaring nir ops with
variable-width params in clc results in their symbol names being (IA64)
mangled; this change enables the mangled names to be handled when later
lowering the calls.
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com >
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36873 >
2025-09-02 16:04:19 +00:00
Job Noorman
082f4b79ae
bin/rb: update Alyssa's email address in test case
...
Also assert that a is not None to stop pyright from complaining.
Signed-off-by: Job Noorman <jnoorman@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37119 >
2025-09-02 15:57:17 +00:00
Mike Blumenkrantz
1084fc6f4c
mesa: add MESA_DEBUG=fallback_tex
...
this is one of the most common sources of misrendering, and being able
to pinpoint it immediately solves a lot of issues
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37054 >
2025-09-02 15:18:21 +00:00
Mike Blumenkrantz
5fde46f883
mesa: tag a couple framebuffer commands for MESA_VERBOSE=api
...
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37054 >
2025-09-02 15:18:21 +00:00
Mike Blumenkrantz
5cf9318ff2
zink: add some cml flakes
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068 >
2025-09-02 10:46:20 -04:00
Mike Blumenkrantz
4971b58c96
zink: don't increase db scale when resizing a db up to the current scale
...
this otherwise triggers infinite db scaling
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068 >
2025-09-02 14:43:34 +00:00
Mike Blumenkrantz
a0e149ab1d
zink: reset batch descriptor states again before use on recycle
...
this otherwise would lead to enlarging mid-batch again, which incurs
unnecessary sync
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068 >
2025-09-02 14:43:34 +00:00
Mike Blumenkrantz
335610c302
zink: don't init non-db batch stuff in db mode
...
some minor memory savings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068 >
2025-09-02 14:43:34 +00:00
Mike Blumenkrantz
fbddc97b9e
zink: zero db offset on batch reset
...
seems weird this hasn't been caught before
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068 >
2025-09-02 14:43:34 +00:00
Mike Blumenkrantz
a3630c865f
zink: once there are many outstanding submits, check for timeline updates
...
this should ensure that there are never too many cmdbufs pending
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068 >
2025-09-02 14:43:34 +00:00
Mike Blumenkrantz
86d0fc7b38
zink: stop deferring resource object unrefs
...
now that batch state reset is threaded, this is unnecesary
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068 >
2025-09-02 14:43:34 +00:00
Mike Blumenkrantz
cdb9bec202
zink: move buffer hashlist clear to normal batch state reset
...
this is threaded now so it doesn't need to be in the submit thread
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068 >
2025-09-02 14:43:34 +00:00
Mike Blumenkrantz
a184a4ca30
zink: rename zink_batch_state::unref_resources -> unref_resource_objs
...
more accurate
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068 >
2025-09-02 14:43:34 +00:00
Mike Blumenkrantz
3b39ecbdf8
zink: stop trying to oom prune batch states
...
this should be regular enough now that such checks are no longer
necessary
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068 >
2025-09-02 14:43:34 +00:00
Mike Blumenkrantz
ffa5518c45
zink: stop using atomics to check fence submit/complete
...
this isn't actually achieving anything since reading a "wrong" value
here isn't harmful
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068 >
2025-09-02 14:43:34 +00:00
Mike Blumenkrantz
d1f8cd54f4
zink: check ctx batch states first when finding a usable one
...
this ensures the completed ones get queued for recycling faster
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068 >
2025-09-02 14:43:34 +00:00
Mike Blumenkrantz
067873d4a4
zink: defer batch state resets more competently
...
previously batch states would defer resource object destruction until
"later", which was somewhat unreliable in the event that the batch state
wasn't checked again for a long while
instead, defer all "large" batch states and then reset them in the submit
thread, which should yield more consistent results, including in scenarios
with multiple contexts in use
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068 >
2025-09-02 14:43:34 +00:00
Mike Blumenkrantz
6dd081ab1b
zink: null out zink_batch_state::next when reusing a batch state
...
this is harmless at present
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068 >
2025-09-02 14:43:34 +00:00
Mike Blumenkrantz
cec2b1327b
zink: split out batch state finding
...
should be no functional changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068 >
2025-09-02 14:43:34 +00:00
Mike Blumenkrantz
6246590da1
zink: add a util function for appending a batch state
...
these are a singly-linked list with a tail pointer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068 >
2025-09-02 14:43:33 +00:00
Gert Wollny
c1611edc3a
r600/sfn: remove superfluous semicolon
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37123 >
2025-09-02 13:50:31 +00:00
Gert Wollny
d41ac790d0
r600/sfn: Increase limit for lowering local arrays to scratch
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37123 >
2025-09-02 13:50:31 +00:00
Gert Wollny
47c1880275
r600: remove hack to force a new CF if TEX grad is set
...
The sfn scheduler takes care that we don't hit the slot limit for TEX
instructions when doing this.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37123 >
2025-09-02 13:50:31 +00:00
Hans-Kristian Arntzen
f28f72a5a2
nvk: Avoid passing garbage data in descriptor buffers for UBOs.
...
With the existing union setup, only the first 8 bytes are initialized
properly for UBOs, yet the UBO size is 16, and all 16 bytes are copied
to applications. This leads to broken capture-replay since the
descriptor payload is no longer invariant.
Fix this by ensuring all union members are 16 bytes, which then get
properly initialized with the designated initializers.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Fixes: 8b5835af31 ("nvk: Use bindless cbufs on Turing+")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37053 >
2025-09-02 15:24:22 +02:00
Job Noorman
603d6fe240
ir3: use nir_lower_bit_size for 8-bit bit_count
...
8-bit bit_count cannot simply use the masked result of a 16-bit
bit_count. Make sure it is properly lowered to a 16-bit bit_count.
Signed-off-by: Job Noorman <jnoorman@igalia.com >
Fixes: 8aa2cad5df ("ir3: lower relevant 8-bit ALU ops in nir_lower_bit_size")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37116 >
2025-09-02 12:02:03 +00:00
Tapani Pälli
4035520ca9
anv: change some image qualifiers as coherent for Last Of Us
...
This fixes graphics artifacts happening with particular shader.
This 'heuristic' hits few very similar shaders but should provide better
performance than current fix to turn off caching from all shaders.
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/35929 >
2025-09-02 11:04:35 +00:00
David Rosca
3f317348c2
radv/video: Fix VP9 loop filter and segmentation params
...
Fixes: b8ac2d47e7 ("radv/video: add KHR_video_decode_vp9 support.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13801
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37080 >
2025-09-02 10:46:23 +00:00
Daniel Schürmann
441d5aab08
aco/ra: coalesce vector affinities with tied definitions
...
Totals from 19310 (24.19% of 79839) affected shaders: (Navi48)
MaxWaves: 564238 -> 564542 (+0.05%); split: +0.06%, -0.01%
Instrs: 10856428 -> 10803360 (-0.49%); split: -0.53%, +0.04%
CodeSize: 56405088 -> 56189384 (-0.38%); split: -0.41%, +0.02%
VGPRs: 986120 -> 985952 (-0.02%); split: -0.50%, +0.48%
Latency: 53956142 -> 53940850 (-0.03%); split: -0.11%, +0.09%
InvThroughput: 8769260 -> 8735595 (-0.38%); split: -0.49%, +0.11%
VClause: 237471 -> 237452 (-0.01%); split: -0.05%, +0.04%
SClause: 225385 -> 225389 (+0.00%)
Copies: 799792 -> 744150 (-6.96%); split: -7.25%, +0.30%
Branches: 208574 -> 208572 (-0.00%); split: -0.00%, +0.00%
VALU: 6116920 -> 6061448 (-0.91%); split: -0.95%, +0.04%
SALU: 1442068 -> 1441990 (-0.01%); split: -0.01%, +0.00%
VOPD: 1914 -> 1744 (-8.88%); split: +0.10%, -8.99%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36851 >
2025-09-02 10:24:27 +00:00
Daniel Schürmann
2f303636f3
aco/ra: consider precolor affinities in get_reg_vector()
...
No fossil changes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36851 >
2025-09-02 10:24:27 +00:00
Daniel Schürmann
6dbf8f7b90
aco/ra: don't set precolor affinities for already assigned temporaries
...
Also don't overwrite existing precolor affinities.
Totals from 248 (0.31% of 79839) affected shaders: (Navi48)
Instrs: 154427 -> 154401 (-0.02%); split: -0.12%, +0.10%
CodeSize: 812880 -> 812568 (-0.04%); split: -0.12%, +0.08%
VGPRs: 12432 -> 12408 (-0.19%)
Latency: 851623 -> 851801 (+0.02%); split: -0.03%, +0.05%
InvThroughput: 156569 -> 156581 (+0.01%); split: -0.04%, +0.05%
VClause: 2672 -> 2681 (+0.34%); split: -0.34%, +0.67%
Copies: 12645 -> 12660 (+0.12%); split: -0.53%, +0.65%
VALU: 82894 -> 82909 (+0.02%); split: -0.08%, +0.10%
SALU: 25406 -> 25424 (+0.07%); split: -0.07%, +0.14%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36851 >
2025-09-02 10:24:26 +00:00
Daniel Schürmann
eb557fd090
aco/ra: add vector_info::index to indicate the Operand's index into the vector
...
This simplifies the code and will allow for a mismatch between the index and
the Operand's temporary.
Totals from 28 (0.04% of 79839) affected shaders: (Navi48)
Instrs: 18453 -> 18440 (-0.07%); split: -0.08%, +0.01%
CodeSize: 98588 -> 98532 (-0.06%); split: -0.06%, +0.00%
Copies: 1347 -> 1333 (-1.04%); split: -1.11%, +0.07%
VALU: 10431 -> 10417 (-0.13%); split: -0.14%, +0.01%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36851 >
2025-09-02 10:24:26 +00:00
Robert Mader
1772380307
nir: Fixup 10/12 bit SW decoder YCbCr formats
...
The highest possible values that can be represented with
16/12/10 bits are 65535/4095/1023, not 65536/4096/1024.
In order to ensure 1023 maps to 65535 in the Sx10 case
we thus need to multiply by 65535 / 1023 ~= 64.06158
instead of 64.
Fixes: a166d7609f ("gles: Add support for 10/12/16 bit SW decoder YCbCr formats")
Suggested-by: Benjamin Otte <otte@redhat.com >
Signed-off-by: Robert Mader <robert.mader@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric R. Smith <eric.smith@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37077 >
2025-09-02 09:08:51 +00:00
Martin Roukala (né Peres)
4a42ea6785
nvk/ci: switch to default kernel to b2c's default kernel
...
This brings linux v6.16.3 to all CI-tron jobs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37085 >
2025-09-02 07:48:53 +00:00
Martin Roukala (né Peres)
40a632cb18
radv/ci: switch to default kernel to b2c's default kernel
...
This brings linux v6.16.3 to most jobs but the following ones:
* navi21/31: still waiting for the zerovram bug fix
* polaris10: 6.16 introduced an sdma-related hang that is being bisected
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37085 >
2025-09-02 07:48:53 +00:00
Martin Roukala (né Peres)
20dfc94bf6
ci-tron: uprev b2c to v0.9.17
...
This brings also brings Linux v6.16.3 to r300 and etnaviv.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37085 >
2025-09-02 07:48:53 +00:00