Commit graph

209403 commits

Author SHA1 Message Date
Georg Lehmann
92cf02ee23 nir/search: support swizzles on expressions in replacement patterns
Before this wasn't a compile time error, but it also didn't do anything.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36117>
2025-07-30 07:25:51 +00:00
Mel Henning
4be68b119e loader: Don't load nouveau GL on nvidia kmd
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The vulkan driver already has a check for this. This prevents the GL
driver from loading too.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13484
Fixes: e99446fc ("egl: Add EGL_EXT_device_query_name and EGL_EXT_device_persistent_id")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36449>
2025-07-29 23:52:32 +00:00
Timothy Arceri
6a217a06d9 util: remove recursion from bitset helpers
Recursion can cause a stack overflow when the range is very large.

Fixes: cb558b2b88 ("glsl: add mark_array_elements_referenced() fast path")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13617

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36430>
2025-07-29 23:07:12 +00:00
Sagar Ghuge
3a9157a10b anv: Use thread group preemption granularity
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36337>
2025-07-29 22:47:56 +00:00
Sagar Ghuge
9ae09d521c intel/genxml: Update CS_CHICKEN1 register field
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36337>
2025-07-29 22:47:56 +00:00
Roland Scheidegger
47c9c1869c llvmpipe: Fix attribute interpolation setup when rendering lines with msaa
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
If multisampling is enabled, we effectively always use pixel offset 0 for the
purposes of setup, overriding half pixel center.
However, line setup (and by the looks of it rectangle as well), while honoring
this for the purposes of setting up the rasterization planes, it forgot to
do this adjustment when setting up attribute interpolation, hence attribute
interpolation for lines ended up wrong.
Rather than fixing this up in line setup, just override pixel_offset in setup
context when using msaa, since this is what we actually do, which simplifies
the logic (do the same for the key for the setup jit function as well).

Reviewed-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36435>
2025-07-29 21:52:01 +00:00
Marek Olšák
d61edf079b nir: add nir_move_only_convergent/divergent
This will be needed by nir_opt_move_reorder_loads, which will use
the move flags.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36357>
2025-07-29 16:20:53 -04:00
Marek Olšák
35bbc8405b nir: add more nir_move_options
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36357>
2025-07-29 16:20:51 -04:00
Marek Olšák
44d78c4451 nir: handle load_input_vertex in nir_can_move_instr
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36357>
2025-07-29 16:20:49 -04:00
Marek Olšák
8d3e76c250 nir: split nir_move_load_frag_coord from nir_move_load_input
It's a pure system value on AMD, not an input.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36357>
2025-07-29 16:20:48 -04:00
Marek Olšák
5083769fcb nir: renumber nir_move_options
for future commits

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36357>
2025-07-29 16:20:46 -04:00
Marek Olšák
8d584586f5 nir: handle can_reorder robustly in nir_can_move_instr
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36357>
2025-07-29 16:20:44 -04:00
Marek Olšák
c229c93540 nir: change how can_mov_out_of_loop is set for intrinsics in nir_can_move_instr
Set to false first, then set to true when needed.

More intrinsics will set false.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36357>
2025-07-29 16:20:42 -04:00
Marek Olšák
ad1cfcc841 nir: mark inverse_ballot & is_subgroup_invocation_lt_amd as CAN_REORDER
nir_can_move_instr already ignores that this flag isn't set.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36357>
2025-07-29 16:20:39 -04:00
Marek Olšák
2eea9b968d nir/group_loads: rename to nir_opt_group_loads
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's meant to be an optimization pass.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36100>
2025-07-29 19:28:59 +00:00
Marek Olšák
3bceb7b622 nir/group_loads: don't use pass_flags to store the indirection level
no change in behavior

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36100>
2025-07-29 19:28:59 +00:00
Marek Olšák
7b9acabe89 nir/group_loads: store our custom instr->index in an array
we'll put more stuff in the new structure

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36100>
2025-07-29 19:28:58 +00:00
Marek Olšák
821dc611c5 nir/group_loads: use nir_instr_next/prev
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36100>
2025-07-29 19:28:58 +00:00
Marek Olšák
318a57c57c nir/group_loads: make is_grouped_load use get_load_resource
and unify get_intrinsic_resource & get_uniform_inst_resource into the new
helper get_load_resource.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36100>
2025-07-29 19:28:57 +00:00
Marek Olšák
b9f7dc5d26 nir/group_loads: remove mostly duplicated function is_memory_load
is_grouped_load does the same thing

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36100>
2025-07-29 19:28:57 +00:00
Marek Olšák
ef0a5e1a65 nir/group_loads: invert the return value of can_move to reflect its true meaning
The previous commit handles non-reorderable instructions better, so this is
no longer needed.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36100>
2025-07-29 19:28:56 +00:00
Marek Olšák
ad8b5325d4 nir/group_loads: group any reorderable intrinsics regardless of barriers
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36100>
2025-07-29 19:28:56 +00:00
Marek Olšák
e0d8979dea nir/group_loads: split is_barrier into is_barrier + is_terminate
and handle demote

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36100>
2025-07-29 19:28:56 +00:00
Marek Olšák
7d9aca2235 nir/group_loads: allow moving loads across instructions without defs
It wouldn't group these:
    load (reordeable)
    store
    load (reordeable)

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36100>
2025-07-29 19:28:55 +00:00
Marek Olšák
aa732f6f30 nir/group_loads: handle more loads
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36100>
2025-07-29 19:28:55 +00:00
Lucas Fryzek
ab52889d28 anv: Enable compression on astc emulation plane
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11108
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30592>
2025-07-29 19:10:34 +00:00
Mike Blumenkrantz
f68cae3e13 kopper: fix initial swapinterval setting
setting the mode here is harmless even on weirdo cts swapchain cases

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

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36452>
2025-07-29 14:47:56 -04:00
Eric Engestrom
a8e9af2ce9 wsi/display: pass the plane's modifiers to the image
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This should cause us to choose a better-than-linear format modifier
automatically based on the intersection of the driver's support and the
display plane's support.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36341>
2025-07-29 16:44:04 +00:00
Emma Anholt
0c0d9c05e0 wsi/display: Do connector setup before swapchain init.
The connector setup decides on a CRTC/plane, and can be done early.  We're
going to need that to get the modifiers list before we have swapchain init
create the images.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36341>
2025-07-29 16:44:04 +00:00
Emma Anholt
fe7652eae9 wsi/display: Pull DRM format translation up a level.
Saves doing it multiple times, but more importantly we want to know it
before wsi_swapchain_init() soon.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36341>
2025-07-29 16:44:03 +00:00
Eric Engestrom
b16a6a56d8 wsi/display: pass the image's DRM modifiers to the kernel
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36341>
2025-07-29 16:44:02 +00:00
Yiwei Zhang
00d0f2bec5 nvk: clean up direct u_gralloc dep
The u_gralloc fallback backend exists as a best effort attempt and it
does log in the Android logcat so can be easily identified if not WAI.
So far there's no Vulkan impl in mesa could reasonably work with the
fallback backend alone, so if that becomes a real pain, we can exclude
it from inside vk_android_get_ugralloc runtime helper.

Also drop redundant ANB header.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36386>
2025-07-29 16:29:58 +00:00
Yiwei Zhang
0d5a2f92ca nak: do not hide drm header on Android
libdrm exists on Android and drm header is needed as well. The proper
way for cross-compile now is to use "-Dallow-fallback-for=libdrm" so
that the subproject can be fetched accordingly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36386>
2025-07-29 16:29:58 +00:00
Yiwei Zhang
1e0c3529e7 nvk: clean up existing nvk_android frontend
1. No need custom nvk_AcquireImageANDROID to wait for the HWC release
   fence, since nvk is able to properly import the sync file.
2. Document the nvk_QueueSignalReleaseImageANDROID behavior.
3. Drop redundant header and includes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36386>
2025-07-29 16:29:58 +00:00
José Roberto de Souza
07f5b53dd7 intel/brw: Remove duplicated implementation of brw_imm_uq/brw_imm_u64()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36448>
2025-07-29 16:05:54 +00:00
José Roberto de Souza
14386eb7e5 intel/brw: Add comment to reg_unit()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36448>
2025-07-29 16:05:54 +00:00
José Roberto de Souza
7981a18df2 intel/brw: Nuke unused brw_message_desc_header_present()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36448>
2025-07-29 16:05:53 +00:00
Pavel Ondračka
116bd1848e r300/ci: remove emulated swtcl testing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36436>
2025-07-29 15:50:59 +00:00
Pavel Ondračka
1035098a78 r300/ci: add RS740 piglit and dEQP testing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36436>
2025-07-29 15:50:59 +00:00
Thomas H.P. Andersen
f8741cc344 anti-lag: pass a proper dataSize
dataSize was passed as sizeof(uint64_t)

From spec:
dataSize is the size in bytes of the buffer pointed to by pData.
dataSize must be large enough to contain the result of each query

The NVK driver checks that the dataSize is large enough and hit an assert.

This patch changes dataSize to sizeof(struct query) * num_timestamps.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36402>
2025-07-29 15:24:14 +00:00
Faith Ekstrand
064b9e5645 vulkan/wsi/x11: Handle VK_NOT_READY in AcquireNextImage()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This check assumed that we would always get `VK_TIMEOUT` from
wsi_queue_pull() but the new explicit sync wait is smart enough to do
that for us.  Unfortunately, the X11 code weasn't smart enough to know
that VK_NOT_READY (which is a positive return code) was also an early
exit condition.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12971
Fixes: 899263ecfc ("wsi/x11: support explicit sync")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tested-by: Adam Ivora
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36419>
2025-07-29 15:05:40 +00:00
Antonio Ospite
1b55314615 broadcom/compiler: prevent FALLTHROUGH error with C23
When building for the C23 standard, the compiler gives the following
error:

-----------------------------------------------------------------------
../src/broadcom/compiler/vir_register_allocate.c
../src/broadcom/compiler/vir_register_allocate.c: In function ‘update_graph_and_reg_classes_for_inst’:
../src/broadcom/compiler/vir_register_allocate.c:1225:44: error: expected statement before ‘;’ token
 1225 |                                 FALLTHROUGH;
      |                                            ^
../src/broadcom/compiler/vir_register_allocate.c:1225:44: warning: ‘fallthrough’ attribute ignored [-Wattributes]
../src/broadcom/compiler/vir_register_allocate.c:1225:44: error: suggest braces around empty body in an ‘else’ statement [-Werror=empty-body]
../src/broadcom/compiler/vir_register_allocate.c:1222:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1222 |                         if (c->devinfo->ver >= 71)
      |                            ^
../src/broadcom/compiler/vir_register_allocate.c:1226:17: note: here
 1226 |                 case 1:
      |                 ^~~~
-----------------------------------------------------------------------

Fix that by doing what the compiler suggests, i.e. by using braces
around empty body in the ‘else’ statement.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36323>
2025-07-29 14:07:07 +00:00
Antonio Ospite
9c96f4f13f lima: fix returning _Bool instead of pointer
When building for C23 the compiler warns about returning a boolean when
a different type is expected instead.

Change the code to return NULL instead of false, fixing the following
error:

-----------------------------------------------------------------------
../src/gallium/drivers/lima/lima_bo.c: In function ‘lima_bo_cache_get’:
../src/gallium/drivers/lima/lima_bo.c:247:14: error: incompatible types when returning type ‘_Bool’ but ‘struct lima_bo *’ was expected
  247 |       return false;
      |              ^~~~~
-----------------------------------------------------------------------

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36323>
2025-07-29 14:07:07 +00:00
Antonio Ospite
b2b6e56583 etnaviv: fix returning _Bool instead of pointer
When building for C23 the compiler warns about returning a boolean when
a different type is expected instead.

Change the code to return NULL instead of false, fixing the following
error:

-----------------------------------------------------------------------
../src/gallium/drivers/etnaviv/etnaviv_query_acc_perfmon.c: In function ‘perfmon_allocate’:
../src/gallium/drivers/etnaviv/etnaviv_query_acc_perfmon.c:109:14: error: incompatible types when returning type ‘_Bool’ but ‘struct etna_acc_query *’ was expected
  109 |       return false;
      |              ^~~~~
../src/gallium/drivers/etnaviv/etnaviv_query_acc_perfmon.c:112:14: error: incompatible types when returning type ‘_Bool’ but ‘struct etna_acc_query *’ was expected
  112 |       return false;
      |              ^~~~~
-----------------------------------------------------------------------

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36323>
2025-07-29 14:07:07 +00:00
Antonio Ospite
2972f1df83 asahi: fix returning _Bool instead of pointer
When building for C23 the compiler warns about returning a boolean when
a different type is expected instead.

Change the code to return NULL instead of false, fixing the following
error:

-----------------------------------------------------------------------
../src/gallium/drivers/asahi/agx_pipe.c: In function ‘agx_resource_from_handle’:
../src/gallium/drivers/asahi/agx_pipe.c:184:14: error: incompatible types when returning type ‘_Bool’ but ‘struct pipe_resource *’ was expected
  184 |       return false;
      |              ^~~~~
-----------------------------------------------------------------------

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36323>
2025-07-29 14:07:07 +00:00
Antonio Ospite
c5bfa57e8f microsoft/compiler: fix returning _Bool instead of pointer
When building for C23 the compiler warns about returning a boolean when
a different type is expected instead.

Change the code to return NULL instead of false, fixing the following
errors:

-----------------------------------------------------------------------
../src/microsoft/compiler/dxil_module.c: In function ‘create_call_instr’:
../src/microsoft/compiler/dxil_module.c:3311:17: error: incompatible types when returning type ‘_Bool’ but ‘struct dxil_instr *’ was expected
 3311 |          return false;
      |                 ^~~~~
../src/microsoft/compiler/dxil_module.c: In function ‘dxil_emit_load’:
../src/microsoft/compiler/dxil_module.c:3469:14: error: incompatible types when returning type ‘_Bool’ but ‘const struct dxil_value *’ was expected
 3469 |       return false;
      |              ^~~~~
../src/microsoft/compiler/dxil_module.c: In function ‘dxil_emit_cmpxchg’:
../src/microsoft/compiler/dxil_module.c:3511:14: error: incompatible types when returning type ‘_Bool’ but ‘const struct dxil_value *’ was expected
 3511 |       return false;
      |              ^~~~~
../src/microsoft/compiler/dxil_module.c: In function ‘dxil_emit_atomicrmw’:
../src/microsoft/compiler/dxil_module.c:3535:14: error: incompatible types when returning type ‘_Bool’ but ‘const struct dxil_value *’ was expected
 3535 |       return false;
      |              ^~~~~
../src/microsoft/compiler/dxil_function.c: In function ‘dxil_alloc_func_with_rettype’:
../src/microsoft/compiler/dxil_function.c:251:17: error: incompatible types when returning type ‘_Bool’ but ‘const struct dxil_func *’ was expected
  251 |          return false;
      |                 ^~~~~
../src/microsoft/compiler/dxil_function.c:261:14: error: incompatible types when returning type ‘_Bool’ but ‘const struct dxil_func *’ was expected
  261 |       return false;
      |              ^~~~~
../src/microsoft/compiler/nir_to_dxil.c: In function ‘emit_atomic_binop’:
../src/microsoft/compiler/nir_to_dxil.c:959:14: error: incompatible types when returning type ‘_Bool’ but ‘const struct dxil_value *’ was expected
  959 |       return false;
      |              ^~~~~
../src/microsoft/compiler/nir_to_dxil.c: In function ‘emit_atomic_cmpxchg’:
../src/microsoft/compiler/nir_to_dxil.c:984:14: error: incompatible types when returning type ‘_Bool’ but ‘const struct dxil_value *’ was expected
  984 |       return false;
      |              ^~~~~
../src/microsoft/compiler/nir_to_dxil.c: In function ‘emit_threads’:
../src/microsoft/compiler/nir_to_dxil.c:1793:14: error: incompatible types when returning type ‘_Bool’ but ‘const struct dxil_mdnode *’ was expected
 1793 |       return false;
      |              ^~~~~
../src/microsoft/compiler/nir_to_dxil.c: In function ‘call_unary_external_function’:
../src/microsoft/compiler/nir_to_dxil.c:3223:14: error: incompatible types when returning type ‘_Bool’ but ‘const struct dxil_value *’ was expected
 3223 |       return false;
      |              ^~~~~
../src/microsoft/compiler/nir_to_dxil.c:3228:14: error: incompatible types when returning type ‘_Bool’ but ‘const struct dxil_value *’ was expected
 3228 |       return false;
      |              ^~~~~
../src/microsoft/compiler/nir_to_dxil.c: In function ‘emit_texture_size’:
../src/microsoft/compiler/nir_to_dxil.c:4305:14: error: incompatible types when returning type ‘_Bool’ but ‘const struct dxil_value *’ was expected
 4305 |       return false;
      |              ^~~~~
../src/microsoft/compiler/nir_to_dxil.c: In function ‘emit_sample_grad’:
../src/microsoft/compiler/nir_to_dxil.c:5350:14: error: incompatible types when returning type ‘_Bool’ but ‘const struct dxil_value *’ was expected
 5350 |       return false;
      |              ^~~~~
../src/microsoft/compiler/nir_to_dxil.c: In function ‘emit_sample_cmp_grad’:
../src/microsoft/compiler/nir_to_dxil.c:5370:14: error: incompatible types when returning type ‘_Bool’ but ‘const struct dxil_value *’ was expected
 5370 |       return false;
      |              ^~~~~
../src/microsoft/compiler/nir_to_dxil.c: In function ‘emit_texel_fetch’:
../src/microsoft/compiler/nir_to_dxil.c:5393:14: error: incompatible types when returning type ‘_Bool’ but ‘const struct dxil_value *’ was expected
 5393 |       return false;
      |              ^~~~~
../src/microsoft/compiler/nir_to_dxil.c: In function ‘emit_texture_lod’:
../src/microsoft/compiler/nir_to_dxil.c:5413:14: error: incompatible types when returning type ‘_Bool’ but ‘const struct dxil_value *’ was expected
 5413 |       return false;
      |              ^~~~~
../src/microsoft/compiler/nir_to_dxil.c: In function ‘emit_texture_gather’:
../src/microsoft/compiler/nir_to_dxil.c:5434:14: error: incompatible types when returning type ‘_Bool’ but ‘const struct dxil_value *’ was expected
 5434 |       return false;
      |              ^~~~~
-----------------------------------------------------------------------

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36323>
2025-07-29 14:07:07 +00:00
Antonio Ospite
663c9faf73 dril: fix returning _Bool instead of pointer
When building for C23 the compiler warns about returning a boolean when
a different type is expected instead.

Change the code to return NULL instead of false, fixing the following
error:

-----------------------------------------------------------------------
../src/gallium/targets/dril/dril_target.c: In function ‘init_dri2_configs’:
../src/gallium/targets/dril/dril_target.c:362:14: error: incompatible types when returning type ‘_Bool’ but ‘const __DRIconfig **’ {aka ‘const struct __DRIconfigRec **’} was expected
  362 |       return false;
      |              ^~~~~
-----------------------------------------------------------------------

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36323>
2025-07-29 14:07:07 +00:00
Antonio Ospite
0dd8051f34 radv: fix returning _Bool instead of pointer
When building for C23 the compiler warns about returning a boolean when
a different type is expected instead.

Change the code to return NULL instead of false, fixing the following
errors:

-----------------------------------------------------------------------
../src/amd/vulkan/radv_pipeline_cache.c: In function ‘radv_pipeline_cache_object_search’:
../src/amd/vulkan/radv_pipeline_cache.c:338:14: error: incompatible types when returning type ‘_Bool’ but ‘struct radv_pipeline_cache_object *’ was expected
  338 |       return false;
      |              ^~~~~
../src/amd/vulkan/radv_pipeline_cache.c:352:14: error: incompatible types when returning type ‘_Bool’ but ‘struct radv_pipeline_cache_object *’ was expected
  352 |       return false;
      |              ^~~~~
-----------------------------------------------------------------------

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36323>
2025-07-29 14:07:06 +00:00
Antonio Ospite
bf56ab91fd nak: fix returning _Bool instead of pointer
When building for C23 the compiler warns about returning a boolean when
a different type is expected instead.

Change the code to return NULL instead of false, fixing the following
error:

-----------------------------------------------------------------------
../src/nouveau/compiler/nak_nir_lower_image_addrs.c: In function ‘lower_formatted_image_load’:
../src/nouveau/compiler/nak_nir_lower_image_addrs.c:60:14: error: incompatible types when returning type ‘_Bool’ but ‘nir_def *’ {aka ‘struct nir_def *’} was expected
   60 |       return false;
      |              ^~~~~
-----------------------------------------------------------------------

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36323>
2025-07-29 14:07:06 +00:00
Antonio Ospite
6ffe6c2aef anv: fix returning _Bool instead of pointer
When building for C23 the compiler warns about returning a boolean when
a different type is expected instead.

Change the code to return NULL instead of false, fixing the following
error:

-----------------------------------------------------------------------
../src/intel/vulkan_hasvk/anv_nir_apply_pipeline_layout.c: In function ‘nir_deref_find_descriptor’:
../src/intel/vulkan_hasvk/anv_nir_apply_pipeline_layout.c:230:14: error: incompatible types when returning type ‘_Bool’ but ‘nir_intrinsic_instr *’ {aka ‘struct nir_intrinsic_instr *’} was expected
  230 |       return false;
      |              ^~~~~
-----------------------------------------------------------------------

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36323>
2025-07-29 14:07:06 +00:00