Commit abaecd5f by Ben Clayton

VkFormat.cpp: Replace ASSERT with UNIMPLEMENTED

Actually print what is unhandled so we can fix it. Change-Id: I98ef49cf2f3f3882a8c4296578af4880c2542240 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/29270 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent d853c12d
...@@ -313,7 +313,7 @@ bool Format::isFloatFormat() const ...@@ -313,7 +313,7 @@ bool Format::isFloatFormat() const
case VK_FORMAT_D32_SFLOAT_S8_UINT: case VK_FORMAT_D32_SFLOAT_S8_UINT:
return true; return true;
default: default:
ASSERT(false); UNIMPLEMENTED("Format: %d", int(format));
} }
return false; return false;
...@@ -1043,7 +1043,7 @@ int Format::componentCount() const ...@@ -1043,7 +1043,7 @@ int Format::componentCount() const
case VK_FORMAT_R64G64B64A64_SFLOAT: case VK_FORMAT_R64G64B64A64_SFLOAT:
return 4; return 4;
default: default:
ASSERT(false); UNIMPLEMENTED("Format: %d", int(format));
} }
return 1; return 1;
...@@ -1191,7 +1191,7 @@ bool Format::isUnsignedComponent(int component) const ...@@ -1191,7 +1191,7 @@ bool Format::isUnsignedComponent(int component) const
case VK_FORMAT_R64G64B64_SFLOAT: case VK_FORMAT_R64G64B64_SFLOAT:
return component >= 3; return component >= 3;
default: default:
ASSERT(false); UNIMPLEMENTED("Format: %d", int(format));
} }
return false; return false;
...@@ -1411,7 +1411,7 @@ int Format::bytes() const ...@@ -1411,7 +1411,7 @@ int Format::bytes() const
case VK_FORMAT_ASTC_12x12_SRGB_BLOCK: return 0; // FIXME case VK_FORMAT_ASTC_12x12_SRGB_BLOCK: return 0; // FIXME
case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM: return 1; // Y plane only case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM: return 1; // Y plane only
default: default:
ASSERT(false); UNIMPLEMENTED("Format: %d", int(format));
} }
return 0; return 0;
...@@ -1734,7 +1734,7 @@ bool Format::has16bitTextureFormat() const ...@@ -1734,7 +1734,7 @@ bool Format::has16bitTextureFormat() const
case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM: case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:
return false; return false;
default: default:
ASSERT(false); UNIMPLEMENTED("Format: %d", int(format));
} }
return false; return false;
...@@ -1780,7 +1780,7 @@ bool Format::has8bitTextureComponents() const ...@@ -1780,7 +1780,7 @@ bool Format::has8bitTextureComponents() const
case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM: case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:
return false; return false;
default: default:
ASSERT(false); UNIMPLEMENTED("Format: %d", int(format));
} }
return false; return false;
...@@ -1826,7 +1826,7 @@ bool Format::has16bitTextureComponents() const ...@@ -1826,7 +1826,7 @@ bool Format::has16bitTextureComponents() const
case VK_FORMAT_R16G16B16A16_UINT: case VK_FORMAT_R16G16B16A16_UINT:
return true; return true;
default: default:
ASSERT(false); UNIMPLEMENTED("Format: %d", int(format));
} }
return false; return false;
...@@ -1872,7 +1872,7 @@ bool Format::has32bitIntegerTextureComponents() const ...@@ -1872,7 +1872,7 @@ bool Format::has32bitIntegerTextureComponents() const
case VK_FORMAT_R32G32B32A32_UINT: case VK_FORMAT_R32G32B32A32_UINT:
return true; return true;
default: default:
ASSERT(false); UNIMPLEMENTED("Format: %d", int(format));
} }
return false; return false;
...@@ -1918,7 +1918,7 @@ bool Format::hasYuvFormat() const ...@@ -1918,7 +1918,7 @@ bool Format::hasYuvFormat() const
case VK_FORMAT_R16G16B16A16_UINT: case VK_FORMAT_R16G16B16A16_UINT:
return false; return false;
default: default:
ASSERT(false); UNIMPLEMENTED("Format: %d", int(format));
} }
return false; return false;
...@@ -1965,7 +1965,7 @@ bool Format::isRGBComponent(int component) const ...@@ -1965,7 +1965,7 @@ bool Format::isRGBComponent(int component) const
case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM: case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:
return component < 3; return component < 3;
default: default:
ASSERT(false); UNIMPLEMENTED("Format: %d", int(format));
} }
return false; return false;
......
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