platform/upstream/glslang.git
4 years agoMerge pull request #2422 from ben-clayton/gn
John Kessenich [Mon, 19 Oct 2020 23:29:18 +0000 (17:29 -0600)]
Merge pull request #2422 from ben-clayton/gn

Add basic GN configurations

4 years agoFix uninitialized use of TIntermediate::resource (#2424)
Ben Clayton [Mon, 19 Oct 2020 21:21:12 +0000 (22:21 +0100)]
Fix uninitialized use of TIntermediate::resource (#2424)

TIntermediate was constructed without initializing any of the `resources` fields,
and `TProgram::linkStage()` was not calling `TIntermediate::setLimits()`
after constructing new `TIntermediate`s for non-first stages.

Fields of `resources` were then read in `TIntermediate::finalCheck()`
triggering undefined behavior.

This CL makes three changes:
(1) `TIntermediate::setLimits()` is now called for non-first stages by
    copying the `firstIntermediate`'s limits. This ensures that the
    `resources` fields is initialized, fixing the bug.
(2) `TIntermediate::resources` is now wrapped in a `MustBeAssigned<>`
    helper struct, asserting in non-release builds that this field is
    always initialized before reading.
(3) `TIntermediate::resources` is now zero-initialized, so that if
    the `TIntermediate::resources` field is not set in a release build
    (and so the `assert()` will be disabled) behavior is still
    deterministic.

Fixes #2423

4 years agoAdd GN build instructions to README.md
Ben Clayton [Fri, 16 Oct 2020 13:26:05 +0000 (14:26 +0100)]
Add GN build instructions to README.md

4 years agoAdd basic GN configurations
Ben Clayton [Fri, 16 Oct 2020 11:47:38 +0000 (12:47 +0100)]
Add basic GN configurations

This allows glslang to be build standalone using the gn build system.

To build with gn:

```
gclient sync --gclientfile=standalone.gclient
gn gen out/default
cd out/default
ninja
```

4 years agoSPIR-V: Remove SpvTools.h include from disassemble.cpp (#2417)
Triang3l [Mon, 12 Oct 2020 16:33:01 +0000 (19:33 +0300)]
SPIR-V: Remove SpvTools.h include from disassemble.cpp (#2417)

disassemble.cpp appears not to be using anything from SpvTools.h, but the inclusion of it prevents standalone building of the SPIR-V portion (for instance, when needed purely for generation and disassembly) without SPIRV-Tools dependency.

4 years agoRemove executable bits from code/data files (#2420)
Rémi Verschelde [Mon, 12 Oct 2020 16:08:47 +0000 (18:08 +0200)]
Remove executable bits from code/data files (#2420)

4 years agoAdd test case for read-only storage texture passed to helper function (#2414)
David Neto [Wed, 7 Oct 2020 22:10:27 +0000 (18:10 -0400)]
Add test case for read-only storage texture passed to helper function (#2414)

This is based on spv.paramMemory.frag.out which exercises the
writeonly storage image case.

This appears to need desktop GLSL.

The generated SPIR-V fails validation because the image_write function
takes a parameter which is pointer to an OpTypeImage with Unknown format.
But the parameters passed in are pointer to OpTypeImage with formats Rgba32f
and Rgba16f. The validator rejects this, saying the parameter types must
match.

4 years agoDisable -Wno-conversion on MSVC compiler (#2410)
jonahryandavis [Wed, 7 Oct 2020 17:32:49 +0000 (13:32 -0400)]
Disable -Wno-conversion on MSVC compiler (#2410)

4 years agoRevert "Add new SpirvToolsDisassemble API interface + Improve Doc on existing API...
John Kessenich [Mon, 5 Oct 2020 22:58:31 +0000 (16:58 -0600)]
Revert "Add new SpirvToolsDisassemble API interface + Improve Doc on existing API interface (#2408)"

See issue #2413.

This reverts commit d1929f359a1035cb169ec54630c24ae6ce0bcc21.

4 years agoAdd new SpirvToolsDisassemble API interface + Improve Doc on existing API interface...
pheonix [Mon, 5 Oct 2020 15:59:27 +0000 (08:59 -0700)]
Add new SpirvToolsDisassemble API interface + Improve Doc on existing API interface (#2408)

* Add more flexible SpirvToolsDisassemble interface to allow specifying spv_target_env for disassembly output.
Improve documentation on existing SpirvToolsDisassemble interface.

* Update pre-processor check - following existing ENABLE_OPT checks.

* Fix not-found header paths for glslangValidator and glslangtests.

4 years agoRevert "Add more flexible SpirvToolsDisassemble interface to allow specifying spv_tar...
John Kessenich [Mon, 28 Sep 2020 00:15:41 +0000 (18:15 -0600)]
Revert "Add more flexible SpirvToolsDisassemble interface to allow specifying spv_target_env for disassembly output. (#2406)"

This reverts commit 2eed8236d07d50f35c466d723651d86284c60161.

4 years agoAdd more flexible SpirvToolsDisassemble interface to allow specifying spv_target_env...
pheonix [Sun, 27 Sep 2020 23:53:18 +0000 (16:53 -0700)]
Add more flexible SpirvToolsDisassemble interface to allow specifying spv_target_env for disassembly output. (#2406)

Improve documentation on existing SpirvToolsDisassemble interface.
Fix cmake build scripts to account for `spirv-tools` external when -DENABLE_OPT=ON

4 years ago[spirv-remap] Fix undefined behavior in hashing (#2403)
craig stout [Sun, 27 Sep 2020 00:43:30 +0000 (20:43 -0400)]
[spirv-remap] Fix undefined behavior in hashing (#2403)

There's a statement that intends to generate a 32-bit hashcode, but due
to integer promotion, the intermediate values can trigger signed integer
overflow, which is undefined behavior.

To avoid this, cast at least one operand to unsigned int before
multiplying, which will cause the result to be promoted to unsigned int
instead of signed int.

With this patch, I'm able to build core for qemu-x64 with host_asan-ubsan.

Fixed: 60128
Change-Id: Idd644e534116bf29dca8013936ac39901bbe68fc
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/glslang/+/428254
Reviewed-by: John Bauman <jbauman@google.com>
Co-authored-by: Drew Fisher <zarvox@google.com>
4 years ago[Wconversion] Suppress glslang issue (#2404)
craig stout [Sat, 26 Sep 2020 17:02:33 +0000 (13:02 -0400)]
[Wconversion] Suppress glslang issue (#2404)

The glslang public includes dir contains headers with implicit
conversion issues. Add -Wno-conversion to glslang's public config.

Bug: 60140
Bug: 58162
Change-Id: Iec27cb4242e9fdceddd6a3e02044a0bccfa0ce36
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/glslang/+/429054
Reviewed-by: Petr Hosek <phosek@google.com>
Co-authored-by: Shai Barack <shayba@google.com>
4 years agoUpdate spirv-tools and spirv-headers known goods (#2401)
greg-lunarg [Fri, 25 Sep 2020 02:07:15 +0000 (20:07 -0600)]
Update spirv-tools and spirv-headers known goods (#2401)

4 years agoSPIRV: Add more utility functions to build some opcodes (#2398)
Rex Xu [Fri, 18 Sep 2020 13:18:35 +0000 (21:18 +0800)]
SPIRV: Add more utility functions to build some opcodes (#2398)

Add more builder functions to OpExecutionMode, OpExecutionModeId,
OpDecorateString, OpMemberDecorateString.

According to SPIR-V, OpExecutionMode and OpExecutionModeId could
take variable extra operands. Current implementation doesn't support
this and assumes at most 3 operands are extra operands. It is not
true. Similarly, OpDecorateString and OpMemberDecorateString could
support multiple strings either as literal strings or as string
operands. Further, OpDecorate and OpDecorateId have the same problem,
taking variable extra operands.

4 years agoPreprocessor related issue fix (#2378)
Chow [Tue, 15 Sep 2020 03:46:24 +0000 (11:46 +0800)]
Preprocessor related issue fix (#2378)

* Preprocessor related fix

1). Accoding to ESSL spec : All macro names containing two consecutive underscores ( __ ) are reserved for future use as predefined macro names, so just report a warning instead of error when the shader defines the macro names begining with  '__';

2. According to spec:  If an implementation does not recognize the tokens following #pragma, then it will ignore that pragma, so report a compile-time warning intead of error for the following statement:
#pragma debug(1.23)

3. The 'defined' macro should be allowed to expand and '__LINE__' should be allowed to be replaced with its original line number (otherwise, other expanding macros may change this value).

4. Add a flag 'indentifierSeen' in PPContext to indicate whether the any non-preprocessor tokens is existed before the extension directives, because the built-in symbols and functions are parsed before paring the user shader, so add a 'shaderSource' flag to check this error only for the user shader source;

5. Add missing type int16 and uint16.

* Add test results, remove restriction of #extension.

1. Remove extension restriction in first line , as this is contraversy now.

2. The following shader is compiled failed as glslang consider the keyword 'defined' can not be undefined(in the 9th line: "#define defined BBB")
The shader is as following:
According to ES3.0 spec: It is an error to undefine or to redefine a built-in (pre-defined) macro name.
This rule is aimed to the  __LINE__,  __FILE__, __VERSION__ and  GL_ES,
the keyword "defined" should not be restricted by this rule,
so change the compile error to warning and make the following shader compile successfully.

* 1. Using relaxedError to control error/warning report level. 2. remove #extension restriction. 3. Fix version related issue.

1. Using relaxedError to control error/warning report level. 2. remove #extension restriction. 3. Fix version related issue.

* Add test results

* Turn conditional warnings about pragma to unconditional ones.

4 years agoSPIRV: Add disassembly support for multiple literal strings (#2397)
Rex Xu [Mon, 14 Sep 2020 15:57:09 +0000 (11:57 -0400)]
SPIRV: Add disassembly support for multiple literal strings (#2397)

According to the extension SPV_GOOGLE_decorate_string,
OpDecorateString (or OpMemberDecorateString) ought to be capable of
supporting multiple literal strings. Each literal strings are padded
with null terminator to make word alignment. The layout is:

  Inst | Target | Decoration | Literal String, Literal String, ...

4 years agoFix scope definition in ES 100. (#2379)
Chow [Mon, 14 Sep 2020 14:00:48 +0000 (22:00 +0800)]
Fix scope definition in ES 100. (#2379)

* Remove image2DShadow and other 3 tokens. Refine codes.

Remove image2DShadow and other 3 tokens. Refine codes.

* 110scope.vert has redefinition part of what's removed from 100scope.vert

4 years agoFix #2385: guard against constant_id on non-const.
johnkslang [Mon, 14 Sep 2020 08:49:38 +0000 (02:49 -0600)]
Fix #2385: guard against constant_id on non-const.

4 years agoMerge pull request #2394 from ShabbyX/subpassLoad
John Kessenich [Sun, 13 Sep 2020 04:45:53 +0000 (22:45 -0600)]
Merge pull request #2394 from ShabbyX/subpassLoad

Allow subpassLoad for ANGLE

4 years agoMerge pull request #2395 from nihui/patch-4
John Kessenich [Sun, 13 Sep 2020 04:45:22 +0000 (22:45 -0600)]
Merge pull request #2395 from nihui/patch-4

Find python interpreter from host when cross-compiling

4 years agoTry to find python interpreter from host first
nihui [Sat, 12 Sep 2020 03:18:02 +0000 (11:18 +0800)]
Try to find python interpreter from host first

4 years agoAllow subpassLoad for ANGLE
Shahbaz Youssefi [Sat, 12 Sep 2020 02:30:49 +0000 (22:30 -0400)]
Allow subpassLoad for ANGLE

Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
4 years agoMerge pull request #2388 from Tobski/rq-initialization-error
John Kessenich [Tue, 8 Sep 2020 11:39:06 +0000 (05:39 -0600)]
Merge pull request #2388 from Tobski/rq-initialization-error

Error when initializing rayQuery with assignment

4 years agoAdded missing copyright amendment
Tobias Hector [Tue, 8 Sep 2020 10:10:27 +0000 (11:10 +0100)]
Added missing copyright amendment

4 years agoMerge pull request #2386 from amdrexu/bugfix
John Kessenich [Mon, 7 Sep 2020 05:05:14 +0000 (23:05 -0600)]
Merge pull request #2386 from amdrexu/bugfix

Parser: Fix wrong names of extension macros

4 years agoMerge pull request #2389 from amdrexu/bugfix2
John Kessenich [Mon, 7 Sep 2020 04:48:24 +0000 (22:48 -0600)]
Merge pull request #2389 from amdrexu/bugfix2

SPIRV: Fix some disassembly issues

4 years agoSPIRV: Fix some disassembly issues
Rex Xu [Mon, 7 Sep 2020 03:09:21 +0000 (11:09 +0800)]
SPIRV: Fix some disassembly issues

- OpExecutionModeId is not supported in disassembly.
- Some execution modes are missing in disassembled strings.

4 years agoError when initializing rayQuery with assignment
Tobias Hector [Thu, 3 Sep 2020 14:14:14 +0000 (15:14 +0100)]
Error when initializing rayQuery with assignment

4 years agoParser: Fix wrong names of extension macros
Rex Xu [Wed, 2 Sep 2020 15:03:03 +0000 (23:03 +0800)]
Parser: Fix wrong names of extension macros

The names of some extension macros are wrong because of coding typos.

4 years agoMerge pull request #2380 from null77/suppress-override-warnings
John Kessenich [Wed, 26 Aug 2020 18:17:42 +0000 (12:17 -0600)]
Merge pull request #2380 from null77/suppress-override-warnings

Suppress two override suggestion warnings.

4 years agoSuppress two override suggestion warnings.
Jamie Madill [Wed, 26 Aug 2020 04:54:50 +0000 (00:54 -0400)]
Suppress two override suggestion warnings.

We're turning these on in ANGLE and want to keep the build clean.

4 years agoRevert "Merge pull request #2371 from RafaelMarinheiro/master"
johnkslang [Sun, 23 Aug 2020 07:31:49 +0000 (01:31 -0600)]
Revert "Merge pull request #2371 from RafaelMarinheiro/master"

This reverts commit f257e0ea6b9aeab2dc7af3207ac6d29d2bbc01d0, reversing
changes made to 8f0c6bd7732331186b66118d4613cd0dc7076de4.

4 years agoMerge pull request #2375 from juliusikkala/master
John Kessenich [Sun, 23 Aug 2020 06:43:18 +0000 (00:43 -0600)]
Merge pull request #2375 from juliusikkala/master

Obey ENABLE_PCH CMake option

4 years agoObey ENABLE_PCH CMake option
Julius Ikkala [Fri, 21 Aug 2020 15:44:06 +0000 (18:44 +0300)]
Obey ENABLE_PCH CMake option

4 years agoMerge pull request #2371 from RafaelMarinheiro/master
John Kessenich [Mon, 17 Aug 2020 10:04:32 +0000 (04:04 -0600)]
Merge pull request #2371 from RafaelMarinheiro/master

Use --test-root to pass files to Bazel tests.

4 years agoMerge pull request #2369 from ezdiy/c_api_export
John Kessenich [Mon, 17 Aug 2020 09:02:44 +0000 (03:02 -0600)]
Merge pull request #2369 from ezdiy/c_api_export

GLSLANG_EXPORT for C APIs.

4 years agoBuild: fix a build warning
johnkslang [Sat, 15 Aug 2020 01:39:28 +0000 (19:39 -0600)]
Build: fix a build warning

4 years agoUse --test-root to pass files to Bazel tests.
Rafael Marinheiro [Fri, 14 Aug 2020 21:00:58 +0000 (22:00 +0100)]
Use --test-root to pass files to Bazel tests.

The current implementation makes tests fail when it is imported from a
different Bazel workspace. We fix that by using
the --test-root flag to pass the rootpath to the
tests.

4 years agoMerge pull request #2367 from KhronosGroup/fix-semantic-checking
John Kessenich [Fri, 14 Aug 2020 15:41:18 +0000 (09:41 -0600)]
Merge pull request #2367 from KhronosGroup/fix-semantic-checking

Remove incorrect style of extension-based semantic checking.

4 years agoFix #2366, fix #2358, correctly separate out numerical feature checking
johnkslang [Fri, 14 Aug 2020 14:40:06 +0000 (08:40 -0600)]
Fix #2366, fix #2358, correctly separate out numerical feature checking

We need separate concepts for
 - total set of extensions ever enabled, for the back end
 - current state of extensions, for parsing
 - the set of features currently enabled for building the AST

4 years agoNon-functional (almost): Refactor when 'extensionRequested' is called.
johnkslang [Fri, 14 Aug 2020 08:16:19 +0000 (02:16 -0600)]
Non-functional (almost): Refactor when 'extensionRequested' is called.

This detangles incorrect conflation of HLSL with GLSL extensions,
defers asking expensive questions until it's time to ask, and removes
some dead code.

4 years agoNon-functional: Remove reinventing the scalar type, note code issues
johnkslang [Fri, 14 Aug 2020 06:36:19 +0000 (00:36 -0600)]
Non-functional: Remove reinventing the scalar type, note code issues

The scalar type was already the basic type passed in.

Also factored out of this the checking of extensions for 8/16-bit stuff.
This code seems wrong in several ways, but for now just documenting it.

4 years agoNon-functional: spellings of "destinaton" and "addPairConversion"
johnkslang [Tue, 11 Aug 2020 08:27:44 +0000 (02:27 -0600)]
Non-functional: spellings of "destinaton" and "addPairConversion"

4 years agoMerge pull request #2370 from alan-baker/update-tools
John Kessenich [Wed, 12 Aug 2020 17:24:59 +0000 (11:24 -0600)]
Merge pull request #2370 from alan-baker/update-tools

Update tools

4 years agoUpdate test expectations
Alan Baker [Wed, 12 Aug 2020 13:04:56 +0000 (09:04 -0400)]
Update test expectations

4 years agoUpdate SPIRV-Tools and SPIRV-Headers known good
Alan Baker [Wed, 12 Aug 2020 13:04:24 +0000 (09:04 -0400)]
Update SPIRV-Tools and SPIRV-Headers known good

4 years agoGLSLANG_EXPORT for C APIs.
Ez Diy [Mon, 10 Aug 2020 20:26:41 +0000 (22:26 +0200)]
GLSLANG_EXPORT for C APIs.

Fixes FFI breakage introduced in #2283

4 years agoNon-functional: correctly do GL_EXT_buffer_reference2 semantic checking
johnkslang [Fri, 7 Aug 2020 08:26:04 +0000 (02:26 -0600)]
Non-functional: correctly do GL_EXT_buffer_reference2 semantic checking

See #2366 for detail.

4 years agoNon-functional: consistently use 'const TSourceLoc&' to pass location.
johnkslang [Thu, 6 Aug 2020 11:24:24 +0000 (05:24 -0600)]
Non-functional: consistently use 'const TSourceLoc&' to pass location.

4 years agoSPV: Fix #1829: don't emit OpModuleProcessed use-storage-buffer
johnkslang [Thu, 6 Aug 2020 07:34:14 +0000 (01:34 -0600)]
SPV: Fix #1829: don't emit OpModuleProcessed use-storage-buffer

4 years agoMerge pull request #2365 from KhronosGroup/update-gtests
John Kessenich [Wed, 5 Aug 2020 17:45:39 +0000 (11:45 -0600)]
Merge pull request #2365 from KhronosGroup/update-gtests

Build/Test: Dropping VS 2013 allows using the latest googletests

4 years agoBuild/Test: Dropping 2013 allows using the latest googletests.
johnkslang [Wed, 5 Aug 2020 11:23:04 +0000 (05:23 -0600)]
Build/Test: Dropping 2013 allows using the latest googletests.

These have a new spelling: INSTANTIATE_TEST_CASE_P -> INSTANTIATE_TEST_SUITE_P

4 years agoSPV: Standalone; sanity check the client GLSL input semantics option value.
johnkslang [Tue, 4 Aug 2020 13:17:39 +0000 (07:17 -0600)]
SPV: Standalone; sanity check the client GLSL input semantics option value.

4 years agoSPV: Use more correct SPV-Tools environment, partially addressing #2290
johnkslang [Tue, 4 Aug 2020 09:00:32 +0000 (03:00 -0600)]
SPV: Use more correct SPV-Tools environment, partially addressing #2290

4 years agoSPV: Fix #2363: include trailing newline named text SPV output.
johnkslang [Tue, 4 Aug 2020 08:13:50 +0000 (02:13 -0600)]
SPV: Fix #2363: include trailing newline named text SPV output.

4 years agoMerge pull request #2362 from ShabbyX/optimize_for_angle
John Kessenich [Mon, 3 Aug 2020 07:28:52 +0000 (01:28 -0600)]
Merge pull request #2362 from ShabbyX/optimize_for_angle

Use GLSLANG_ANGLE to strip features to what ANGLE requires

4 years agoMerge pull request #2361 from ben-clayton/revert-thread-local
John Kessenich [Mon, 3 Aug 2020 06:12:02 +0000 (00:12 -0600)]
Merge pull request #2361 from ben-clayton/revert-thread-local

Revert changes that migrate to `thread_local`.

4 years agoUse GLSLANG_ANGLE to strip features to what ANGLE requires
Shahbaz Youssefi [Fri, 3 Jul 2020 19:42:53 +0000 (15:42 -0400)]
Use GLSLANG_ANGLE to strip features to what ANGLE requires

This change strips a few features similar to GLSLANG_WEB but doesn't
remove every detail like the latter.  It also hardcodes profile/version
to core/450.

In particular, TBuiltIns::initialize is specialized to remove most of
what is not supported or won't be supported by ANGLE.  The result of
this function is parsed with TParseContext::parseShaderStrings which is
a performance bottleneck.

This change shaves about 300KB off of ANGLE's binary size and reduces
the cost of SetupBuiltinSymbolTable to nearly a sixth.

Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
4 years agoRevert changes that migrate to `thread_local`.
Ben Clayton [Fri, 31 Jul 2020 06:09:17 +0000 (07:09 +0100)]
Revert changes that migrate to `thread_local`.

iOS 8 does not support `thread_local`, which is still in use.
Another approach will have to be found.

This change is a revert of the following changes:

a3845240 - "Simplify PoolAlloc with use of thread_local."
abf92c80 - "Deprecate InitializeDll functions"
33585c87 - "Limit visibility of symbols for internal libraries"

Issue: #2346

4 years agoMerge pull request #2359 from dneto0/fix-warn
John Kessenich [Tue, 28 Jul 2020 14:39:26 +0000 (08:39 -0600)]
Merge pull request #2359 from dneto0/fix-warn

Avoid spurious warning about uninit var

4 years agoAvoid spurious warning about uninit var
David Neto [Mon, 27 Jul 2020 19:33:56 +0000 (15:33 -0400)]
Avoid spurious warning about uninit var

4 years agoMerge pull request #2356 from greg-lunarg/kg112
John Kessenich [Thu, 23 Jul 2020 01:51:27 +0000 (08:51 +0700)]
Merge pull request #2356 from greg-lunarg/kg112

Update spirv-tools known-good to most recent stable

4 years agoUpdate spirv-tools known-good to most recent stable
Greg Fischer [Wed, 22 Jul 2020 21:10:04 +0000 (15:10 -0600)]
Update spirv-tools known-good to most recent stable

4 years agoMerge pull request #2353 from vkushwaha-nv/SPV_EXT_shader_atomic_float
John Kessenich [Wed, 22 Jul 2020 15:06:01 +0000 (22:06 +0700)]
Merge pull request #2353 from vkushwaha-nv/SPV_EXT_shader_atomic_float

Add changes for SPV_EXT_shader_atomic_float_add

4 years agoAdd changes for SPV_EXT_shader_atomic_float_add
Vikram Kushwaha [Sun, 19 Jul 2020 22:45:01 +0000 (15:45 -0700)]
Add changes for SPV_EXT_shader_atomic_float_add

4 years agoMerge pull request #2354 from ben-clayton/limit-visibility
John Kessenich [Wed, 22 Jul 2020 10:46:44 +0000 (17:46 +0700)]
Merge pull request #2354 from ben-clayton/limit-visibility

Limit visibility of symbols for internal libraries

4 years agoLimit visibility of symbols for internal libraries
Ben Clayton [Tue, 14 Jul 2020 17:36:08 +0000 (18:36 +0100)]
Limit visibility of symbols for internal libraries

Also remove `SPIRV/doc.cpp` from the `SPVRemapper` target as this
is part of `SPIRV`, causing ODR violations. Instead have
`SPVRemapper` link against `SPIRV`.

Fixes ODR violations.

4 years agoMerge pull request #2348 from ben-clayton/thread-local
John Kessenich [Wed, 22 Jul 2020 04:47:06 +0000 (11:47 +0700)]
Merge pull request #2348 from ben-clayton/thread-local

Simplify PoolAlloc by using `thread_local`

4 years agoMerge pull request #2345 from mbechard/master
John Kessenich [Wed, 22 Jul 2020 04:15:24 +0000 (11:15 +0700)]
Merge pull request #2345 from mbechard/master

also search global sequences for live variables

4 years agoSPV: Update to the latest SPIR-V headers.
johnkslang [Mon, 20 Jul 2020 17:49:28 +0000 (11:49 -0600)]
SPV: Update to the latest SPIR-V headers.

4 years agoDeprecate InitializeDll functions
Ben Clayton [Tue, 14 Jul 2020 17:34:45 +0000 (18:34 +0100)]
Deprecate InitializeDll functions

These were only used for TThreadPool, which now uses `thread_local`.

4 years agoSimplify PoolAlloc with use of thread_local.
Ben Clayton [Tue, 14 Jul 2020 17:32:12 +0000 (18:32 +0100)]
Simplify PoolAlloc with use of thread_local.

glslang is using C++ 11, which has first class support for variables of the `thread_local` storage class.

By dropping the use of the `OS_[GS]etTLSValue`, we can simplify the logic, and have it support a thread-local default allocator if none is provided.

Issue: #2346

4 years agoMerge pull request #2352 from ben-clayton/vs2015
John Kessenich [Tue, 21 Jul 2020 03:55:12 +0000 (10:55 +0700)]
Merge pull request #2352 from ben-clayton/vs2015

Finalize glslang 10.15.3847, start glslang 11, drop support for VS2013

4 years agoalso search global variables assignment for live variables
Malcolm Bechard [Tue, 14 Jul 2020 16:59:57 +0000 (12:59 -0400)]
also search global variables assignment for live variables

when traversing the AST to find live UBOs etc, also traverse
references to global module-level variables, incase they are
being filled in from UBOs etc.

4 years agoDrop support for VS2013
Ben Clayton [Mon, 20 Jul 2020 15:32:30 +0000 (16:32 +0100)]
Drop support for VS2013

This was scheduled for today - 20th July 2020.

Updates Appveyor configs to use VS2015 instead.

4 years agoStart glslang 11.0.0
Ben Clayton [Mon, 20 Jul 2020 15:26:34 +0000 (16:26 +0100)]
Start glslang 11.0.0

4 years agoFinalize glslang 10.15.3847
Ben Clayton [Mon, 20 Jul 2020 15:24:30 +0000 (16:24 +0100)]
Finalize glslang 10.15.3847

4 years agobuild_info: Fix parsing of versions with no flavor
Ben Clayton [Mon, 20 Jul 2020 15:39:15 +0000 (16:39 +0100)]
build_info: Fix parsing of versions with no flavor

4 years agoMerge pull request #2351 from ben-clayton/license-checker-cfg
John Kessenich [Sat, 18 Jul 2020 09:30:04 +0000 (16:30 +0700)]
Merge pull request #2351 from ben-clayton/license-checker-cfg

Update license-checker.cfg with simplified rules

4 years agoUpdate license-checker.cfg with simplified rules
Ben Clayton [Fri, 17 Jul 2020 19:06:31 +0000 (20:06 +0100)]
Update license-checker.cfg with simplified rules

`license-checker` has been updated to support `**` wildcards simplifying the ruless, and multiple license configs.

Add a new config for the bison generated files to ensure their licenses don't change.

4 years agoMerge pull request #2350 from ben-clayton/update-license-checker-rules
John Kessenich [Fri, 17 Jul 2020 13:33:14 +0000 (20:33 +0700)]
Merge pull request #2350 from ben-clayton/update-license-checker-rules

Add new rules for update of license-checker

4 years agoAdd new rules for update of license-checker
Ben Clayton [Fri, 17 Jul 2020 10:58:54 +0000 (11:58 +0100)]
Add new rules for update of license-checker

`license-checker` will be updated to support `**` based wildcards. As part of this, `license-checker` will now traverse into subdirectories that would previously be excluded when the parent directory is excluded.

This change adds new rules that work with both the old version and new, to ease migration.

4 years agoMerge pull request #2349 from KhronosGroup/return-precision
John Kessenich [Thu, 16 Jul 2020 07:36:51 +0000 (14:36 +0700)]
Merge pull request #2349 from KhronosGroup/return-precision

GLSL/SPV: Propagaet precision qualifier from function to return value.

4 years agoGLSL/SPV: Propagaet precision qualifier from function to return value.
John Kessenich [Thu, 16 Jul 2020 05:38:47 +0000 (23:38 -0600)]
GLSL/SPV: Propagaet precision qualifier from function to return value.

When a return value's type has no precision qualification (e.g., the return
expression is formed from a constructor), and the formal function return type
has a precision qualification, back propagate that from the return type to the
type of the return value's expression.

4 years agoMerge pull request #2347 from ben-clayton/runtests
John Kessenich [Thu, 16 Jul 2020 02:45:50 +0000 (09:45 +0700)]
Merge pull request #2347 from ben-clayton/runtests

runtests: Check error codes, set LD_LIBRARY_PATH

4 years agoruntests: Check error codes, set LD_LIBRARY_PATH
Ben Clayton [Tue, 14 Jul 2020 11:56:26 +0000 (12:56 +0100)]
runtests: Check error codes, set LD_LIBRARY_PATH

`glslangValidator` will only return [the codes 0..6](https://github.com/KhronosGroup/glslang/blob/b481744aea1ecf52ee4591afaa0f5e270b9d1636/StandAlone/StandAlone.cpp#L117-L125). Fail the test if anything else is returned (like due to the exe crashing).

Also set `LD_LIBRARY_PATH` to contain the `lib` directory before calling glslang.

4 years agoMerge pull request #2335 from ben-clayton/kokoro-bazel-test-output
John Kessenich [Tue, 14 Jul 2020 09:11:43 +0000 (16:11 +0700)]
Merge pull request #2335 from ben-clayton/kokoro-bazel-test-output

Kokoro: Print test output to stdout

4 years agoMerge pull request #2344 from ben-clayton/build_info-x
John Kessenich [Tue, 14 Jul 2020 09:11:04 +0000 (16:11 +0700)]
Merge pull request #2344 from ben-clayton/build_info-x

Give build_info.py the executable bit

4 years agoGive build_info.py the executable bit
Ben Clayton [Tue, 14 Jul 2020 09:09:51 +0000 (10:09 +0100)]
Give build_info.py the executable bit

4 years agoMerge pull request #2343 from KhronosGroup/fix-non-determinism
John Kessenich [Tue, 14 Jul 2020 08:13:22 +0000 (15:13 +0700)]
Merge pull request #2343 from KhronosGroup/fix-non-determinism

Fix recently found non-determinism with gl_WorldToObject3x4EXT.

4 years agoFix recently found non-determinism with gl_WorldToObject3x4EXT.
John Kessenich [Tue, 14 Jul 2020 07:44:35 +0000 (01:44 -0600)]
Fix recently found non-determinism with gl_WorldToObject3x4EXT.

4 years agoMerge pull request #2339 from ben-clayton/cmake-project
John Kessenich [Tue, 14 Jul 2020 07:12:15 +0000 (14:12 +0700)]
Merge pull request #2339 from ben-clayton/cmake-project

CMake: Move project() to top of CMakeLists.txt

4 years agoMerge pull request #2341 from ben-clayton/bison-license
John Kessenich [Tue, 14 Jul 2020 07:07:21 +0000 (14:07 +0700)]
Merge pull request #2341 from ben-clayton/bison-license

Add bison license to LICENSE.txt

4 years agoNon-determinism: Remove test file that seems to trigger non-determinism.
John Kessenich [Tue, 14 Jul 2020 06:32:25 +0000 (00:32 -0600)]
Non-determinism: Remove test file that seems to trigger non-determinism.

This problem needs to be fixed, but in parallel, we need to see master
and any other changes to it passing all tests.

The removed test is ray-tracing centric, and may indicate non-determinism
in recent code added for that functionality.

4 years agoAdd bison license to LICENSE.txt
Ben Clayton [Mon, 13 Jul 2020 19:32:09 +0000 (20:32 +0100)]
Add bison license to LICENSE.txt

4 years agoCMake: Move project() to top of CMakeLists.txt
Ben Clayton [Mon, 13 Jul 2020 18:14:02 +0000 (19:14 +0100)]
CMake: Move project() to top of CMakeLists.txt

Also remove `NOTICE` from message() about PCHs - it seems to print this in the actual message, contrary to the documentation where it is used as a severity.

4 years agoKokoro: Print test output to stdout
Ben Clayton [Mon, 13 Jul 2020 09:12:06 +0000 (10:12 +0100)]
Kokoro: Print test output to stdout

4 years agoMerge pull request #2337 from KhronosGroup/revert-ANGLE
John Kessenich [Mon, 13 Jul 2020 10:34:05 +0000 (17:34 +0700)]
Merge pull request #2337 from KhronosGroup/revert-ANGLE

Revert "Merge pull request #2330 from ShabbyX/optimize_for_angle"