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

@@ -15,11 +15,9 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize
MemberName 9(OS) 0 "ss"
MemberName 9(OS) 1 "a"
MemberName 9(OS) 2 "tex"
Name 44 "gss2"
Name 47 "gss"
Name 51 "gtex"
Name 62 "@entryPointOutput"
Decorate 44(gss2) DescriptorSet 0
Decorate 47(gss) DescriptorSet 0
Decorate 51(gtex) DescriptorSet 0
Decorate 62(@entryPointOutput) Location 0
@@ -36,7 +34,6 @@ WARNING: AST will form illegal SPIR-V; need to transform to legalize
36: 7(float) Constant 1050253722
37: 34(fvec2) ConstantComposite 35 36
43: TypePointer UniformConstant 6
44(gss2): 43(ptr) Variable UniformConstant
47(gss): 43(ptr) Variable UniformConstant
50: TypePointer UniformConstant 8
51(gtex): 50(ptr) Variable UniformConstant