mesa/src
Paulo Zanoni c3aa7e42ba zink: fix bind size handling in buffer_bo_commit()
What we're checking in the assertion we're changing seems to be what
the OpenGL spec describes as:

  "<offset> must be an integer multiple of the implementation
   dependent constant SPARSE_BUFFER_PAGE_SIZE_ARB, and <size> must
   either be a multiple of SPARSE_BUFFER_PAGE_SIZE_ARB, or extend to
   the end of the buffer's data store"

There are two sizes in question here: the size of the VkBuffer and the
size of its corresponding VkDeviceMemory. It looks like
bo->base.base.size corresponds to VkDeviceMemory, while res->obj->size
corresponds to VkBuffer. Here we're really talking about the VkBuffer
size, so fix the assertion.

On Anv, we're hitting this issue because piglit's
arb_sparse_buffer-basic creates a buffer of size 32k and tries to
issue a bind operation with size 32k. The catch here is that Anv
requires the memory to be 64kb, so Zink gets confused and hits the
assertion.

Issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10220
Testcase: piglit/arb_sparse_buffer-basic
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26410>
2024-02-21 22:58:42 +00:00
..
amd aco/ra: fix GFX9- writelane 2024-02-21 12:40:14 +00:00
android_stub util/log: improve logger_android 2023-02-22 17:55:40 +00:00
asahi agx: add "is helper program?" key bit 2024-02-14 21:02:32 +00:00
broadcom v3d,v3dv: fix BO allocation for shared vars 2024-02-21 06:17:55 +00:00
c11 util/meson: Getting mesa util core to be self contained 2023-08-02 03:41:24 +00:00
compiler meson: do not pull in clc for clover 2024-02-21 20:53:36 +00:00
drm-shim compiler,vulkan,drm-shim: Remove unused include directories from meson.build 2023-10-27 01:35:10 +00:00
egl egl: don't bind zink under dri2/3 2024-02-21 11:15:38 +10:00
etnaviv ci/etnaviv: update expectations 2024-02-12 01:25:24 +01:00
freedreno tu: Exclude more a7xx regs from stomping 2024-02-12 22:05:13 +00:00
gallium zink: fix bind size handling in buffer_bo_commit() 2024-02-21 22:58:42 +00:00
gbm gbm: delete some zink handling 2023-10-09 18:43:09 +00:00
getopt
glx glx/dri3: handle zink fallback if loader picks it. 2024-02-21 11:16:22 +10:00
gtest gtest: backport ansi color fix 2023-08-18 21:33:14 +00:00
imagination pvr: enable VK_EXT_headless_surface on all platforms except Windows 2024-02-06 20:32:39 +00:00
imgui
intel intel: Only build shaders with anv and iris 2024-02-21 20:53:36 +00:00
loader loader: handle picking zink for nouveau for certain GPUs. 2024-02-21 11:16:25 +10:00
mapi glapi: move EXT_texture_storage to the right position 2024-02-07 08:48:20 +00:00
mesa st/mesa: optimize st_update_arrays using lots of C++ template variants 2024-02-21 18:36:44 +00:00
microsoft microsoft/compiler: Fix SM6.6 non-bindless handle annotation for UAV counter 2024-02-21 03:39:22 +00:00
nouveau nvk: fix dri options leak. 2024-02-21 05:23:09 +00:00
panfrost pan/va: Add missing valhall_enums dep to valhall_disasm 2024-02-08 15:04:34 +01:00
tool perfetto/pps-producer: add optimized cpu/gpu timestamp correlation support 2023-11-09 13:22:48 +00:00
util st/mesa: optimize st_update_arrays using lots of C++ template variants 2024-02-21 18:36:44 +00:00
virtio venus: simplify feedback types tracking during submission 2024-02-16 23:51:22 +00:00
vulkan vk/wsi/x11/sw: use swapchain depth for putimage 2024-02-20 15:47:45 +00:00
.clang-format nir: add _safe variants of nir_foreach_reg_load/store 2023-12-15 17:19:28 +00:00
meson.build virgl: Fix compilation on MSVC 2024-02-05 08:41:22 +00:00