HLSL: Add parens in unpackUint2x32 for clarity.
This commit is contained in:
parent
e4e4791c4e
commit
7b9cba7424
@ -7,7 +7,7 @@ struct SPIRV_Cross_Output
|
||||
|
||||
uint64_t SPIRV_Cross_packUint2x32(uint2 value)
|
||||
{
|
||||
return uint64_t(value.y) << 32 | uint64_t(value.x);
|
||||
return (uint64_t(value.y) << 32) | uint64_t(value.x);
|
||||
}
|
||||
|
||||
uint2 SPIRV_Cross_unpackUint2x32(uint64_t value)
|
||||
|
@ -7,7 +7,7 @@ struct SPIRV_Cross_Output
|
||||
|
||||
uint64_t SPIRV_Cross_packUint2x32(uint2 value)
|
||||
{
|
||||
return uint64_t(value.y) << 32 | uint64_t(value.x);
|
||||
return (uint64_t(value.y) << 32) | uint64_t(value.x);
|
||||
}
|
||||
|
||||
uint2 SPIRV_Cross_unpackUint2x32(uint64_t value)
|
||||
|
@ -1507,7 +1507,7 @@ void CompilerHLSL::emit_resources()
|
||||
{
|
||||
statement("uint64_t SPIRV_Cross_packUint2x32(uint2 value)");
|
||||
begin_scope();
|
||||
statement("return uint64_t(value.y) << 32 | uint64_t(value.x);");
|
||||
statement("return (uint64_t(value.y) << 32) | uint64_t(value.x);");
|
||||
end_scope();
|
||||
statement("");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user