glslang/hlsl
steve-lunarg 05f75142d6 HLSL: opcode specific promotion rules for interlocked ops
PR #577 addresses most but not all of the intrinsic promotion problems.
This PR resolves all known cases in the remainder.

Interlocked ops need special promotion rules because at the time
of function selection, the first argument has not been converted
to a buffer object.  It's just an int or uint, but you don't want
to convert THAT argument, because that implies converting the
buffer object itself.  Rather, you can convert other arguments,
but want to stay in the same "family" of functions.  E.g, if
the first interlocked arg is a uint, use only the uint family,
never the int family, you can convert the other args as you please.

This PR allows making such opcode and arg specific choices by
passing the op and arg to the convertible lambda.  The code in
the new test "hlsl.promote.atomic.frag" would not compile without
this change, but it must compile.

Also, it provides better handling of downconversions (to "worse"
types), which are permitted in HLSL.  The existing method of
selecting upconversions is unchanged, but if that doesn't find
any valid ones, then it will allow downconversions.  In effect
this always uses an upconversion if there is one.
2016-12-07 12:00:32 -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 allow renaming of shader entry point when creating SPIR-V 2016-12-01 08:51:43 -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: opcode specific promotion rules for interlocked ops 2016-12-07 12:00:32 -07:00
hlslParseHelper.h Merge branch 'intrinsic-promotion' of https://github.com/steve-lunarg/glslang into steve-lunarg-intrinsic-promotion 2016-12-03 13:27:22 -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