Formatting.

This commit is contained in:
Hans-Kristian Arntzen 2018-01-09 12:51:21 +01:00
parent 9c3d4e7c60
commit 44a4eb7562

View File

@ -4317,10 +4317,10 @@ string CompilerGLSL::access_chain_internal(uint32_t base, const uint32_t *indice
auto builtin = meta[base].decoration.builtin_type; auto builtin = meta[base].decoration.builtin_type;
switch (builtin) switch (builtin)
{ {
// case BuiltInCullDistance: // These are already arrays, need to figure out rules for these in tess/geom.
// case BuiltInClipDistance:
case BuiltInPosition: case BuiltInPosition:
case BuiltInPointSize: case BuiltInPointSize:
//case BuiltInCullDistance: // These are already arrays, need to figure out rules for these in tess/geom.
//case BuiltInClipDistance:
if (var->storage == StorageClassInput) if (var->storage == StorageClassInput)
expr = join("gl_in[", to_expression(index), "].", expr); expr = join("gl_in[", to_expression(index), "].", expr);
else if (var->storage == StorageClassOutput) else if (var->storage == StorageClassOutput)
@ -6197,12 +6197,13 @@ void CompilerGLSL::emit_instruction(const Instruction &instruction)
case OpAtomicLoad: case OpAtomicLoad:
flush_all_atomic_capable_variables(); flush_all_atomic_capable_variables();
// FIXME: Image? // FIXME: Image?
// OpAtomicLoad seems to only be relevant for atomic counters.
UFOP(atomicCounter); UFOP(atomicCounter);
register_read(ops[1], ops[2], should_forward(ops[2])); register_read(ops[1], ops[2], should_forward(ops[2]));
break; break;
// OpAtomicStore unimplemented. Not sure what would use that. case OpAtomicStore:
// OpAtomicLoad seems to only be relevant for atomic counters. SPIRV_CROSS_THROW("Unsupported opcode OpAtomicStore.");
case OpAtomicIIncrement: case OpAtomicIIncrement:
forced_temporaries.insert(ops[1]); forced_temporaries.insert(ops[1]);
@ -6707,10 +6708,8 @@ void CompilerGLSL::emit_instruction(const Instruction &instruction)
} }
else else
{ {
const uint32_t all_barriers = MemorySemanticsWorkgroupMemoryMask | const uint32_t all_barriers = MemorySemanticsWorkgroupMemoryMask | MemorySemanticsUniformMemoryMask |
MemorySemanticsUniformMemoryMask | MemorySemanticsImageMemoryMask | MemorySemanticsAtomicCounterMemoryMask;
MemorySemanticsImageMemoryMask |
MemorySemanticsAtomicCounterMemoryMask;
if (semantics & (MemorySemanticsCrossWorkgroupMemoryMask | MemorySemanticsSubgroupMemoryMask)) if (semantics & (MemorySemanticsCrossWorkgroupMemoryMask | MemorySemanticsSubgroupMemoryMask))
{ {
@ -8442,11 +8441,7 @@ const Instruction *CompilerGLSL::get_next_instruction_in_block(const Instruction
uint32_t CompilerGLSL::mask_relevant_memory_semantics(uint32_t semantics) uint32_t CompilerGLSL::mask_relevant_memory_semantics(uint32_t semantics)
{ {
return semantics & (MemorySemanticsAtomicCounterMemoryMask | return semantics & (MemorySemanticsAtomicCounterMemoryMask | MemorySemanticsImageMemoryMask |
MemorySemanticsImageMemoryMask | MemorySemanticsWorkgroupMemoryMask | MemorySemanticsUniformMemoryMask |
MemorySemanticsWorkgroupMemoryMask | MemorySemanticsCrossWorkgroupMemoryMask | MemorySemanticsSubgroupMemoryMask);
MemorySemanticsUniformMemoryMask |
MemorySemanticsCrossWorkgroupMemoryMask |
MemorySemanticsSubgroupMemoryMask);
} }