John Kessenich [Tue, 3 Jul 2018 00:52:14 +0000 (18:52 -0600)]
HLSL: Fix #1423: implement CalculateLevelOfDetailUnclamped().
(If there is a bias issue, we need to discover what it is.)
John Kessenich [Tue, 3 Jul 2018 00:35:41 +0000 (18:35 -0600)]
Merge pull request #1416 from aejsmith/samplerless-texture-functions
Add support for GL_EXT_samplerless_texture_functions
John Kessenich [Mon, 2 Jul 2018 22:04:31 +0000 (16:04 -0600)]
Merge branch 'HaydnTrigg-patch-1'
John Kessenich [Mon, 2 Jul 2018 22:04:08 +0000 (16:04 -0600)]
Merge branch 'patch-1' of https://github.com/HaydnTrigg/glslang into HaydnTrigg-patch-1
John Kessenich [Mon, 2 Jul 2018 21:55:01 +0000 (15:55 -0600)]
Merge pull request #1420 from KhronosGroup/spir-dis
SPV: Add option to print disassembly in standard form using SPIRV-Tools.
John Kessenich [Tue, 12 Jun 2018 00:12:15 +0000 (18:12 -0600)]
SPV: Add option to print disassembly in standard form using SPIRV-Tools.
John Kessenich [Mon, 2 Jul 2018 19:49:16 +0000 (13:49 -0600)]
Bump revision.
John Kessenich [Mon, 2 Jul 2018 19:47:31 +0000 (13:47 -0600)]
PP: Rationalize return values of MacroExpand.
This results in better error recovery, including fewer
crashes on badly formed PP input.
John Kessenich [Mon, 2 Jul 2018 16:40:32 +0000 (10:40 -0600)]
PP/HLSL: Fix #1424: support comma in nested curly braces for macro arg
Alex Smith [Sat, 23 Jun 2018 08:34:24 +0000 (09:34 +0100)]
Add support for GL_EXT_samplerless_texture_functions
Haydn Trigg [Fri, 29 Jun 2018 17:55:06 +0000 (13:55 -0400)]
Constant.cpp Floating point divide by zero
Constant.cpp will throw a floating point divide by zero if floating point exceptions are enabled in Win32 causing the program to crash. This fix manually checks the right-hand argument of the division and sets appropriate Infinity, Negative Infinity, or NAN as if the floating point exceptions were disabled.
John Kessenich [Wed, 27 Jun 2018 22:47:38 +0000 (16:47 -0600)]
Merge pull request #1419 from tgjones/spirv-remap-artifact
Include spirv-remap.exe in AppVeyor artifacts
Tim Jones [Wed, 27 Jun 2018 09:31:19 +0000 (17:31 +0800)]
Include spirv-remap.exe in AppVeyor artifacts
John Kessenich [Fri, 22 Jun 2018 06:33:36 +0000 (00:33 -0600)]
Merge pull request #1413 from karl-lunarg/fix-update
script: Improve update sources script
Karl Schultz [Thu, 21 Jun 2018 23:30:07 +0000 (17:30 -0600)]
script: Improve update sources script
- remove unused variable to pass pylint
- Use another approach to detect if known-good remote is already
present to avoid the need for "ignore following errors" message.
John Kessenich [Thu, 21 Jun 2018 00:54:12 +0000 (18:54 -0600)]
Merge pull request #1411 from KhronosGroup/fix-literal-warnings
Build: Make literal casting have fewer warnings and be more consistent.
John Kessenich [Thu, 21 Jun 2018 00:10:55 +0000 (18:10 -0600)]
Build: Make literal casting have fewer warnings and be more consistent.
John Kessenich [Wed, 20 Jun 2018 05:52:10 +0000 (23:52 -0600)]
Merge pull request #1409 from greg-lunarg/remap3
Add support for OpConstantNull and OpConstantSampler to spirv-remap
GregF [Tue, 19 Jun 2018 19:47:50 +0000 (13:47 -0600)]
Add support for OpConstantNull and OpConstantSampler to spirv-remap
Fixes issue #1408
John Kessenich [Tue, 19 Jun 2018 15:47:23 +0000 (09:47 -0600)]
Bump revision.
John Kessenich [Tue, 19 Jun 2018 15:43:09 +0000 (09:43 -0600)]
Revert "GLSL: Fix #1279: refract does not have a double-type eta."
This reverts commit
ebec909487b8c44a8c28b40c9899857593cc9bb5.
Khronos decided glslang was originally correct, and the specifications
are incorrect.
John Kessenich [Fri, 15 Jun 2018 03:13:43 +0000 (21:13 -0600)]
Merge pull request #1405 from Igalia/nroberts/amb-arrays
Take into account arrays of opaque types with --auto-map-bindings
Neil Roberts [Wed, 13 Jun 2018 10:00:18 +0000 (12:00 +0200)]
Take into account arrays of opaque types when reserving bindings
TDefaultIoResolverBase::reserveSlot and getFreeSlot now have a size
parameter to reserve a range of bindings. This is used by
TDefaultIoResolver::resolveBinding to reserve a continuous range when
the type is an array and the target API is GL.
John Kessenich [Tue, 12 Jun 2018 01:25:24 +0000 (19:25 -0600)]
GLSL: Fix #1358: Support "struct name", where name could be a user type
John Kessenich [Fri, 8 Jun 2018 18:56:23 +0000 (12:56 -0600)]
Merge pull request #1402 from greg-lunarg/kg21
Update spirv-tools known-good
GregF [Fri, 8 Jun 2018 17:10:33 +0000 (11:10 -0600)]
Update spirv-tools known-good
Includes the following spirv-opt improvements:
Preserve inst-to-block and def-use in passes.
Add store for var initializer in inlining.
Handle types with self references.
John Kessenich [Thu, 7 Jun 2018 07:33:48 +0000 (01:33 -0600)]
Merge pull request #1401 from dneto0/bad-e11
Relax a stringToDouble test for, OSX AppleClang 9.1
David Neto [Thu, 7 Jun 2018 00:19:19 +0000 (17:19 -0700)]
Relax a stringToDouble test for, OSX AppleClang 9.1
1e-323 was flushed to zero.
1e-308 is also flushed to zero.
Use 1e-307 instead, which still satisfies the test intent.
Fixes #1400
John Kessenich [Tue, 5 Jun 2018 14:53:36 +0000 (08:53 -0600)]
SPV: Fix #1399 emit ImageGatherExtended when using ConstOffsets operand
John Kessenich [Tue, 5 Jun 2018 01:11:25 +0000 (19:11 -0600)]
Fix #1360: uint->int width conversions must still be typed as uint.
John Kessenich [Mon, 4 Jun 2018 21:36:03 +0000 (15:36 -0600)]
Fix #1395: GLSL volatile maps to SPIR-V Volatile and Coherent.
The major version number was bumped in the previous commit to support
this.
John Kessenich [Mon, 4 Jun 2018 21:33:31 +0000 (15:33 -0600)]
Change the major revision number for next commit.
John Kessenich [Mon, 4 Jun 2018 21:30:54 +0000 (15:30 -0600)]
Bump revision.
John Kessenich [Sun, 3 Jun 2018 05:27:45 +0000 (23:27 -0600)]
Merge pull request #1397 from LoopDawg/warning-fix-4
Fix several signed/unsigned comparison compile warnings.
LoopDawg [Sat, 2 Jun 2018 02:23:34 +0000 (20:23 -0600)]
Fix several signed/unsigned comparison compile warnings.
John Kessenich [Fri, 1 Jun 2018 00:31:18 +0000 (18:31 -0600)]
Merge pull request #1394 from greg-lunarg/kg20
Update spirv-tools known-good.
GregF [Thu, 31 May 2018 22:17:18 +0000 (16:17 -0600)]
Update spirv-tools known-good.
Includes:
Fold FMix feeding Extract, and use the simplification pass.
John Kessenich [Mon, 28 May 2018 01:53:20 +0000 (19:53 -0600)]
Fix #1391: Remove use of nonportable strnlen().
John Kessenich [Mon, 28 May 2018 01:29:42 +0000 (19:29 -0600)]
Merge pull request #876 from ligfx/cmaketargetincludedirectories
CMake: use target_include_directories to expose includes
Michael Maltese [Tue, 2 May 2017 23:16:06 +0000 (16:16 -0700)]
CMake: use target_include_directories to expose includes
This makes glslang simpler to embed in larger projects.
John Kessenich [Fri, 25 May 2018 22:10:58 +0000 (16:10 -0600)]
Merge pull request #1386 from zeux/master
Fix TextureUpgradeAndSamplerRemovalTransform when used with qualifiers
John Kessenich [Fri, 25 May 2018 21:55:41 +0000 (15:55 -0600)]
Merge pull request #1387 from jeffbolznv/disassembly_explicit_types
Add bit width of types to disassembleInstruction
John Kessenich [Fri, 25 May 2018 17:08:14 +0000 (11:08 -0600)]
Merge pull request #1385 from KhronosGroup/fix-strtod
PP: Fix strtod problems: add tests, remove 2nd use, replace
John Kessenich [Fri, 25 May 2018 00:26:44 +0000 (18:26 -0600)]
PP: Implement locale-independent strtod, using istringstream and a fast path.
Fixes #1228. Fixes #234.
This uses imbue() to be locale independent. Notes:
- 'sstream >> double' is much slower than strtod()
* this was measurable in the test suite as a whole, despite being
a tiny fraction of what the test suite does
- so, this embeds a fast path that bypasses sstream most of the time
=> the test suite is faster than before
- sstream is probably slower, because it does more accurate rounding than strtod()
- sstream does not create INFINITY by itself, this was done based on failure inferencing
Jeff Bolz [Wed, 23 May 2018 04:13:30 +0000 (23:13 -0500)]
Add bit width of types to disassembleInstruction
John Kessenich [Fri, 25 May 2018 00:24:06 +0000 (18:24 -0600)]
PP: Remove second parsing of numbers recorded in macros; save/use original.
This partly addresses #1228 and #234 by reducing usage of strtod (or atof).
There is now only place to parse a floating-point number.
John Kessenich [Fri, 25 May 2018 00:11:47 +0000 (18:11 -0600)]
Testing: Add new tests, and new ways of testing, for floating-point.
- Adds a pragma to see binary output of double values (not portable)
- Print decimals that show more values, but in a portable way
(lots of portability issues)
- Expand the tests to test more double values
Note: it is quite difficult to have 100% portable tests for floating point.
The current situation works by not printing full precision, and working around
several portability issues.
John Kessenich [Thu, 24 May 2018 15:42:32 +0000 (09:42 -0600)]
Merge pull request #1388 from greg-lunarg/kg19
Update spirv-tools known-good
GregF [Thu, 24 May 2018 00:56:20 +0000 (18:56 -0600)]
Update spirv-tools known-good
Includes:
Fold divide and multiply by same value.
Allow ADCE to remove more instructions.
Remove dead Workgroup variables in ADCE.
Fold fclamp feeding compare.
Add pass to fold a load feeding an extract.
Remove redundant stores.
SROA: Only create symbols that are loaded.
Get ADCE to handle OpCopyMemory
Remove the limit on struct size in SROA.
Arseny Kapoulkine [Mon, 21 May 2018 22:27:07 +0000 (15:27 -0700)]
Fix TextureUpgradeAndSamplerRemovalTransform when used with qualifiers
The transform removes sampler arguments from functions and function
calls; this causes function arguments to change their indices. When some
function arguments have an output qualifier, this qualifier can get lost
because of the removal which can lead to incorrect results (e.g. out
qualifier not having effect).
To fix this we iterate through both seq & qual arrays in lock-step and
manually remove/replace entries as appropriate.
John Kessenich [Sat, 19 May 2018 19:32:52 +0000 (13:32 -0600)]
Merge pull request #1384 from LoopDawg/self-cast
HLSL: allow self-type cast (as no-op passthrough)
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 17:26:36 +0000 (11:26 -0600)]
Bump revision.
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.