X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Fpixelformat_backend.cpp;h=1da1435705c6dad4f55819a2f08577cbe7819fe3;hb=ab9b22356f16aea822527c06186641d3121e1355;hp=13df7ee8692fe871c3843921ea780d1c0cb6bdf6;hpb=99ca354f18119f82f1adeca100cd665a8f640317;p=libs%2Fgl.git 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)