mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 05:48:07 +02:00
anv: zero-out anv_batch_bo
anv_batch_bo has a length field that we use to flush cachelines. Not having that field initialized properly leads us to access out of bound memory. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15425>
This commit is contained in:
parent
78acae3865
commit
d68b9f0e6b
1 changed files with 1 additions and 1 deletions
|
|
@ -349,7 +349,7 @@ anv_batch_bo_create(struct anv_cmd_buffer *cmd_buffer,
|
|||
{
|
||||
VkResult result;
|
||||
|
||||
struct anv_batch_bo *bbo = vk_alloc(&cmd_buffer->vk.pool->alloc, sizeof(*bbo),
|
||||
struct anv_batch_bo *bbo = vk_zalloc(&cmd_buffer->vk.pool->alloc, sizeof(*bbo),
|
||||
8, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
|
||||
if (bbo == NULL)
|
||||
return vk_error(cmd_buffer, VK_ERROR_OUT_OF_HOST_MEMORY);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue