From c5072a8cabd465ac967d7012d979b6f4d4b16a8a Mon Sep 17 00:00:00 2001 From: Greg Fischer Date: Mon, 7 Feb 2022 12:15:31 -0700 Subject: [PATCH] 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 --- glslang/Include/Types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glslang/Include/Types.h b/glslang/Include/Types.h index 54150fbe..91fcd4eb 100644 --- a/glslang/Include/Types.h +++ b/glslang/Include/Types.h @@ -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 &&