Add assert on illegal signed/unsigned blit
The goal of this CL is to add an assert to catch any illegal blit
between signed and unsigned formats. Because the clear code also
uses this path, the clear color must also have the same signedness
as the destination color for integer formats.
Bug: b/202978657
Change-Id: I1d4576489042e3e1772190585fb035bee1635c16
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/58228
Presubmit-Ready: Alexis Hétu <sugoi@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Commit-Queue: Alexis Hétu <sugoi@google.com>
diff --git a/src/Vulkan/VkFormat.hpp b/src/Vulkan/VkFormat.hpp
index dd26314..89e9284 100644
--- a/src/Vulkan/VkFormat.hpp
+++ b/src/Vulkan/VkFormat.hpp
@@ -35,9 +35,11 @@
bool isSignedUnnormalizedInteger() const;
bool isUnsignedUnnormalizedInteger() const;
bool isUnnormalizedInteger() const;
+ bool isUnsigned() const;
VkImageAspectFlags getAspects() const;
Format getAspectFormat(VkImageAspectFlags aspect) const;
+ VkFormat getClearFormat() const;
bool isStencil() const;
bool isDepth() const;
bool isSRGBformat() const;