glslang/hlsl
steve-lunarg a64ed3eba0 HLSL: allow "sample" in expressions.
Unlike other qualifiers, HLSL allows "sample" to be either a qualifier keyword or an
identifier (e.g, a variable or function name).

A fix to allow this was made a while ago, but that fix was insufficient when 'sample'
was used in an expression.  The problem was around the initial ambiguity between:

   sample float a; // "sample" is part of a fully specified type
and
   sample.xyz;     // sample is a keyword in a dot expression

Both start the same.  The "sample" was being accepted as a qualifier before enough
further parsing was done to determine we were not a declaration after all.  This
consumed the token, causing it to fail for its real purpose.

Now, when accepting a fully specified type, the token is pushed back onto the stack if
the thing is not a fully specified type.  This leaves it available for subsequent
purposes.

Changed the "hlsl.identifier.sample.frag" test to exercise this situation, distilled
down from a production shaders.
2016-12-18 18:01:34 -07:00
..
CMakeLists.txt HLSL: implement numthreads for compute shaders 2016-10-31 09:28:17 -06:00
hlslAttributes.cpp WIP: HLSL: Add GS support 2016-11-21 18:25:08 -07:00
hlslAttributes.h WIP: HLSL: Add GS support 2016-11-21 18:25:08 -07:00
hlslGrammar.cpp HLSL: allow "sample" in expressions. 2016-12-18 18:01:34 -07:00
hlslGrammar.h WIP: HLSL: Add GS support 2016-11-21 18:25:08 -07:00
hlslOpMap.cpp HLSL: Basic array grammar. 2016-06-19 11:50:34 -06:00
hlslOpMap.h HLSL: Add (almost) full expression grammar: Binary, unary (pre/post-fix), assign, ... 2016-05-03 23:33:00 -06:00
hlslParseables.cpp HLSL: add intrinsic function implicit promotions 2016-11-23 10:36:34 -07:00
hlslParseables.h Add lerp, fix sincos return type, ret type tests, non-square mats, HLSL->AST tx semantics 2016-06-21 10:10:48 -06:00
hlslParseHelper.cpp HLSL: More robust handling of bad shader input, catching a few more things. 2016-12-14 17:02:32 -07:00
hlslParseHelper.h HLSL: More robust handling of bad shader input, catching a few more things. 2016-12-14 17:02:32 -07:00
hlslScanContext.cpp Merge pull request #599 from steve-lunarg/gs 2016-11-23 00:29:30 -07:00
hlslScanContext.h HLSL: Implement basic "struct" grammar. 2016-06-12 23:54:31 -06:00
hlslTokens.h WIP: HLSL: Add GS support 2016-11-21 18:25:08 -07:00
hlslTokenStream.cpp HLSL: Fix a grammar error related to constructors in parenthetical expressions 2016-07-30 08:09:09 -06:00
hlslTokenStream.h HLSL: Fix a grammar error related to constructors in parenthetical expressions 2016-07-30 08:09:09 -06:00