LoopDawg [Thu, 17 May 2018 19:03:12 +0000 (13:03 -0600)]
HLSL: allow self-type cast (as no-op passthrough)
Previously, casting an object of a struct type to an identical type
would produce an error. This PR allows this case.
As a side-effect of the change, several self-type casts in existing
tests go away. For example:
0:10 Construct float ( temp float)
0:10 'f' ( in float)
becomes this (without the unneeded constructor op):
0:10 'f' ( in float)
For vector or array types this can result in somewhat less overall code.
Fixes: #1218
John Kessenich [Thu, 17 May 2018 16:42:10 +0000 (10:42 -0600)]
GLSL: Fix #1279: refract does not have a double-type eta.
John Kessenich [Thu, 17 May 2018 16:22:40 +0000 (10:22 -0600)]
Merge pull request #1381 from LoopDawg/coverage_array
HLSL: require coverage mask to be arrayed output.
John Kessenich [Thu, 17 May 2018 16:19:56 +0000 (10:19 -0600)]
Merge pull request #1383 from amdrexu/bugfix
Fix issue #1376: SPV_AMD_gpu_shader_half_float is not emitted under vulkan1.1
Rex Xu [Thu, 17 May 2018 05:51:28 +0000 (13:51 +0800)]
Fix issue #1376: SPV_AMD_gpu_shader_half_float is not emitted under
vulkan1.1
Interpolation functions, using 16-bit interpolants, should always emit
this extension string regardless of vulkan enviornment version.
LoopDawg [Wed, 16 May 2018 13:25:29 +0000 (07:25 -0600)]
HLSL: require coverage mask to be arrayed output.
SPIR-V requires the coverage mask to be an array of integers, but HLSL
allows scalar integers. This adds the requisite type conversion and
wrapped entry point handling.
Fixes: #1202
John Kessenich [Wed, 16 May 2018 16:36:16 +0000 (10:36 -0600)]
Merge pull request #1379 from LoopDawg/groupid-fix
HLSL: various SPIR-V compute shader IDs must be 3-vectors of integers
LoopDawg [Tue, 15 May 2018 20:52:14 +0000 (14:52 -0600)]
HLSL: various SPIR-V compute shader IDs must be a 3-vector of integers.
This PR forces the external definition of SV_GroupID variables to 3-vectors.
The conversion process between the shader-declared type and the external type
happens in wrapped main IO variable conversion.
The same applies to SV_DispatchThreadID and SV_GroupThreadID.
Fixes: #1371
John Kessenich [Wed, 16 May 2018 06:46:19 +0000 (00:46 -0600)]
Merge pull request #1378 from LoopDawg/append-decl-order
HLSL: Allow stream output Append() method after entry point.
LoopDawg [Tue, 15 May 2018 19:36:13 +0000 (13:36 -0600)]
HLSL: Allow stream output Append() method after entry point.
Append() method is special: unlike most outputs, it does not copy
some temporary data to a symbol in the entry point epilogue, but
rather uses an emit builtin after each write to the output stream.
This had been handled by remembering the special output symbol for
the stream as it was declared in the shader entry point before
symbol sanitization. However the prior code was too simple and
only handled cases where the Append() method happened after the
entry point, so that the output symbol had been seen.
This PR adds a patching step so that the Append()s may appear in
any order WRT the entry point. They are patched in an epilogue,
whereupon it is guaranteed in a well formed shader that we have
seen the appropriate declaration.
Fixes #1217.
John Kessenich [Tue, 15 May 2018 04:08:53 +0000 (22:08 -0600)]
SPV: Fix #1374: For an SSBO 16-bit access, only emit StorageUniformBufferBlock16 capability.
John Kessenich [Sat, 12 May 2018 20:24:05 +0000 (14:24 -0600)]
Merge pull request #1375 from Igalia/nroberts/aml-arrayio
Skip outermost array when assigning locations to auto-array interfaces
John Kessenich [Thu, 10 May 2018 16:22:13 +0000 (10:22 -0600)]
Tests: Fix #1372: Don't legalize runtests HLSL tests.
We want these tests to be independent of whether SPIRV-opt is used.
Neil Roberts [Thu, 10 May 2018 13:49:28 +0000 (15:49 +0200)]
Skip outermost array when assigning locations to auto-array interfaces
When assigning a location to an interface whose stage automatically
converts the interfaces to an array, it now strips off the outermost
array from the type before calculating how many locations it consumes.
John Kessenich [Sat, 5 May 2018 03:35:05 +0000 (21:35 -0600)]
Bump version.
John Kessenich [Sat, 5 May 2018 03:19:47 +0000 (21:19 -0600)]
Merge pull request #1370 from KhronosGroup/fix-param-types
Fix #944: Convert argument type to match formal parameter type.
John Kessenich [Sat, 5 May 2018 03:19:29 +0000 (21:19 -0600)]
Merge pull request #1369 from greg-lunarg/kg18
Update spirv-opt known-good
John Kessenich [Fri, 4 May 2018 17:43:03 +0000 (11:43 -0600)]
Fix #944: Convert argument type to match formal parameter type.
GregF [Fri, 4 May 2018 17:22:55 +0000 (11:22 -0600)]
Update spirv-opt known-good
Notably, this includes the following:
- Fix exponential performance of DeadInsertElim
- Constant folding of OpVectorTimesScalar
- Add Vector DCE
- Add store-store elimination to LocalSingleBlockElim
- Improve folding of OpVectorTimesScalar and OpPhi
- Fixes handling of kill and unreachable ops in inlining
John Kessenich [Thu, 3 May 2018 07:18:37 +0000 (01:18 -0600)]
Merge pull request #1363 from mattparks/patch4
Fixed install for SPIRV, glslang, and hlsl when building shared libs
John Kessenich [Thu, 3 May 2018 07:16:40 +0000 (01:16 -0600)]
Merge pull request #1368 from danginsburg/issue_1367
Fix issue #1367 - change the I/O remapper to ignore push constants so…
danginsburg [Wed, 2 May 2018 20:42:22 +0000 (16:42 -0400)]
Fix issue #1367 - change the I/O remapper to ignore push constants so it does not apply a binding/descriptor set to them.
John Kessenich [Thu, 26 Apr 2018 20:12:29 +0000 (14:12 -0600)]
Build: Add missing break statements. Fixes #1052.
Matthew Albrecht [Thu, 26 Apr 2018 14:04:25 +0000 (09:04 -0500)]
Fixed install for SPIRV, glslang, and hlsl when building shared libs
John Kessenich [Thu, 26 Apr 2018 14:11:04 +0000 (08:11 -0600)]
Merge pull request #1364 from greg-lunarg/kg17
Update known-good.
GregF [Wed, 25 Apr 2018 17:48:51 +0000 (11:48 -0600)]
Update known-good.
Notably, reduces spirv-opt time and adds folding of OpDot and OpFNegate.
John Kessenich [Tue, 24 Apr 2018 19:29:12 +0000 (13:29 -0600)]
GLSL/Vulkan: Warn about arrays of arrays of resources that need bindings.
Initial way of addressing #1362.
John Kessenich [Mon, 23 Apr 2018 21:18:42 +0000 (15:18 -0600)]
GLSL: Fix #1359: don't allow unsized arrays as initializers.
John Kessenich [Mon, 23 Apr 2018 21:17:21 +0000 (15:17 -0600)]
validate script: fix path
John Kessenich [Fri, 20 Apr 2018 01:42:50 +0000 (19:42 -0600)]
GLSL: Fix #1300: Can redeclare without size a sized built-in block array.
John Kessenich [Wed, 18 Apr 2018 03:02:19 +0000 (21:02 -0600)]
Infrastructure: If using .hlsl suffix, default is -D.
John Kessenich [Tue, 17 Apr 2018 23:46:33 +0000 (17:46 -0600)]
Bump revision.
John Kessenich [Tue, 17 Apr 2018 23:44:11 +0000 (17:44 -0600)]
Tests: Add usage and tests for previous commit.
John Kessenich [Tue, 17 Apr 2018 23:24:03 +0000 (17:24 -0600)]
Merge branch 'nicebyte-glsl-ext'
John Kessenich [Tue, 17 Apr 2018 23:23:31 +0000 (17:23 -0600)]
Merge branch 'glsl-ext' of https://github.com/nicebyte/glslang into nicebyte-glsl-ext
John Kessenich [Mon, 16 Apr 2018 22:02:21 +0000 (16:02 -0600)]
Bump revision.
John Kessenich [Sun, 15 Apr 2018 04:01:55 +0000 (22:01 -0600)]
Merge pull request #1345 from amdrexu/bugfix
Add AMD float16/int16 SPV extension string when GLSL specifies them
Rex Xu [Wed, 11 Apr 2018 08:56:50 +0000 (16:56 +0800)]
Specify SPV_AMD_gpu_shader_int16 extension string when frexp() takes 16-bit
exp operand
John Kessenich [Sat, 14 Apr 2018 03:01:01 +0000 (21:01 -0600)]
Bump revision.
John Kessenich [Sat, 14 Apr 2018 00:36:58 +0000 (18:36 -0600)]
HLSL/SPV: Declare DepthReplacing for shaders declaring SV_Depth* outputs.
John Kessenich [Fri, 13 Apr 2018 16:38:20 +0000 (10:38 -0600)]
Merge pull request #1348 from greg-lunarg/kg16
Update spirv-opt known good
John Kessenich [Fri, 13 Apr 2018 15:36:22 +0000 (09:36 -0600)]
Merge pull request #1351 from danginsburg/issue_1350
Fix issue #1350 - set the node type to match the atomic TIntermAggreg…
danginsburg [Fri, 13 Apr 2018 13:51:22 +0000 (09:51 -0400)]
Update gold results
Grigory Dzhavadyan [Fri, 13 Apr 2018 03:31:27 +0000 (20:31 -0700)]
Make FindLanguage use the entire name if parseStageName is false
Grigory Dzhavadyan [Fri, 13 Apr 2018 02:29:26 +0000 (19:29 -0700)]
Fix build error
Grigory Dzhavadyan [Thu, 12 Apr 2018 21:35:24 +0000 (14:35 -0700)]
Make glslang validator support files ending in .glsl
This patch makes the validator accept *.<stage name>.[g/h]lsl pattern
for file names.
This patch preserves previous behavior (i.e. *.vert/*.frag/etc. in file
names still work).
danginsburg [Thu, 12 Apr 2018 20:46:04 +0000 (16:46 -0400)]
Fix issue #1350 - set the node type to match the atomic TIntermAggregate node type so that AtomicSMin/Max is not generated with a result type of void.
John Kessenich [Thu, 12 Apr 2018 17:37:57 +0000 (11:37 -0600)]
GLSL/Vulkan: Enforce no location aliasing in vertex inputs.
GregF [Thu, 12 Apr 2018 16:39:15 +0000 (10:39 -0600)]
Update spirv-opt known good
Changes include:
Fix SSA rewrite for nested loops.
Add support for two new extensions:
- SPV_NV_shader_subgroup_partitioned
- SPV_EXT_descriptor_indexing
Legalize OpImageTexelPointer
Copy propagate arrays
John Kessenich [Thu, 12 Apr 2018 07:02:46 +0000 (01:02 -0600)]
Build: Fix #1347: Compile with NV_EXTENSIONS disabled.
John Kessenich [Thu, 12 Apr 2018 00:14:46 +0000 (18:14 -0600)]
Merge pull request #1326 from mattparks/patch1
Allowed for LIB_TYPE to be set to switch between static and shared libs for glslang, SPIRV, and HLSL
John Kessenich [Wed, 11 Apr 2018 06:03:47 +0000 (00:03 -0600)]
Non-functional: Fix tabs.
John Kessenich [Wed, 11 Apr 2018 04:01:19 +0000 (22:01 -0600)]
GLSL: Fix #1330: default outputs for GL_NV_geometry_shader_passthrough
John Kessenich [Tue, 10 Apr 2018 20:20:01 +0000 (14:20 -0600)]
Bump revision.
John Kessenich [Tue, 10 Apr 2018 20:17:09 +0000 (14:17 -0600)]
Merge pull request #1343 from KhronosGroup/uint-counter-bufs
HLSL: Fix #1332: consistently use uint for counter buf typing.
John Kessenich [Tue, 10 Apr 2018 20:16:39 +0000 (14:16 -0600)]
Merge pull request #1341 from St0fF-NPL-ToM/master
fix VS2012 compile issues
John Kessenich [Tue, 10 Apr 2018 17:57:20 +0000 (11:57 -0600)]
HLSL: Fix #1332: consistently use uint for counter buf typing.
St0fF [Tue, 10 Apr 2018 12:44:23 +0000 (14:44 +0200)]
Revert "add ability to record accessed and declared "named defines""
This reverts commit
e7350423067442f616431c1cdf4f18dd7990a491.
John Kessenich [Mon, 9 Apr 2018 23:40:23 +0000 (17:40 -0600)]
Merge pull request #1338 from cgmb/minor-shaderlang-fixups
Minor cleanup in ShaderLang.cpp
John Kessenich [Mon, 9 Apr 2018 23:21:30 +0000 (17:21 -0600)]
GLSL/SPV: no location on atomic_uint; Fix #1339.
Cory Bloor [Mon, 9 Apr 2018 00:11:51 +0000 (18:11 -0600)]
Minor cleanup in ShaderLang.cpp
Use unique_ptr to simplify memory management in ProcessDeferred.
St0fF [Mon, 9 Apr 2018 19:08:14 +0000 (21:08 +0200)]
fix further MSVC 2012 build issues
MSVC 2012 does not allow initializer lists - replaced with corrresponding CTor calls.
St0fF [Mon, 9 Apr 2018 17:28:45 +0000 (19:28 +0200)]
add ability to record accessed and declared "named defines"
Added the needed 2 sets to TIntermediate, added accessor-functions, inserter functions. Implemented recording of such named defines inside the preprocessor parser.
St0fF [Mon, 9 Apr 2018 15:37:01 +0000 (17:37 +0200)]
fix VS2012 compile issues
small fixes needed to compile under Win8.1/VS2012/static_lib
John Kessenich [Sun, 8 Apr 2018 00:49:54 +0000 (18:49 -0600)]
GLSL/SPV: Fix #1310: don't create unnecessary integer matrices.
John Kessenich [Fri, 6 Apr 2018 16:37:06 +0000 (10:37 -0600)]
README: Expand on the C++11 compiler requirement for MSVS.
John Kessenich [Fri, 6 Apr 2018 01:57:40 +0000 (19:57 -0600)]
Update revision.
John Kessenich [Fri, 6 Apr 2018 01:52:38 +0000 (19:52 -0600)]
Fix #1328: ENABLE_HLSL=OFF breaking build.
John Kessenich [Fri, 6 Apr 2018 01:35:38 +0000 (19:35 -0600)]
Fix #1331: Emit SPV_GOOGLE_hlsl_functionality1 for counters.
It was missing when there were no semantics.
John Kessenich [Fri, 6 Apr 2018 01:00:01 +0000 (19:00 -0600)]
Fix #1333: Protect against -g for non-generating code.
John Kessenich [Thu, 5 Apr 2018 19:53:31 +0000 (13:53 -0600)]
Merge branch 'nonuniform-dynindex'
John Kessenich [Mon, 2 Apr 2018 21:04:19 +0000 (15:04 -0600)]
Update revision.
John Kessenich [Thu, 5 Apr 2018 19:44:16 +0000 (13:44 -0600)]
Revision/Version update.
John Kessenich [Thu, 5 Apr 2018 17:25:02 +0000 (11:25 -0600)]
GLSL/SPV: Implement SPV_EXT_descriptor_indexing and GL_EXT_nonuniform_qualifier
John Kessenich [Mon, 2 Apr 2018 21:04:19 +0000 (15:04 -0600)]
Update revision.
John Kessenich [Mon, 2 Apr 2018 20:52:15 +0000 (14:52 -0600)]
GLSL: Implement correct semantic checking for run-time sized arrays.
John Kessenich [Mon, 2 Apr 2018 03:22:34 +0000 (21:22 -0600)]
Linker: Fix #1329: correctly merge unsized arrays, and fix link tests.
John Kessenich [Fri, 30 Mar 2018 19:36:10 +0000 (13:36 -0600)]
Merge pull request #1327 from mattparks/patch2
Added getter for uniform block bindings
Matthew Albrecht [Fri, 30 Mar 2018 14:58:01 +0000 (09:58 -0500)]
Added getter for uniform block bindings
Matthew Albrecht [Fri, 30 Mar 2018 14:32:03 +0000 (09:32 -0500)]
Allowed for LIB_TYPE to be set to switch between static and shared libs for glslang, SPIRV, and HLSL
John Kessenich [Fri, 30 Mar 2018 06:53:23 +0000 (00:53 -0600)]
Merge pull request #1325 from KhronosGroup/simplify-doc
Non-Functional: Remove unused parts of the disassembler.
John Kessenich [Fri, 30 Mar 2018 06:11:39 +0000 (00:11 -0600)]
Non-Functional: Remove unused parts of the disassembler.
John Kessenich [Fri, 30 Mar 2018 04:50:58 +0000 (22:50 -0600)]
Merge pull request #1322 from jeffbolznv/master
Implement GL_NV_shader_subgroup_partitioned
Jeff Bolz [Fri, 30 Mar 2018 03:52:17 +0000 (22:52 -0500)]
Implement GL_NV_shader_subgroup_partitioned
John Kessenich [Fri, 30 Mar 2018 02:21:04 +0000 (20:21 -0600)]
Merge pull request #1320 from greg-lunarg/addopt21
Only print legalization warning if optimizer not enabled
GregF [Thu, 29 Mar 2018 17:49:14 +0000 (11:49 -0600)]
Only print legalization warning if optimizer disabled
John Kessenich [Thu, 29 Mar 2018 05:26:27 +0000 (23:26 -0600)]
Merge pull request #1319 from KhronosGroup/array-rationalization
Array rationalization
John Kessenich [Thu, 29 Mar 2018 05:26:10 +0000 (23:26 -0600)]
Merge pull request #1316 from greg-lunarg/addopt18
Disable DCE by Remapper through glslangValidator...
John Kessenich [Thu, 29 Mar 2018 05:24:56 +0000 (23:24 -0600)]
Merge pull request #1318 from amdrexu/feature
Add int16 support to AMD_trinary_minmax and AMD_shader_ballot
John Kessenich [Thu, 29 Mar 2018 00:01:20 +0000 (18:01 -0600)]
Non-functional. Rationalizations enabling future generalizations:
- Use much simpler method to update implicit array sizes.
The previous overly complicated method was error prone.
- Rationalize all use of unsized arrays.
- Combine decorations when generating SPIR-V, to simplify
adding extensions.
John Kessenich [Wed, 28 Mar 2018 19:00:55 +0000 (13:00 -0600)]
Non-Functional: Remove merge-replicated code and fix white space.
Rex Xu [Wed, 28 Mar 2018 08:33:01 +0000 (16:33 +0800)]
Add int16 support to AMD_trinary_minmax and AMD_shader_ballot
GregF [Mon, 26 Mar 2018 23:20:10 +0000 (17:20 -0600)]
Disable DCE by Remapper through glslangValidator...
...now that spirv-opt is capable enough.
John Kessenich [Tue, 27 Mar 2018 06:46:18 +0000 (00:46 -0600)]
Merge pull request #1313 from greg-lunarg/kg15
Update SPIRV-Tools known good.
John Kessenich [Mon, 26 Mar 2018 18:35:25 +0000 (12:35 -0600)]
Merge pull request #1312 from KhronosGroup/fix-mixed-array-styles
Fix mixed array styles
greg-lunarg [Mon, 26 Mar 2018 18:20:43 +0000 (12:20 -0600)]
Merge branch 'master' into kg15
GregF [Mon, 26 Mar 2018 18:11:55 +0000 (12:11 -0600)]
Update SPIRV-Tools known good.
Also update spirv-opt recipes.
John Kessenich [Mon, 26 Mar 2018 06:38:53 +0000 (00:38 -0600)]
Types: Fix #1290: Rationalize and correct "mixed" style array dimensioning.
There a couple functional problems, which when reduced down also led to
some good simplifications and rationalization. So, this commit:
- corrects "mixed" functionality: int[A] f[B] -> f[B][A]
- correct multi-identifier decls: int[A] f[B], g[C] -> f and g are independently sized.
- increases symmetry between different places in the code that do this
- makes fewer ways to do the same thing; several methods are just gone now
- makes more clear when something is copied or shared
John Kessenich [Sun, 25 Mar 2018 17:46:06 +0000 (11:46 -0600)]
Test Results Only: Include size in implicitly sized arrays (change to unsized).
This effects 60 tests, in a trivial way, but is critical to factor out this
noise from future planned changes.
John Kessenich [Fri, 23 Mar 2018 05:54:04 +0000 (23:54 -0600)]
Non functional: add EshTargetClientVersion alias for EShTargetClientVersion.
Fixes #1304.