Commit graph

209382 commits

Author SHA1 Message Date
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
Antonio Ospite
6e2de27288 zink: 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/zink/zink_instance.c: In function ‘zink_create_instance’:
src/gallium/drivers/zink/zink_instance.c:37:14: error: incompatible types when returning type ‘_Bool’ but ‘VkInstance’ {aka ‘struct VkInstance_T *’} was expected
   37 |       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
51a5926f66 crocus: 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/gallium/drivers/crocus/crocus_program.c: In function ‘crocus_compile_vs’:
../src/gallium/drivers/crocus/crocus_program.c🔢14: error: incompatible types when returning type ‘_Bool’ but ‘struct crocus_compiled_shader *’ was expected
 1234 |       return false;
      |              ^~~~~
../src/gallium/drivers/crocus/crocus_program.c: In function ‘crocus_compile_tcs’:
../src/gallium/drivers/crocus/crocus_program.c:1431:14: error: incompatible types when returning type ‘_Bool’ but ‘struct crocus_compiled_shader *’ was expected
 1431 |       return false;
      |              ^~~~~
../src/gallium/drivers/crocus/crocus_program.c: In function ‘crocus_compile_tes’:
../src/gallium/drivers/crocus/crocus_program.c:1576:14: error: incompatible types when returning type ‘_Bool’ but ‘struct crocus_compiled_shader *’ was expected
 1576 |       return false;
      |              ^~~~~
../src/gallium/drivers/crocus/crocus_program.c: In function ‘crocus_compile_gs’:
../src/gallium/drivers/crocus/crocus_program.c:1722:14: error: incompatible types when returning type ‘_Bool’ but ‘struct crocus_compiled_shader *’ was expected
 1722 |       return false;
      |              ^~~~~
../src/gallium/drivers/crocus/crocus_program.c: In function ‘crocus_compile_fs’:
../src/gallium/drivers/crocus/crocus_program.c:1862:14: error: incompatible types when returning type ‘_Bool’ but ‘struct crocus_compiled_shader *’ was expected
 1862 |       return false;
      |              ^~~~~
../src/gallium/drivers/crocus/crocus_program.c: In function ‘crocus_compile_clip’:
../src/gallium/drivers/crocus/crocus_program.c:2043:14: error: incompatible types when returning type ‘_Bool’ but ‘struct crocus_compiled_shader *’ was expected
 2043 |       return false;
      |              ^~~~~
../src/gallium/drivers/crocus/crocus_program.c: In function ‘crocus_compile_sf’:
../src/gallium/drivers/crocus/crocus_program.c:2197:14: error: incompatible types when returning type ‘_Bool’ but ‘struct crocus_compiled_shader *’ was expected
 2197 |       return false;
      |              ^~~~~
../src/gallium/drivers/crocus/crocus_program.c: In function ‘crocus_compile_ff_gs’:
../src/gallium/drivers/crocus/crocus_program.c:2290:14: error: incompatible types when returning type ‘_Bool’ but ‘struct crocus_compiled_shader *’ was expected
 2290 |       return false;
      |              ^~~~~
../src/gallium/drivers/crocus/crocus_program.c: In function ‘crocus_compile_cs’:
../src/gallium/drivers/crocus/crocus_program.c:2540:14: error: incompatible types when returning type ‘_Bool’ but ‘struct crocus_compiled_shader *’ was expected
 2540 |       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
8825bf9b48 nir: 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/compiler/nir/nir_lower_io_indirect_loads.c: In function ‘get_load_once_variable’:
../src/compiler/nir/nir_lower_io_indirect_loads.c:87:17: error: incompatible types when returning type ‘_Bool’ but ‘nir_variable **’ {aka ‘struct nir_variable **’} was expected
   87 |          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
llyyr
c869971d05 radv: don't set HOST_IMAGE_TRANSFER_BIT if host_image_copy not enabled
This can't work if the extension isn't enabled, so only set if the
extension is enabled.

Fixes: d89b11011f ("radv: add support for formats with host-transfer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36400>
2025-07-29 13:48:59 +00:00
David Rosca
da5f3a1027 radeonsi/vcn: Use more_rbsp_data flag for H264 PPS encode
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
transform_8x8_mode, pic_scaling_matrix_present_flag and
second_chroma_qp_index_offset may only be present in High profile.

Cc: mesa-stable
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36351>
2025-07-29 11:30:24 +00:00
David Rosca
6247c7fdc1 frontends/va: Add H264 encode more_rbsp_data PPS flag
Cc: mesa-stable
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36351>
2025-07-29 11:30:24 +00:00
Christoph Pillmayer
a501d26dee vk/sync: Pass dependencyFlags in vk_common_CmdPipelineBarrier
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>

Fixes: 97f0a449 ("vulkan: implement legacy entrypoints on top of VK_KHR_synchronization2")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36321>
2025-07-29 11:11:29 +00:00
Nagulendran, Iswara
6088dbe05c amd/vpelib: Fix cost profiling support
Add additional changes/logs to profile total register writes.

Signed-off-by: Iswara Nagulendran <Iswara.Nagulendran@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36433>
2025-07-29 09:17:25 +00:00
Chang, Tomson
02beb30d6b amd/vpelib: Update register header and definitions macros
Update header and related macros and functions

Reviewed-by: Min-Hsuan You <Min-Hsuan.You@amd.com>
Reviewed-by: Ricky Lin <Ricky.Lin@amd.com>
Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Signed-off-by: Tomson Chang <tomson.chang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36433>
2025-07-29 09:17:25 +00:00
Chan, Roy
08fd9aab30 amd/vpelib: fix memory corruption
[WHY]
Wrong structure size being allocated

[HOW]
fixed the structure size during allocation

Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36433>
2025-07-29 09:17:25 +00:00
Nagulendran, Iswara
74c88f740f amd/vpelib: Fix Issues with Background Color insertions
[WHY]
Background Color Insertion, test cases involving studio output fails

[HOW]
Move background color convertion into revision specific resource
files and isolated what needed to be executed for VPE

Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Signed-off-by: Iswara Nagulendran <Iswara.Nagulendran@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36433>
2025-07-29 09:17:25 +00:00
Assadian, Navid
b529d38ae9 amd/vpelib: Exit when VPE not support in debug
When the debug flag is set to assert when vpe is not supported, instead
of assert it is preferable to exit so the CI aborts the process instead
of waiting on the assert message.

[WHY]
In debug mode for CI, when assert the process doesn't abort and the CI
terminates on time out.

[HOW]
Using exit instead of assert

Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Signed-off-by: Navid Assadian <navid.assadian@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36433>
2025-07-29 09:17:24 +00:00
Kovac, Krunoslav
5b8b5c4c49 amd/vpelib: Fix Possible dereferencing null
pointer issue

[WHY]
Mostly dereferencing possible null ptrs

[HOW]
Add checks / refactor code.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36433>
2025-07-29 09:17:24 +00:00
Chang, Tomson
48495c142a amd/vpelib: Add missing swizzle and dcc info
Add missing swizzle mode and dcc info

Reviewed-by: Ricky Lin <Ricky.Lin@amd.com>
Reviewed-by: Jude Shih <Jude.Shih@amd.com>
Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Signed-off-by: Tomson Chang <tomson.chang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36433>
2025-07-29 09:17:24 +00:00
Hsieh, Mike
d281a5587d amd/vpelib: add max/min input output capability
[WHY]
Capability need to show max and min input/output size.

[HOW]
Add max_input_size, max_ouptut_size, min_output_size and min_imput_size.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Ricky Lin <Ricky.Lin@amd.com>
Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Signed-off-by: Mike Hsieh <Mike.Hsieh@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36433>
2025-07-29 09:17:24 +00:00
Hsieh, Mike
6b279abcac amd/vpelib: bug fix: remove unnecessary free
[WHY]
vpe_priv.resource should not be freed when destroy resource

[HOW]
Remove unnecessary free.

Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Reviewed-by: Brendan Steve Leder <BrendanSteven.Leder@amd.com>
Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Signed-off-by: Mike Hsieh <Mike.Hsieh@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36433>
2025-07-29 09:17:24 +00:00
Hsieh, Mike
e1ff093e63 amd/vpelib: add format, colorspace check function
[WHY]
VPE does not support pixel format and colorspace support check.

[HOW]
add vpe_create_engine function to support stateless API.
Add new function to support pixel format check and colorspace support
check.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Signed-off-by: Mike Hsieh <Mike.Hsieh@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36433>
2025-07-29 09:17:24 +00:00
Agate, Jesse
0541d73cbd amd/vpelib: Use Ceil Division Macro
Use available ceil division macro

[WHY]
Code Cleanup

[HOW]
Use available macro

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Navid Assadian <Navid.Assadian@amd.com>
Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36433>
2025-07-29 09:17:24 +00:00
Erico Nunes
d620529ddb lima: ppir: fix check for discard_block in optimization
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
uses_discard may be set when the nir shader contains a 'discard'
implemented with a nir 'terminate', in that case it may stil not
necessarily have a discard block.
Fixes a crash in shaders that have comp->uses_discard but no
comp->discard_block.

Fixes: fa9ddbe82b ("lima: ppir: optimize branches")

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36350>
2025-07-29 08:55:02 +00:00
Yinjie Yao
740daef360 radeonsi/vcn: Enable preencode on VCN5.0
two_pass_search_center_map_mode will need to be disabled on VCN5.0
due to hardware limitations.

Signed-off-by: Yinjie Yao <yinjie.yao@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36380>
2025-07-29 08:26:08 +00:00
Yiwei Zhang
037fd5704a venus: set wsi alias binding memoryOffset to zero
This aligns with common wsi and Android expectations and obeys the spec
for dedicated wsi mem alloc.

Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36388>
2025-07-29 07:50:11 +00:00