diff --git a/spirv_cross.cpp b/spirv_cross.cpp index 385ca435..c3661578 100644 --- a/spirv_cross.cpp +++ b/spirv_cross.cpp @@ -60,8 +60,8 @@ bool Compiler::variable_storage_is_aliased(const SPIRVariable &v) bool ssbo = (meta[type.self].decoration.decoration_flags & (1ull << DecorationBufferBlock)) != 0; bool image = type.basetype == SPIRType::Image; bool counter = type.basetype == SPIRType::AtomicCounter; - bool restrict = (meta[v.self].decoration.decoration_flags & (1ull << DecorationRestrict)) != 0; - return !restrict && (ssbo || image || counter); + bool is_restrict = (meta[v.self].decoration.decoration_flags & (1ull << DecorationRestrict)) != 0; + return !is_restrict && (ssbo || image || counter); } bool Compiler::block_is_pure(const SPIRBlock &block) diff --git a/spirv_glsl.cpp b/spirv_glsl.cpp index aa07da8a..fd929232 100644 --- a/spirv_glsl.cpp +++ b/spirv_glsl.cpp @@ -873,7 +873,7 @@ void CompilerGLSL::emit_buffer_block(const SPIRVariable &var) { auto &type = get(var.basetype); bool ssbo = (meta[type.self].decoration.decoration_flags & (1ull << DecorationBufferBlock)) != 0; - bool restrict = (meta[var.self].decoration.decoration_flags & (1ull << DecorationRestrict)) != 0; + bool is_restrict = (meta[var.self].decoration.decoration_flags & (1ull << DecorationRestrict)) != 0; add_resource_name(var.self); @@ -887,7 +887,7 @@ void CompilerGLSL::emit_buffer_block(const SPIRVariable &var) else resource_names.insert(buffer_name); - statement(layout_for_variable(var), restrict ? "restrict " : "", ssbo ? "buffer " : "uniform ", buffer_name); + statement(layout_for_variable(var), is_restrict ? "restrict " : "", ssbo ? "buffer " : "uniform ", buffer_name); begin_scope(); type.member_name_cache.clear();