summaryrefslogtreecommitdiffstats
path: root/src/vulkan/gen7_state.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-12-02 03:28:27 -0800
committerJason Ekstrand <[email protected]>2015-12-03 13:43:53 -0800
commitfcfb404a5860c67129e3672768cc557c0e4a1f12 (patch)
treec3af43297c0e1b348053f59a65fa3a0350d6f67f /src/vulkan/gen7_state.c
parentd3547e733443f406ff505e5f9f9790de0ae16907 (diff)
vk/0.210.0: Rework allocation to use the new pAllocator's
Diffstat (limited to 'src/vulkan/gen7_state.c')
-rw-r--r--src/vulkan/gen7_state.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vulkan/gen7_state.c b/src/vulkan/gen7_state.c
index e4cf552f90d..a3cb95dbb52 100644
--- a/src/vulkan/gen7_state.c
+++ b/src/vulkan/gen7_state.c
@@ -107,6 +107,7 @@ alloc_surface_state(struct anv_device *device,
VkResult genX(CreateSampler)(
VkDevice _device,
const VkSamplerCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
VkSampler* pSampler)
{
ANV_FROM_HANDLE(anv_device, device, _device);
@@ -115,8 +116,8 @@ VkResult genX(CreateSampler)(
assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO);
- sampler = anv_device_alloc(device, sizeof(*sampler), 8,
- VK_SYSTEM_ALLOC_TYPE_API_OBJECT);
+ sampler = anv_alloc2(&device->alloc, pAllocator, sizeof(*sampler), 8,
+ VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
if (!sampler)
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);