mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Vulkan: Fix compilation on 32-bit targets
This commit is contained in:
@ -260,120 +260,6 @@ VkShaderModule CompileAndCreateFragmentShader(const std::string& source_code, bo
|
||||
|
||||
} // namespace Util
|
||||
|
||||
template <>
|
||||
DeferredResourceDestruction
|
||||
DeferredResourceDestruction::Wrapper<VkCommandPool>(VkCommandPool object)
|
||||
{
|
||||
DeferredResourceDestruction ret;
|
||||
ret.object.command_pool = object;
|
||||
ret.destroy_callback = [](VkDevice device, const Object& obj) {
|
||||
vkDestroyCommandPool(device, obj.command_pool, nullptr);
|
||||
};
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <>
|
||||
DeferredResourceDestruction
|
||||
DeferredResourceDestruction::Wrapper<VkDeviceMemory>(VkDeviceMemory object)
|
||||
{
|
||||
DeferredResourceDestruction ret;
|
||||
ret.object.device_memory = object;
|
||||
ret.destroy_callback = [](VkDevice device, const Object& obj) {
|
||||
vkFreeMemory(device, obj.device_memory, nullptr);
|
||||
};
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <>
|
||||
DeferredResourceDestruction DeferredResourceDestruction::Wrapper<VkBuffer>(VkBuffer object)
|
||||
{
|
||||
DeferredResourceDestruction ret;
|
||||
ret.object.buffer = object;
|
||||
ret.destroy_callback = [](VkDevice device, const Object& obj) {
|
||||
vkDestroyBuffer(device, obj.buffer, nullptr);
|
||||
};
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <>
|
||||
DeferredResourceDestruction DeferredResourceDestruction::Wrapper<VkBufferView>(VkBufferView object)
|
||||
{
|
||||
DeferredResourceDestruction ret;
|
||||
ret.object.buffer_view = object;
|
||||
ret.destroy_callback = [](VkDevice device, const Object& obj) {
|
||||
vkDestroyBufferView(device, obj.buffer_view, nullptr);
|
||||
};
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <>
|
||||
DeferredResourceDestruction DeferredResourceDestruction::Wrapper<VkImage>(VkImage object)
|
||||
{
|
||||
DeferredResourceDestruction ret;
|
||||
ret.object.image = object;
|
||||
ret.destroy_callback = [](VkDevice device, const Object& obj) {
|
||||
vkDestroyImage(device, obj.image, nullptr);
|
||||
};
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <>
|
||||
DeferredResourceDestruction DeferredResourceDestruction::Wrapper<VkImageView>(VkImageView object)
|
||||
{
|
||||
DeferredResourceDestruction ret;
|
||||
ret.object.image_view = object;
|
||||
ret.destroy_callback = [](VkDevice device, const Object& obj) {
|
||||
vkDestroyImageView(device, obj.image_view, nullptr);
|
||||
};
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <>
|
||||
DeferredResourceDestruction DeferredResourceDestruction::Wrapper<VkRenderPass>(VkRenderPass object)
|
||||
{
|
||||
DeferredResourceDestruction ret;
|
||||
ret.object.render_pass = object;
|
||||
ret.destroy_callback = [](VkDevice device, const Object& obj) {
|
||||
vkDestroyRenderPass(device, obj.render_pass, nullptr);
|
||||
};
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <>
|
||||
DeferredResourceDestruction
|
||||
DeferredResourceDestruction::Wrapper<VkFramebuffer>(VkFramebuffer object)
|
||||
{
|
||||
DeferredResourceDestruction ret;
|
||||
ret.object.framebuffer = object;
|
||||
ret.destroy_callback = [](VkDevice device, const Object& obj) {
|
||||
vkDestroyFramebuffer(device, obj.framebuffer, nullptr);
|
||||
};
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <>
|
||||
DeferredResourceDestruction
|
||||
DeferredResourceDestruction::Wrapper<VkShaderModule>(VkShaderModule object)
|
||||
{
|
||||
DeferredResourceDestruction ret;
|
||||
ret.object.shader_module = object;
|
||||
ret.destroy_callback = [](VkDevice device, const Object& obj) {
|
||||
vkDestroyShaderModule(device, obj.shader_module, nullptr);
|
||||
};
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <>
|
||||
DeferredResourceDestruction DeferredResourceDestruction::Wrapper<VkPipeline>(VkPipeline object)
|
||||
{
|
||||
DeferredResourceDestruction ret;
|
||||
ret.object.pipeline = object;
|
||||
ret.destroy_callback = [](VkDevice device, const Object& obj) {
|
||||
vkDestroyPipeline(device, obj.pipeline, nullptr);
|
||||
};
|
||||
return ret;
|
||||
}
|
||||
|
||||
UtilityShaderDraw::UtilityShaderDraw(VkCommandBuffer command_buffer,
|
||||
VkPipelineLayout pipeline_layout, VkRenderPass render_pass,
|
||||
VkShaderModule vertex_shader, VkShaderModule geometry_shader,
|
||||
|
Reference in New Issue
Block a user