mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-20 01:30:34 +01:00
lavapipe: zero-init sampler objects
The cso code hashes these as a block of bytes. This silences some Valgrind uninitialized memory warnings and possibly avoids creating some redundant sampler instances. Signed-off-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18953>
This commit is contained in:
parent
2aac8ef125
commit
6dcad8a13b
1 changed files with 2 additions and 2 deletions
|
|
@ -2223,8 +2223,8 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateSampler(
|
|||
|
||||
assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO);
|
||||
|
||||
sampler = vk_alloc2(&device->vk.alloc, pAllocator, sizeof(*sampler), 8,
|
||||
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
|
||||
sampler = vk_zalloc2(&device->vk.alloc, pAllocator, sizeof(*sampler), 8,
|
||||
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
|
||||
if (!sampler)
|
||||
return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue