MSL: Make sure we fix up the output position.
If a stage takes the position as both an input and an output (i.e. a tessellation shader or a geometry shader), then we could wind up fixing up the input position by mistake. Ensure that doesn't happen, by only setting the `qual_pos_var_name` variable from the output position.
This commit is contained in:
parent
5dde82654c
commit
f3267db1d8
@ -1165,7 +1165,7 @@ void CompilerMSL::add_plain_variable_to_interface_block(StorageClass storage, co
|
||||
if (is_builtin)
|
||||
{
|
||||
set_member_decoration(ib_type.self, ib_mbr_idx, DecorationBuiltIn, builtin);
|
||||
if (builtin == BuiltInPosition)
|
||||
if (builtin == BuiltInPosition && storage == StorageClassOutput)
|
||||
qual_pos_var_name = qual_var_name;
|
||||
}
|
||||
|
||||
@ -1572,7 +1572,7 @@ void CompilerMSL::add_plain_member_variable_to_interface_block(StorageClass stor
|
||||
if (is_builtin)
|
||||
{
|
||||
set_member_decoration(ib_type.self, ib_mbr_idx, DecorationBuiltIn, builtin);
|
||||
if (builtin == BuiltInPosition)
|
||||
if (builtin == BuiltInPosition && storage == StorageClassOutput)
|
||||
qual_pos_var_name = qual_var_name;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user