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

This commit is contained in:
Evan Hemsley 2025-02-05 17:52:35 -08:00 committed by GitHub
parent 6782cfe2c5
commit 86691d325b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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;