From 33e19e86bfe60e1418c09df0c65b2f18666e5066 Mon Sep 17 00:00:00 2001 From: Yuwen Wu Date: Thu, 18 Aug 2022 19:38:25 +0800 Subject: [PATCH] Don't rename remapped variables like 'gl_LastFragDepthARM' --- spirv_cross_parsed_ir.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spirv_cross_parsed_ir.cpp b/spirv_cross_parsed_ir.cpp index d399d415..33e672dc 100644 --- a/spirv_cross_parsed_ir.cpp +++ b/spirv_cross_parsed_ir.cpp @@ -342,6 +342,8 @@ void ParsedIR::set_name(ID id, const string &name) { auto &m = meta[id]; m.decoration.alias = name; + if (ids[id].get_type() == TypeVariable && get(id).remapped_variable) + return; if (!is_valid_identifier(name) || is_reserved_identifier(name, false, false)) meta_needing_name_fixup.insert(id); }