Commit 42d10fdf by Chris Forbes

Add support for sampling VK_FORMAT_D16_UNORM

Test: dEQP-VK.*d16_unorm* Bug: b/131246807 Change-Id: Ifaec74c1a2273af4585dd2423e87db4992cbf14e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30531Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent dcc9fd79
......@@ -259,6 +259,7 @@ namespace sw
case VK_FORMAT_R32_SFLOAT:
case VK_FORMAT_R16_SFLOAT:
case VK_FORMAT_D32_SFLOAT:
case VK_FORMAT_D16_UNORM:
c.y = Float4(0.0f);
case VK_FORMAT_R32G32_SFLOAT:
case VK_FORMAT_R16G16_SFLOAT:
......
......@@ -1708,6 +1708,7 @@ bool Format::has16bitTextureFormat() const
case VK_FORMAT_A2B10G10R10_UINT_PACK32:
case VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:
case VK_FORMAT_B10G11R11_UFLOAT_PACK32:
case VK_FORMAT_D16_UNORM:
return false;
default:
UNIMPLEMENTED("Format: %d", int(format));
......@@ -1763,6 +1764,7 @@ bool Format::has8bitTextureComponents() const
case VK_FORMAT_A2B10G10R10_UINT_PACK32:
case VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:
case VK_FORMAT_B10G11R11_UFLOAT_PACK32:
case VK_FORMAT_D16_UNORM:
return false;
default:
UNIMPLEMENTED("Format: %d", int(format));
......@@ -1818,6 +1820,7 @@ bool Format::has16bitTextureComponents() const
case VK_FORMAT_R16G16B16A16_SINT:
case VK_FORMAT_R16G16B16A16_UINT:
case VK_FORMAT_R16G16B16A16_SFLOAT:
case VK_FORMAT_D16_UNORM:
return true;
default:
UNIMPLEMENTED("Format: %d", int(format));
......@@ -1928,6 +1931,7 @@ bool Format::hasYuvFormat() const
case VK_FORMAT_A2B10G10R10_UINT_PACK32:
case VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:
case VK_FORMAT_D32_SFLOAT:
case VK_FORMAT_D16_UNORM:
case VK_FORMAT_B10G11R11_UFLOAT_PACK32:
return false;
default:
......@@ -1985,6 +1989,7 @@ bool Format::isRGBComponent(int component) const
case VK_FORMAT_B10G11R11_UFLOAT_PACK32:
return component < 3;
case VK_FORMAT_D32_SFLOAT:
case VK_FORMAT_D16_UNORM:
return false;
default:
UNIMPLEMENTED("Format: %d", int(format));
......
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