mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-27 04:04:23 +08:00
panvk: no need to map IB internally on valhall
The hack is only needed before valhall. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12178 Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32232>
This commit is contained in:
parent
0776b56ad6
commit
79a99a2c05
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user