Commit 6d29348d by Alexis Hetu Committed by Alexis Hétu

Enable filtering depth only formats

Exposing GL_OES_depth_texture requires that at least depth only format are filterable, so making sure at least D16_UNORM and D32_SFLOAT can be filtered. Tests: dEQP-VK.*d16_unorm* Tests: dEQP-VK.*d32_sfloat* Bug: b/146563038 Change-Id: I2c5a10b03eab19d179c005e2f0f8f22a4921830c Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/39748 Presubmit-Ready: Alexis Hétu <sugoi@google.com> Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com>
parent 750660e1
...@@ -497,6 +497,8 @@ void PhysicalDevice::getFormatProperties(Format format, VkFormatProperties *pFor ...@@ -497,6 +497,8 @@ void PhysicalDevice::getFormatProperties(Format format, VkFormatProperties *pFor
case VK_FORMAT_EAC_R11_SNORM_BLOCK: case VK_FORMAT_EAC_R11_SNORM_BLOCK:
case VK_FORMAT_EAC_R11G11_UNORM_BLOCK: case VK_FORMAT_EAC_R11G11_UNORM_BLOCK:
case VK_FORMAT_EAC_R11G11_SNORM_BLOCK: case VK_FORMAT_EAC_R11G11_SNORM_BLOCK:
case VK_FORMAT_D16_UNORM:
case VK_FORMAT_D32_SFLOAT:
pFormatProperties->optimalTilingFeatures |= pFormatProperties->optimalTilingFeatures |=
VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT; VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT;
// Fall through // Fall through
...@@ -524,8 +526,6 @@ void PhysicalDevice::getFormatProperties(Format format, VkFormatProperties *pFor ...@@ -524,8 +526,6 @@ void PhysicalDevice::getFormatProperties(Format format, VkFormatProperties *pFor
case VK_FORMAT_R32G32B32A32_UINT: case VK_FORMAT_R32G32B32A32_UINT:
case VK_FORMAT_R32G32B32A32_SINT: case VK_FORMAT_R32G32B32A32_SINT:
case VK_FORMAT_S8_UINT: case VK_FORMAT_S8_UINT:
case VK_FORMAT_D16_UNORM:
case VK_FORMAT_D32_SFLOAT:
case VK_FORMAT_D32_SFLOAT_S8_UINT: case VK_FORMAT_D32_SFLOAT_S8_UINT:
pFormatProperties->optimalTilingFeatures |= pFormatProperties->optimalTilingFeatures |=
VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT | VK_FORMAT_FEATURE_SAMPLED_IMAGE_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