diff --git a/src/vulkan/runtime/vk_sampler.c b/src/vulkan/runtime/vk_sampler.c index 15b7cac3b28..95d0fc03b9a 100644 --- a/src/vulkan/runtime/vk_sampler.c +++ b/src/vulkan/runtime/vk_sampler.c @@ -178,9 +178,18 @@ vk_sampler_state_init(struct vk_sampler_state *state, } } -void -vk_sampler_init(const VkSamplerCreateInfo *pCreateInfo, struct vk_sampler *sampler) +void * +vk_sampler_create(struct vk_device *device, + const VkSamplerCreateInfo *pCreateInfo, + const VkAllocationCallbacks *alloc, + size_t size) { + struct vk_sampler *sampler; + + sampler = vk_object_zalloc(device, alloc, size, VK_OBJECT_TYPE_SAMPLER); + if (!sampler) + return NULL; + struct vk_sampler_state state; vk_sampler_state_init(&state, pCreateInfo); @@ -200,22 +209,6 @@ vk_sampler_init(const VkSamplerCreateInfo *pCreateInfo, struct vk_sampler *sampl assert(state.format == conversion->state.format); sampler->ycbcr_conversion = conversion; } -} - -void * -vk_sampler_create(struct vk_device *device, - const VkSamplerCreateInfo *pCreateInfo, - const VkAllocationCallbacks *alloc, - size_t size) -{ - struct vk_sampler *sampler; - - sampler = vk_object_zalloc(device, alloc, size, VK_OBJECT_TYPE_SAMPLER); - if (!sampler) - return NULL; - - assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO); - vk_sampler_init(pCreateInfo, sampler); return sampler; } diff --git a/src/vulkan/runtime/vk_sampler.h b/src/vulkan/runtime/vk_sampler.h index 95165d593ba..5c1e7df870e 100644 --- a/src/vulkan/runtime/vk_sampler.h +++ b/src/vulkan/runtime/vk_sampler.h @@ -161,9 +161,6 @@ void vk_sampler_destroy(struct vk_device *device, const VkAllocationCallbacks *alloc, struct vk_sampler *sampler); -void -vk_sampler_init(const VkSamplerCreateInfo *pCreateInfo, struct vk_sampler *sampler); - #ifdef __cplusplus } #endif