platform/upstream/glslang.git
2 years agoFix WavePrefixCountBits() being off by one.
Ryp [Thu, 21 Apr 2022 19:05:17 +0000 (22:05 +0300)]
Fix WavePrefixCountBits() being off by one.

It was counting bits up to the current lane included, whereas the
documentation says it should be excluded. This now matches dxc's behavior
as well.

Fix #2929

2 years agoMerge pull request #2927 from ggfan/ndk-env-variable-update
Greg Fischer [Fri, 15 Apr 2022 16:45:00 +0000 (10:45 -0600)]
Merge pull request #2927 from ggfan/ndk-env-variable-update

Change ANDROID_NDK_ROOT to ANDROID_NDK_HOME in README.md

2 years agoChange ANDROID_NDK_ROOT to ANDROID_NDK_HOME in README.md
Gerry Fan [Wed, 13 Apr 2022 17:08:51 +0000 (17:08 +0000)]
Change ANDROID_NDK_ROOT to ANDROID_NDK_HOME in README.md

2 years agoMerge pull request #2925 from SpaceIm/fix-mingw
Greg Fischer [Fri, 8 Apr 2022 00:33:03 +0000 (18:33 -0600)]
Merge pull request #2925 from SpaceIm/fix-mingw

CMake: fix MinGW build

2 years agofix MinGW
SpaceIm [Thu, 7 Apr 2022 19:18:27 +0000 (21:18 +0200)]
fix MinGW

pre compiled headers leads to "internal error in mingw32_gt_pch_use_address, at config/i386/host-mingw32.c:192: MapViewOfFileEx: Attempt to access invalid address"

2 years agoMerge pull request #2924 from greg-lunarg/r.11.9.0a
Greg Fischer [Wed, 6 Apr 2022 19:42:55 +0000 (13:42 -0600)]
Merge pull request #2924 from greg-lunarg/r.11.9.0a

Release 11.9.0

2 years agoRelease 11.9.0
Greg Fischer [Wed, 6 Apr 2022 18:21:33 +0000 (12:21 -0600)]
Release 11.9.0

2 years agoMerge pull request #2923 from greg-lunarg/kg123
Greg Fischer [Wed, 6 Apr 2022 19:01:04 +0000 (13:01 -0600)]
Merge pull request #2923 from greg-lunarg/kg123

Update spirv-tools known good

2 years agoUpdate spirv-tools known good
Greg Fischer [Wed, 6 Apr 2022 18:00:57 +0000 (12:00 -0600)]
Update spirv-tools known good

2 years agoMerge pull request #2915 from EdoardoLuciani/master
Greg Fischer [Mon, 28 Mar 2022 18:07:30 +0000 (12:07 -0600)]
Merge pull request #2915 from EdoardoLuciani/master

Update README.md with ray tracing shader stages filename extensions

2 years agoMerge pull request #2917 from greg-lunarg/i2907
Greg Fischer [Mon, 28 Mar 2022 18:04:17 +0000 (12:04 -0600)]
Merge pull request #2917 from greg-lunarg/i2907

Improved comment for glslang_optimization_level_t

2 years agoImproved comment for glslang_optimization_level_t
Greg Fischer [Mon, 28 Mar 2022 17:34:40 +0000 (11:34 -0600)]
Improved comment for glslang_optimization_level_t

2 years agoUpdate README.md
Edoardo Luciani [Sat, 26 Mar 2022 15:26:46 +0000 (15:26 +0000)]
Update README.md

2 years agoMerge pull request #2913 from greg-lunarg/i2905
Greg Fischer [Fri, 25 Mar 2022 21:56:18 +0000 (15:56 -0600)]
Merge pull request #2913 from greg-lunarg/i2905

Generate Int8, Int16 and Float16 capabilities for constants

2 years agoGenerate Int8, Int16 and Float16 capabilities for constants
Greg Fischer [Fri, 25 Mar 2022 20:36:01 +0000 (14:36 -0600)]
Generate Int8, Int16 and Float16 capabilities for constants

Fixes #2905

2 years agoMerge pull request #2851 from chaoticbob/version-override
Greg Fischer [Thu, 24 Mar 2022 23:51:54 +0000 (17:51 -0600)]
Merge pull request #2851 from chaoticbob/version-override

Added GLSL version override functionality and CLI

2 years agoUpdate glsl.versionOverride.vert
Greg Fischer [Thu, 24 Mar 2022 22:41:52 +0000 (16:41 -0600)]
Update glsl.versionOverride.vert

Change shader original version to 110

2 years agoUpdate glsl.versionOverride.tese
Greg Fischer [Thu, 24 Mar 2022 22:41:15 +0000 (16:41 -0600)]
Update glsl.versionOverride.tese

Change shader original version to 110

2 years agoUpdate glsl.versionOverride.tesc
Greg Fischer [Thu, 24 Mar 2022 22:40:18 +0000 (16:40 -0600)]
Update glsl.versionOverride.tesc

Change original shader to version 110

2 years agoUpdate glsl.versionOverride.geom
Greg Fischer [Thu, 24 Mar 2022 22:39:34 +0000 (16:39 -0600)]
Update glsl.versionOverride.geom

Change original shader to version 110

2 years agoUpdate glsl.versionOverride.frag
Greg Fischer [Thu, 24 Mar 2022 22:37:42 +0000 (16:37 -0600)]
Update glsl.versionOverride.frag

Change original shader to version 110

2 years agoUpdate glsl.versionOverride.comp
Greg Fischer [Thu, 24 Mar 2022 22:36:48 +0000 (16:36 -0600)]
Update glsl.versionOverride.comp

Change original shader to version 110

2 years agoMerge pull request #2912 from greg-lunarg/edic1
Greg Fischer [Thu, 24 Mar 2022 19:43:40 +0000 (13:43 -0600)]
Merge pull request #2912 from greg-lunarg/edic1

Add eliminate-dead-input-components to -Os

2 years agoMerge pull request #2908 from Biswa96/cmake-spirv-remap
Greg Fischer [Thu, 24 Mar 2022 19:25:38 +0000 (13:25 -0600)]
Merge pull request #2908 from Biswa96/cmake-spirv-remap

cmake: Install SPVRemapper runtime library

2 years agoAdd eliminate-dead-input-components to -Os
Greg Fischer [Thu, 24 Mar 2022 18:13:59 +0000 (12:13 -0600)]
Add eliminate-dead-input-components to -Os

2 years agoMerge pull request #2911 from greg-lunarg/kg122
Greg Fischer [Thu, 24 Mar 2022 18:12:40 +0000 (12:12 -0600)]
Merge pull request #2911 from greg-lunarg/kg122

Update spirv-tools and spirv-headers known good

2 years agoUpdate spirv-tools and spirv-headers known good
Greg Fischer [Thu, 24 Mar 2022 16:23:19 +0000 (10:23 -0600)]
Update spirv-tools and spirv-headers known good

To pick up support for spirv-opt --eliminate-dead-input-components

2 years agoMerge pull request #2906 from apanteleev/escape-deps
Greg Fischer [Wed, 23 Mar 2022 17:43:43 +0000 (11:43 -0600)]
Merge pull request #2906 from apanteleev/escape-deps

Make depfiles compatible with Windows paths

2 years agoPrevent Push Constant blocks being an array (#2904)
sfricke-samsung [Wed, 23 Mar 2022 17:42:21 +0000 (12:42 -0500)]
Prevent Push Constant blocks being an array (#2904)

* Prevent Push Constant blocks being an array

* Add push constant array error test

Co-authored-by: Greg Fischer <greg@lunarg.com>
2 years agoMerge pull request #2902 from ZhiqianXia/gl_FragCoord
Greg Fischer [Mon, 21 Mar 2022 18:03:34 +0000 (12:03 -0600)]
Merge pull request #2902 from ZhiqianXia/gl_FragCoord

The first redeclarations of gl_FragCoord must appear before any use.

2 years agocmake: Install SPVRemapper runtime library
Biswapriyo Nath [Tue, 15 Mar 2022 13:56:57 +0000 (19:26 +0530)]
cmake: Install SPVRemapper runtime library

This installs SPVRemapper.dll file which was missing previously.

2 years agoEscape the characters that Make considers special in the dependency files.
Alexey Panteleev [Sat, 12 Mar 2022 01:56:15 +0000 (17:56 -0800)]
Escape the characters that Make considers special in the dependency files.

2 years agoThe first redeclarations of gl_FragCoord must appear before any
ZhiqianXia [Wed, 2 Mar 2022 11:54:33 +0000 (19:54 +0800)]
The first redeclarations of gl_FragCoord must appear before any
use of gl_FragCoord.

2 years agoMerge pull request #2897 from ZhiqianXia/origin_upper_left
Greg Fischer [Tue, 1 Mar 2022 21:50:55 +0000 (14:50 -0700)]
Merge pull request #2897 from ZhiqianXia/origin_upper_left

Fix the issue for GL_ARB_fragment_coord_conventions extension.

2 years ago1. refine the check for "origin_upper_left" and "pixel_center_integer"
ZhiqianXia [Tue, 1 Mar 2022 07:06:04 +0000 (15:06 +0800)]
1. refine the check for "origin_upper_left" and "pixel_center_integer"
2. gl_FragCoord can be used at ogl140 with extension "GL_ARB_fragment_coord_conventions".

Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
2 years agoMerge pull request #2895 from greg-lunarg/i2894
Greg Fischer [Fri, 25 Feb 2022 00:57:22 +0000 (17:57 -0700)]
Merge pull request #2895 from greg-lunarg/i2894

Don't do updatePrecision on float16_t operations

2 years agoDon't do updatePrecision on float16_t operations
Greg Fischer [Thu, 24 Feb 2022 20:50:41 +0000 (13:50 -0700)]
Don't do updatePrecision on float16_t operations

float16_t does not take GLSL precisions and SPIR-V does not
support RelaxedPrecision on float16_t.

Fixes #2894

2 years agoMerge pull request #2892 from greg-lunarg/mb
Greg Fischer [Wed, 23 Feb 2022 23:34:36 +0000 (16:34 -0700)]
Merge pull request #2892 from greg-lunarg/mb

Improve error message for image/sampler functions under enhanced-msgs

2 years agoImprove error message for image/sampler functions for enhanced-msgs
Greg Fischer [Fri, 18 Feb 2022 22:08:28 +0000 (15:08 -0700)]
Improve error message for image/sampler functions for enhanced-msgs

For recent GLSL versions, if texture2D function call appears, the error
message reports an unsupported type constructor. Change message to
unsupported function. Likewise for other removed texture* function calls.

2 years agoMerge pull request #2891 from dneto0/hlsl-namespace
Greg Fischer [Wed, 16 Feb 2022 23:15:20 +0000 (16:15 -0700)]
Merge pull request #2891 from dneto0/hlsl-namespace

Fix Test/hlsl.namespace.frag test case

2 years agoFix Test/hlsl.namespace.frag test case
David Neto [Wed, 16 Feb 2022 22:10:29 +0000 (17:10 -0500)]
Fix Test/hlsl.namespace.frag test case

Before this change, the example is rejected by DXC:

$ dxc -T ps_6_0 hlsl.namespace.frag
hlsl.namespace.frag:22:73: error: call to non-static member function
without an object argument
    return N1::getVec() + N2::getVec() + N2::N3::getVec() + N2::N3::C1::getVec() * N2::gf;
                                                                ~~~~~~~~~~~~^~~~~~

The call to the class member function requires an object, or we ned to
make the function static.  This update makes the function static.

This also fixes SPIR-V validation: without this change the call
to that getVec does not have enough arguments:

error: line 69: OpFunctionCall Function <id>'s parameter count does not
match the argument count.
  %43 = OpFunctionCall %v4float %N2__N3__C1__getVec_

2 years agoMerge pull request #2888 from mrpippy/python3
Greg Fischer [Thu, 10 Feb 2022 21:16:44 +0000 (14:16 -0700)]
Merge pull request #2888 from mrpippy/python3

Explicitly use Python 3 for scripts

2 years agoMerge pull request #2887 from mbechard/master
Greg Fischer [Thu, 10 Feb 2022 18:57:37 +0000 (11:57 -0700)]
Merge pull request #2887 from mbechard/master

avoid leaving decorations on auto-push-constants

2 years agoExplicitly use Python 3 for scripts
Brendan Shanks [Thu, 10 Feb 2022 17:24:03 +0000 (09:24 -0800)]
Explicitly use Python 3 for scripts

2 years agoavoid leaving decorations on auto-push-constants
Malcolm Bechard [Wed, 9 Feb 2022 23:44:22 +0000 (18:44 -0500)]
avoid leaving decorations on auto-push-constants

uniform blocks that are upgraded to push_constants shouldn't have
set/binding etc. decorations applied to them

2 years agoMerge pull request #2886 from greg-lunarg/i2875
Greg Fischer [Mon, 7 Feb 2022 20:09:13 +0000 (13:09 -0700)]
Merge pull request #2886 from greg-lunarg/i2875

Fix sameElementShape test of sampler

2 years agoFix sameElementShape test of sampler
Greg Fischer [Mon, 7 Feb 2022 19:15:31 +0000 (12:15 -0700)]
Fix sameElementShape test of sampler

There is apparently a hole in the initialization of sampler in TType
so that a simple comparison which should pass might fail. Until the
hole is found, also test that both types are samplers before comparing
the sampler field for equality.

Fixes #2875

2 years agoMerge pull request #2885 from greg-lunarg/kg121
Greg Fischer [Thu, 3 Feb 2022 16:26:44 +0000 (09:26 -0700)]
Merge pull request #2885 from greg-lunarg/kg121

Update spirv-tools known good

2 years agoUpdate spirv-tools known good
Greg Fischer [Thu, 3 Feb 2022 01:37:43 +0000 (18:37 -0700)]
Update spirv-tools known good

Picking up some spirv-tools bug fixes

2 years agoMerge pull request #2883 from greg-lunarg/link2
Greg Fischer [Tue, 1 Feb 2022 22:47:19 +0000 (15:47 -0700)]
Merge pull request #2883 from greg-lunarg/link2

Enhance readability of error messages for GLSL

2 years agoMerge pull request #2874 from mbechard/master
Greg Fischer [Tue, 1 Feb 2022 22:46:25 +0000 (15:46 -0700)]
Merge pull request #2874 from mbechard/master

fix cases where symbols in the tree didn't get updated during block merging

2 years agoEnhance readability of error messages for GLSL
Greg Fischer [Thu, 30 Dec 2021 18:56:57 +0000 (11:56 -0700)]
Enhance readability of error messages for GLSL

Specifically, make GLSL link error messages more specific and output
only information relevant to the error.

Also change type printing to more closely reflect GLSL syntax. This
is the default for link error messages, but must me enabled with the
new option --enhanced-msgs for compilation error messages.

Also with --enhanced-msgs, only emit one error message per source
line.

2 years agofix cases where symbols in the tree didn't get updated during block merging
Malcolm Bechard [Wed, 26 Jan 2022 02:31:31 +0000 (21:31 -0500)]
fix cases where symbols in the tree didn't get updated during block merging

For GL_EXT_vulkan_glsl_relaxed. When merging the default uniform block,
there were cases where symbols in the tree wern't updated to match the
new block structure after merging blocks together.

This change traverses the symbol tree and updates any references to the
merged block.

2 years agoMerge pull request #2879 from greg-lunarg/vulkan-1.3-B
Greg Fischer [Thu, 27 Jan 2022 20:21:18 +0000 (13:21 -0700)]
Merge pull request #2879 from greg-lunarg/vulkan-1.3-B

Release 11.8.0

2 years agoRelease 11.8.0
Greg Fischer [Thu, 27 Jan 2022 19:23:47 +0000 (12:23 -0700)]
Release 11.8.0

2 years agoMerge pull request #2878 from greg-lunarg/vulkan-1.3-A
Greg Fischer [Thu, 27 Jan 2022 19:13:43 +0000 (12:13 -0700)]
Merge pull request #2878 from greg-lunarg/vulkan-1.3-A

Fix size_t to int warning

2 years agoFix size_t to int warning
Greg Fischer [Thu, 27 Jan 2022 18:39:19 +0000 (11:39 -0700)]
Fix size_t to int warning

2 years agoMerge pull request #2876 from greg-lunarg/vulkan-1.3
Greg Fischer [Thu, 27 Jan 2022 17:09:36 +0000 (10:09 -0700)]
Merge pull request #2876 from greg-lunarg/vulkan-1.3

Add Vulkan 1.3 support

2 years agoAdd Vulkan 1.3 support
Greg Fischer [Wed, 26 Jan 2022 21:45:58 +0000 (14:45 -0700)]
Add Vulkan 1.3 support

Also update known goods to Vulkan 1.3 support
Also re-enable SPIR-V 1.6 tests with vulkan1.3 target
Also re-cache SPIRV 1.6 header which somehow regressed back to 1.5

2 years agoMerge pull request #2873 from greg-lunarg/i2872
Greg Fischer [Wed, 26 Jan 2022 00:44:03 +0000 (17:44 -0700)]
Merge pull request #2873 from greg-lunarg/i2872

Fix comment for setEnvInput()

2 years agoFix comment for setEnvInput()
Greg Fischer [Tue, 25 Jan 2022 20:40:07 +0000 (13:40 -0700)]
Fix comment for setEnvInput()

Specifically, add text to clarify dialect and dialectVersion

Fixes #2872

2 years agoMerge pull request #2852 from gnoliyil/fuchsia
Greg Fischer [Thu, 13 Jan 2022 21:36:29 +0000 (14:36 -0700)]
Merge pull request #2852 from gnoliyil/fuchsia

build: Make action targets hermetic

2 years agoMerge pull request #2868 from ben-clayton/patch-1
Greg Fischer [Thu, 13 Jan 2022 21:35:16 +0000 (14:35 -0700)]
Merge pull request #2868 from ben-clayton/patch-1

Update LICENSE.txt

2 years agoUpdate LICENSE.txt
Ben Clayton [Thu, 13 Jan 2022 12:14:34 +0000 (12:14 +0000)]
Update LICENSE.txt

Expand the GPL 3 with special bison exception to the fully expanded license.

Required for Google's updated license checker.

2 years agoMerge pull request #2866 from greg-lunarg/i2858
Greg Fischer [Tue, 11 Jan 2022 21:36:01 +0000 (14:36 -0700)]
Merge pull request #2866 from greg-lunarg/i2858

Temporarily disable spirv1.6 tests

2 years agoTemporarily disable spirv1.6 tests
Greg Fischer [Tue, 11 Jan 2022 20:13:50 +0000 (13:13 -0700)]
Temporarily disable spirv1.6 tests

These tests will be re-enabled when a Vulkan version is released that
supports spirv1.6.

Fixes #2858

2 years agoMerge pull request #2862 from n-morales/2861-macos-gcc-build-failures
Greg Fischer [Tue, 11 Jan 2022 18:42:11 +0000 (11:42 -0700)]
Merge pull request #2862 from n-morales/2861-macos-gcc-build-failures

#2861 macos gcc build failures

2 years ago#2861: If compiling with macOS and GCC, default ENABLE_PCH to false since CMake will...
Nicolas Morales [Tue, 11 Jan 2022 10:40:54 +0000 (11:40 +0100)]
#2861: If compiling with macOS and GCC, default ENABLE_PCH to false since CMake will generate incompatible Xarch flags for the precompiled headers

2 years ago#2861: Check for macOS systems before adding "--no-undefined" to linker flags as...
Nicolas Morales [Tue, 11 Jan 2022 10:40:50 +0000 (11:40 +0100)]
#2861: Check for macOS systems before adding "--no-undefined" to linker flags as it is not compatible with the default linker.

2 years agoMerge pull request #2853 from ZhiqianXia/EndStreamPrimitive
Greg Fischer [Mon, 10 Jan 2022 20:04:15 +0000 (13:04 -0700)]
Merge pull request #2853 from ZhiqianXia/EndStreamPrimitive

EndStreamPrimitive not supported when there is #extension GL_ARB_gpu_shader5

2 years agoMerge pull request #2864 from scribam/cmake-install-prefix
Greg Fischer [Mon, 10 Jan 2022 19:27:51 +0000 (12:27 -0700)]
Merge pull request #2864 from scribam/cmake-install-prefix

Override CMAKE_INSTALL_PREFIX only if ENABLE_GLSLANG_INSTALL is ON

2 years agoMerge branch 'master' into EndStreamPrimitive
Greg Fischer [Mon, 10 Jan 2022 18:49:19 +0000 (11:49 -0700)]
Merge branch 'master' into EndStreamPrimitive

2 years agoMerge pull request #2865 from alan-baker/update-license
Greg Fischer [Mon, 10 Jan 2022 18:15:41 +0000 (11:15 -0700)]
Merge pull request #2865 from alan-baker/update-license

Add missing license to LICENSE.txt

2 years agoAdd missing license to LICENSE.txt
Alan Baker [Mon, 10 Jan 2022 15:38:49 +0000 (10:38 -0500)]
Add missing license to LICENSE.txt

* This license is used by:
  * SPIRV/GLSL.ext.AMD.h
  * SPIRV/GLSL.ext.EXT.h
  * SPIRV/GLSL.ext.KHR.h
  * SPIRV/GLSL.ext.NV.h

2 years agoAdded missing test result
Hai Nguyen [Mon, 10 Jan 2022 14:56:54 +0000 (09:56 -0500)]
Added missing test result

2 years agoAdded initial tests for --glsl-version
Hai Nguyen [Mon, 10 Jan 2022 14:43:44 +0000 (09:43 -0500)]
Added initial tests for --glsl-version

- Added compilation tests for shader stages using a different
  version at each stage.

2 years agoOverride CMAKE_INSTALL_PREFIX only if ENABLE_GLSLANG_INSTALL is ON
scribam [Sun, 9 Jan 2022 21:28:45 +0000 (22:28 +0100)]
Override CMAKE_INSTALL_PREFIX only if ENABLE_GLSLANG_INSTALL is ON

2 years agoMerge pull request #2859 from ZhiqianXia/floatBitsToInt
Greg Fischer [Fri, 7 Jan 2022 21:38:42 +0000 (14:38 -0700)]
Merge pull request #2859 from ZhiqianXia/floatBitsToInt

Support the floatBitsToint function at GL_ARB_gpu_shader5 Extension.

2 years agoSupport the floatBitsToint function at GL_ARB_gpu_shader5 Extension.
ZhiqianXia [Fri, 7 Jan 2022 05:50:30 +0000 (13:50 +0800)]
Support the floatBitsToint function at GL_ARB_gpu_shader5 Extension.

2 years agoMerge pull request #2847 from jeremy-lunarg/hayes-fix-issue-2846
Greg Fischer [Wed, 5 Jan 2022 18:34:32 +0000 (11:34 -0700)]
Merge pull request #2847 from jeremy-lunarg/hayes-fix-issue-2846

Unblock unsized error from assert

2 years agoMerge pull request #2857 from jeremy-lunarg/hayes-fix-warnings
Greg Fischer [Wed, 5 Jan 2022 18:30:08 +0000 (11:30 -0700)]
Merge pull request #2857 from jeremy-lunarg/hayes-fix-warnings

Fix GCC sign-compare warnings

2 years agoUnblock unsized error from assert
Jeremy Hayes [Thu, 23 Dec 2021 21:53:44 +0000 (14:53 -0700)]
Unblock unsized error from assert

Fix issue #2846.

2 years agoFix GCC sign-compare warnings
Jeremy Hayes [Wed, 5 Jan 2022 02:55:41 +0000 (19:55 -0700)]
Fix GCC sign-compare warnings

2 years agoEndStreamPrimitive not supported when there is #extension GL_ARB_gpu_shader5
ZhiqianXia [Tue, 4 Jan 2022 02:40:04 +0000 (10:40 +0800)]
EndStreamPrimitive not supported when there is #extension GL_ARB_gpu_shader5

Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
2 years agoMerge pull request #2800 from mhillenbrand/string_literal_endianness
Greg Fischer [Tue, 4 Jan 2022 00:57:38 +0000 (17:57 -0700)]
Merge pull request #2800 from mhillenbrand/string_literal_endianness

Fix encoding/decoding of string literals for big-endian systems

2 years agoMerge pull request #2849 from jeremy-lunarg/hayes-fix-issue-2848
Greg Fischer [Mon, 3 Jan 2022 23:39:45 +0000 (16:39 -0700)]
Merge pull request #2849 from jeremy-lunarg/hayes-fix-issue-2848

Fix seg fault

2 years agoRevisions to GLSL version override
Hai Nguyen [Sun, 2 Jan 2022 00:02:14 +0000 (19:02 -0500)]
Revisions to GLSL version override

- Reverted public function interface changes for C++.
- Added override member variable to TShader.
- Added accessor TShader::setOverrideVersion.
- Reverted changes to tests.

2 years agobuild: Make action targets hermetic
Yilong Li [Sat, 1 Jan 2022 23:08:35 +0000 (15:08 -0800)]
build: Make action targets hermetic

Fuchsia GN build requires all "action" targets to be
hermetic, and they should correctly and fully state
their inputs and ouptuts in "sources" and "outputs"
fields (see https://fuchsia.dev/fuchsia-src/development/build/hermetic_actions
for details).

This change adds "sources" field to "glslang_extension_headers"
build target so that it states all its input files in its
GN target build rule.

TEST=fx set workstation.x64 --args=build_should_trace_actions=true
     fx build

Bug: 90846
Change-Id: I63bd5d03cee86d93b0bb7cf2cee95c5ae0d98f93

2 years agoUpdated gtests preprocess()and parse() calls with arg for new parameter
Hai Nguyen [Sat, 1 Jan 2022 09:44:06 +0000 (04:44 -0500)]
Updated gtests preprocess()and parse() calls with arg for new parameter

2 years agoAdded GLSL version override interface and CLI
Hai Nguyen [Sat, 1 Jan 2022 09:18:41 +0000 (04:18 -0500)]
Added GLSL version override interface and CLI

This change list allows a user to override the GLSL version from the
command line or through the C and C++ interfaces. This will override the
override happens in ProcessDeferred() before DeduceVersionProfile() so
the process should still error out if the version is insufficient for
the shader code.

- Added --glsl-version <version> to CLI.
- Added parameter to route glslVersion as override version to
  preprocessor and parse functions to C++ interface.
- Updated C interface with function to override GLSL version.

2 years agoFix seg fault
Jeremy Hayes [Tue, 28 Dec 2021 22:17:39 +0000 (15:17 -0700)]
Fix seg fault

Check types before accessing typeName.

Fix #2848.

2 years agoMerge pull request #2845 from greg-lunarg/sup1.6
Greg Fischer [Thu, 16 Dec 2021 22:32:54 +0000 (15:32 -0700)]
Merge pull request #2845 from greg-lunarg/sup1.6

Add support for spirv1.6

2 years agoAdd support for spirv1.6
Greg Fischer [Thu, 2 Sep 2021 23:37:39 +0000 (17:37 -0600)]
Add support for spirv1.6

Add command line support which enables the following behavior:

- Remap discard

  Map discard to DemoteToHelperInvocation for HLSL shaders. Map to
  OpTerminateInvocation for GLSL shaders.

- Decorate HelperInvocation with Volatile

- Use localSizeId for execution mode

  WorkGroupSize is deprecated in spirv1.6

Also update known goods to SPIRV 1.6

2 years agoMerge pull request #2844 from greg-lunarg/hdr1.6
Greg Fischer [Thu, 16 Dec 2021 21:48:18 +0000 (14:48 -0700)]
Merge pull request #2844 from greg-lunarg/hdr1.6

Pickup header for SPIR-V 1.6

2 years agoPickup header for SPIR-V 1.6
Greg Fischer [Thu, 16 Dec 2021 18:37:39 +0000 (11:37 -0700)]
Pickup header for SPIR-V 1.6

2 years agoMerge pull request #2840 from alelenv/no_location2
Greg Fischer [Thu, 9 Dec 2021 18:45:32 +0000 (11:45 -0700)]
Merge pull request #2840 from alelenv/no_location2

Do not output location decoration for certain variables in ray tracing storage classes.

2 years agoMerge pull request #2836 from chaoticbob/vulkan_rules_relaxed
Greg Fischer [Tue, 7 Dec 2021 23:12:05 +0000 (16:12 -0700)]
Merge pull request #2836 from chaoticbob/vulkan_rules_relaxed

Vulkan rules relaxed for glslang C interface

2 years agoMerge pull request #2841 from greg-lunarg/i2244a
Greg Fischer [Tue, 7 Dec 2021 23:10:28 +0000 (16:10 -0700)]
Merge pull request #2841 from greg-lunarg/i2244a

Fix --hlsl-dx-position-w to work for SV_Position embedded in struct

2 years agoFix --hlsl-dx-position-w to work for SV_Position embedded in struct
Greg Fischer [Tue, 7 Dec 2021 21:33:09 +0000 (14:33 -0700)]
Fix --hlsl-dx-position-w to work for SV_Position embedded in struct

Fixes #2244

2 years agoDo not output location decoration for certain variables in ray tracing storage
Ashwin Lele [Mon, 6 Dec 2021 21:09:03 +0000 (13:09 -0800)]
Do not output location decoration for certain variables in ray tracing storage
classes.