diff --git a/src/panfrost/vulkan/jm/panvk_vX_cmd_draw.c b/src/panfrost/vulkan/jm/panvk_vX_cmd_draw.c index 89523da7fdc..af29fa6f0ba 100644 --- a/src/panfrost/vulkan/jm/panvk_vX_cmd_draw.c +++ b/src/panfrost/vulkan/jm/panvk_vX_cmd_draw.c @@ -1426,6 +1426,8 @@ panvk_index_minmax_search(struct panvk_cmd_buffer *cmdbuf, uint32_t start, void *ptr = cmdbuf->state.gfx.ib.buffer->host_ptr + cmdbuf->state.gfx.ib.offset; + assert(PAN_ARCH < 9 && cmdbuf->state.gfx.ib.buffer->host_ptr); + assert(cmdbuf->state.gfx.ib.buffer); assert(cmdbuf->state.gfx.ib.buffer->bo); assert(cmdbuf->state.gfx.ib.buffer->host_ptr); diff --git a/src/panfrost/vulkan/panvk_buffer.c b/src/panfrost/vulkan/panvk_buffer.c index 358e18f7faa..b1a5d1ac027 100644 --- a/src/panfrost/vulkan/panvk_buffer.c +++ b/src/panfrost/vulkan/panvk_buffer.c @@ -44,9 +44,14 @@ panvk_GetBufferMemoryRequirements2(VkDevice device, } VKAPI_ATTR VkResult VKAPI_CALL -panvk_BindBufferMemory2(VkDevice device, uint32_t bindInfoCount, +panvk_BindBufferMemory2(VkDevice _device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo *pBindInfos) { + VK_FROM_HANDLE(panvk_device, device, _device); + const struct panvk_physical_device *phys_dev = + to_panvk_physical_device(device->vk.physical); + const unsigned arch = pan_arch(phys_dev->kmod.props.gpu_prod_id); + for (uint32_t i = 0; i < bindInfoCount; ++i) { VK_FROM_HANDLE(panvk_device_memory, mem, pBindInfos[i].memory); VK_FROM_HANDLE(panvk_buffer, buffer, pBindInfos[i].buffer); @@ -64,7 +69,7 @@ panvk_BindBufferMemory2(VkDevice device, uint32_t bindInfoCount, * * Make sure this goes away as soon as we fixed indirect draws. */ - if (buffer->vk.usage & VK_BUFFER_USAGE_INDEX_BUFFER_BIT) { + if (arch < 9 && (buffer->vk.usage & VK_BUFFER_USAGE_INDEX_BUFFER_BIT)) { VkDeviceSize offset = pBindInfos[i].memoryOffset; VkDeviceSize pgsize = getpagesize(); off_t map_start = offset & ~(pgsize - 1);