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/emit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/emit.cpp') diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 28fb0b551..e86a6d1e4 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -2076,7 +2076,7 @@ struct EmitVisitor { return true; } - else if(as(type)) + else if(as(type)) { return true; } -- cgit v1.2.3