Commit graph

215534 commits

Author SHA1 Message Date
Timothy Arceri
b75cd07265 util/driconf: add Cursemark workaround
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes gpu hang on radeonsi and corrupt rendering on iris.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14392
Cc: mesa-stable

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38777>
2025-12-03 23:58:15 +00:00
Connor Abbott
d5498240ac spirv: Remove view_index_is_input
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The last user was removed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38793>
2025-12-03 22:52:29 +00:00
Connor Abbott
63a38b945d tu: Call nir_lower_sysvals_to_varyings once
Remove the early call to nir_lower_sysvals_to_varyings. This guarantees
that we only call it after lower_system_values has replaced the
variables with intrinsics. It turns out that a sequence like this
doesn't work:

1. shader declares Layer builtin as a signed integer
2. nir_lower_sysvals_to_varyings turns it into a varying (but keeps the
  signed integer type)
3. nir_lower_input_attachments (or some other pass) creates a
  nir_load_layer_id intrinsic.
4. nir_lower_sysvals_to_varyings is called again, and when creating the
  varying variable it passes an unsigned type to
  nir_get_variable_with_location(), which asserts because there is
  already a signed integer variable.

By making lower_sysvals_to_varyings happen late for layer, we can avoid
this happening by lowering away the variable before (2).

Fixes: 5bbbf5cf9b ("tu: Set use_layer_id_sysval for nir_lower_input_attachments")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38793>
2025-12-03 22:52:29 +00:00
Connor Abbott
4cfa188db6 tu: Stop setting view_index_is_input
glslang apparently emits ViewID as a signed integer. If other passes
generate a sysval then lower_sysvals_to_varyings() tries to create an
variable with unsigned type and asserts when the preexisting varying's
type doesn't match the type it expects. Just make ViewID a sysval and
lower it in lower_sysvals_to_varyings() to avoid this and simplify the
SPIR-V parser.

Fixes: 5bbbf5cf9b ("tu: Set use_layer_id_sysval for nir_lower_input_attachments")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38793>
2025-12-03 22:52:28 +00:00
Marek Olšák
e14f8ee0e4 nir/has_divergent_loop: require divergence metadata, check all function impls
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
instead of forcing callers to call nir_divergence_analysis

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38597>
2025-12-03 20:14:18 +00:00
Faith Ekstrand
d0b83dd7ce pan: Move pan_compile_shader to pan_compiler.c
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38788>
2025-12-03 18:28:45 +00:00
Faith Ekstrand
e64736fba7 pan: Drop bifrost_shader_blend_info::format
It existed entirey to save us a switch statement.  It's very unlikely
that's worth pulling GENX API command stream stuff into the compiler.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38788>
2025-12-03 18:28:45 +00:00
Faith Ekstrand
3970548556 pan: Move PRINTF_BUFFER_SIZE to the compiler
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38788>
2025-12-03 18:28:44 +00:00
Faith Ekstrand
83f90b0760 pan/bi: Fix LD_VAR_BUF indirect offset calculations
We multiply by 16 correctly but then drop that in the case where vbase
is non-zero.  We typically lower FS input indirects so we don't see this
often but there are a few cases where they still sneak through.

Fixes: 0fcddd4d2c ("pan/bi: Rework varying linking on Valhall")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38788>
2025-12-03 18:28:44 +00:00
Faith Ekstrand
9f173bb066 panvk/jm: Delete panvk_varying_hw_format()
It's duplicated in panvk_vX_shader.c, which is where it's actually used.
This version is a dead artifact of the past.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38788>
2025-12-03 18:28:44 +00:00
Faith Ekstrand
cad5fb4370 pan/blend: Use flat inputs for blend shaders
There's nothing to interpolate here so there's no reason to use
nir_load_interpolated_input.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38788>
2025-12-03 18:28:44 +00:00
Faith Ekstrand
bdd4bea636 pan/genxml: Decode blend shaders on CSF
In order to decode blend shaders, we need to pass in the fragment binary
address because the blend pointer uses the same top 32 bits as the
fragment binary.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38788>
2025-12-03 18:28:43 +00:00
Gurchetan Singh
4f45e834ae gfxstream: fix logspam in TLS helper function
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Logspam has been reported in a gfxstream initialization
path.

Fixes: 4a30c6fd70 ("gfxstream: Use the Mesa common tss_* TLS helper functions")
Cc: mesa-stable

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38776>
2025-12-03 09:12:21 -08:00
Thong Thai
4f4745ebf3 frontends/va: get libva api version from va_version.h
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38773>
2025-12-03 16:01:38 +00:00
Samuel Pitoiset
ac37885fc8 vulkan: update spec to 1.4.335
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This renames rayTracingInvocationReorder because both NV and EXT use
the same name.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38779>
2025-12-03 14:47:00 +00:00
Marek Olšák
9b011a7344 amd: rename most GFX115x definitions for released chips
addrlib changes match the original code.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38718>
2025-12-03 13:29:07 +00:00
Gil Pedersen
858364be71 intel: Add PIPE_FORMAT_R10G10B10X2_UNORM support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This utilizes the RGBX format faking logic from e8cd7a30 to enable
PIPE_FORMAT_R10G10B10X2_UNORM renderer support using swizzling.

This format is needed for better HDR rendering support in the iris driver, to
support the Proton / Wine DXGI implementation, which requires an RGBA ordered
renderer for its Vulkan implementation. This in turn requires the Wayland
display to support both alpha and opaque formats. The check currently fails,
since only PIPE_FORMAT_R10G10B10A2_UNORM is exposed when Gallium (iris) is
the DRI Wayland renderer.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38616>
2025-12-03 11:22:38 +00:00
Peyton Lee
3652b29573 radeonsi/vpe: correct tone mapping parameters
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Video post-processing now supports explicit color standards.
Applications can pass different combinations of primaries,
transfer functions, and color matrices.

This is used to ensure correct mapping.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38764>
2025-12-03 10:34:41 +00:00
Aitor Camacho
62a97e87a6 docs,kk: Add KosmicKrisp environment variable documentation
Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38460>
2025-12-03 10:29:26 +00:00
Aitor Camacho
df19ec3020 vulkan/wsi: Fix double destroy of present_id_timeline at swapchain create
Fixes: c888da3d48 ("vulkan/wsi: Add mechanism to wait for WSI semaphore unsignal.")

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38754>
2025-12-03 09:53:42 +00:00
Samuel Pitoiset
fda1262eed radv: reduce maxTexelBufferElements to 1<<29
It's the number of elements. RADV exposes VK_FORMAT_R64_{UINT,SINT}
formats for texel buffers, so the maximum is 1<<29 to fit in the
32-bit bounds checking.

Fixes KHR-GL46.texture_buffer_size_clamping.* with Zink and new VKCTS
dEQP-VK.texture.misc.max_elements.*.

Cc: mesa-stable.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38140>
2025-12-03 09:31:08 +00:00
Yiwei Zhang
bb19e30e0d venus: add VK_EXT_mesh_shader support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This fills in the last piece for vkd3d-proton feature level 12_2.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38739>
2025-12-03 07:21:53 +00:00
Yiwei Zhang
6fb6a740d9 venus: sync protocol for VK_EXT_mesh_shader support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38739>
2025-12-03 07:21:53 +00:00
Lionel Landwerlin
86419dd519 brw: remove driver specific load_num_workgroup lowering
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: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38735>
2025-12-02 22:44:05 +00:00
Lionel Landwerlin
578d2f0daa anv: move load_num_workgroups tracking to driver
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38735>
2025-12-02 22:44:04 +00:00
Lionel Landwerlin
e12e7e117c iris: lower load_num_workgroups
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38735>
2025-12-02 22:44:03 +00:00
Calder Young
5bf3546cc6 anv: Use companion cmd buffer for CCS and MCS image barriers
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37627>
2025-12-02 22:22:24 +00:00
Calder Young
69f6966ae2 anv: Add shorthand for executing on the companion cmd buffer
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37627>
2025-12-02 22:22:24 +00:00
Calder Young
fe0aed2302 anv: Fix missing const qualifiers on some params in anv_blorp.c
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37627>
2025-12-02 22:22:24 +00:00
Ian Romanick
b16c169b6d vc4: Don't call nir_lower_flrp in vc4_optimize_nir
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's already called by st_nir_opts, so it shouldn't be necessary to do
it again here.

This is only compile tested.  I have not collected any shader-db or
fossil-db data.

Acked-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12526>
2025-12-02 21:28:05 +00:00
Ian Romanick
956a09b990 broadcom/compiler: only lower flrp once
This is only compile tested.  I have not collected any shader-db or
fossil-db data.

v2: Drop the calls to nir_opt_constant_folding. The builder in
nir_lower_flrp will already take care of this.

v3: NIR_PASS_V is gone. Noticed by Marge.

Acked-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12526>
2025-12-02 21:28:05 +00:00
Ian Romanick
d64ce23b08 elk: only lower flrp once
No shader-db changes on any Intel platform. Both Iris and Crocus use
st_nir_opts, which calls nir_lower_flrp before brw_nir_optimize. The
call still needs to exist for hasvk, but I don't collect fossil-db data
for hasvk.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12526>
2025-12-02 21:28:05 +00:00
Alyssa Rosenzweig
e4b8b758b1 brw: only lower flrp once
No shader-db changes on any Intel platform.

fossil-db:

Lunar Lake
Totals:
Instrs: 926275147 -> 926273376 (-0.00%); split: -0.00%, +0.00%
Cycle count: 106012190597 -> 106011255305 (-0.00%); split: -0.00%, +0.00%
Spill count: 3424180 -> 3424168 (-0.00%)
Fill count: 4877035 -> 4877017 (-0.00%)
Max live registers: 193918196 -> 193918122 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 49106544 -> 49106448 (-0.00%); split: +0.00%, -0.00%
Non SSA regs after NIR: 231281721 -> 231281719 (-0.00%)

Totals from 1705 (0.08% of 2020028) affected shaders:
Instrs: 926974 -> 925203 (-0.19%); split: -0.28%, +0.09%
Cycle count: 39024288 -> 38088996 (-2.40%); split: -2.77%, +0.37%
Spill count: 2229 -> 2217 (-0.54%)
Fill count: 2977 -> 2959 (-0.60%)
Max live registers: 183056 -> 182982 (-0.04%); split: -0.20%, +0.16%
Max dispatch width: 46880 -> 46784 (-0.20%); split: +0.07%, -0.27%
Non SSA regs after NIR: 263520 -> 263518 (-0.00%)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12526>
2025-12-02 21:28:05 +00:00
Ian Romanick
92e609f4fe glsl: Move flrp lowering out of the loop
Other lower_flrp Intel platforms had similar shader-db changes.

Lunar Lake
total instructions in shared programs: 17131619 -> 17131182 (<.01%)
instructions in affected programs: 59924 -> 59487 (-0.73%)
helped: 255 / HURT: 9

total loops in shared programs: 5336 -> 5334 (-0.04%)
loops in affected programs: 4 -> 2 (-50.00%)
helped: 2 / HURT: 0

total cycles in shared programs: 888274988 -> 888269628 (<.01%)
cycles in affected programs: 1753370 -> 1748010 (-0.31%)
helped: 182 / HURT: 94

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12526>
2025-12-02 21:28:05 +00:00
Ian Romanick
4bbc29373a nir/lower_flrp: Check and set shader_info::flrp_lowered
No shader-db or fossil-db changes on any Intel platform.

v2: Return early if lowering_mask is zero. If the first call to
nir_lower_flrp has a lowering_mask of zero, later calls with non-zero
masks would not do any lowering. lp_bld_nir.c has this issue.

Suggested-by: Alyssa
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12526>
2025-12-02 21:28:05 +00:00
Ian Romanick
341e2d3283 lavapipe: fp16 flrp must also be lowered
Prevents failures with fp16 in lavapipe and Zink on lavapipe when
"nir/lower_flrp: Check and set shader_info::flrp_lowered" is
applied. Lowering with an incomplete mask on the first call to
nir_lower_flrp will prevent later calls (with the complete mask) from
doing anything.

Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12526>
2025-12-02 21:28:05 +00:00
Faith Ekstrand
f1debfccaf pan: Move pan_shader_compile() to pan_compiler.h
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
10e571aebd pan/compiler: Move pan_ir.h into pan_compiler.h
There is nothing IR about it.  It's really the compiler interface file,
so it should all go in pan_compiler.h.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
2d286ec80a pan/compiler: Move all NIR passe definitions to pan_nir.h
While we're at it, rename pan_lower_* to pan_nir_lower_* for consistency
with everything else.  The intention is that eventually this will be a
private header and drivers will stop calling these passes themselves.
However, that is a long way off so for now we'll just move them to the
sensibly named place.  Notably, pan_preprocess/optimize/postprocess_nir
stay in pan_compiler.h because those are intended to be external APIs
indefinitely.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
b7f45c66fe pan: Move pan_shader NIR helpers to pan_compiler.h
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
55ae25f2d7 pan: Move disassembly wrappers to a new pan_compiler.h
This is going to be where we put the compiler interface.  For now,
disassembly wrappers are as good a place to start as any.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
1f068d8c71 pan: Move pan_arch() to pan_model.h
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
4c9ec8fad2 pan: Add a central libpanfrost_compiler library
The only thing that only pulls in bifrost is our CL compiler for
pre-builts.  Everything that uses pan_shader.h pulls it in because
that's header-only and calls into both back-ends anyway.  Some day
we might want to figure out how to properly dead-code the midgard
compiler for Vulkan but today is not that day.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
013c94458e pan/bi: Add separate meson files for bifrost tests
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
b02bc53261 pan: Move util/* to compiler/
src/panfrost/util is all compiler stuff, we just put it in util/ so it
could be used by both midgard and bifrost.  We also rename all the files
to have a pan_nir prefix.  We'll rename the functions later.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:30 +00:00
Faith Ekstrand
fa6c9b6805 pan: Move midgard to compiler/midgard
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:29 +00:00
Faith Ekstrand
0f923e7f60 pan: Move compiler to compiler/bifrost
It was this way for a while but then someone decided that we should try
to hide midgard and get it off the main path.  However, we still try to
present a unified interface to the GL driver.  The combination of these
two things means that those common compiler interfaces have to live
outside of panfrost/compiler which makes everything more awkward than
it needs to be.  We either need to move it back into src/gallium and
make abstracting across the two the GL driver's problem (which breaks
other tooling) or need to put both under src/panfrost/compiler.  The
midgard compiler can just as easily bitrot in panfrost/compiler/midgard.
The first step is moving the bifrost compiler.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
2025-12-02 21:00:29 +00:00
Gurchetan Singh
57ae8eb70f android_stub: fix missing prototypes issues
When the compiler is configured to complain about missing
prototypes, the lack of prototypes can cause issues:

src/android_stub/cutils_stub.cpp:13:1:
   error: no previous prototype for function 'atrace_begin_body' [-Werror,-Wmissing-prototypes]
   13 | atrace_begin_body(const char * /*name*/)

Update cutils/trace.h to the version in android-16.0.0_r3 [1], and
add proper header includes to fix this.

[1] https://android.googlesource.com/platform/system/core.git/+/refs/tags/android-16.0.0_r3/libcutils/include/cutils/trace.h

Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38644>
2025-12-02 20:03:02 +00:00
Gurchetan Singh
1997987b58 util: fix error about missing include
When building with linux_glibc_x86_64 in AOSP, this is
observed.

src/util/u_debug_stack.h:66:4: error: unknown type name 'uint64_t'
   66 |    uint64_t start_ip;
      |    ^

Adding <stdint.h> fixes it.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38644>
2025-12-02 20:03:02 +00:00
Gurchetan Singh
5af6af9644 android_stub: add missing definition
Fixes:

android_stub/sync_stub.cpp:18:11: error: use of undeclared identifier 'NULL'
   18 |    return NULL;
      |           ^~~~

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38644>
2025-12-02 20:03:02 +00:00