mirror of
https://github.com/love2d/love.git
synced 2026-08-18 11:44:15 +02:00
vulkan: remove dep on VK_KHR_push_descriptor
It's not sure if this extension is supported everywhere This commit uses normal descriptor pools, sets and writes, which are all availabel in base vulkan.
This commit is contained in:
@@ -552,6 +552,28 @@ VkSamplerMipmapMode Vulkan::getMipMapMode(SamplerState::MipmapFilterMode mode) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VkDescriptorType Vulkan::getDescriptorType(graphics::Shader::UniformType type) {
|
||||
switch (type) {
|
||||
case graphics::Shader::UniformType::UNIFORM_FLOAT:
|
||||
case graphics::Shader::UniformType::UNIFORM_MATRIX:
|
||||
case graphics::Shader::UniformType::UNIFORM_INT:
|
||||
case graphics::Shader::UniformType::UNIFORM_UINT:
|
||||
case graphics::Shader::UniformType::UNIFORM_BOOL:
|
||||
return VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
|
||||
case graphics::Shader::UniformType::UNIFORM_SAMPLER:
|
||||
return VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
|
||||
case graphics::Shader::UniformType::UNIFORM_STORAGETEXTURE:
|
||||
return VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
|
||||
case graphics::Shader::UniformType::UNIFORM_TEXELBUFFER:
|
||||
return VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER;
|
||||
case graphics::Shader::UniformType::UNIFORM_STORAGEBUFFER:
|
||||
return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
|
||||
default:
|
||||
throw love::Exception("unkonwn uniform type");
|
||||
}
|
||||
}
|
||||
|
||||
void Vulkan::cmdTransitionImageLayout(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout oldLayout, VkImageLayout newLayout,
|
||||
uint32_t baseLevel, uint32_t levelCount, uint32_t baseLayer, uint32_t layerCount) {
|
||||
VkImageMemoryBarrier barrier{};
|
||||
|
||||
Reference in New Issue
Block a user