Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Vulkan validation errors on default depth textures #60137

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

JFonS
Copy link
Contributor

@JFonS JFonS commented Apr 11, 2022

The validation layers were complaining that we use DEFAULT_RD_TEXTURE_WHITE (which is RGBA8) in places where it's sampled as a depth texture. This commit adds the new default texture DEFAULT_RD_TEXTURE_DEPTH and uses it where needed.

Here's the full validation error for reference:

Descriptor set VkDescriptorSet Descriptor Set 35356 encountered the following validation error at vkCmdDrawIndexed time: Descriptor in binding #4 index 0, VkImageView Image View 250, format VK_FORMAT_R8G8B8A8_UNORM, doesn't contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT_KHR The Vulkan spec states: If a VkImageView is sampled with depth comparison, the image view's format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDrawIndexed-None-06479)

The validation layers were complaining that we use DEFAULT_RD_TEXTURE_WHITE (which is RGBA8) in places where it's sampled as a depth texture. This commit adds the new default texture DEFAULT_RD_TEXTURE_DEPTH and uses it where needed.
@JFonS JFonS added this to the 4.0 milestone Apr 11, 2022
@JFonS JFonS requested a review from a team as a code owner April 11, 2022 09:59
@akien-mga akien-mga merged commit 0fb3d69 into godotengine:master Apr 11, 2022
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants