This is a temporary measure until the zeroed shaders are replaced with the real
ones. This avoids a VK_ERROR_OUT_OF_DEVICE_MEMORY error due to a zero sized
allocation.
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Fixes:
1dfd5351249 ("pvr: Setup SPM background object")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24139>
consts_buffer_size = info->const_shared_regs * sizeof(uint32_t);
+ /* TODO: Remove this check, along with the pvr_finishme(), once the zeroed
+ * shaders are replaced by the real shaders.
+ */
+ if (!consts_buffer_size)
+ return VK_SUCCESS;
+
+ pvr_finishme("Remove consts buffer size check");
+
result = pvr_bo_alloc(device,
device->heaps.general_heap,
consts_buffer_size,