mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 04:30:10 +01:00
panvk/csf: fix uninitialized read in draw context
We check fn_set_fbds_provoking_vertex_stride == 0 to determine whether a
previous function variant has already been allocated, so this value must
be initialized to zero before we start the loop. We could fix this by
explicitly initializing just that field, but I figure it's simpler and
safer to just zero-initialize the whole struct.
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Fixes: 885805560f ("panvk/csf: fix case where vk_meta is used before PROVOKING_VERTEX_MODE_LAST")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38458>
This commit is contained in:
parent
bcdc0aae44
commit
e899bc8be8
1 changed files with 1 additions and 1 deletions
|
|
@ -137,7 +137,7 @@ calc_fn_set_fbds_provoking_vertex_idx(struct panvk_cmd_buffer *cmdbuf)
|
|||
VkResult
|
||||
panvk_per_arch(device_draw_context_init)(struct panvk_device *dev)
|
||||
{
|
||||
dev->draw_ctx = vk_alloc(&dev->vk.alloc,
|
||||
dev->draw_ctx = vk_zalloc(&dev->vk.alloc,
|
||||
sizeof(struct panvk_device_draw_context),
|
||||
_Alignof(struct panvk_device_draw_context),
|
||||
VK_SYSTEM_ALLOCATION_SCOPE_DEVICE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue