Преглед на файлове

GPU: Remove stencil bit from sampler aspect mask on Vulkan (#12196)

Evan Hemsley преди 7 месеца
родител
ревизия
86691d325b
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/gpu/vulkan/SDL_gpu_vulkan.c

+ 1 - 1
src/gpu/vulkan/SDL_gpu_vulkan.c

@@ -5689,7 +5689,7 @@ static VulkanTexture *VULKAN_INTERNAL_CreateTexture(
         imageViewCreateInfo.image = texture->image;
         imageViewCreateInfo.format = SDLToVK_TextureFormat[createinfo->format];
         imageViewCreateInfo.components = texture->swizzle;
-        imageViewCreateInfo.subresourceRange.aspectMask = texture->aspectFlags;
+        imageViewCreateInfo.subresourceRange.aspectMask = texture->aspectFlags & ~VK_IMAGE_ASPECT_STENCIL_BIT; // Can't sample stencil values
         imageViewCreateInfo.subresourceRange.baseMipLevel = 0;
         imageViewCreateInfo.subresourceRange.levelCount = createinfo->num_levels;
         imageViewCreateInfo.subresourceRange.baseArrayLayer = 0;