HLSL: allow self-type cast (as no-op passthrough)
Previously, casting an object of a struct type to an identical type
would produce an error. This PR allows this case.
As a side-effect of the change, several self-type casts in existing
tests go away. For example:
0:10 Construct float ( temp float)
0:10 'f' ( in float)
becomes this (without the unneeded constructor op):
0:10 'f' ( in float)
For vector or array types this can result in somewhat less overall code.
Fixes: #1218
This commit is contained in:
@@ -315,6 +315,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
{"hlsl.semicolons.frag", "main"},
|
||||
{"hlsl.shapeConv.frag", "main"},
|
||||
{"hlsl.shapeConvRet.frag", "main"},
|
||||
{"hlsl.self_cast.frag", "main"},
|
||||
{"hlsl.snorm.uav.comp", "main"},
|
||||
{"hlsl.staticMemberFunction.frag", "main"},
|
||||
{"hlsl.store.rwbyteaddressbuffer.type.comp", "main"},
|
||||
|
||||
Reference in New Issue
Block a user