Danylo Piliaiev
9db945c3be
tu: Add info about usage to command buffers tracepoint
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35637 >
2025-06-20 19:15:44 +00:00
Danylo Piliaiev
9f74fcffe4
tu: Add MESA_TRACE_FUNC to submit and BO alloc paths
...
Makes much easier to see how slow are submits and BO allocs,
which sometimes happen together.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35637 >
2025-06-20 19:15:44 +00:00
Danylo Piliaiev
6e5944ec4b
tu: Cache copy timestamp cs to avoid allocations on submit
...
For non-ONE_TIME_SUBMIT command buffers we have to create CS that
copies u_trace timestamps. Having cs pool allows us to avoid
allocations in most cases.
Together with previous commit, BO allocations on submit would be
rare during normal u_trace tracing.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35637 >
2025-06-20 19:15:44 +00:00
Danylo Piliaiev
a1b9aa3385
tu: Suballocate u_trace buffers to avoid allocations on submit
...
For non-ONE_TIME_SUBMIT command buffers we have to copy tracepoints
which leads to BO allocations. That adds overhead we don't want,
especially when there are many tiny submissions.
While suballocator for u_trace BOs is allocated only when needed,
it's not deallocated afterwards, since the point where it's not needed
is tricky to determine.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35637 >
2025-06-20 19:15:44 +00:00
Alyssa Rosenzweig
8ec4337c1f
hk: drop psiz writes with !largePoints
...
affects geom/tess mostly.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658 >
2025-06-20 18:46:16 +00:00
Alyssa Rosenzweig
691aa581c3
hk: optimize !largePoints
...
should slightly help proton
requires reordering the uvs lowering to be after tes lowering since that can
insert psiz writes.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658 >
2025-06-20 18:46:16 +00:00
Alyssa Rosenzweig
9d7301b2d1
hk: disable custom border for proton
...
zoom.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658 >
2025-06-20 18:46:16 +00:00
Alyssa Rosenzweig
ba4bab0584
hk: make border colour lint quieter
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658 >
2025-06-20 18:46:16 +00:00
Alyssa Rosenzweig
81e005c18b
hk: don't give DXVK fake min/max
...
no games use this, we want to be demoted to fl11 for dxvk for perf anyway.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658 >
2025-06-20 18:46:16 +00:00
Alyssa Rosenzweig
b68f34e1f9
hk: stop uploading blend constants
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658 >
2025-06-20 18:46:15 +00:00
Alyssa Rosenzweig
34b8ef8f7e
hk: stop reserving pile of uniform regs for literally no reason
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658 >
2025-06-20 18:46:15 +00:00
Alyssa Rosenzweig
8fb891334f
hk: make image heap / root uniform dynamic
...
so we don't have to worst case alloc without disrupting gl.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658 >
2025-06-20 18:46:15 +00:00
Alyssa Rosenzweig
f64ba2d2dc
hk: don't advertise b4g4r4a4 format
...
it is optional and broken with opaque_black
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658 >
2025-06-20 18:46:14 +00:00
Alyssa Rosenzweig
3afd675310
hk: use #defines for uniforms
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658 >
2025-06-20 18:46:14 +00:00
Alyssa Rosenzweig
53bbd850f5
asahi: use #defines for uniforms
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658 >
2025-06-20 18:46:14 +00:00
Alyssa Rosenzweig
c3b449ff98
asahi: use #defines for prologs/epilogs
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658 >
2025-06-20 18:46:14 +00:00
Alyssa Rosenzweig
733dd3ba4e
asahi: clean up fs prolog pass
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658 >
2025-06-20 18:46:14 +00:00
Alyssa Rosenzweig
c4b3f8cf74
agx: add headers for uniform abi
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658 >
2025-06-20 18:46:14 +00:00
Alyssa Rosenzweig
5795c8595f
nir: model dynamic uniform layout on hk
...
add some new intrinsics so we can defer lowering until we have the information.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658 >
2025-06-20 18:46:13 +00:00
Yiwei Zhang
7b81c5bb78
vulkan/android: clean up u_gralloc_get_buffer_color_info handling
...
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35613 >
2025-06-20 18:13:36 +00:00
Yiwei Zhang
072223c11d
egl/android: clean up u_gralloc_get_buffer_color_info handling
...
No longer need the defaults, and can properly bail on real errors. The
behavior change of chroma sitting has been mentioned in the prior
commit, and doesn't affect gallium side.
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35613 >
2025-06-20 18:13:36 +00:00
Yiwei Zhang
4b68ed990b
u_gralloc: assign default u_gralloc_buffer_color_info
...
Gralloc is the central piece to align defaults and expectations across
different APIs. Doing so simplifies client side handling. To be noted,
midpoint chroma location is preferred as the default to skip the chroma
lowering pass. The same has been suggested by all Vulkan drivers with
AHB implemented and practiced for years under venus.
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35613 >
2025-06-20 18:13:36 +00:00
Yiwei Zhang
64d18f84b0
u_gralloc/mapper4: fill u_gralloc_buffer_color_info properly
...
Clients are expecting the color info to be fully filled when the api
exists. Give proper defaults for the metadata to stay aligned with
legacy backends.
Also amend the missing ChromaSiting cases.
Fixes: ee42e2166d ("android: Introduce the Android buffer info abstraction")
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35613 >
2025-06-20 18:13:36 +00:00
Yiwei Zhang
0ac1e05f65
u_gralloc/mapper5: fill u_gralloc_buffer_color_info properly
...
Clients are expecting the color info to be fully filled when the api
exists. Give proper defaults for the metadata to stay aligned with
legacy backends.
Fixes: 122fd46b15 ("Android15 support gralloc IMapper5")
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35613 >
2025-06-20 18:13:36 +00:00
Karol Herbst
de1ce0f75e
rusticl: allow packagers to enable freedreno by default
...
The msm driver hasn't yet passed conformance, so it's not part of the
auto set at this point in time. But this will allow distribution to
enable it by default, if they find it suitable.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35618 >
2025-06-20 17:46:32 +00:00
Job Noorman
bc10c812d6
ir3/legalize: apply initial GS/TCS sync in legalize
...
When applying the sync flags after legalize, we might run into the issue
of the first instruction not supporting (ss)/(sy). We cannot insert a
nop at that point anymore since jump targets have already been
calculated. Fix this by applying the sync flags during legalize, where
all other sync flags are also applied.
Signed-off-by: Job Noorman <jnoorman@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35653 >
2025-06-20 17:23:46 +00:00
Job Noorman
e51fa32aac
ir3/legalize: propagate force_ss/sy across blocks
...
Just like the other sync state, we might need to apply this at the start
of successor blocks.
Signed-off-by: Job Noorman <jnoorman@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35653 >
2025-06-20 17:23:46 +00:00
Job Noorman
a5355b5ffd
ir3/legalize: don't force (ss) after predt
...
This isn't necessary and since predt is a terminator and we (mistakenly)
didn't propagate force_ss across blocks, it wasn't actually applied.
Signed-off-by: Job Noorman <jnoorman@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35653 >
2025-06-20 17:23:46 +00:00
Mike Blumenkrantz
2e071cc66c
zink: actually use GENERAL image barrier functions
...
and fix a bunch of issues there
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:32 +00:00
Mike Blumenkrantz
5c2344b6a6
zink: mimic buffer transfer dst noop barrier semantics with images
...
this should better guarantee sync with GENERAL
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:32 +00:00
Mike Blumenkrantz
bbac75acd3
zink: always unset unordered access flags when executing an ordered barrier
...
this otherwise confuses the calculator
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:31 +00:00
Mike Blumenkrantz
ea45f89ebe
zink: always pass through src access flags for buffer barriers
...
this is more accurate and avoids mixing/matching flags from different cmdbufs
probably won't affect anything at this exact moment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:31 +00:00
Mike Blumenkrantz
cb026adc4c
zink: don't use TRANSFER bit as default pipeline stage if no access is set
...
should be TOP_OF_PIPE
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:31 +00:00
Mike Blumenkrantz
5ff573d534
zink: skip sampler layout updates when using GENERAL layouts
...
these are always GENERAL
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
06be46c7a0
zink: add another aggressive sampler barrier after sequential image copies
...
this should better handle pipelined texture uploads
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
e5d1547f08
zink: break out the fb unbind sampler barrier
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
d8c1fdb644
zink: fix GENERAL image copy box resets on non-transfer barrier
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
43def9716b
zink: use GENERAL layout in zink_copy_image_buffer when possible
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
4f329fdc61
zink: local screen variable in zink_copy_image_buffer
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
d30008124d
zink: fix image transfer op batching with GENERAL layouts
...
this depends on the access, not the layout
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
3d073bb0b3
zink: delete barrier sync flag inferring
...
these are all explicit now
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
5f22d3f174
zink: fill in sync flags for a couple barriers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
4483c6195d
zink: put back the sampler barrier on fb unbind with GENERAL layouts
...
this is actually critical to avoid splitting renderpasses regardless of
the layout being used
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Yiwei Zhang
41d241bf6e
radv: relax the native_handle_t::numFds requirement
...
For modern gralloc impl, usually there's other fds appended in the
native_handle_t for gralloc buffer metadata sharing. So numFds can be
greater than 1, while the common agreement is still that the format
plane handles being placed at the beginning in the lack of a standard
format plane fd metadata query mapper api.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13163
Cc: mesa-stable
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35038 >
2025-06-20 16:51:18 +00:00
Alyssa Rosenzweig
b0f8c22682
nir/opt_sink: sink agx backfacing
...
helps an elden ring shader:
Totals from 1 (0.03% of 3206) affected shaders:
Instrs: 4146 -> 4141 (-0.12%)
CodeSize: 27374 -> 27334 (-0.15%)
ALU: 2554 -> 2549 (-0.20%)
FSCIB: 2554 -> 2549 (-0.20%)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35559 >
2025-06-20 16:09:28 +00:00
Alyssa Rosenzweig
3eeba6efdd
nir/opt_preamble: hoist reorderable SSBO loads on AGX
...
basically asahi version of 2f93137308 ("nir/opt_preamble: Handle
load_global_ir3"). elden ring:
Totals from 2409 (75.14% of 3206) affected shaders:
MaxWaves: 2068416 -> 2081984 (+0.66%); split: +0.74%, -0.08%
Instrs: 2439078 -> 1849792 (-24.16%)
CodeSize: 15570886 -> 12196612 (-21.67%)
Spills: 11623 -> 11678 (+0.47%); split: -0.63%, +1.10%
Fills: 9815 -> 9762 (-0.54%); split: -1.37%, +0.83%
Scratch: 31200 -> 31328 (+0.41%); split: -0.23%, +0.64%
ALU: 1154256 -> 1038680 (-10.01%); split: -10.22%, +0.21%
FSCIB: 1154256 -> 1038479 (-10.03%); split: -10.24%, +0.21%
IC: 248318 -> 237344 (-4.42%); split: -4.47%, +0.05%
GPRs: 266323 -> 254621 (-4.39%); split: -4.72%, +0.33%
Uniforms: 639557 -> 794085 (+24.16%); split: -0.07%, +24.23%
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reacted-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35559 >
2025-06-20 16:09:28 +00:00
Christoph Neuhauser
e99446fc5e
egl: Add EGL_EXT_device_query_name and EGL_EXT_device_persistent_id
...
Adds support for the EGL extensions EGL_EXT_device_query_name and
EGL_EXT_device_persistent_id. This enables querying device name, vendor
name, renderer name and device and driver UUIDs.
Signed-off-by: Christoph Neuhauser <christoph.neuhauser@intel.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34958 >
2025-06-20 15:35:44 +00:00
Karol Herbst
ee7536a1e3
radeonsi: implement SVM interfaces
...
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35175 >
2025-06-20 15:10:42 +00:00
Karol Herbst
a107041112
radeonsi: implement resource_get_address
...
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35175 >
2025-06-20 15:10:42 +00:00
Karol Herbst
a1b8c6c404
radeosi: assert addresses are not NULL in a couple of places
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35175 >
2025-06-20 15:10:42 +00:00