another formatting fix and a comment

This commit is contained in:
Vadim Shcherbakov 2017-12-11 21:02:13 +03:00
parent 6c41f9e9da
commit 717d9fefd8
2 changed files with 3 additions and 2 deletions

View File

@ -1706,6 +1706,7 @@ void Compiler::parse(const Instruction &instruction)
auto &var = set<SPIRVariable>(id, type, storage, initializer);
// hlsl based shaders don't have those decorations. force them and then reset when reading/writing images
auto &ttype = get<SPIRType>(type);
if (ttype.basetype == SPIRType::BaseType::Image)
{

View File

@ -3008,7 +3008,7 @@ string CompilerMSL::builtin_to_glsl(BuiltIn builtin, StorageClass storage)
case BuiltInInstanceIndex:
return "gl_InstanceIndex";
case BuiltInLayer:
return current_function && (current_function->self == entry_point) ? stage_out_var_name + ".gl_Layer": "gl_Layer";
return current_function && (current_function->self == entry_point) ? stage_out_var_name + ".gl_Layer": "gl_Layer";
// When used in the entry function, output builtins are qualified with output struct name.
case BuiltInPosition:
@ -3109,7 +3109,7 @@ string CompilerMSL::builtin_type_decl(BuiltIn builtin)
case BuiltInInstanceIndex:
return "uint";
case BuiltInLayer:
return "uint";
return "uint";
// Vertex function out
case BuiltInClipDistance: