HLSL Legalization: Add scalar replacement

This allow for propagation through structs with dynamically indexed
arrays. This supports recent removal of non-io struct flattening.
This commit is contained in:
GregF
2017-12-21 10:55:57 -07:00
parent 3b2dc1a756
commit e0639287df
7 changed files with 33 additions and 57 deletions

View File

@@ -127,7 +127,7 @@ Shader version: 500
// Module Version 10000
// Generated by (magic number): 80003
// Id's are bound by 67
// Id's are bound by 70
Capability Shader
1: ExtInstImport "GLSL.std.450"
@@ -168,10 +168,10 @@ Shader version: 500
5: Label
52: 19(ptr) AccessChain 18 15
53: 7(fvec4) Load 52
64: 6(float) CompositeExtract 53 1
41: 6(float) FNegate 64
66: 7(fvec4) CompositeInsert 41 53 1
Store 44(@entryPointOutput.pos) 66
67: 6(float) CompositeExtract 53 1
41: 6(float) FNegate 67
69: 7(fvec4) CompositeInsert 41 53 1
Store 44(@entryPointOutput.pos) 69
Store 47(@entryPointOutput.somethingelse) 25
Return
FunctionEnd