Fixed some types utility functions for uniform blocks
Uniform blocks can be neither scalars not registers,
so make sure these never return true for uniform blocks.
Change-Id: Ib00afd175e4df92d45fe1aeaca865ea45fc13b0b
Reviewed-on: https://swiftshader-review.googlesource.com/4544
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/compiler/Types.h b/src/OpenGL/compiler/Types.h
index e58c996..3e760f3 100644
--- a/src/OpenGL/compiler/Types.h
+++ b/src/OpenGL/compiler/Types.h
@@ -369,8 +369,8 @@
TInterfaceBlock *getAsInterfaceBlock() const { return isInterfaceBlock() ? getInterfaceBlock() : nullptr; }
bool isVector() const { return primarySize > 1 && !isMatrix(); }
- bool isScalar() const { return primarySize == 1 && !isMatrix() && !structure; }
- bool isRegister() const { return !isMatrix() && !structure && !array; } // Fits in a 4-element register
+ bool isScalar() const { return primarySize == 1 && !isMatrix() && !structure && !isInterfaceBlock(); }
+ bool isRegister() const { return !isMatrix() && !structure && !array && !isInterfaceBlock(); } // Fits in a 4-element register
bool isStruct() const { return structure != 0; }
bool isScalarInt() const { return isScalar() && IsInteger(type); }