Skip to content

Commit

Permalink
GPU: Remove stencil bit from sampler aspect mask on Vulkan (libsdl-or…
Browse files Browse the repository at this point in the history
  • Loading branch information
thatcosmonaut authored Feb 6, 2025
1 parent 6782cfe commit 86691d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gpu/vulkan/SDL_gpu_vulkan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 86691d3

Please sign in to comment.