Fix sameElementShape test of sampler

There is apparently a hole in the initialization of sampler in TType
so that a simple comparison which should pass might fail. Until the
hole is found, also test that both types are samplers before comparing
the sampler field for equality.

Fixes #2875
This commit is contained in:
Greg Fischer 2022-02-07 12:15:31 -07:00
parent 2742e95934
commit c5072a8cab

View File

@ -2703,7 +2703,7 @@ public:
*lpidx = -1;
*rpidx = -1;
}
return sampler == right.sampler &&
return ((basicType != EbtSampler && right.basicType != EbtSampler) || sampler == right.sampler) &&
vectorSize == right.vectorSize &&
matrixCols == right.matrixCols &&
matrixRows == right.matrixRows &&