Avoid conflict with C99 keyword.
This commit is contained in:
parent
36a0b63f28
commit
7d8add33e4
@ -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)
|
||||
|
@ -873,7 +873,7 @@ void CompilerGLSL::emit_buffer_block(const SPIRVariable &var)
|
||||
{
|
||||
auto &type = get<SPIRType>(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();
|
||||
|
Loading…
Reference in New Issue
Block a user