platform/upstream/glslang.git
5 years agoMerge pull request #1499 from chaoc/nvidia_turing
John Kessenich [Wed, 19 Sep 2018 22:44:26 +0000 (16:44 -0600)]
Merge pull request #1499 from chaoc/nvidia_turing

Add support for multiple Nvidia extensions

5 years agoupdate glslang test results for temporary validation fail
Chao Chen [Wed, 19 Sep 2018 21:06:36 +0000 (14:06 -0700)]
update glslang test results for temporary validation fail

5 years agoAdd-support-for-SPV_NV_shading_rate
Chao Chen [Wed, 19 Sep 2018 18:43:21 +0000 (11:43 -0700)]
Add-support-for-SPV_NV_shading_rate

5 years agoAdd-support-for-SPV_NVX_raytracing
Chao Chen [Wed, 19 Sep 2018 18:42:24 +0000 (11:42 -0700)]
Add-support-for-SPV_NVX_raytracing

5 years agoAdd-support-for-SPV_NV_mesh_shader
Chao Chen [Wed, 19 Sep 2018 18:41:59 +0000 (11:41 -0700)]
Add-support-for-SPV_NV_mesh_shader

5 years ago0003-Add-support-for-SPV_NV_shader_image_footprint
Chao Chen [Wed, 19 Sep 2018 18:41:27 +0000 (11:41 -0700)]
0003-Add-support-for-SPV_NV_shader_image_footprint

5 years agoAdd-support-for-SPV_NV_compute_shader_derivatives
Chao Chen [Wed, 19 Sep 2018 18:40:45 +0000 (11:40 -0700)]
Add-support-for-SPV_NV_compute_shader_derivatives

5 years agoAdd-support-for-SPV_NV_fragment_shader_barycentric
Chao Chen [Wed, 19 Sep 2018 18:39:56 +0000 (11:39 -0700)]
Add-support-for-SPV_NV_fragment_shader_barycentric

5 years agoUpdate to latest spirv.hpp header (which fixed a typo).
John Kessenich [Wed, 19 Sep 2018 19:58:01 +0000 (13:58 -0600)]
Update to latest spirv.hpp header (which fixed a typo).

5 years agoSPV: Move to latest SPIR-V header (latest NV extensions support).
John Kessenich [Wed, 19 Sep 2018 09:54:48 +0000 (03:54 -0600)]
SPV: Move to latest SPIR-V header (latest NV extensions support).

5 years agoBuild: Fix some warnings.
John Kessenich [Tue, 18 Sep 2018 09:43:30 +0000 (03:43 -0600)]
Build: Fix some warnings.

5 years agoBump revision.
John Kessenich [Thu, 13 Sep 2018 23:54:48 +0000 (17:54 -0600)]
Bump revision.

5 years agoMerge pull request #1492 from NorbertGarnysAMD/shader_atomic_int64
John Kessenich [Thu, 13 Sep 2018 17:52:35 +0000 (11:52 -0600)]
Merge pull request #1492 from NorbertGarnysAMD/shader_atomic_int64

Add GL_EXT_shader_atomic_int64

5 years agoAdd GL_EXT_shader_atomic_int64
Norbert Garnys [Thu, 13 Sep 2018 13:34:26 +0000 (15:34 +0200)]
Add GL_EXT_shader_atomic_int64

5 years agoMerge pull request #1491 from DennisOSRM/patch-1
John Kessenich [Wed, 12 Sep 2018 15:02:08 +0000 (09:02 -0600)]
Merge pull request #1491 from DennisOSRM/patch-1

Fix compiler warning emitted from GCC8

5 years agoFix compiler warning emitted from GCC8
Dennis Luxen [Wed, 12 Sep 2018 08:34:54 +0000 (10:34 +0200)]
Fix compiler warning emitted from GCC8

the following warning gets emitted:

```
In file included from ./Vulkan/glslang/SPIRV/hex_float.h:39,
                 from ./Vulkan/glslang/SPIRV/SpvBuilder.cpp:49:
./Vulkan/glslang/SPIRV/bitutils.h: In instantiation of ‘Dest spvutils::BitwiseCast(Src) [with Dest = spvutils::Float16; Src = short unsigned int]’:
./Vulkan/glslang/SPIRV/hex_float.h:138:47:   required from ‘T spvutils::FloatProxy<T>::getAsFloat() const [with T = spvutils::Float16]’
./Vulkan/glslang/SPIRV/hex_float.h:821:52:   required from here
./Vulkan/glslang/SPIRV/bitutils.h:29:14: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘class spvutils::Float16’; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
   std::memcpy(&dest, &source, sizeof(dest));
   ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./Vulkan/glslang/SPIRV/SpvBuilder.cpp:49:
./Vulkan/glslang/SPIRV/hex_float.h:43:7: note: ‘class spvutils::Float16’ declared here
 class Float16 {
       ^~~~~~~
In file included from ./Vulkan/glslang/SPIRV/hex_float.h:39,
                 from ./Vulkan/glslang/SPIRV/SpvBuilder.cpp:49:
./Vulkan/glslang/SPIRV/bitutils.h: In instantiation of ‘Dest spvutils::BitwiseCast(Src) [with Dest = spvutils::FloatProxy<spvutils::Float16>; Src = short unsigned int]’:
./Vulkan/glslang/SPIRV/hex_float.h:431:28:   required from ‘void spvutils::HexFloat<T, Traits>::setFromSignUnbiasedExponentAndNormalizedSignificand(bool, spvutils::HexFloat<T, Traits>::int_type, spvutils::HexFloat<T, Traits>::uint_type, bool) [with T = spvutils::FloatProxy<spvutils::Float16>; Traits = spvutils::HexFloatTraits<spvutils::FloatProxy<spvutils::Float16> >; spvutils::HexFloat<T, Traits>::int_type = short int; spvutils::HexFloat<T, Traits>::uint_type = short unsigned int]’
./Vulkan/glslang/SPIRV/hex_float.h:633:5:   required from ‘void spvutils::HexFloat<T, Traits>::castTo(other_T&, spvutils::round_direction) [with other_T = spvutils::HexFloat<spvutils::FloatProxy<spvutils::Float16>, spvutils::HexFloatTraits<spvutils::FloatProxy<spvutils::Float16> > >; T = spvutils::FloatProxy<float>; Traits = spvutils::HexFloatTraits<spvutils::FloatProxy<float> >]’
./Vulkan/glslang/SPIRV/hex_float.h:817:39:   required from here
./Vulkan/glslang/SPIRV/bitutils.h:29:14: warning: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘class spvutils::FloatProxy<spvutils::Float16>’ from an array of ‘short unsigned int’ [-Wclass-memaccess]
   std::memcpy(&dest, &source, sizeof(dest));
   ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./Vulkan/glslang/SPIRV/SpvBuilder.cpp:49:
./Vulkan/glslang/SPIRV/hex_float.h:115:7: note: ‘class spvutils::FloatProxy<spvutils::Float16>’ declared here
 class FloatProxy {
       ^~~~~~~~~~
```

5 years agoBump revision.
John Kessenich [Tue, 11 Sep 2018 00:14:21 +0000 (18:14 -0600)]
Bump revision.

5 years agoSPV: Fix #1487: Only declare AMD int16/half_float extensions when needed.
John Kessenich [Tue, 11 Sep 2018 00:10:51 +0000 (18:10 -0600)]
SPV: Fix #1487: Only declare AMD int16/half_float extensions when needed.

5 years agoPrinting preprocessed shaders (not a supported path): Fix #1490: strings
John Kessenich [Mon, 10 Sep 2018 17:37:38 +0000 (11:37 -0600)]
Printing preprocessed shaders (not a supported path): Fix #1490: strings

Put quote marks around strings, due to a change in how tokenization works.

5 years agoBump version and revision.
John Kessenich [Fri, 7 Sep 2018 15:07:03 +0000 (09:07 -0600)]
Bump version and revision.

5 years agoMerge branch 'jeffbolznv-memory_scope_semantics'
John Kessenich [Fri, 7 Sep 2018 14:56:46 +0000 (08:56 -0600)]
Merge branch 'jeffbolznv-memory_scope_semantics'

5 years agoGL_KHR_memory_scope_semantics
Jeff Bolz [Wed, 5 Sep 2018 15:11:41 +0000 (10:11 -0500)]
GL_KHR_memory_scope_semantics

5 years agoMerge pull request #1465 from otakuto/remove-execute-permissions
John Kessenich [Fri, 31 Aug 2018 15:14:47 +0000 (08:14 -0700)]
Merge pull request #1465 from otakuto/remove-execute-permissions

Remove execute permissions

5 years agoMerge pull request #1485 from karl-lunarg/karl-lunarg-patch-1
John Kessenich [Fri, 31 Aug 2018 15:12:54 +0000 (08:12 -0700)]
Merge pull request #1485 from karl-lunarg/karl-lunarg-patch-1

tooling: Fix update sources script for Python 3

5 years agoMerge pull request #1486 from mrtrizer/patch-1
John Kessenich [Fri, 31 Aug 2018 15:09:54 +0000 (08:09 -0700)]
Merge pull request #1486 from mrtrizer/patch-1

Fixed a typo leading to compilation error.

5 years agoUpdate SpvTools.cpp
Denis Zdorovtsov [Fri, 31 Aug 2018 14:36:15 +0000 (17:36 +0300)]
Update SpvTools.cpp

Fix build.

5 years agobump revision
John Kessenich [Thu, 30 Aug 2018 23:43:22 +0000 (17:43 -0600)]
bump revision

5 years agoSPV: Turn off the default validation done by the SPIRV-Tools optimizer.
John Kessenich [Thu, 30 Aug 2018 22:56:59 +0000 (16:56 -0600)]
SPV: Turn off the default validation done by the SPIRV-Tools optimizer.

Also use the glslang namespace qualifier consistently and validate after
legalization, not before. (But most tests don't legalize.)

5 years agoMerge pull request #1482 from KhronosGroup/validate
John Kessenich [Thu, 30 Aug 2018 20:20:11 +0000 (13:20 -0700)]
Merge pull request #1482 from KhronosGroup/validate

SPV: Add SPIRV-Tools validator.

5 years agoGLSL: Remove use of __ in the implementation of keywords having __.
John Kessenich [Thu, 30 Aug 2018 18:22:33 +0000 (12:22 -0600)]
GLSL: Remove use of __ in the implementation of keywords having __.

5 years agoGLSL: Remove use of __ in the implementation of keywords having __.
John Kessenich [Thu, 30 Aug 2018 18:22:33 +0000 (12:22 -0600)]
GLSL: Remove use of __ in the implementation of keywords having __.

5 years agotooling: Fix update sources script for Python 3
Karl Schultz [Mon, 27 Aug 2018 20:06:38 +0000 (14:06 -0600)]
tooling: Fix update sources script for Python 3

This one small change allows the update_glslang_sources.py script to operate correctly with Python 2 and Python 3.

Change the string literal type to "bytes" so that it matches the type returned by the subprocess calls.  Otherwise, under Python 3, the search for "known-good" in the list of remotes always fails.  This is OK for the first execution of update_glsang_sources, since the remote is not there on the first run.  But on subsequent runs, the search still fails to match and the script stops when trying to create a remote that already exists.

5 years agoSPV: Add option for controling when the SPIRV-Tools validator is used.
John Kessenich [Thu, 23 Aug 2018 21:29:08 +0000 (15:29 -0600)]
SPV: Add option for controling when the SPIRV-Tools validator is used.

5 years agoSPV: Isolate SPIRV-tools glue to its own file.
John Kessenich [Thu, 23 Aug 2018 21:17:10 +0000 (15:17 -0600)]
SPV: Isolate SPIRV-tools glue to its own file.

5 years agoSPV: Add SPIRV-Tools validator. This needs the latest SPIR-Tools.
John Kessenich [Wed, 22 Aug 2018 23:17:07 +0000 (17:17 -0600)]
SPV: Add SPIRV-Tools validator. This needs the latest SPIR-Tools.

5 years agoNon-functional: Rationalize some existing use of SPIRV-Tools.
John Kessenich [Wed, 22 Aug 2018 23:12:46 +0000 (17:12 -0600)]
Non-functional: Rationalize some existing use of SPIRV-Tools.

5 years agoMerge pull request #1480 from dneto0/stringify
John Kessenich [Mon, 20 Aug 2018 15:07:12 +0000 (08:07 -0700)]
Merge pull request #1480 from dneto0/stringify

Use our own SPIRV-Tools message stringifier

5 years agoUse our own SPIRV-Tools message stringifier
David Neto [Mon, 20 Aug 2018 14:36:27 +0000 (10:36 -0400)]
Use our own SPIRV-Tools message stringifier

Stop including an internal SPIRV-Tools header. It has been
deleted.

Fixes #1477

5 years agoMerge pull request #1474 from KhronosGroup/pure-8-16-bit-capability
John Kessenich [Sat, 18 Aug 2018 00:00:04 +0000 (17:00 -0700)]
Merge pull request #1474 from KhronosGroup/pure-8-16-bit-capability

SPV: only declare the pure 8/16-bit capabilities when needed.

5 years agoMerge pull request #1476 from greg-lunarg/kg24
John Kessenich [Fri, 17 Aug 2018 19:46:32 +0000 (12:46 -0700)]
Merge pull request #1476 from greg-lunarg/kg24

Update SPIRV-Tools known good.

5 years agoUpdate SPIRV-Tools known good.
GregF [Thu, 16 Aug 2018 21:34:36 +0000 (15:34 -0600)]
Update SPIRV-Tools known good.

Includes:

    Update OpPhi instructions after splitting block. (#1783)
    Don't change decorations and names in merge return. (#1777)
    Transform to combine consecutive access chains
    Handle undef literal value in vector shuffle
    Fix block ordering in dead branch elim
    Fix finding constant with particular type. (#1724)
    Fix infinite loop while folding OpVectorShuffle (#1722)
    Fix size error when folding vector shuffle. (#1721)
    Layout validation: Permit {vec3; float} tight packing

5 years agoSPV: only declare the pure 8/16-bit capabilities when needed.
John Kessenich [Wed, 15 Aug 2018 19:54:09 +0000 (13:54 -0600)]
SPV: only declare the pure 8/16-bit capabilities when needed.

Only when operations stray outside the 8/16-bit storage-capabilities
are the general (pure 8/16-bit) capabilities needed.

5 years agoSPV: More corrections of <id> versus "immediate" operands.
John Kessenich [Tue, 14 Aug 2018 19:31:43 +0000 (13:31 -0600)]
SPV: More corrections of <id> versus "immediate" operands.

5 years agoSPV: Correct SPIR-V operands for <id> versus immediate.
John Kessenich [Tue, 14 Aug 2018 03:37:59 +0000 (21:37 -0600)]
SPV: Correct SPIR-V operands for <id> versus immediate.

5 years agoBump version patch level.
John Kessenich [Mon, 13 Aug 2018 07:32:56 +0000 (01:32 -0600)]
Bump version patch level.

5 years agoFix #1471: Merge shift amounts for different sets: --stb ... --std ...
John Kessenich [Mon, 13 Aug 2018 04:05:59 +0000 (22:05 -0600)]
Fix #1471: Merge shift amounts for different sets: --stb ... --std ...

5 years agoFix #1393: rationalize usage, in the spirit of #1393.
John Kessenich [Mon, 13 Aug 2018 03:24:55 +0000 (21:24 -0600)]
Fix #1393: rationalize usage, in the spirit of #1393.

Order is kept about the same.

5 years agoBump revision.
John Kessenich [Thu, 9 Aug 2018 20:17:52 +0000 (14:17 -0600)]
Bump revision.

5 years agoFix #1468: Add command-line --entry-point support, same as existing -e.
John Kessenich [Thu, 9 Aug 2018 20:15:00 +0000 (14:15 -0600)]
Fix #1468: Add command-line --entry-point support, same as existing -e.

5 years agoFix #1469: Make it easier to copy/paste build instructions.
John Kessenich [Thu, 9 Aug 2018 19:56:57 +0000 (13:56 -0600)]
Fix #1469: Make it easier to copy/paste build instructions.

5 years agoMerge pull request #1466 from Kangz/warning_fixes
John Kessenich [Thu, 9 Aug 2018 19:49:56 +0000 (12:49 -0700)]
Merge pull request #1466 from Kangz/warning_fixes

Fix -Wignored-qualifier and -Wunused-variable warnings

5 years agoMerge pull request #1470 from antiagainst/patch-2
John Kessenich [Thu, 9 Aug 2018 19:34:46 +0000 (12:34 -0700)]
Merge pull request #1470 from antiagainst/patch-2

Appveyor CI: build artifacts for x64

5 years agoAppveyor CI: build artifacts for x64
Lei Zhang [Thu, 9 Aug 2018 17:36:17 +0000 (13:36 -0400)]
Appveyor CI: build artifacts for x64

Fixes https://github.com/KhronosGroup/glslang/issues/1396

5 years agoFix -Wignored-qualifier and -Wunused-variable warnings
Corentin Wallez [Wed, 8 Aug 2018 13:20:15 +0000 (15:20 +0200)]
Fix -Wignored-qualifier and -Wunused-variable warnings

5 years agoAdd shebang
otakuto [Mon, 6 Aug 2018 18:25:35 +0000 (03:25 +0900)]
Add shebang

5 years agoRemove execute permissions
otakuto [Mon, 6 Aug 2018 18:16:20 +0000 (03:16 +0900)]
Remove execute permissions

5 years agoMerge pull request #1460 from KhronosGroup/postprocess
John Kessenich [Mon, 6 Aug 2018 07:46:27 +0000 (00:46 -0700)]
Merge pull request #1460 from KhronosGroup/postprocess

Non-Functional: Add postprocess as more robust way to add capabilities

5 years agoNon-Functional: Add postprocess as more robust way to add capabilities
John Kessenich [Fri, 3 Aug 2018 21:56:12 +0000 (15:56 -0600)]
Non-Functional: Add postprocess as more robust way to add capabilities

When capabilities are needed for specific SPIR-V instructions, it is
fragile to do so based on GLSL/AST usage; it should be based on actual
instructions they got translated to.

5 years agoMerge pull request #1459 from dgkoch/dgkoch_build_fixes4
John Kessenich [Wed, 1 Aug 2018 21:28:57 +0000 (14:28 -0700)]
Merge pull request #1459 from dgkoch/dgkoch_build_fixes4

Fix various build warnings/errors

5 years agoFix build warnings/errors:
Daniel Koch [Fri, 27 Jul 2018 21:20:49 +0000 (17:20 -0400)]
Fix build warnings/errors:

1) On some old versions of MSVC:

glslang\MachineIndependent\Constant.cpp(187): warning C4056: overflow in floating-point constant arithmetic

On this platform the definition of INFINITY is as follows:

#ifndef _HUGE_ENUF
   #define _HUGE_ENUF  1e+300  // _HUGE_ENUF*_HUGE_ENUF must overflow
#endif
#define INFINITY   ((float)(_HUGE_ENUF * _HUGE_ENUF))

Moving the negation outside the cast seems to resolve that issue.

2) Some Linux compilers were unhappy with lines 226/227

glslang/MachineIndependent/Constant.cpp: In member function 'virtual glslang::TIntermTyped* glslang::TIntermConstantUnion::fold(glslang::TOperator, const glslang::TIntermTyped*) const':
glslang/MachineIndependent/Constant.cpp:226:99: error: integer overflow in expression [-Werror=overflow]
 else if (rightUnionArray[i].getIConst() == -1 && leftUnionArray[i].getIConst() == -(int)0x80000000)
   ^~~~~~~~~~~~~~~~
glslang/MachineIndependent/Constant.cpp:227:48: error: integer overflow in expression [-Werror=overflow]
     newConstArray[i].setIConst(-(int)0x80000000);
                                                ^~~~~~~~~~~~~~~~

Moving the negation to the right side of the cast made those happy, but then some Windows compilers were unhappy:

glslang\MachineIndependent\Constant.cpp(226): warning C4146: unary minus operator applied to unsigned type, result still unsigned
glslang\MachineIndependent\Constant.cpp(227): warning C4146: unary minus operator applied to unsigned type, result still unsigned

which required adding on the "ll" suffix.

3) Android builds where unhappy with line 242:

glslang/MachineIndependent/Constant.cpp:242:100: error: comparison of integers of different signs: 'long long' and 'unsigned long long' [-Werror,-Wsign-compare]
                 else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == -0x8000000000000000ll)
                                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Adding an explicit (long long) cast resolved this.
And the negation needs to be on the right side of the cast otherwise linux
builds are unhappy as in (2).

4) Android builds are unhappy with out of order initializers:

glslang/MachineIndependent/reflection.h:60:84: error: field 'type' will be initialized after field 'stages' [-Werror,-Wreorder]
glDefineType(pGLDefineType), size(pSize), index(pIndex), counterIndex(-1), type(pType.clone()), stages(EShLanguageMask(0)) { }
   ^
1 error generated.

Change-Id: Ic9a05fa7912498284885113d8b051f93f822f62b

5 years agoMerge pull request #1457 from KhronosGroup/parse-floats
John Kessenich [Fri, 27 Jul 2018 19:46:35 +0000 (12:46 -0700)]
Merge pull request #1457 from KhronosGroup/parse-floats

Tests: Add more string -> float tests. Related to #1456.

5 years agoPP: Address #1456: Strip float suffixes before using platform library.
John Kessenich [Fri, 27 Jul 2018 19:08:05 +0000 (13:08 -0600)]
PP: Address #1456: Strip float suffixes before using platform library.

5 years agoTests: Add more string -> float tests. Related to #1456.
John Kessenich [Fri, 27 Jul 2018 17:19:55 +0000 (11:19 -0600)]
Tests: Add more string -> float tests. Related to #1456.

5 years agoPP: floating-point parsing: more stable handling of istringstream::fail
John Kessenich [Thu, 26 Jul 2018 20:29:29 +0000 (14:29 -0600)]
PP: floating-point parsing: more stable handling of istringstream::fail

Possibly addresses #1456

6 years agoBump revision.
John Kessenich [Wed, 25 Jul 2018 21:33:34 +0000 (15:33 -0600)]
Bump revision.

6 years agoMerge pull request #1455 from TiemoJung/nullpointer_crash_fix
John Kessenich [Wed, 25 Jul 2018 18:13:05 +0000 (11:13 -0700)]
Merge pull request #1455 from TiemoJung/nullpointer_crash_fix

Fixes a crash when in/out varying variable had no semantic name and a…

6 years agoGLSL: No more restrictions on (non)shadow sampler construction.
John Kessenich [Wed, 25 Jul 2018 18:11:04 +0000 (12:11 -0600)]
GLSL: No more restrictions on (non)shadow sampler construction.

 Match https://github.com/KhronosGroup/GLSL/pull/22

6 years agoFixes a crash when in/out varying variable had no semantic name and an error was...
t.jung [Tue, 24 Jul 2018 11:22:21 +0000 (13:22 +0200)]
Fixes a crash when in/out varying variable had no semantic name and an error was reported in ioremapper phase when the variable was rejected

6 years agoMerge pull request #1451 from KhronosGroup/shadow-forces-depth
John Kessenich [Mon, 23 Jul 2018 23:41:00 +0000 (16:41 -0700)]
Merge pull request #1451 from KhronosGroup/shadow-forces-depth

GLSL/SPV: If a texture is used with a shadow sampler, force 'shadow'.

6 years agoHLSL: Fix #1445: distance() works on scalars.
John Kessenich [Mon, 23 Jul 2018 22:55:01 +0000 (16:55 -0600)]
HLSL: Fix #1445: distance() works on scalars.

6 years agoMerge pull request #1453 from greg-lunarg/kg22
John Kessenich [Mon, 23 Jul 2018 22:03:31 +0000 (15:03 -0700)]
Merge pull request #1453 from greg-lunarg/kg22

Update spirv-tools known good

6 years agoGLSL: Construct shadow texture from non-shadow sampler.
John Kessenich [Mon, 23 Jul 2018 21:59:09 +0000 (15:59 -0600)]
GLSL: Construct shadow texture from non-shadow sampler.

Tracks https://github.com/KhronosGroup/GLSL/pull/22.

6 years agoGLSL/SPV: If a texture is used with a shadow sampler, force 'shadow'.
John Kessenich [Sat, 21 Jul 2018 01:04:15 +0000 (19:04 -0600)]
GLSL/SPV: If a texture is used with a shadow sampler, force 'shadow'.

Fixes #854. But, only good if we are not trying to use the same
texture for both shadow and non-shadow constructors.

Force the type of the texture to have 'shadow' set when it is
constructed with a samplerShadow.

6 years agoUpdate spirv-tools known good
GregF [Mon, 23 Jul 2018 17:57:16 +0000 (11:57 -0600)]
Update spirv-tools known good

Includes the following:

Add Vulkan 1.1 capability sets
Don't merge types of resources
Remove stores of undef.
Make sure the constant folder get the correct type.

6 years agoMerge branch 'zeux-master'
John Kessenich [Fri, 20 Jul 2018 23:13:19 +0000 (17:13 -0600)]
Merge branch 'zeux-master'

6 years agoMerge branch 'master' of https://github.com/zeux/glslang into zeux-master
John Kessenich [Fri, 20 Jul 2018 21:28:38 +0000 (15:28 -0600)]
Merge branch 'master' of https://github.com/zeux/glslang into zeux-master

6 years agoMerge pull request #1450 from KhronosGroup/link-merge-all
John Kessenich [Fri, 20 Jul 2018 19:40:32 +0000 (12:40 -0700)]
Merge pull request #1450 from KhronosGroup/link-merge-all

Link: Merge all downstream consumed intermediate modes.

6 years agoLink: Merge all the settings in TIntermediate.
John Kessenich [Fri, 20 Jul 2018 05:10:32 +0000 (23:10 -0600)]
Link: Merge all the settings in TIntermediate.

Fixes #1309.

6 years agoMerge pull request #1436 from karl-lunarg/karl-ccache
John Kessenich [Thu, 19 Jul 2018 03:39:31 +0000 (20:39 -0700)]
Merge pull request #1436 from karl-lunarg/karl-ccache

build: Add ccache option to CMake config

6 years agoMerge pull request #1446 from KhronosGroup/spv-link
John Kessenich [Thu, 19 Jul 2018 00:29:17 +0000 (17:29 -0700)]
Merge pull request #1446 from KhronosGroup/spv-link

Link/SPV: Correct symbol IDs on merging ASTs to a single coherent space

6 years agoMerge pull request #1437 from mattparks/patch-2
John Kessenich [Thu, 19 Jul 2018 00:15:32 +0000 (17:15 -0700)]
Merge pull request #1437 from mattparks/patch-2

CMake options for postfix and SPVRemapper.

6 years agoMerge branch 'jeffbolznv-missing_descriptor_indexing_extension'
John Kessenich [Thu, 19 Jul 2018 00:11:16 +0000 (18:11 -0600)]
Merge branch 'jeffbolznv-missing_descriptor_indexing_extension'

6 years agoMerge branch 'missing_descriptor_indexing_extension' of https://github.com/jeffbolznv...
John Kessenich [Thu, 19 Jul 2018 00:10:45 +0000 (18:10 -0600)]
Merge branch 'missing_descriptor_indexing_extension' of https://github.com/jeffbolznv/glslang into jeffbolznv-missing_descriptor_indexing_extension

6 years agoLink/SPV: Correct symbol IDs on merging ASTs to a single coherent space
John Kessenich [Fri, 13 Jul 2018 16:40:40 +0000 (10:40 -0600)]
Link/SPV: Correct symbol IDs on merging ASTs to a single coherent space

This is one step in providing full linker functionality for creating
correct SPIR-V from multiple compilation units for the same stage.
(This was the only remaining "hard" part. The rest should be simple.)

6 years agoMerge pull request #1442 from dneto0/use-forked-android-ndk-repo
John Kessenich [Thu, 12 Jul 2018 22:07:51 +0000 (15:07 -0700)]
Merge pull request #1442 from dneto0/use-forked-android-ndk-repo

NDK build: Use NDK r17b and its own CMake toolchain file

6 years agoAdd missing OpExtension SPV_EXT_descriptor_indexing for dynamic indexing capabilities
Jeff Bolz [Thu, 12 Jul 2018 21:51:18 +0000 (16:51 -0500)]
Add missing OpExtension SPV_EXT_descriptor_indexing for dynamic indexing capabilities

6 years agoErrors and Build: Fix build warnings, which also improved error messages.
John Kessenich [Thu, 12 Jul 2018 21:11:07 +0000 (15:11 -0600)]
Errors and Build: Fix build warnings, which also improved error messages.

6 years agoNDK build: Use NDK r17b and its own CMake toolchain file
David Neto [Thu, 12 Jul 2018 18:49:26 +0000 (14:49 -0400)]
NDK build: Use NDK r17b and its own CMake toolchain file

More recent NDK releases have their own CMake toolchain file.
Use it.

Also, download the NDK from github.com:dneto0/android-ndk.
That is a fork of the repo we used to use, but we have more
control over how long it stays stable.

6 years agoTravis CI: Fix comments disabling code.
John Kessenich [Thu, 12 Jul 2018 17:37:09 +0000 (11:37 -0600)]
Travis CI: Fix comments disabling code.

6 years agoMerge pull request #1440 from dneto0/later-android
John Kessenich [Thu, 12 Jul 2018 17:01:54 +0000 (10:01 -0700)]
Merge pull request #1440 from dneto0/later-android

WIP: Travis-CI: Use Android NDK r13b specifically

6 years agoTravis-CI: Use Android NDK r13b specifically
David Neto [Wed, 11 Jul 2018 19:31:36 +0000 (15:31 -0400)]
Travis-CI: Use Android NDK r13b specifically

The Travis-CI bot downloads a copy of the Android NDK.  The source
we get it from recently updated to Android NDK r17b.  However,
the android.toolchain.cmake file does not know how to parse the
Android native API level from that version of the NDK.  So check
out the NDK r13b version that we were using until yesterday.

Fixes #1439

6 years agoMerge pull request #1438 from Think-Silicon/getUniformStages
John Kessenich [Wed, 11 Jul 2018 15:19:21 +0000 (08:19 -0700)]
Merge pull request #1438 from Think-Silicon/getUniformStages

Reflection exposes the Shader Stages where a Uniform is present

6 years agoNon-functional: Retrigger bots; the previous failure looks suspicious.
John Kessenich [Wed, 11 Jul 2018 08:24:36 +0000 (02:24 -0600)]
Non-functional: Retrigger bots; the previous failure looks suspicious.

6 years agoHLSL: Fix #1432: Globally initialize local static variables.
John Kessenich [Wed, 11 Jul 2018 07:09:14 +0000 (01:09 -0600)]
HLSL: Fix #1432: Globally initialize local static variables.

6 years agoReflection exposes the Shader Stages where a Uniform is present
dmpakas [Tue, 10 Jul 2018 15:25:48 +0000 (18:25 +0300)]
Reflection exposes the Shader Stages where a Uniform is present

6 years agoAllowed debug postfix to be changed.
Matthew Albrecht [Sat, 7 Jul 2018 22:00:08 +0000 (17:00 -0500)]
Allowed debug postfix to be changed.

6 years agoAdded the cmake option to disable building SPVRemapper.
Matthew Albrecht [Sat, 7 Jul 2018 21:53:06 +0000 (16:53 -0500)]
Added the cmake option to disable building SPVRemapper.

6 years agoMerge pull request #1434 from antiagainst/fix-spirv-tools-header
John Kessenich [Fri, 6 Jul 2018 19:18:32 +0000 (13:18 -0600)]
Merge pull request #1434 from antiagainst/fix-spirv-tools-header

Use public SPIRV-Tools header

6 years agobuild: Add ccache option to CMake config
Karl Schultz [Fri, 6 Jul 2018 18:12:09 +0000 (12:12 -0600)]
build: Add ccache option to CMake config

This is totally optional, but lets people build this repo with
ccache to improve rebuild speeds.  It also can help a great deal
on ccache-enabled CI systems like Travis-CI.  We build fixed
revisions of glslang a lot on Travis, so this will be a big help
with CI machine loading.

6 years agoSPIRV: Simplify matrix->matrix constructor
Arseny Kapoulkine [Thu, 5 Jul 2018 20:19:39 +0000 (13:19 -0700)]
SPIRV: Simplify matrix->matrix constructor

When constructing a matrix from another matrix with smaller dimensions,
there's no need to extract the scalars out of columns and rebuild the
resulting matrix from scalars - instead, we can just construct shorter
vectors with OpShuffle and combine them to the final result.

This keeps the common casts such as mat3(mat4) in vector registers,
which may improve performance for some GPUs, and cleans up output of
translation tools like SPIRV-Cross.

Fixes #1412.