glslang-zig/glslang/MachineIndependent
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
..
preprocessor Fixed processing #include's when preprocessing HLSL 2016-12-04 17:07:10 -05:00
Constant.cpp Parser: Implement extension GL_AMD_gpu_shader_half_float. 2016-09-30 16:13:06 +08:00
gl_types.h Parser: Implement extension GL_AMD_gpu_shader_half_float. 2016-09-30 16:13:06 +08:00
glslang.y Parser: Implement extension GL_AMD_gpu_shader_half_float. 2016-09-30 16:13:06 +08:00
glslang_tab.cpp Parser: Implement extension GL_AMD_gpu_shader_half_float. 2016-09-30 16:13:06 +08:00
glslang_tab.cpp.h Parser: Implement extension GL_AMD_gpu_shader_half_float. 2016-09-30 16:13:06 +08:00
InfoSink.cpp HLSL: Change the final syntax-error printf to go to the infoLog. 2016-09-19 14:56:55 -06:00
Initialize.cpp Parser: Some function prototypes of interpolateAtXXX are incorrect. 2016-10-10 16:55:04 +08:00
Initialize.h SPV: Non-functional: Condense SPV-related versioning, and rationalize all uses. 2016-06-16 23:31:29 -06:00
Intermediate.cpp Merge branch 'intrinsic-promotion' of https://github.com/steve-lunarg/glslang into steve-lunarg-intrinsic-promotion 2016-12-03 13:27:22 -07:00
intermOut.cpp HLSL: Enable component-wise vector comparisons from operators 2016-10-26 08:50:10 -06:00
IntermTraverse.cpp Comments only. 2016-05-06 13:06:11 -06:00
iomapper.cpp Add UAV (image) binding offset and HLSL register support 2016-11-01 14:44:54 -06:00
iomapper.h New uniform mapping handling 2016-10-28 15:43:14 +02:00
limits.cpp Array of Array prep: Turn a batch of 0's into nullptr or UnsizedArraySize. 2015-08-09 18:15:25 -06:00
linkValidate.cpp Fix crash by returning early from finalCheck() if there is no tree to process. 2016-11-27 17:32:19 -07:00
LiveTraverser.h Fix defects in uniform array flattening 2016-09-22 15:58:06 -06:00
localintermediate.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
parseConst.cpp glslang: Fix over 100 warnings from MSVC warning level 4. 2015-05-15 17:30:55 +00:00
ParseContextBase.cpp HLSL: opcode specific promotion rules for interlocked ops 2016-12-07 12:00:32 -07:00
ParseHelper.cpp HLSL: opcode specific promotion rules for interlocked ops 2016-12-07 12:00:32 -07:00
ParseHelper.h HLSL: opcode specific promotion rules for interlocked ops 2016-12-07 12:00:32 -07:00
parseVersions.h Fixed processing #include's when preprocessing HLSL 2016-12-04 17:07:10 -05:00
PoolAlloc.cpp Whitespace: Nonfunctional: fix inconsistent white space, esp. no tabs. 2016-08-05 17:34:34 -06:00
propagateNoContraction.cpp Address some compiler warnings. 2016-10-08 22:07:20 -03:00
propagateNoContraction.h Non-functional: Fix some comments English and brace formatting in recent merges. 2016-05-17 10:24:00 -06:00
reflection.cpp add reflection queries to return a TType. Fix minor issue with interface names. 2016-10-02 16:57:58 -06:00
reflection.h add reflection queries to return a TType. Fix minor issue with interface names. 2016-10-02 16:57:58 -06:00
RemoveTree.cpp Improvement to the AST traversal infrastructure. 2014-01-11 19:29:55 +00:00
RemoveTree.h Put all glslang internals (but not the external interface) into the glslang namespace. 2013-08-29 00:39:25 +00:00
Scan.cpp Parser: Implement extension GL_AMD_gpu_shader_half_float. 2016-09-30 16:13:06 +08:00
Scan.h Front-ends: Remove now defunct afterEOF and related, use scanner's instead. 2016-08-31 13:46:50 -06:00
ScanContext.h Refactor TParseContext into 3 level inheritance. 2016-03-12 19:08:55 -07:00
ShaderLang.cpp Don't print the "Linked stage" message unless the AST is being dumped. 2016-12-03 13:59:51 -07:00
SymbolTable.cpp Parser: Implement extension GL_AMD_gpu_shader_half_float. 2016-09-30 16:13:06 +08:00
SymbolTable.h Add amend ability for anonymous blocks, so they can grow between function bodies. 2016-09-29 23:59:26 -06:00
Versions.cpp Parser: Implement extension GL_AMD_gpu_shader_half_float. 2016-09-30 16:13:06 +08:00
Versions.h Parser: Implement extension GL_AMD_gpu_shader_half_float. 2016-09-30 16:13:06 +08:00