vkd3d-shader/hlsl: Improve support for lhs casts and function OUT parameters.
Improve support for casts on the left hand side of assignments, and function OUT parameters which also rely on add_assigment().
Merge request reports
Activity
added 7 commits
- 1e8ad66c - tests: Add lhs cast tests.
- 437c1197 - tests: Test partial assignments due to lhs casts.
- 49891dab - tests: Add more function cast tests.
- 52b41ceb - vkd3d-shader/hlsl: Delay lowering complex casts to after parse time.
- 457a378b - vkd3d-shader/hlsl: Support non-shape-changing lhs casts.
- a2e2bb50 - vkd3d-shader/hlsl: Don't count cast to param type on IN as part of OUT var's lhs.
- 0ea55306 - vkd3d-shader/hlsl: Don't forbid base type casts on var assignments.
Toggle commit list3/7 has a whitespace error (blank line at EOF). I'm tempted to argue for a double cast (not that I'm expecting surprises), also maybe for a test like
float4 func(out float4 f) ... { float4 f; func((float2)f); }
although I'd expect the latter to just fail compilation due to an invalid cast. Or maybe we have that test somewhere already?
Looks fine otherwise though.
3/7 has a whitespace error (blank line at EOF).
Thanks I fixed that.
I'm tempted to argue for a double cast (not that I'm expecting surprises), also maybe for a test like [...]
I added a function OUT parameter test with multiple casts. Turns out there was a surprise! On multiple casts on function out parameters, it seems that only the first cast is allowed to change base type for SM4 but not the others, so I updated 7/7.
I also added the suggested tests and yes, it fails compilation due to an invalid cast.
While at it I rewrote "non-shape-changing" to "non-size-changing" on both the fixme and the commit message in 5/7 since that is more accurate.
added 5 commits
- 923c3499 - tests: Add more function cast tests.
- 017f8d17 - vkd3d-shader/hlsl: Delay lowering complex casts to after parse time.
- e706fd8c - vkd3d-shader/hlsl: Support non-size-changing lhs casts.
- 30e5f258 - vkd3d-shader/hlsl: Don't count cast to param type on IN as part of OUT var's lhs.
- d44bb194 - vkd3d-shader/hlsl: Don't forbid first base type cast on var assignments.
Toggle commit listadded 23 commits
-
d44bb194...c7b20912 - 16 commits from branch
wine:master
- 51db2323 - tests/hlsl: Add lhs cast tests.
- 60f75cc5 - tests/hlsl: Test partial assignments due to lhs casts.
- dc37d901 - tests/hlsl: Add more function cast tests.
- c2e224c5 - vkd3d-shader/hlsl: Delay lowering complex casts until after parse time.
- b55fe195 - vkd3d-shader/hlsl: Support non-size-changing lhs casts.
- 0a15ab70 - vkd3d-shader/hlsl: Don't count cast to param type on IN as part of OUT var's lhs.
- 4d18fb39 - vkd3d-shader/hlsl: Don't forbid first base type cast on var assignments.
Toggle commit list-
d44bb194...c7b20912 - 16 commits from branch