vulkan: Drop vk_sampler_init()

It's ill-defined at best since it doesn't even initialize the
vk_object_base and its only use was NVK and that use is now gone.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35624>
This commit is contained in:
Faith Ekstrand
2025-06-17 15:42:39 -04:00
committed by Marge Bot
parent 5d416a3742
commit 366b36aefd
2 changed files with 11 additions and 21 deletions
+11 -18
View File
@@ -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;
}
-3
View File
@@ -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