HLSL: allow "sample" as a valid identifier.
authorsteve-lunarg <steve_gh@khasekhemwy.net>
Wed, 16 Nov 2016 20:22:11 +0000 (13:22 -0700)
committersteve-lunarg <steve_gh@khasekhemwy.net>
Wed, 16 Nov 2016 20:22:11 +0000 (13:22 -0700)
commit75fd223f037d88e0b03f801a7dc5e6ed1a939172
treee0b9d307764f47935d89db2b9a729aba7c07b8fc
parentfabe7d6a613782d49becaef86aa0161ed7d3c4d7
HLSL: allow "sample" as a valid identifier.

HLSL has keywords for various interpolation modifiers such as "linear",
"centroid", "sample", etc.  Of these, "sample" appears to be special,
as it is also accepted as an identifier string, where the others are not.

This PR adds this ability, so the construct "int sample = 42;" no longer
produces a compilation error.

New test = hlsl.identifier.sample.frag
Test/baseResults/hlsl.identifier.sample.frag.out [new file with mode: 0644]
Test/hlsl.identifier.sample.frag [new file with mode: 0644]
gtests/Hlsl.FromFile.cpp
hlsl/hlslGrammar.cpp