Vulkan: Correct Aspectbits for Depth Textures
Vulkan spec only wants to have a single aspect bit when a texture contains both a stencil and a depth part. As for Blender depth is more used than stencil we standardize to depth aspect. Pull Request: https://projects.blender.org/blender/blender/pulls/107542
This commit is contained in:
parent
5095ecc67b
commit
96dcdbfc51
|
@ -50,15 +50,13 @@ VkImageAspectFlagBits to_vk_image_aspect_flag_bits(const eGPUTextureFormat forma
|
|||
case GPU_R11F_G11F_B10F:
|
||||
case GPU_SRGB8_A8:
|
||||
return VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
case GPU_DEPTH32F_STENCIL8:
|
||||
case GPU_DEPTH24_STENCIL8:
|
||||
return static_cast<VkImageAspectFlagBits>(VK_IMAGE_ASPECT_DEPTH_BIT |
|
||||
VK_IMAGE_ASPECT_STENCIL_BIT);
|
||||
|
||||
/* Depth Formats. */
|
||||
case GPU_DEPTH_COMPONENT32F:
|
||||
case GPU_DEPTH_COMPONENT24:
|
||||
case GPU_DEPTH_COMPONENT16:
|
||||
case GPU_DEPTH32F_STENCIL8:
|
||||
case GPU_DEPTH24_STENCIL8:
|
||||
return VK_IMAGE_ASPECT_DEPTH_BIT;
|
||||
|
||||
/* Texture only formats. */
|
||||
|
|
Loading…
Reference in New Issue