Commit graph

220288 commits

Author SHA1 Message Date
Ian Romanick
b5e023777c brw: Change the flags written by some CMP
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
One frustrating thing about the CMP and CMPN instructions is that they
always write the flags. Sometimes, however, it is desirable to generate
the comparison result without modifying the flags. This would,
theoretically, reduce false dependencies that restrict the scheduler's
ability to rearrange code, create more opportunities for cmod
propagation, save a kitten from a tree, and make a rainbow.

Consider this sequence:

           cmp.ge.f0.0(8)  g103<1>F        g101<8,8,1>F    g39<8,8,1>F
           cmp.nz.f0.0(8)  null<1>D        g81<8,8,1>D     0D
   (+f0.0) if(8)   JIP:  LABEL19         UIP:  LABEL19

It would be advantageous to put the first CMP between the second CMP and
the IF, but this cannot be done since the IF depends on the flags generated
by the second CMP.

This pass enables this rescheduling by changing the first CMP to write
to a different flags register.

           cmp.ge.f1.0(8)  g103<1>F        g101<8,8,1>F    g39<8,8,1>F
           cmp.nz.f0.0(8)  null<1>D        g81<8,8,1>D     0D
   (+f0.0) if(8)   JIP:  LABEL19         UIP:  LABEL19

Sometimes this is also possible by using a different instruction.  For
example, consider

           cmp.l.f0.0(8)   g103<1>D        g101<8,8,1>D    0D

This produces 0xffffffff when g101 negative and zero otherwise. This
instruction, which does not modifiy the flag, also produces these results:

           asr(8)          g103<1>D        g101<8,8,1>D    31D

Gfx9 platforms take a hit on instructions due to the instruction added
at the end of short shaders by brw_workaround_source_arf_before_eot.

shader-db:

Lunar Lake, Meteor Lake, DG2, Tiger Lake, and Ice Lake had similar results. (Lunar Lake shown)
total instructions in shared programs: 17089451 -> 17088766 (<.01%)
instructions in affected programs: 766613 -> 765928 (-0.09%)
helped: 653 / HURT: 0

total cycles in shared programs: 888832986 -> 887873068 (-0.11%)
cycles in affected programs: 549441852 -> 548481934 (-0.17%)
helped: 10474 / HURT: 130

LOST:   9
GAINED: 0

Skylake
total instructions in shared programs: 19037976 -> 19049719 (0.06%)
instructions in affected programs: 3979914 -> 3991657 (0.30%)
helped: 503 / HURT: 12303

total cycles in shared programs: 867918242 -> 866930801 (-0.11%)
cycles in affected programs: 512773919 -> 511786478 (-0.19%)
helped: 13858 / HURT: 66

LOST:   32
GAINED: 0

fossil-db:

Lunar Lake
Totals:
Instrs: 925023504 -> 924950382 (-0.01%); split: -0.01%, +0.00%
Cycle count: 106348432916 -> 106116809009 (-0.22%); split: -0.22%, +0.00%
Spill count: 3423988 -> 3423930 (-0.00%); split: -0.00%, +0.00%
Fill count: 4877087 -> 4876960 (-0.00%); split: -0.01%, +0.00%
Max dispatch width: 49087552 -> 49078448 (-0.02%); split: +0.00%, -0.02%

Totals from 1099332 (54.44% of 2019443) affected shaders:
Instrs: 742670473 -> 742597351 (-0.01%); split: -0.01%, +0.00%
Cycle count: 100455549635 -> 100223925728 (-0.23%); split: -0.23%, +0.00%
Spill count: 3384366 -> 3384308 (-0.00%); split: -0.00%, +0.00%
Fill count: 4837434 -> 4837307 (-0.00%); split: -0.01%, +0.00%
Max dispatch width: 26725152 -> 26716048 (-0.03%); split: +0.00%, -0.03%

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 997603774 -> 997529238 (-0.01%); split: -0.01%, +0.00%
Cycle count: 93904012762 -> 93646730006 (-0.27%); split: -0.28%, +0.00%
Spill count: 3710155 -> 3710125 (-0.00%); split: -0.00%, +0.00%
Fill count: 5032908 -> 5032819 (-0.00%); split: -0.01%, +0.00%
Max dispatch width: 37929640 -> 37811560 (-0.31%)

Totals from 1334920 (58.52% of 2281134) affected shaders:
Instrs: 817377787 -> 817303251 (-0.01%); split: -0.01%, +0.00%
Cycle count: 88468851658 -> 88211568902 (-0.29%); split: -0.29%, +0.00%
Spill count: 3663353 -> 3663323 (-0.00%); split: -0.00%, +0.00%
Fill count: 4991629 -> 4991540 (-0.00%); split: -0.01%, +0.00%
Max dispatch width: 20245832 -> 20127752 (-0.58%)

Tiger Lake and Ice Lake had similar results. (Tiger Lake shown)
Totals:
Instrs: 1013433769 -> 1013363273 (-0.01%); split: -0.01%, +0.00%
Cycle count: 85766921182 -> 85509316620 (-0.30%); split: -0.31%, +0.00%
Spill count: 3903923 -> 3903944 (+0.00%); split: -0.00%, +0.00%
Fill count: 6801983 -> 6801948 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 37896320 -> 37805320 (-0.24%); split: +0.00%, -0.24%

Totals from 1333814 (58.54% of 2278396) affected shaders:
Instrs: 830200531 -> 830130035 (-0.01%); split: -0.01%, +0.00%
Cycle count: 80746184101 -> 80488579539 (-0.32%); split: -0.32%, +0.01%
Spill count: 3855771 -> 3855792 (+0.00%); split: -0.00%, +0.00%
Fill count: 6755513 -> 6755478 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 20301456 -> 20210456 (-0.45%); split: +0.00%, -0.45%

Skylake
Totals:
Instrs: 519389758 -> 519874108 (+0.09%); split: -0.00%, +0.10%
Cycle count: 57932316132 -> 57789433956 (-0.25%); split: -0.25%, +0.00%
Spill count: 636741 -> 636715 (-0.00%); split: -0.01%, +0.00%
Fill count: 860470 -> 860357 (-0.01%); split: -0.02%, +0.00%
Max dispatch width: 32527800 -> 32481792 (-0.14%); split: +0.00%, -0.14%

Totals from 1080380 (62.25% of 1735462) affected shaders:
Instrs: 411976399 -> 412460749 (+0.12%); split: -0.00%, +0.12%
Cycle count: 54291447615 -> 54148565439 (-0.26%); split: -0.27%, +0.00%
Spill count: 602993 -> 602967 (-0.00%); split: -0.01%, +0.00%
Fill count: 734459 -> 734346 (-0.02%); split: -0.02%, +0.00%
Max dispatch width: 18626096 -> 18580088 (-0.25%); split: +0.00%, -0.25%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38978>
2026-03-24 01:31:26 +00:00
Ian Romanick
31de96d321 brw/lower_regioning: Allow integer conversions in SEL
The Bspec says that SEL sources and destination can be any mix of *B,
*W, and *D. We should allow those. Specifically, without this change,
this instruction

    sel.sat.l(8) v548:UD, v899:D, 255d

gets unnecessarily split into two instructions.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38978>
2026-03-24 01:31:26 +00:00
Ian Romanick
dff1e8ae28 brw: Handle scalars and swizzles correctly in is_const_zero
v2: Massive simplification based on feedback from Ken.

Fixes: 96cde9cc01 ("intel/fs: Emit better code for bfi(..., 0)")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38978>
2026-03-24 01:31:25 +00:00
Ian Romanick
985ace332b brw/algebraic: Allow mixed types in saturate constant folding
Prevents assertion failures in func.shader-ballot.basic.q0 and other
tests starting with "nir/algebraic: Optimize some b2f of integer
comparison".

Vector immediates, bfloat, and 8-bit floats are still not supported.

v2: Almost complete re-write based on suggestions from Ken.

v3: Don't retype() on a brw_imm_f value.

Fixes: f8e54d02f7 ("intel/compiler: Relax mixed type restriction for saturating immediates")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38978>
2026-03-24 01:31:25 +00:00
Marek Olšák
dee99b38c5 radeonsi: fix an assertion failure for sampler descriptor loads with LLVM
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Pierre-Eric
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40589>
2026-03-24 01:05:29 +00:00
Marek Olšák
e1a845c042 radeonsi: fix compiler selection for fixed-func TCS
Reviewed-by: Pierre-Eric
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40589>
2026-03-24 01:05:29 +00:00
Marek Olšák
55f5253976 radeonsi: remove unnecessary ac_to_integer in si_llvm_ps_build_end
Reviewed-by: Pierre-Eric
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40589>
2026-03-24 01:05:29 +00:00
Marek Olšák
dbf027534a ac/llvm: inline ac_build_gather_values_extended
Reviewed-by: Pierre-Eric
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40589>
2026-03-24 01:05:29 +00:00
Marek Olšák
235e32d560 ac/llvm: remove almost duplicated ac_build_varying_gather_values
Reviewed-by: Pierre-Eric
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40589>
2026-03-24 01:05:29 +00:00
Marek Olšák
d692ce4b34 radeonsi/meson: don't use llvm variables when LLVM is disabled
also winsys doesn't use LLVM

Reviewed-by: Pierre-Eric
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40589>
2026-03-24 01:05:29 +00:00
Marek Olšák
8ea3d794fb radeonsi: recompute IO bases after optimizations
to fix an assertion added by the commit, reproduced by viewperf13/catia

Fixes: d06616063c - radeonsi: assert that IO bases don't have holes & the same base isn't used twice

Reviewed-by: Pierre-Eric
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40589>
2026-03-24 01:05:29 +00:00
Eric Engestrom
731e5e466a zink+lvp/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40583>
2026-03-23 23:38:32 +00:00
Eric Engestrom
bb71c2dc34 zink+radv/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40583>
2026-03-23 23:38:32 +00:00
Eric Engestrom
f49402d309 nvk/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40583>
2026-03-23 23:38:32 +00:00
Eric Engestrom
21d79ef01e turnip/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40583>
2026-03-23 23:38:32 +00:00
Eric Engestrom
ac47c021cd vc4,v3d/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40583>
2026-03-23 23:38:32 +00:00
Eric Engestrom
5f3953fdd4 radeonsi/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40583>
2026-03-23 23:38:32 +00:00
Eric Engestrom
145a1c9e2a radv/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40583>
2026-03-23 23:38:32 +00:00
Eric Engestrom
d805ce9234 nvk/ci: give more time to nightly job nvk-ga106-vkcts-valve
Probably caused by more tests running because more extensions are supported.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40583>
2026-03-23 23:38:32 +00:00
Eric Engestrom
b729dfcc9e llvmpipe/ci: document regressions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40583>
2026-03-23 23:38:32 +00:00
Eric Engestrom
f67f3c9122 freedreno/ci: document regressions
The job was just crashing for a long time so it's not really possible to
figure out when it regressed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40583>
2026-03-23 23:38:32 +00:00
Mel Henning
84a44ad17d nvk: Disable descriptorBufferCaptureReplay for now
This gets renderdoc working again. We can turn this back on once we
figure out the issues around replay addresses.

See also: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14518

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40019>
2026-03-23 23:21:11 +00:00
Samuel Pitoiset
0658e5e141 vulkan: fix memory leak in vkQueueBeginDebugUtilsLabelEXT()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Caught by ASAN with VKCTS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40572>
2026-03-23 22:41:49 +00:00
Radu Costas
598d43faf6 pvr, ci: Remove tests from expected failure list
Add back the spirv assembly tests after fixing the underlying issue.

Signed-off-by: Radu Costas <radu.costas@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40568>
2026-03-23 22:27:02 +00:00
Radu Costas
721c1b8f65 pco: Amend errant nir_move_option
Move options were bit or-ing from the wrong enum, causing undefined
behaviour when the number of intrinsics changed.
Replaced it with the values from the right nir_move_options enum that
were previously working. (Further refinement needed on these after
extensive testing.)

Fixes: f1b24267d2 ("pco: rework nir processing and passes")
Signed-off-by: Radu Costas <radu.costas@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40568>
2026-03-23 22:27:02 +00:00
Michel Dänzer
8f30e90fc1 winsys/amdgpu: Prefer render node FD for ac_drm_device_initialize
If the FD passed in isn't from a render node, try to determine the
corresponding render node and open it. If that succeeds, pass the
render node FD to ac_drm_device_initialize.

The existing code already detects when ac_drm_device_get_fd doesn't
return the FD passed in, and handles that case correctly.

This avoids issues with unauthenticated FDs from card nodes.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7289

v2:
* Always close render_fd after calling ac_drm_device_initialize for it.
  (Pierre-Eric Pelloux-Prayer)
* Formatting tweaks for logging when ac_drm_device_initialize fails for
  render_fd.
v3: (Pierre-Eric Pelloux-Prayer)
* Log render_device path when ac_drm_device_initialize fails for
  render_fd.
* Fix render_device string leak.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40519>
2026-03-23 21:51:52 +00:00
Daniel Schürmann
218be90084 radv: call nir_opt_if late again
Totals from 1715 (1.22% of 140074) affected shaders:

Instrs: 1086964 -> 1079896 (-0.65%); split: -0.65%, +0.00%
CodeSize: 5600856 -> 5554620 (-0.83%); split: -0.84%, +0.02%
VGPRs: 95868 -> 95976 (+0.11%)
Latency: 4005981 -> 3992353 (-0.34%); split: -0.38%, +0.04%
InvThroughput: 682121 -> 682071 (-0.01%); split: -0.11%, +0.10%
VClause: 19117 -> 19093 (-0.13%); split: -0.15%, +0.02%
SClause: 17075 -> 17040 (-0.20%); split: -0.21%, +0.01%
Copies: 101031 -> 98193 (-2.81%); split: -2.87%, +0.07%
Branches: 24106 -> 24011 (-0.39%); split: -0.43%, +0.03%
PreSGPRs: 67254 -> 66797 (-0.68%); split: -0.70%, +0.02%
PreVGPRs: 71827 -> 71830 (+0.00%)
VALU: 571206 -> 570516 (-0.12%); split: -0.12%, +0.00%
SALU: 180525 -> 177146 (-1.87%); split: -1.90%, +0.03%
VMEM: 34030 -> 34010 (-0.06%)
SMEM: 27669 -> 27622 (-0.17%)
VOPD: 4485 -> 4481 (-0.09%); split: +0.04%, -0.13%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40453>
2026-03-23 21:24:40 +00:00
Pavel Ondračka
52d90752c2 r300/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40570>
2026-03-23 21:06:32 +00:00
pal1000
128dc57436 util: Fix use of undeclared identifier 'NULL' in src/util/os_misc.h when compiling with clang
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 2771eb39fd ("util: Add function os_unset_option/os_set_option for latter use")

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14805

```
FAILED: [code=1] src/util/libmesa_util.a.p/u_process.c.obj
"cc" "-Isrc/util/libmesa_util.a.p" "-Isrc/util" "-I../../src/util" "-Iinclude" "-I../../include" "-Isrc" "-I../../src" "-Isrc/util/format" "-I../../src/util/format" "-IC:/msys64/clang64/bin/../include" "-fvisibility=hidden" "-fdiagnostics-color=always" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-std=c11" "-O2" "-g" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DPACKAGE_VERSION=\"26.0.0-rc3\"" "-DPACKAGE_BUGREPORT=\"https://gitlab.freedesktop.org/mesa/mesa/-/issues\"" "-DHAVE_OPENGL=1" "-DHAVE_OPENGL_ES_1=1" "-DHAVE_OPENGL_ES_2=1" "-DHAVE_SOFTPIPE" "-DHAVE_LLVMPIPE" "-DHAVE_ZINK" "-DHAVE_D3D12" "-DHAVE_VIRGL" "-DHAVE_SWRAST" "-DMESA_SYSTEM_HAS_KMS_DRM=0" "-DVIDEO_CODEC_VC1DEC=1" "-DVIDEO_CODEC_H264DEC=1" "-DVIDEO_CODEC_H264ENC=1" "-DVIDEO_CODEC_H265DEC=1" "-DVIDEO_CODEC_H265ENC=1" "-DVIDEO_CODEC_AV1DEC=1" "-DVIDEO_CODEC_AV1ENC=1" "-DVIDEO_CODEC_VP9DEC=1" "-DVIDEO_CODEC_MPEG12DEC=1" "-DVIDEO_CODEC_JPEGDEC=1" "-DHAVE_WINDOWS_PLATFORM" "-DHAVE_SURFACELESS_PLATFORM" "-DUSE_LIBGLVND=0" "-DUSE_D3D12_PREVIEW_HEADERS=0" "-DHAVE_GALLIUM_D3D12_VIDEO" "-DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS" "-DGLAPI_EXPORT_PROTO_ENTRY_POINTS=1" "-DALLOW_KCMP" "-DMESA_DEBUG=0" "-DHAVE___BUILTIN_BSWAP32" "-DHAVE___BUILTIN_BSWAP64" "-DHAVE___BUILTIN_CLZ" "-DHAVE___BUILTIN_CLZLL" "-DHAVE___BUILTIN_CTZ" "-DHAVE___BUILTIN_EXPECT" "-DHAVE___BUILTIN_FFS" "-DHAVE___BUILTIN_FFSLL" "-DHAVE___BUILTIN_POPCOUNT" "-DHAVE___BUILTIN_POPCOUNTLL" "-DHAVE___BUILTIN_UNREACHABLE" "-DHAVE___BUILTIN_TYPES_COMPATIBLE_P" "-DHAVE___BUILTIN_ADD_OVERFLOW" "-DHAVE_FUNC_ATTRIBUTE_CONST" "-DHAVE_FUNC_ATTRIBUTE_FLATTEN" "-DHAVE_FUNC_ATTRIBUTE_MALLOC" "-DHAVE_FUNC_ATTRIBUTE_PURE" "-DHAVE_FUNC_ATTRIBUTE_UNUSED" "-DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT" "-DHAVE_FUNC_ATTRIBUTE_WEAK" "-DHAVE_FUNC_ATTRIBUTE_FORMAT" "-DHAVE_FUNC_ATTRIBUTE_PACKED" "-DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL" "-DHAVE_FUNC_ATTRIBUTE_ALIAS" "-DHAVE_FUNC_ATTRIBUTE_NORETURN" "-DHAVE_FUNC_ATTRIBUTE_COLD" "-DHAVE_FUNC_ATTRIBUTE_VISIBILITY" "-DHAVE_UINT128" "-D_WIN32_WINNT=0x0A00" "-DWINVER=0x0A00" "-D_GNU_SOURCE" "-DUSE_SSE41" "-DHAVE___BUILTIN_IA32_CLFLUSHOPT" "-DUSE_GCC_ATOMIC_BUILTINS" "-DHAS_SCHED_H" "-DHAVE_DLFCN_H" "-DHAVE_CET_H" "-DHAVE_STRTOF" "-DHAVE_STRTOK_R" "-DHAVE_QSORT_S" "-DHAVE_STRUCT_TIMESPEC" "-DHAVE_ZLIB" "-DHAVE_ZSTD" "-DHAVE_COMPRESSION" "-DWIN32_LEAN_AND_MEAN" "-DWINDOWS_NO_FUTEX" "-DMESA_LLVM_VERSION_STRING=\"21.1.8\"" "-DLLVM_IS_SHARED=0" "-DDRAW_LLVM_AVAILABLE=1" "-DAMD_LLVM_AVAILABLE=1" "-DGALLIVM_USE_ORCJIT=0" "-DHAVE_SPIRV_TOOLS" "-DUSE_LIBELF" "-DTHREAD_SANITIZER=0" "-DHAVE_RENDERDOC_INTEGRATION=false" "-Werror=implicit-function-declaration" "-Werror=missing-prototypes" "-Werror=return-type" "-Werror=empty-body" "-Werror=incompatible-pointer-types" "-Werror=int-conversion" "-Wimplicit-fallthrough" "-Wmisleading-indentation" "-Wno-missing-field-initializers" "-Wno-format-truncation" "-fno-math-errno" "-fno-trapping-math" "-Qunused-arguments" "-fno-common" "-Wno-unknown-pragmas" "-Wno-microsoft-enum-value" "-Wno-unused-function" "-Werror=thread-safety" "-ffunction-sections" "-fdata-sections" "-pipe" "-Wp,-D_FORTIFY_SOURCE=2" "-fstack-protector-strong" "-Wp,-D__USE_MINGW_ANSI_STDIO=1" "-march=core2" "-Werror=pointer-arith" "-Werror=vla" "-Werror=gnu-empty-initializer" "-Wgnu-pointer-arith" -MD -MQ src/util/libmesa_util.a.p/u_process.c.obj -MF "src/util/libmesa_util.a.p/u_process.c.obj.d" -o src/util/libmesa_util.a.p/u_process.c.obj "-c" ../../src/util/u_process.c
In file included from ../../src/util/u_process.c:28:
../../src/util/os_misc.h:151:24: error: use of undeclared identifier 'NULL'
  151 |    os_set_option(name, NULL, true);
      |                        ^~~~
1 error generated.

```
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40548>
2026-03-23 20:18:40 +00:00
Faith Ekstrand
3f870d62b0 nir: Consider if uses in nir_def_all_uses_*
They check for if uses and want to return false but nir_foreach_use()
means the if uses are never seen.

Cc: mesa-stable
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37481>
2026-03-23 19:29:42 +00:00
Georg Lehmann
d664f6a1e4 gallivm: remove dead code in lp_build_add
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40520>
2026-03-23 17:58:32 +00:00
Georg Lehmann
284b4143f7 gallivm: don't optimize fadd(a, 0.0) with signed zero preserve
Fixes: 540e84bedb ("gallivm: Preserve -0 and nan")
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40520>
2026-03-23 17:58:32 +00:00
Yiwei Zhang
c2fe95a364 venus: fix to relax the KHR_external_memory_fd requirement
This reverts commit 1895de16a6. The proper
way to filter out venus incapable physical devices is to do the platform
specific check during renderer side instance creation time.

Fixes: 1895de16a6 ("venus: filter out venus incapable physical devices")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40478>
2026-03-23 17:39:53 +00:00
Mike Blumenkrantz
d6958a5e43 gallium: kill off pipe_surface::context
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:15 +00:00
Mike Blumenkrantz
9ffc4f43f9 svga: move surface context member onto internal surface type
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:15 +00:00
Mike Blumenkrantz
e8ced90aab gallium: add a pipe_context param to pipe_surface_reference()
this shouldn't be used anymore, but for anyone still using it there
needs to be a context passed

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:15 +00:00
Mike Blumenkrantz
169c140ec3 gallium: delete pipe_context surface hooks
no longer used

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:15 +00:00
Mike Blumenkrantz
0615a276ca gallium: add a destructor param to surface refcounting functions
these functions should no longer be used by serious drivers. for those that
do use them, they now need to pass their own destructor function

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:15 +00:00
Mike Blumenkrantz
639c356894 r300: delete pipe_context surface hooks
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:14 +00:00
Mike Blumenkrantz
8c37145e61 r300: clean up some surface management
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:14 +00:00
Mike Blumenkrantz
0cafd100fa freedreno: delete pipe_context surface hooks
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:13 +00:00
Mike Blumenkrantz
1af551ed9f tegra: delete pipe_context surface hooks
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:13 +00:00
Mike Blumenkrantz
199eff7538 nouveau: delete unused surface hook
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:13 +00:00
Mike Blumenkrantz
643d7b4b70 freedreno: clean up some surface management
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:13 +00:00
Mike Blumenkrantz
f1b09f7760 tc: delete unused surface ref code
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:13 +00:00
Mike Blumenkrantz
0115fc92c6 crocus: clean up surface management
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:13 +00:00
Mike Blumenkrantz
a4c0f5ba6f svga: simplify some surface management
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:13 +00:00
Mike Blumenkrantz
17d9f1dc64 llvmpipe: delete pipe_context surface hooks
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:12 +00:00
Mike Blumenkrantz
fa350781ed svga: delete pipe_context surface hooks
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:12 +00:00
Mike Blumenkrantz
5e2ecd64b0 softpipe: delete pipe_context::create_surface
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
2026-03-23 16:58:11 +00:00