X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Fpixelformat_backend.cpp;h=1da1435705c6dad4f55819a2f08577cbe7819fe3;hp=13df7ee8692fe871c3843921ea780d1c0cb6bdf6;hb=1f00d807ddd7ccfeb70619a8e225db50ccd822d3;hpb=f4f81f1d86d50b29b9a44b237f67c6f5ad8f0523 diff --git a/source/backends/vulkan/pixelformat_backend.cpp b/source/backends/vulkan/pixelformat_backend.cpp index 13df7ee8..1da14357 100644 --- a/source/backends/vulkan/pixelformat_backend.cpp +++ b/source/backends/vulkan/pixelformat_backend.cpp @@ -74,6 +74,16 @@ unsigned get_vulkan_aspect(PixelComponents comp) } } +unsigned get_vulkan_attachment_layout(PixelComponents comp) +{ + switch(comp) + { + case DEPTH_COMPONENT: + case STENCIL_INDEX: return VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; + default: return VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; + } +} + PixelFormat pixelformat_from_vulkan(unsigned vkf) { switch(vkf)