The consumer of the Android surface may or may not be display. e.g. it
can also be a media encoder. When BufferQueue makes the allocation, it
takes the gralloc usage bits from both the client API (EGL/Vulkan) and
the consumer side.
Cc: mesa-stable
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
The additional usage bits added for rgba8 and rgb565 are not needed as
those are conditionally added based on the consumer side of the Android
surface (e.g. display, encoder, etc).
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
The existing common ANB helpers are declared under DETECT_OS_ANDROID but
the implementations are hidden further behind ANDROID_API_LEVEL >= 26,
which is not right.
In addition, for the sanity, let's move front buffer usage query behind
api level 26, while moving baseline ANB entry points above the
conditional api level scope.
In the future, we should look to drop below 26 support (basically drop
Android N support where Vulkan 1.0.3 was initially supported).
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
No need to check the baseline support since that's part of core, and the
extended support is checked from vkGetPhysicalDeviceSurfaceFormatsKHR by
the platform against both gralloc and the driver.
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
The composer usage bit is automatically added by the surface consumer
side when the consumer is SurfaceFlinger. e.g. if the swapchain is
connected with a media encoder surface, the consumer side would append
encoder usage bit instead.
Fixes: c406d53858 ("vulkan/android: Add common vkGetSwapchainGrallocUsage{2}ANDROID")
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
Leaving writeable on probably means that we forgot to disable
writeable somewhere, which is a bad idea. The existing code couldn't
handle this and would subtly crash somewhere else due to start not being
saved, but just assert instead to make the problem more clear.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35993>
A rebase problem meant that the hunk leaving the CS not writeable again
was dropped. This isn't what was intended and caused a crash in the CS
code.
Because tu6_emit_gmem_stores() is now called inside a condition, we have
to move the enable/disable outside of it because changing to a
read-write buffer inside of a condition isn't currently supported.
Fixes: ba9d0ba9a0 ("turnip: Emit tile stores at subpass end time.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35993>
Clamp point size to limits.
Emit default point size if required but none is provided.
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998>
Use more Vulkan runtime/common functions.
Properly use the descriptor pool.
Start to remove legacy/unused constructs from PDS generation.
Support for UBO descriptors.
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998>
This pass can now remain in the compiler as Vulkan-specific data will be
abstracted into the compiler-driver interface.
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998>
Do this by switching to vk_descriptor_set_layout and making use of the helper
functions. This also has the bonus of less code in the driver.
Fixes a segfault seen when running glmark2-es2-wayland.
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Co-authored-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998>
The KHR_shader_expect_assume dEQP tests use dynamic rendering without
first checking that the driver supports 1.3 or the
KHR_dynamic_rendering extension
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998>