Commit graph

209372 commits

Author SHA1 Message Date
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
Yiwei Zhang
e559d76066 venus: drop is_wsi tracking and some asserts
This is to help with kms support.

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
Yiwei Zhang
8a156fb695 venus: drop cached ahb buffer memory types
No longer needed as we relocated the type fix to mem alloc time even for
non-dedicated export 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:10 +00:00
Yiwei Zhang
ca97816136 venus: rework AHB memory import
We don't need the host dma-buf size anymore since the blob mapping size
has been made passive.

Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36388>
2025-07-29 07:50:10 +00:00
Yiwei Zhang
87b1a46d88 venus: adopt vk_common_GetAndroidHardwareBufferPropertiesANDROID
This is based on:
1. external format handling has been made passive
2. blob mapping size has been made passive
3. common helper has improved mem type reporting

Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36388>
2025-07-29 07:50:09 +00:00
Yiwei Zhang
aac51c3a0b vulkan/android: improve memoryTypeBits reporting in AHB props query
Instead of reporting all memory types being compatible, at least we can
limit the types to those compatible for dma-buf import. Optionally, we
can do even better here to actually create the image or buffer with the
AHB to get more accurate memory type bits for memory import. However, it
is optional since we can touch up in the common layer upon actual AHB
import time.

Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36388>
2025-07-29 07:50:09 +00:00
Job Noorman
04a182417e ir3/shared_ra: don't reuse src of different halfness
Avoid reusing the src of an ALU/SFU instruction when its halfness is
different from the dst. A difference in halfness would introduce a (ss)
sync and unnecessarily increase ss-stall.

Totals from 8261 (5.02% of 164705) affected shaders:
Instrs: 10044160 -> 10044390 (+0.00%); split: -0.04%, +0.04%
CodeSize: 19875094 -> 19879238 (+0.02%); split: -0.08%, +0.10%
NOPs: 2249893 -> 2249273 (-0.03%); split: -0.14%, +0.11%
MOVs: 426644 -> 426565 (-0.02%); split: -0.24%, +0.23%
COVs: 134819 -> 134810 (-0.01%); split: -0.06%, +0.05%
(ss): 264012 -> 260680 (-1.26%); split: -1.34%, +0.08%
(sy): 122711 -> 122851 (+0.11%); split: -0.07%, +0.18%
(ss)-stall: 1111161 -> 1100625 (-0.95%); split: -1.07%, +0.12%
(sy)-stall: 3650422 -> 3651422 (+0.03%); split: -0.15%, +0.17%
STPs: 8693 -> 8701 (+0.09%); split: -0.08%, +0.17%
LDPs: 16814 -> 16815 (+0.01%); split: -0.10%, +0.11%
Preamble Instrs: 2346201 -> 2351217 (+0.21%); split: -0.25%, +0.46%
Last helper: 3417842 -> 3417889 (+0.00%); split: -0.07%, +0.08%
Cat0: 2486420 -> 2485758 (-0.03%); split: -0.13%, +0.10%
Cat1: 613403 -> 614417 (+0.17%); split: -0.21%, +0.37%
Cat2: 3742181 -> 3742109 (-0.00%); split: -0.00%, +0.00%
Cat6: 81897 -> 81906 (+0.01%); split: -0.03%, +0.04%
Cat7: 254014 -> 253955 (-0.02%); split: -0.11%, +0.09%

Note that the slight increase in Cat1 is mostly from lowered copies (to
swz) and seems to be RA bad luck.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36376>
2025-07-29 07:23:15 +00:00
Georg Lehmann
b12db991eb aco/gfx10: optimize subgroupRotate(x, 32) and subgroupShuffleXor(x, 32)
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We don't have v_permlane64_b32 yet, but we can still optimize it using
shared vgprs. Using the DPP16 row mask, we can even avoid writing exec.

With v0 input/output and v24/v25 as shared vgprs, this results in:
v_mov_b32_dpp v24, v0 quad_perm:[0,1,2,3] row_mask:0x3 bank_mask:0xf
v_mov_b32_dpp v25, v0 quad_perm:[0,1,2,3] row_mask:0xc bank_mask:0xf
v_mov_b32_dpp v0, v24 quad_perm:[0,1,2,3] row_mask:0xc bank_mask:0xf
v_mov_b32_dpp v0, v25 quad_perm:[0,1,2,3] row_mask:0x3 bank_mask:0xf

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36390>
2025-07-29 06:33:20 +00:00
Georg Lehmann
eb4df58a3d aco/isel: refactor shared vgpr usage
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36390>
2025-07-29 06:33:20 +00:00
Georg Lehmann
8a2aca8d6f aco/select_alu: avoid vector get_alu_src for instructions with scalar operands
Foz-DB Navi21:
Totals from 1 (0.00% of 80237) affected shaders:
Instrs: 22 -> 21 (-4.55%)
CodeSize: 112 -> 108 (-3.57%)
Latency: 392 -> 386 (-1.53%)
InvThroughput: 25 -> 24 (-4.00%)
Copies: 4 -> 3 (-25.00%)
PreVGPRs: 8 -> 4 (-50.00%)
VALU: 10 -> 9 (-10.00%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35728>
2025-07-29 06:07:15 +00:00
Georg Lehmann
ad9c340d86 aco: insert VALU s_delay_alu for WMMA
This should avoid some SIMD stalls.

I think this special case was added to try to handle this case:

First Instruction: WMMA
Second Instruction: WMMA instruction with same VGPR of previous WMMA instruction’s Matrix D as Matrix C
Stall if the first and second instruction are not the same type of WMMA or use ABS/NEG on SRC2 of the second instruction

If I read it correctly, we shouldn't need a delay if the type is the same and no
modifier is used. That's kind of complex to handle, so leave it for now.
Not inserting any delays likely hurts more than this.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36328>
2025-07-29 05:48:29 +00:00