From e0639287dffdc963f0222eb6853f83c5e3062f21 Mon Sep 17 00:00:00 2001 From: GregF Date: Thu, 21 Dec 2017 10:55:57 -0700 Subject: [PATCH] HLSL Legalization: Add scalar replacement This allow for propagation through structs with dynamically indexed arrays. This supports recent removal of non-io struct flattening. --- SPIRV/GlslangToSpv.cpp | 2 + .../hlsl.aliasOpaque.frag.out | 3 - .../hlsl.flattenSubset.frag.out | 2 +- .../hlsl.flattenSubset2.frag.out | 4 -- .../hlsl.partialFlattenLocal.vert.out | 63 +++++++------------ .../hlsl.partialFlattenMixed.vert.out | 6 +- Test/baseResults/hlsl.y-negate-3.vert.out | 10 +-- 7 files changed, 33 insertions(+), 57 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 5deb43bd..96904965 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -6086,6 +6086,8 @@ void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector