From 0450ca61e27dd0ee0ae744aa98426621627897a1 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Wed, 18 Apr 2018 12:57:34 -0700 Subject: Fix some logic around legalization of sampler types (#496) The main error here was checking for `IRSamplerType` instead of `IRSamplerTypeBase`, which means the relevant logic only triggered for the `SamplerState` type and not the `SamplerComparisonState` type. The two affected places were type legalization (so that comparison samplers in `struct` types weren't being hoisted out) and the emit logic when deciding whether to introduce local temporaries (so we were emitting temporaries for comparison samplers, leading to GLSL errors). --- source/slang/legalize-types.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/legalize-types.cpp') diff --git a/source/slang/legalize-types.cpp b/source/slang/legalize-types.cpp index 51a7af314..6922a5174 100644 --- a/source/slang/legalize-types.cpp +++ b/source/slang/legalize-types.cpp @@ -88,7 +88,7 @@ static bool isResourceType(IRType* type) { return true; } - else if (auto samplerType = as(type)) + else if (auto samplerType = as(type)) { return true; } -- cgit v1.2.3