mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
v3dv: Move V3D_TFU_READAHEAD_SIZE to src/broadcom/common
We will use it in v3d. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36159>
This commit is contained in:
parent
7ed9fdf85b
commit
310aa198f4
3 changed files with 6 additions and 6 deletions
|
|
@ -71,6 +71,11 @@ struct v3d_device_info {
|
|||
uint32_t cle_buffer_min_size;
|
||||
};
|
||||
|
||||
/* TFU has a 64-bytes readhead. To avoid the unit reading unmaped memory
|
||||
* we need to overallocate buffers that could be read by the TFU.
|
||||
*/
|
||||
#define V3D_TFU_READAHEAD_SIZE 64
|
||||
|
||||
typedef int (*v3d_ioctl_fun)(int fd, unsigned long request, void *arg);
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -2183,7 +2183,7 @@ v3dv_AllocateMemory(VkDevice _device,
|
|||
assert(pAllocateInfo->sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO);
|
||||
|
||||
/* We always allocate device memory in multiples of a page, so round up
|
||||
* requested size to that. We need to add a V3D_TFU_READHAEAD padding to
|
||||
* requested size to that. We need to add a V3D_TFU_READAHEAD padding to
|
||||
* avoid invalid reads done by the TFU unit after the end of the last page
|
||||
* allocated.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -598,11 +598,6 @@ struct v3dv_device {
|
|||
struct util_dynarray device_address_bo_list; /* Array of struct v3dv_bo * */
|
||||
};
|
||||
|
||||
/* TFU has readhead of 64 bytes. So to avoid the unit reading unmaped memory
|
||||
* it is needed to overallocate buffers that could be read by the TFU
|
||||
*/
|
||||
#define V3D_TFU_READAHEAD_SIZE 64
|
||||
|
||||
struct v3dv_device_memory {
|
||||
struct vk_device_memory vk;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue