platform/upstream/glslang.git
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 #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 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 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 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.

2 years agoMerge pull request #2838 from jeremy-lunarg/hayes-remove-badge
Greg Fischer [Thu, 2 Dec 2021 16:48:16 +0000 (09:48 -0700)]
Merge pull request #2838 from jeremy-lunarg/hayes-remove-badge

Remove unnecessary badge

2 years agoRemove unnecessary badge
Jeremy Hayes [Wed, 1 Dec 2021 18:40:11 +0000 (11:40 -0700)]
Remove unnecessary badge

I had copy/pasted this badge without really thinking about it's
usefulness. It is unnecessary.

2 years agoFixed copy/paste error
Hai Nguyen [Wed, 1 Dec 2021 17:32:02 +0000 (12:32 -0500)]
Fixed copy/paste error

2 years agoChanged Vulkan rules relaxed to use shader options
Hai Nguyen [Wed, 1 Dec 2021 08:55:59 +0000 (03:55 -0500)]
Changed Vulkan rules relaxed to use shader options

- Removed vulkan_rules_relaxed from glslang_input_s
- Added GLSLANG_SHADER_VULKAN_RULES_RELAXED to glslang_shader_options_t
- Modified glslang_shader_set_options to handle new enum value
- Corrected enum value for GLSLANG_SHADER_AUTO_MAP_LOCATIONS

2 years agoMerge pull request #2830 from jeremy-lunarg/hayes-migrate-travis-to-github-actions
Greg Fischer [Tue, 30 Nov 2021 21:10:58 +0000 (14:10 -0700)]
Merge pull request #2830 from jeremy-lunarg/hayes-migrate-travis-to-github-actions

Migrate travis to github actions

2 years agoVulkan rules relaxed for glslang C interface
Hai Nguyen [Tue, 30 Nov 2021 09:55:25 +0000 (04:55 -0500)]
Vulkan rules relaxed for glslang C interface

- Added vulkan_rules_relaxed flag to glslang_input_t to turn on Vulkan
  rules relaxed during shader creation.

2 years agoSupport for automap options and resource binding shift (#2834)
Hai Nguyen [Mon, 29 Nov 2021 21:23:01 +0000 (16:23 -0500)]
Support for automap options and resource binding shift (#2834)

* Support for automap options

- Added glslang_shader_options_t with enums for auto map bindings and
  auto map locations.
- Added options param to glslang_shader_parse.
- Modified glslang_shader_parse to call appropriate auto map function if
  auto map bits are set.

* Refactored auto map for C interface

- Added glslang_shader_set_options to independently set options instead
  of being a param on an existing function.
- Added glslang_program_map_io to call mapIO so auto map location
  actually works.

* Added support for shifting resource bindings

- Added resource binding shift functions to match C++ interface

* Uncommented preprocessor call that was commented out for debugging

2 years agoMerge pull request #2832 from amdrexu/bugfix
Greg Fischer [Mon, 29 Nov 2021 21:20:51 +0000 (14:20 -0700)]
Merge pull request #2832 from amdrexu/bugfix

Fix validation failures of test cases regarding GL_EXT_spirv_intrinsics

2 years agoFix validation failures of test cases regarding GL_EXT_spirv_intrinsics
Rex Xu [Wed, 24 Nov 2021 09:37:52 +0000 (17:37 +0800)]
Fix validation failures of test cases regarding GL_EXT_spirv_intrinsics

1. The test cases of OpReadClockKHR is invalid. The return type is
   unsigned integer rather than signed integer.
2. When SPIR-V decorate or SPIR-V type is specified, we should avoid
   auto location mapping because the semantics are totally decided by
   SPIR-V tokens.

2 years agoMerge pull request #2720 from ZhiqianXia/GL_ARB_fragment_coord_conventions
Greg Fischer [Wed, 24 Nov 2021 21:16:45 +0000 (14:16 -0700)]
Merge pull request #2720 from ZhiqianXia/GL_ARB_fragment_coord_conventions

Support the #extension GL_ARB_fragment_coord_conventions.

2 years agoMerge branch 'master' into GL_ARB_fragment_coord_conventions
Greg Fischer [Wed, 24 Nov 2021 18:52:08 +0000 (11:52 -0700)]
Merge branch 'master' into GL_ARB_fragment_coord_conventions

2 years agoMerge pull request #2831 from amdrexu/bugfix
Greg Fischer [Tue, 23 Nov 2021 20:39:57 +0000 (13:39 -0700)]
Merge pull request #2831 from amdrexu/bugfix

Fix an issue of spirv_by_reference

2 years agoFix an issue of spirv_by_reference
Rex Xu [Tue, 23 Nov 2021 08:40:45 +0000 (16:40 +0800)]
Fix an issue of spirv_by_reference

When using this qualifier for a parameter, we make it as a pointer.
However, the function TranslateStorageClass() is therefore called and
the storage class should only be set to Function when it is invoked
to translate parameter types rather than actual argument types.

2 years agoMigrate travis to github actions
Jeremy Hayes [Fri, 17 Sep 2021 20:06:48 +0000 (14:06 -0600)]
Migrate travis to github actions

2 years agoMerge pull request #2723 from ZhiqianXia/textureQueryLOD
Greg Fischer [Mon, 22 Nov 2021 22:21:33 +0000 (15:21 -0700)]
Merge pull request #2723 from ZhiqianXia/textureQueryLOD

Support the textureQueryLOD at #extension GL_ARB_texture_query_lod.

2 years agoMerge branch 'master' into textureQueryLOD
Greg Fischer [Mon, 22 Nov 2021 17:39:03 +0000 (10:39 -0700)]
Merge branch 'master' into textureQueryLOD

2 years agoMerge pull request #2829 from amdrexu/bugfix2
Greg Fischer [Mon, 22 Nov 2021 17:36:12 +0000 (10:36 -0700)]
Merge pull request #2829 from amdrexu/bugfix2

Remove the test spv.intrinsicsSpecConst

2 years agoRemove the test spv.intrinsicsSpecConst
Rex Xu [Mon, 22 Nov 2021 12:05:06 +0000 (20:05 +0800)]
Remove the test spv.intrinsicsSpecConst

According to current SPIR-V spec, we couldn't write a valid case that
references OpExecutionModeId and OpDecorateId.

2 years agoMerge pull request #2782 from kevin-mccullough/FixIomapperSeperableShaderValidation
Greg Fischer [Fri, 19 Nov 2021 22:19:27 +0000 (15:19 -0700)]
Merge pull request #2782 from kevin-mccullough/FixIomapperSeperableShaderValidation

Fix issue with separable shader validation in iomapper

2 years agoMerge pull request #2826 from amdrexu/bugfix
Greg Fischer [Thu, 18 Nov 2021 18:20:02 +0000 (11:20 -0700)]
Merge pull request #2826 from amdrexu/bugfix

Fix an issue of spirv_type used in local variable definitions

2 years agoMerge pull request #2811 from mbechard/master
Greg Fischer [Thu, 18 Nov 2021 17:18:22 +0000 (10:18 -0700)]
Merge pull request #2811 from mbechard/master

remove unneeded extra constructions now that pool allocation is fixed

2 years agoFix an issue of spirv_type used in local variable definitions
Rex Xu [Wed, 17 Nov 2021 15:32:27 +0000 (23:32 +0800)]
Fix an issue of spirv_type used in local variable definitions

We previously use createOp() in SPV builder to create type declaration.
However, all type declarations should be placed in const-type-variable
declaration section. And duplicated type defintions ought to be avoided.
We now make a method in SPV builder to perform this operation with a
more general solution: makeGenericType().

2 years agoremove unneeded extra constructions now that pool allocation is fixed
Malcolm Bechard [Mon, 15 Nov 2021 15:44:08 +0000 (10:44 -0500)]
remove unneeded extra constructions now that pool allocation is fixed

2 years agoFix issue with separable shader validation in iomapper
Kevin McCullough [Wed, 13 Oct 2021 22:32:38 +0000 (15:32 -0700)]
Fix issue with separable shader validation in iomapper

2 years agoMerge pull request #2824 from alan-baker/update-tools
Greg Fischer [Wed, 17 Nov 2021 22:26:19 +0000 (15:26 -0700)]
Merge pull request #2824 from alan-baker/update-tools

Update SPIRV-Tools

2 years agoMerge pull request #2825 from greg-lunarg/i2244
Greg Fischer [Wed, 17 Nov 2021 16:55:17 +0000 (09:55 -0700)]
Merge pull request #2825 from greg-lunarg/i2244

Add --hlsl-dx-position-w option

2 years agoAdd --hlsl-dx-position-w option
Greg Fischer [Wed, 17 Nov 2021 01:42:12 +0000 (18:42 -0700)]
Add --hlsl-dx-position-w option

This reciprocates the w component of SV_Position in HLSL fragment shaders
to provide DirectX compatibility for HLSL shaders in Vulkan.

Fixes #2244

2 years agoUpdate SPIRV-Tools
Alan Baker [Wed, 17 Nov 2021 00:03:12 +0000 (19:03 -0500)]
Update SPIRV-Tools

* Fix test expectations

2 years agoMerge pull request #2823 from kda/master
Greg Fischer [Tue, 16 Nov 2021 18:20:42 +0000 (11:20 -0700)]
Merge pull request #2823 from kda/master

Initialize member TSymbol::uniqueId.

2 years agoInitialize member TSymbol::uniqueId.
Kevin Athey [Tue, 16 Nov 2021 00:33:08 +0000 (16:33 -0800)]
Initialize member TSymbol::uniqueId.

2 years agoMerge pull request #2821 from greg-lunarg/conv0
Greg Fischer [Mon, 15 Nov 2021 21:49:53 +0000 (14:49 -0700)]
Merge pull request #2821 from greg-lunarg/conv0

[RFC] add more negative float conversions to test constantUnaryConversion.comp and remove the undefined ones

2 years agoremove undefined conversions from test constantUnaryConversion.comp
Marius Hillenbrand [Mon, 15 Nov 2021 15:31:50 +0000 (16:31 +0100)]
remove undefined conversions from test constantUnaryConversion.comp

Remove remaining conversions from negative float64_t to unsigned
integers, which are undefined behavior.

As a result, this test will also succeed on platforms that implement
those conversions differently than x86. That addresses one of the issues
in #2815.

2 years agoadd negative float conversions to test constantUnaryConversion.comp
Marius Hillenbrand [Mon, 15 Nov 2021 15:30:15 +0000 (16:30 +0100)]
add negative float conversions to test constantUnaryConversion.comp

Add conversions from negative float16_t and float32_t to bool, all
signed integer types (i.e., including those in
GL_EXT_shader_explicit_arithmetic_types), and all float types (from the
same extension) to extend coverage.

Note that converting negative float values to unsigned integers is
undefined behavior. Thus, we exclude them.

2 years agoMerge pull request #2806 from ZhiqianXia/bestFunctionMatching
Greg Fischer [Mon, 15 Nov 2021 20:28:53 +0000 (13:28 -0700)]
Merge pull request #2806 from ZhiqianXia/bestFunctionMatching

#extension GL_ARB_gpu_shader5 support the implicit conversion ,

2 years agoMerge pull request #2818 from mhillenbrand/promoteConstantUnion_signed_char
Greg Fischer [Mon, 15 Nov 2021 17:52:12 +0000 (10:52 -0700)]
Merge pull request #2818 from mhillenbrand/promoteConstantUnion_signed_char

TIntermediate::promoteConstantUnion(): fix conversion to int8

2 years agoMerge pull request #2819 from greg-lunarg/i2812
Greg Fischer [Sat, 13 Nov 2021 02:16:35 +0000 (19:16 -0700)]
Merge pull request #2819 from greg-lunarg/i2812

Fix struct type sharing

2 years agoMerge pull request #2814 from mhillenbrand/isinf_isnan2
Greg Fischer [Sat, 13 Nov 2021 00:38:11 +0000 (17:38 -0700)]
Merge pull request #2814 from mhillenbrand/isinf_isnan2

Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding (updated)

2 years agoFix struct type sharing
Greg Fischer [Fri, 12 Nov 2021 23:54:22 +0000 (16:54 -0700)]
Fix struct type sharing

Fixes #2812

2 years agoMerge pull request #2817 from greg-lunarg/sdk0
Greg Fischer [Fri, 12 Nov 2021 14:42:16 +0000 (07:42 -0700)]
Merge pull request #2817 from greg-lunarg/sdk0

Revert port GL_EXT_shader_realtime_clock to GL_EXT_spirv_intrinsics

2 years agoTIntermediate::promoteConstantUnion(): fix conversion to int8
Marius Hillenbrand [Wed, 10 Nov 2021 17:10:58 +0000 (18:10 +0100)]
TIntermediate::promoteConstantUnion(): fix conversion to int8

The signedness of type char is implementation-defined in C++. The
conversion to (signed) int8 currently uses a cast to char, which is
undefined for negative values when the type char is implemented as
unsigned. Thus, fix to cast to "signed char", which has the intended
semantic on all implementations.

Fixes #2807

2 years agoRevert port of GL_EXT_shader_realtime_clock to GL_EXT_spirv_intrinsics
Greg Fischer [Fri, 12 Nov 2021 01:48:05 +0000 (18:48 -0700)]
Revert port of GL_EXT_shader_realtime_clock to GL_EXT_spirv_intrinsics

Could not be found by glslang library interface. Blocking SDK build.

2 years agoMerge pull request #2816 from greg-lunarg/v11.7.0
Greg Fischer [Thu, 11 Nov 2021 22:14:06 +0000 (15:14 -0700)]
Merge pull request #2816 from greg-lunarg/v11.7.0

Release 11.7.0

2 years agoMerge pull request #2813 from greg-lunarg/kg120
Greg Fischer [Thu, 11 Nov 2021 18:12:01 +0000 (11:12 -0700)]
Merge pull request #2813 from greg-lunarg/kg120

Update to latest spirv-headers

2 years agoRelease 11.7.0
Greg Fischer [Thu, 11 Nov 2021 16:08:05 +0000 (09:08 -0700)]
Release 11.7.0

2 years agoUse intermOut.cpp's IsNan and IsInfinity for parse-time constant folding (updated)
Marius Hillenbrand [Tue, 9 Nov 2021 15:31:22 +0000 (16:31 +0100)]
Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding (updated)

There were two implementations of isInf() and isNan(), in Constant.cpp
and in intermOut.cpp. The former only works on little-endian systems,
the latter is a wrapper for library functions and works regardless of
endianness. Move the second version into Common.h and adopt it in both
places. Thereby avoid the duplication and fix for big-endian systems.

A previous commit with the same intent and purpose had missed a required
header for builds on Windows.

On s390x, this fixes the test case
Glsl/CompileToAstTest.FromFile/constFold_frag.

Fixes #2802

2 years agoUpdate to latest spirv-headers
Greg Fischer [Thu, 11 Nov 2021 15:43:30 +0000 (08:43 -0700)]
Update to latest spirv-headers

2 years agoMerge pull request #2810 from greg-lunarg/push1
Greg Fischer [Thu, 11 Nov 2021 15:18:59 +0000 (08:18 -0700)]
Merge pull request #2810 from greg-lunarg/push1

Generate error for binding on push_constant

2 years agoMerge pull request #2809 from KhronosGroup/revert-2803-isinf_isnan
Greg Fischer [Wed, 10 Nov 2021 22:59:10 +0000 (15:59 -0700)]
Merge pull request #2809 from KhronosGroup/revert-2803-isinf_isnan

Revert "Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding"

2 years agoGenerate error for binding on push_constant
Greg Fischer [Wed, 10 Nov 2021 22:03:07 +0000 (15:03 -0700)]
Generate error for binding on push_constant

2 years agoRevert "Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding"
Greg Fischer [Wed, 10 Nov 2021 21:13:37 +0000 (14:13 -0700)]
Revert "Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding"

2 years agoMerge pull request #2805 from greg-lunarg/push0
Greg Fischer [Wed, 10 Nov 2021 17:01:54 +0000 (10:01 -0700)]
Merge pull request #2805 from greg-lunarg/push0

Fix test spv.1.4.OpEntryPoint.frag

2 years agoSupport the #extension GL_ARB_fragment_coord_conventions.
ZhiqianXia [Mon, 2 Aug 2021 05:24:11 +0000 (13:24 +0800)]
Support the #extension GL_ARB_fragment_coord_conventions.

Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
2 years ago#extension GL_ARB_gpu_shader5 support the implicit conversion ,
ZhiqianXia [Mon, 2 Aug 2021 08:41:21 +0000 (16:41 +0800)]
#extension GL_ARB_gpu_shader5 support the implicit conversion ,
So the best function matching algorithm should be actived.

Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
2 years agoFix test spv.1.4.OpEntryPoint.frag
Greg Fischer [Tue, 9 Nov 2021 22:46:08 +0000 (15:46 -0700)]
Fix test spv.1.4.OpEntryPoint.frag

Cannot apply binding qualifier to push_constant

2 years agoMerge pull request #2781 from kevin-mccullough/FixLinkTimeValidationForGl_PerVertex
Greg Fischer [Tue, 9 Nov 2021 20:44:32 +0000 (13:44 -0700)]
Merge pull request #2781 from kevin-mccullough/FixLinkTimeValidationForGl_PerVertex

Fix incorrect link time validation for unused gl_PerVertex members

2 years agoMerge pull request #2801 from haasn/thread_safety
Greg Fischer [Tue, 9 Nov 2021 18:43:38 +0000 (11:43 -0700)]
Merge pull request #2801 from haasn/thread_safety

Thread safety fixes

2 years agoMerge pull request #2803 from mhillenbrand/isinf_isnan
Greg Fischer [Tue, 9 Nov 2021 18:08:41 +0000 (11:08 -0700)]
Merge pull request #2803 from mhillenbrand/isinf_isnan

Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding

2 years agoUse intermOut.cpp's IsNan and IsInfinity for parse-time constant folding
Marius Hillenbrand [Tue, 9 Nov 2021 15:31:22 +0000 (16:31 +0100)]
Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding

There were two implementations of isInf() and isNan(), in Constant.cpp
and in intermOut.cpp. The former only works on little-endian systems,
the latter is a wrapper for library functions and works regardless of
endianness. Move the second version into Common.h and adopt it in both
places. Thereby avoid the duplication and fix for big-endian systems.

On s390x, this fixes the test case
Glsl/CompileToAstTest.FromFile/constFold_frag.

Fixes #2802

2 years agoMerge pull request #2799 from cyanreg/master
Greg Fischer [Tue, 9 Nov 2021 01:47:27 +0000 (18:47 -0700)]
Merge pull request #2799 from cyanreg/master

Add support for targeting Vulkan 1.2 in the C API

2 years agoMerge pull request #2798 from alan-baker/update-tools
Greg Fischer [Tue, 9 Nov 2021 01:29:53 +0000 (18:29 -0700)]
Merge pull request #2798 from alan-baker/update-tools

Update tools

2 years agoFix incorrect link time validation for unused gl_PerVertex members
Kevin McCullough [Wed, 13 Oct 2021 22:28:45 +0000 (15:28 -0700)]
Fix incorrect link time validation for unused gl_PerVertex members

2 years agoMerge pull request #2722 from ZhiqianXia/GL_ARB_draw_instanced
Greg Fischer [Mon, 8 Nov 2021 18:32:46 +0000 (11:32 -0700)]
Merge pull request #2722 from ZhiqianXia/GL_ARB_draw_instanced

Support the #extension GL_ARB_draw_instanced.

2 years agoDon't release global mutex before initialize/finalize is done
Niklas Haas [Mon, 8 Nov 2021 13:58:50 +0000 (14:58 +0100)]
Don't release global mutex before initialize/finalize is done

Otherwise this can race with other threads for access to the fields it's
supposed to be initializing/finalizing.

For example, imagine another thread is calling ShInitialize() while the
first thread is calling ShFinalize() - the finalize function would
destroy the state at the same time as the initialize function is trying
to initialize it.

Holding on to the global lock for the entire function prevents all of
these failure modes.