HLSL: allow promotion from 1-vector types to scalars, e.g, float<-float1
authorsteve-lunarg <steve_gh@khasekhemwy.net>
Fri, 11 Nov 2016 22:37:10 +0000 (15:37 -0700)
committersteve-lunarg <steve_gh@khasekhemwy.net>
Sun, 13 Nov 2016 21:44:46 +0000 (14:44 -0700)
commitd9cb832f9cce8440336758169c6e7d90ff2a54db
tree8e339ce3bf19c2c4c5208507aae8d4e7a0bfa7a3
parente69e196e02861db0474cb80fdeec3bf55097310f
HLSL: allow promotion from 1-vector types to scalars, e.g, float<-float1

Previously, an error was thrown when assigning a float1 to a scalar float,
or similar for other basic types.  This allows that.

Also, this allows calling functions accepting scalars with float1 params,
so for example sin(float1) will work.  This is a minor change in
HlslParseContext::findFunction().
Test/baseResults/hlsl.promote.vec1.frag.out [new file with mode: 0644]
Test/hlsl.promote.vec1.frag [new file with mode: 0644]
glslang/Include/Types.h
glslang/MachineIndependent/Intermediate.cpp
gtests/Hlsl.FromFile.cpp
hlsl/hlslParseHelper.cpp