Commit 110236f3 by Alexis Hetu Committed by Alexis Hétu

Enable filtering depth+stencil formats

This is a follow-up to this cl: https://swiftshader-review.googlesource.com/c/SwiftShader/+/39748 where filtering was enabled for depth only formats. According to the Vulkan spec (about VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT): "If the format being queried is a depth/stencil format, this bit only specifies that the depth aspect (not the stencil aspect) of an image of this format supports linear filtering, and that linear filtering of the depth aspect is supported whether depth compare is enabled in the sampler or not. If this bit is not present, linear filtering with depth compare disabled is unsupported and linear filtering with depth compare enabled is supported, but may compute the filtered value in an implementation-dependent manner which differs from the normal rules of linear filtering. The resulting value must be in the range [0,1] and should be proportional to, or a weighted average of, the number of comparison passes or failures." So VK_FORMAT_D32_SFLOAT_S8_UINT can be added to the list of filterable formats, since VK_FORMAT_D32_SFLOAT is already supported. Change-Id: Ida83c2630c920f3dc2c3e17853dfe91c835a4b7f Tests: dEQP-VK.*d32_sfloat_s8_uint* Bug: b/146563038 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/40028 Presubmit-Ready: Alexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
parent a7e42ba7
......@@ -509,6 +509,7 @@ void PhysicalDevice::getFormatProperties(Format format, VkFormatProperties *pFor
case VK_FORMAT_EAC_R11G11_SNORM_BLOCK:
case VK_FORMAT_D16_UNORM:
case VK_FORMAT_D32_SFLOAT:
case VK_FORMAT_D32_SFLOAT_S8_UINT:
pFormatProperties->optimalTilingFeatures |=
VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT;
// Fall through
......@@ -536,7 +537,6 @@ void PhysicalDevice::getFormatProperties(Format format, VkFormatProperties *pFor
case VK_FORMAT_R32G32B32A32_UINT:
case VK_FORMAT_R32G32B32A32_SINT:
case VK_FORMAT_S8_UINT:
case VK_FORMAT_D32_SFLOAT_S8_UINT:
pFormatProperties->optimalTilingFeatures |=
VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT |
VK_FORMAT_FEATURE_BLIT_SRC_BIT |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment