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:
parent
ebec909487
commit
c59916710e
6 changed files with 205 additions and 48 deletions
|
|
@ -40,8 +40,7 @@ gl_FragCoord origin is upper left
|
|||
0:10 move second child to first child ( temp 3-component vector of float)
|
||||
0:10 'u' ( temp 3-component vector of float)
|
||||
0:10 Construct vec3 ( temp 3-component vector of float)
|
||||
0:10 Construct float ( temp float)
|
||||
0:10 'f' ( in float)
|
||||
0:10 'f' ( in float)
|
||||
0:11 Sequence
|
||||
0:11 move second child to first child ( temp 2-component vector of float)
|
||||
0:11 'w' ( temp 2-component vector of float)
|
||||
|
|
@ -203,8 +202,7 @@ gl_FragCoord origin is upper left
|
|||
0:10 move second child to first child ( temp 3-component vector of float)
|
||||
0:10 'u' ( temp 3-component vector of float)
|
||||
0:10 Construct vec3 ( temp 3-component vector of float)
|
||||
0:10 Construct float ( temp float)
|
||||
0:10 'f' ( in float)
|
||||
0:10 'f' ( in float)
|
||||
0:11 Sequence
|
||||
0:11 move second child to first child ( temp 2-component vector of float)
|
||||
0:11 'w' ( temp 2-component vector of float)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue