another formatting fix and a comment
This commit is contained in:
parent
6c41f9e9da
commit
717d9fefd8
@ -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)
|
||||
{
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user