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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>