Interface blocks can now properly return their size from
TType::getElementSize() or TType::elementRegisterCount().
Change-Id: Ief69163088839784cf347160bb49fd64f1a2a395
Reviewed-on: https://swiftshader-review.googlesource.com/3584
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
{
return getStructSize();
}
+ else if(isInterfaceBlock())
+ {
+ return interfaceBlock->objectSize();
+ }
else if(isMatrix())
{
return primarySize * secondarySize;
int elementRegisterCount() const
{
- if(structure)
+ if(structure || isInterfaceBlock())
{
int registerCount = 0;
- const TFieldList& fields = getStruct()->fields();
+ const TFieldList& fields = isInterfaceBlock() ? interfaceBlock->fields() : structure->fields();
for(size_t i = 0; i < fields.size(); i++)
{
registerCount += fields[i]->type()->totalRegisterCount();