mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
panvk: Remove leftovers from CPU-side min/max index calculation
Commit c11f47481a ("panvk: stop CPU mapping all index buffers on JM")
stopped mapping the buffer objects on v9-, but it forgot to remove
panvk_buffer::host_ptr and panvk_cmd_graphics_state::host_addr.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36934>
This commit is contained in:
parent
050a37c923
commit
125de6cd63
4 changed files with 0 additions and 30 deletions
|
|
@ -103,16 +103,5 @@ panvk_DestroyBuffer(VkDevice _device, VkBuffer _buffer,
|
|||
if (!buffer)
|
||||
return;
|
||||
|
||||
if (buffer->host_ptr) {
|
||||
VkDeviceSize pgsize = getpagesize();
|
||||
uintptr_t map_start = (uintptr_t)buffer->host_ptr & ~(pgsize - 1);
|
||||
uintptr_t map_end =
|
||||
ALIGN_POT((uintptr_t)buffer->host_ptr + buffer->vk.size, pgsize);
|
||||
ASSERTED int ret = os_munmap((void *)map_start, map_end - map_start);
|
||||
|
||||
assert(!ret);
|
||||
buffer->host_ptr = NULL;
|
||||
}
|
||||
|
||||
vk_buffer_destroy(&device->vk, pAllocator, &buffer->vk);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,15 +14,6 @@ struct panvk_priv_bo;
|
|||
|
||||
struct panvk_buffer {
|
||||
struct vk_buffer vk;
|
||||
|
||||
/* FIXME: Only used for index buffers to do the min/max index retrieval on
|
||||
* the CPU. This is all broken anyway and the min/max search should be done
|
||||
* with a compute shader that also patches the job descriptor accordingly
|
||||
* (basically an indirect draw).
|
||||
*
|
||||
* Make sure this field goes away as soon as we fixed indirect draws.
|
||||
*/
|
||||
void *host_ptr;
|
||||
};
|
||||
|
||||
VK_DEFINE_NONDISP_HANDLE_CASTS(panvk_buffer, vk.base, VkBuffer,
|
||||
|
|
|
|||
|
|
@ -170,9 +170,6 @@ struct panvk_cmd_graphics_state {
|
|||
/* Index buffer */
|
||||
struct {
|
||||
uint64_t dev_addr;
|
||||
#if PAN_ARCH < 9
|
||||
void *host_addr;
|
||||
#endif
|
||||
uint64_t size;
|
||||
uint8_t index_size;
|
||||
} ib;
|
||||
|
|
|
|||
|
|
@ -903,10 +903,6 @@ panvk_per_arch(CmdBindIndexBuffer2)(VkCommandBuffer commandBuffer,
|
|||
cmdbuf->state.gfx.ib.size = panvk_buffer_range(buf, offset, size);
|
||||
assert(cmdbuf->state.gfx.ib.size <= UINT32_MAX);
|
||||
cmdbuf->state.gfx.ib.dev_addr = panvk_buffer_gpu_ptr(buf, offset);
|
||||
#if PAN_ARCH < 9
|
||||
cmdbuf->state.gfx.ib.host_addr =
|
||||
buf && buf->host_ptr ? buf->host_ptr + offset : NULL;
|
||||
#endif
|
||||
} else {
|
||||
cmdbuf->state.gfx.ib.size = 0;
|
||||
/* In case of NullDescriptors, we need to set a non-NULL address and rely
|
||||
|
|
@ -914,9 +910,6 @@ panvk_per_arch(CmdBindIndexBuffer2)(VkCommandBuffer commandBuffer,
|
|||
* that this only works for v10+, as v9 does not have a way to specify the
|
||||
* index buffer size. */
|
||||
cmdbuf->state.gfx.ib.dev_addr = PAN_ARCH >= 10 ? 0x1000 : 0;
|
||||
#if PAN_ARCH < 9
|
||||
cmdbuf->state.gfx.ib.host_addr = 0;
|
||||
#endif
|
||||
}
|
||||
cmdbuf->state.gfx.ib.index_size = vk_index_type_to_bytes(indexType);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue