HLSL: cast non-int types to uint on Load/Store indexes
authorsteve-lunarg <steve_gh@khasekhemwy.net>
Thu, 20 Apr 2017 15:00:56 +0000 (09:00 -0600)
committersteve-lunarg <steve_gh@khasekhemwy.net>
Thu, 20 Apr 2017 15:00:56 +0000 (09:00 -0600)
commitf8203a0acdda3faf6444909f5f50a952445bd09e
tree4dee52004abd99e2d97370c69caf6449e5a30155
parent670271890d5d0eead597cf0974225b9cb9db4429
HLSL: cast non-int types to uint on Load/Store indexes

Some texture and SB operations can take non-integer indexes, which should be
cast to integers before use if they are not already.  This adds makeIntegerIndex()
for the purpose.  Int types are left alone.

(This was done before for operator[], but needs to apply to some other things
too, hence its extraction into common function now)
Test/baseResults/hlsl.structbuffer.floatidx.comp.out [new file with mode: 0644]
Test/baseResults/spv.ssbo.autoassign.frag.out
Test/hlsl.structbuffer.floatidx.comp [new file with mode: 0644]
gtests/Hlsl.FromFile.cpp
hlsl/hlslParseHelper.cpp
hlsl/hlslParseHelper.h