mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 22:00:13 +01:00
anv: Do not copy garbage to batch_bo
batch_size is the aligned value so it is >= than the actual number of bytes in anv_batch. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18110>
This commit is contained in:
parent
631794b8a9
commit
87b19c68d8
1 changed files with 3 additions and 2 deletions
|
|
@ -2425,10 +2425,11 @@ anv_queue_submit_simple_batch(struct anv_queue *queue,
|
||||||
*/
|
*/
|
||||||
assert(vk_queue_is_empty(&queue->vk));
|
assert(vk_queue_is_empty(&queue->vk));
|
||||||
|
|
||||||
uint32_t batch_size = align_u32(batch->next - batch->start, 8);
|
const uint32_t batch_size = batch->next - batch->start;
|
||||||
|
const uint32_t batch_bo_size = align_u32(batch_size, 8);
|
||||||
|
|
||||||
struct anv_bo *batch_bo = NULL;
|
struct anv_bo *batch_bo = NULL;
|
||||||
result = anv_bo_pool_alloc(&device->batch_bo_pool, batch_size, &batch_bo);
|
result = anv_bo_pool_alloc(&device->batch_bo_pool, batch_bo_size, &batch_bo);
|
||||||
if (result != VK_SUCCESS)
|
if (result != VK_SUCCESS)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue