From 901b45e09aa3cab60e55604c63121745b10ce97c Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Sat, 10 Sep 2016 22:21:57 +0200 Subject: [PATCH] Fix remap_parameter. Need to return after backing variable resolve. --- spirv_cross.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spirv_cross.cpp b/spirv_cross.cpp index ef752041..30a189c6 100644 --- a/spirv_cross.cpp +++ b/spirv_cross.cpp @@ -2324,13 +2324,13 @@ void Compiler::CombinedImageSamplerHandler::pop_remap_parameters() uint32_t Compiler::CombinedImageSamplerHandler::remap_parameter(uint32_t id) { - if (parameter_remapping.empty()) - return id; - auto *var = compiler.maybe_get_backing_variable(id); if (var) id = var->self; + if (parameter_remapping.empty()) + return id; + auto &remapping = parameter_remapping.top(); auto itr = remapping.find(id); if (itr != end(remapping))