HLSL: Fix possibly incorrect type conversion in StoreN and LoadN
authorJean-François Marquis <jfmarquis@gmail.com>
Fri, 15 Dec 2017 17:57:33 +0000 (12:57 -0500)
committerJean-François Marquis <jfmarquis@gmail.com>
Thu, 21 Dec 2017 17:11:40 +0000 (12:11 -0500)
commit3f0aff8ee5e4f8fbe452b30410336b753b7a8b3f
treeff11bedb8ea36b5d7474d62d71e160a72a8fd8bc
parent3f0d4bcd6ab30e21c0048586419f110163282bc5
HLSL: Fix possibly incorrect type conversion in StoreN and LoadN

Set type to r-value resulting from indexing vector, to prevent
float->uint conversion when source is already uint. Resulting
OpConvertFToU would otherwise fail validation because source is
already uint.
For LoadN, incorrect uint->float->uint can be avoided; fixing
potential truncation of big integer values.
Test/baseResults/hlsl.structbuffer.byte.frag.out
Test/baseResults/hlsl.structbuffer.fn2.comp.out
Test/baseResults/hlsl.structbuffer.rwbyte.frag.out
hlsl/hlslParseHelper.cpp