Commit graph

218134 commits

Author SHA1 Message Date
Nanley Chery
c69f7904e3 anv: Enable YCRCB CMFs on Xe2+
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Allow the CCS_E aux-usage for YUV formats on Xe2+.

Reviewed-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39628>
2026-02-04 02:23:50 +00:00
Nanley Chery
381f4a658f intel/isl: Add YCRCB CMF mappings for Xe2+
These formats are listed under "media mapping" on Bspec 63919.

Reviewed-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39628>
2026-02-04 02:23:48 +00:00
Nanley Chery
23a3c8c972 intel: Disable CCS_E support for YCRCB on gfx12
The table in Bspec 47715 lists these formats as "Not Supported" in the
"Lossless Compression Support" column.

Reviewed-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39628>
2026-02-04 02:23:48 +00:00
Maaz Mombasawala
a66d19b691 Revert "ci: disable vmware farm"
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 1d120c1bf2.

Docker authentication issue, should be resolved now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39472>
2026-02-03 23:14:27 +00:00
Maaz Mombasawala
a188bac3f3 svga: Update CI expectations.
Update expectations based on run -
https://gitlab.freedesktop.org/mombasa/mesa/-/pipelines/1597265/

Signed-off-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39683>
2026-02-03 22:54:51 +00:00
Karol Herbst
5890aedf8c nak: replace get_io_addr_offset with nir_opt_offsets
Totals:
Totals:
CodeSize: 9521188272 -> 9474779520 (-0.49%); split: -0.50%, +0.01%
Number of GPRs: 47361498 -> 47340754 (-0.04%); split: -0.05%, +0.00%
SLM Size: 5444552 -> 5444436 (-0.00%)
Static cycle count: 6182267636 -> 6141873245 (-0.65%); split: -0.69%, +0.03%
Spills to memory: 44288 -> 44241 (-0.11%)
Fills from memory: 44288 -> 44241 (-0.11%)
Spills to reg: 185307 -> 185246 (-0.03%); split: -0.06%, +0.03%
Fills from reg: 225943 -> 225895 (-0.02%); split: -0.04%, +0.01%
Max warps/SM: 50637496 -> 50646924 (+0.02%); split: +0.02%, -0.00%

Totals from 118675 (10.20% of 1163204) affected shaders:
CodeSize: 2675917792 -> 2629509040 (-1.73%); split: -1.77%, +0.04%
Number of GPRs: 7190170 -> 7169426 (-0.29%); split: -0.32%, +0.03%
SLM Size: 2694216 -> 2694100 (-0.00%)
Static cycle count: 3780817453 -> 3740423062 (-1.07%); split: -1.12%, +0.05%
Spills to memory: 40938 -> 40891 (-0.11%)
Fills from memory: 40938 -> 40891 (-0.11%)
Spills to reg: 78989 -> 78928 (-0.08%); split: -0.14%, +0.06%
Fills from reg: 83274 -> 83226 (-0.06%); split: -0.10%, +0.04%
Max warps/SM: 4219736 -> 4229164 (+0.22%); split: +0.23%, -0.01%

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39525>
2026-02-03 22:23:51 +00:00
Karol Herbst
e5bf1f5aff nir/opt_offsets: support nvidias intrinsics
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39525>
2026-02-03 22:23:51 +00:00
Karol Herbst
cb60e4d14f nir/opt_offsets: support negative offsets and 64 bit sources
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39525>
2026-02-03 22:23:51 +00:00
Karol Herbst
f456735d11 nak: convert memory load/stores to nv variants
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39525>
2026-02-03 22:23:50 +00:00
Karol Herbst
4add3959e9 nir: add BASE to nvidia memory intrinsics
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39525>
2026-02-03 22:23:50 +00:00
Karol Herbst
e779538ad2 nir: add nvidia IO intrinsics
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39525>
2026-02-03 22:23:50 +00:00
Valentine Burley
24073b66fa tu/ci: Document a618-vk-asan failure
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: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39639>
2026-02-03 21:53:18 +00:00
Valentine Burley
d4ad50752f tu: Fix memory leak of patchpoints_ctx in dynamic rendering
tu_CmdBeginRendering was unconditionally allocating a new
patchpoints_ctx. When resuming a render pass chain, this overwrote the
existing context from the suspended pass, leaking it and all associated
FDM patchpoints.

Fixes: 0dd06c74d6 ("tu: Fix FDM patchpoint memory leak")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39639>
2026-02-03 21:53:16 +00:00
Konstantin Seurer
ce4d338b0d radv: Use stderr for shader printf
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39640>
2026-02-03 20:00:15 +00:00
Konstantin Seurer
24a1e3d8c2 radv/bvh: Make sure internal nodes are collapsed when possible
Avoiding NaNs should have the same effect but it's good practice to not
rely on float OPs for correctness.

Fixes: 95a89f7 ("radv: Report smaller bvh sizes when possible")
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39640>
2026-02-03 20:00:15 +00:00
Konstantin Seurer
60c1e4e3e6 vulkan: Make sure no NaNs end up in the BVH
Fixes: 2032268 ("vulkan: Avoid NAN in the IR BVH")
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39640>
2026-02-03 20:00:15 +00:00
Konstantin Seurer
2f3a9c10f4 radv/rra: Fix nullptr dereference
cc: mesa-stable

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39640>
2026-02-03 20:00:15 +00:00
Frank Binns
1bc23bdbb8 pvr/ci: document some recent flakes
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39646>
2026-02-03 19:38:16 +00:00
Kenneth Graunke
6fbe201a12 brw: Convert VS/TES/GS outputs to URB intrinsics.
For VS/TES/GS, we lower all outputs to temporaries and emit copies at the
end of the shader (or for GS, at each EmitVertex() call) from those
temporaries back to real outputs.  We use vec8 URB writes without
writemasking, since our output area's contents are undefined anyhow.

This is simpler than what TCS and Mesh do, which allow for output
variables to be read/written at a per-component level at any time,
with the output memory being used for cross-thread communication.

Rather than using the complicated TCS/Mesh handling and relying on
vectorization, we port the emit_urb_writes() approach to NIR.  This
also takes care of emitting the VUE header with default values when
fields aren't explicitly written by the shader.

We also handle multiview in the process.  It simplifies things, and
also drops another case of non-semantic IO in brw.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39666>
2026-02-03 19:11:21 +00:00
Kenneth Graunke
52341b8b9c brw: Split EOT handling out of emit_urb_writes()
The TES workaround code is still going to be needed even after
we rework URB output handling for VS/TES/GS to use NIR intrinsics.

For VS, we know at least one URB write will have been emitted at
the end of the program, so we can just tag it.

GS already handles EOT via emit_gs_thread_end().

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39666>
2026-02-03 19:11:21 +00:00
Kenneth Graunke
1f0773e951 brw: Add VUE header varyings to io_component()
This is needed for VS/TES/GS outputs.  Mesh takes a different path
because those are per-primitive.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39666>
2026-02-03 19:11:21 +00:00
Kenneth Graunke
54def4020c brw: Set a valid varying_to_slot for VUE header fields other than PSIZ
This lets us look up things in varying_to_slot[] without having to
special case VIEWPORT, LAYER, and PRIMITIVE_SHADING_RATE.  All of them
map to the same slot as PSIZ, slot 0, the VUE header.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39666>
2026-02-03 19:11:20 +00:00
Kenneth Graunke
076a183b8f brw: Move TES VUE map calculation before lowering outputs
We'll need the VUE map when we convert to using URB intrinsics.
Prepare for that by reordering VUE map setup before IO lowering.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39666>
2026-02-03 19:11:20 +00:00
Kenneth Graunke
2af44670ed brw: Implement load_urb_output_handle_intel for VS/GS stages
Simply get the payload field.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39666>
2026-02-03 19:11:20 +00:00
Kenneth Graunke
0cbf49aa8f brw: Drop urb_handle parameter from store_urb()
We always store to outputs, never inputs.  Just use the output handle.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39666>
2026-02-03 19:11:19 +00:00
Lucas Stach
643ba9a784 etnaviv: idle the pipe before flushing texture caches
As seen in the Vivante kernel driver function gckHARDWARE_Flush(),
GPUs without gcvFEATURE_TEX_CACHE_FLUSH_FIX, which translates to
all GPUs before halti5, need a full stall of the GPU pipeline
before flushing the texture caches.

This fixes sporadic GPU hangs observed in use-cases where texture
data updates are intermixed with draws without any state changes
that might necessitate a stall.

Cc: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39673>
2026-02-03 18:24:14 +00:00
Emma Anholt
5f82c1ae54 ci/tu: Move vkd3d-proton testing from nightly to pre-merge.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Now that we have vkd3d-proton testing support (and single-threaded test
support for test_large_texel_buffer), we can integrate vkd3d into the
normal pre-merge test run.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39568>
2026-02-03 17:34:09 +00:00
Emma Anholt
52cc02a60f ci/rpi4: Move OOM-causing test skips to the single-thread list.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39568>
2026-02-03 17:34:09 +00:00
Emma Anholt
4b670e4eeb ci/vulkan: Enable dEQP-VK.wsi.direct_drm testing.
For now this runs on anv and freedreno a618 -- other devices have manual
skips for it currently, or run under a compositor, or don't have a
connector with a mode that the tests are willing to use.  Hopefully we can
extend coverage to other devices soon.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39568>
2026-02-03 17:34:09 +00:00
Emma Anholt
213710049c ci/deqp-runner: Enable a common single-threaded test list.
The implicit_unmap tests complete in ~18s each on my A740, so I think they
should be fine to remove from all devices' skips files -- the problem was
hitting swap in parallel.

This reshuffles some test groups, making new xfails show up.  The changes
are particularly notable in virgl, where virglrenderer gets wedged at some
point, arbitrary sets of tests after that fail.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39568>
2026-02-03 17:34:09 +00:00
Emma Anholt
93ff1aa90b ci/deqp-runner: Bump to 0.23.2 for single-threaded and vkd3d support.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39568>
2026-02-03 17:34:09 +00:00
Emma Anholt
78e70012c7 ci/deqp-runner: Drop silly catting of flakes/skips files together.
They're vector args in deqp-runner, you can just specify the arg multiple
times.  This also means that the expectations.json will have the proper
filenames in it, rather than the fake one.  Also cleans up
deqp-runner.sh's "set -x" output nicely.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39568>
2026-02-03 17:34:09 +00:00
Emma Anholt
d55d4eb9a3 ci: Add some flakes that I tripped over when test groups got reshuffled.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39568>
2026-02-03 17:34:09 +00:00
Emma Anholt
c0a4d3ef1e ci/tu: Clear stale xfails from the nightlies.
Fixes: 63243bcc3e ("tu: Fix TU_DRAW_STATE_VB size")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39568>
2026-02-03 17:34:08 +00:00
Emma Anholt
3e7e04ad55 ci/tu: Skip more subgroup.clustered vector tests pre-merge.
These have been intermittently timing out on HDK8350/A660, showing up as
flakes (then the shader cache gets the re-run to pass, since there are
multiple shaders compiled per test).  Extending the pre-merge skip set on
the other devices should also help tame our runtimes, giving us more room
for other important testing (vkd3d, KHR_display).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39568>
2026-02-03 17:34:08 +00:00
Emma Anholt
ba0ce75f38 ci/intel: Clean up some expectations for the nightlies.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39568>
2026-02-03 17:34:08 +00:00
Emma Anholt
a4b3e16d89 ci/freedreno: Clean up some expectations for the nightlies.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39568>
2026-02-03 17:34:08 +00:00
Emma Anholt
42e17a948e lima/ci: Remove erroneous skips.
When you get UnexpectedResult(skip), that means take your xfail out
because it's now skipping.  Which is the fix, instead of "take the xfail
out and add it to manual skips".

Fixes: e54440d15e ("Uprev Piglit to a3826de3c26a279599d15b018a9a3e75ca46f4f8")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39568>
2026-02-03 17:34:08 +00:00
Marek Olšák
edffb2d76d ac: add FMASK codes
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39631>
2026-02-03 17:10:32 +00:00
Marek Olšák
6f36a2be2e ac: unify HTILE codes and encoding
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39631>
2026-02-03 17:10:32 +00:00
Marek Olšák
e0c7c642f4 ac: unify and demystify CMASK clear codes
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39631>
2026-02-03 17:10:32 +00:00
Marek Olšák
43e9af713b radv: use DCC definitions more
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39631>
2026-02-03 17:10:31 +00:00
Marek Olšák
6af6197136 ac: unify DCC clear code definitions
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39631>
2026-02-03 17:10:30 +00:00
Juan A. Suarez Romero
7bc1736006 broadcom/cle: ensure zlib inflate assign memory
This basic assertion helps static analyzer to avoid complaining that the
data memory could be NULL when we copy data from there later.

This fixes static analyzer warning null pointer passed to 2nd parameter expecting 'nonnull'

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39577>
2026-02-03 16:44:13 +00:00
Juan A. Suarez Romero
5a85b3d9f4 broadcom/cle: bump up gen version for v3d
The generation version for V3D XML package was marked as 3.3, but
actually we removed all the code supporting this generation, and the
generations we support now are from 4.2 onwards.

So we bump up the generation version.

Fixes: 9c4829473a ("broadcom/cle: remove v33 and v41 from xml definition")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39577>
2026-02-03 16:44:13 +00:00
Dhruv Mark Collins
e8fc50ef46 freedreno,u_trace: Fix various UBSAN errors
These are a handful of errors that pop up in UBSAN, a lot of them
depend on compiler-specific behavior such as zero-sized VLAs being
valid, while others plugged some potential bug prone code such as
nullptr derefs.

Signed-off-by: Dhruv Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39662>
2026-02-03 16:14:35 +00:00
Loïc Molinari
ae41474d8c panfrost: Add new CPU scope traces
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
New traces can safely be added now that they are disabled by default.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39407>
2026-02-03 15:41:51 +00:00
Loïc Molinari
cc933d1d08 panfrost: Port CPU scope traces to PAN_TRACE_*()
Use the new Mesa CPU trace wrappers to give Panfrost traces a
category. For builds with either Perfetto, Gpuvis or sysprof enabled,
Panfrost traces must now be enabled at run-time through the PAN_TRACE
environment variable. It removes the CPU cost of traces when traces
aren't used, it allows users to enable traces based on the needed
categories and it will allow to add new traces without worrying about
the CPU cost.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39407>
2026-02-03 15:41:51 +00:00
Loïc Molinari
1bca181580 pan/trace: Add wrappers for Mesa CPU scope traces
Add the PAN_TRACE_SCOPE() and PAN_TRACE_FUNC() wrappers based on
MESA_TRACE_SCOPE_IF() in order to associate a category to each trace
and let users select the set of tracing categories to enable at
run-time through the PAN_CPU_TRACE environment variable. This makes
Panfrost tracing an opt-in and avoids to CPU cost of tracing by
default.

There are 3 categories for now:
  - "lib" for the shared utilities
  - "gl" for the Gallium driver
  - "vk" for the Vulkan driver

Each of these categories are divided into subcategories so that
subsystems can easily be traced ("gl.csf" or "lib.kmod" for instance).

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39407>
2026-02-03 15:41:50 +00:00
Loïc Molinari
c9097e2e13 util/perf: Add support for conditional CPU scope traces
Add a 'cond' argument to the _MESA_TRACE_SCOPE(),
_MESA_TRACE_SCOPE_NAME() and _MESA_TRACE_SCOPE_FLOW() macros, fix up
the MESA_TRACE_SCOPE(), MESA_TRACE_SCOPE_FLOW(), MESA_TRACE_FUNC() and
MESA_TRACE_FUNC_FLOW() macros depending on it and add the new
MESA_TRACE_SCOPE_IF(), MESA_TRACE_SCOPE_FLOW_IF(),
MESA_TRACE_FUNC_IF() and MESA_TRACE_FUNC_FLOW_IF() conditional macros.

The trace macros are now based on the conditional ones. Code gen stays
the same for all the current traces though since compilers optimize
out the condition to always taken. See the compiler explorer link.

Conditional CPU scope traces are meant to allow builds with either
Perfetto, Gpuvis or sysprof tracing enabled to filter traces at
run-time.

Link: https://godbolt.org/z/886PKWEqf
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39407>
2026-02-03 15:41:50 +00:00