platform/upstream/glslang.git
3 years agoRevert "Update minimum SPIR-V requirement for GL_EXT_buffer_reference"
Greg Fischer [Wed, 7 Apr 2021 21:20:16 +0000 (15:20 -0600)]
Revert "Update minimum SPIR-V requirement for GL_EXT_buffer_reference"

3 years agoMerge pull request #2598 from greg-lunarg/noprop1
Greg Fischer [Wed, 7 Apr 2021 00:04:50 +0000 (18:04 -0600)]
Merge pull request #2598 from greg-lunarg/noprop1

Do not propagate packing qualifiers to scalars or vectors

3 years agoDo not propagate packing qualifiers to scalars or vectors
Greg Fischer [Mon, 5 Apr 2021 22:49:42 +0000 (16:49 -0600)]
Do not propagate packing qualifiers to scalars or vectors

Packing qualifiers have no practical effect on scalars or vectors
so this is unnecessary and its confusing tools downstream that
consume the AST.

3 years agoMerge pull request #2593 from jeremy-lunarg/hayes-update-min-spv-requirement
Greg Fischer [Thu, 1 Apr 2021 18:32:57 +0000 (12:32 -0600)]
Merge pull request #2593 from jeremy-lunarg/hayes-update-min-spv-requirement

Update minimum SPIR-V requirement for GL_EXT_buffer_reference

3 years agoMerge pull request #2597 from greg-lunarg/interp0
Greg Fischer [Thu, 1 Apr 2021 08:37:08 +0000 (02:37 -0600)]
Merge pull request #2597 from greg-lunarg/interp0

Fix SPIR-V for HLSL EvaluateAttribute* of interpolants in structs

3 years agoFix SPIR-V for HLSL EvaluateAttribute* of interpolants in structs
Greg Fischer [Wed, 31 Mar 2021 21:24:48 +0000 (15:24 -0600)]
Fix SPIR-V for HLSL EvaluateAttribute* of interpolants in structs

Generate load of interpolant for first operand to GLSLstd450
InterpolateAt* SPIR-V ops. This allows the interpolants to
propagate from the input struct in the wrapper around main
into the shader during HLSL legalization. A new pass has been
added to legalization which will remove the load and replace
with the pointer of the load to create valid external
interpolate op.

Fixes #2584

3 years agoMerge pull request #2590 from pmistryNV/GL_ARB_sparse_texture2-bug-fix
Greg Fischer [Wed, 31 Mar 2021 00:33:31 +0000 (18:33 -0600)]
Merge pull request #2590 from pmistryNV/GL_ARB_sparse_texture2-bug-fix

For bug #2580: sparseTextureGatherOffsetsARB should only take constant offsets

3 years agoFor bug #2580: sparseTextureGatherOffsetsARB should only take constant offsets.
Pankaj Mistry [Wed, 24 Mar 2021 19:52:23 +0000 (12:52 -0700)]
For bug #2580: sparseTextureGatherOffsetsARB should only take constant offsets.

3 years agoUpdate minimum SPIR-V requirement
Jeremy Hayes [Fri, 26 Mar 2021 21:39:34 +0000 (15:39 -0600)]
Update minimum SPIR-V requirement

Require SPIR-V 1.3 when using GL_EXT_buffer_reference.
Migrate tests to SPIR-V 1.3 fixture as necessary.
Fix extension table key.
Fix whitespace.

3 years agoMerge pull request #2589 from ben-clayton/fix-warnings
greg-lunarg [Tue, 23 Mar 2021 16:29:38 +0000 (10:29 -0600)]
Merge pull request #2589 from ben-clayton/fix-warnings

Fix warnings about int comparisons of different signness

3 years agoFix warnings about int comparisons of different signness
Ben Clayton [Tue, 23 Mar 2021 10:47:59 +0000 (10:47 +0000)]
Fix warnings about int comparisons of different signness

Warnings in public headers can trigger warnings-as-errors.

3 years agoMerge pull request #2588 from jeremy-lunarg/hayes-2530
greg-lunarg [Mon, 22 Mar 2021 23:42:43 +0000 (17:42 -0600)]
Merge pull request #2588 from jeremy-lunarg/hayes-2530

Default to KHR extension

3 years agoMerge pull request #2587 from mbechard/master
greg-lunarg [Mon, 22 Mar 2021 23:39:47 +0000 (17:39 -0600)]
Merge pull request #2587 from mbechard/master

Don't check precision qualifiers on cross-stage checks

3 years agoDefault to KHR extension
Jeremy Hayes [Fri, 5 Mar 2021 01:03:14 +0000 (18:03 -0700)]
Default to KHR extension

Fix #2530.

3 years agoDon't check precision qualifiers on cross-stage checks
Malcolm Bechard [Mon, 22 Mar 2021 17:51:45 +0000 (13:51 -0400)]
Don't check precision qualifiers on cross-stage checks

Fixes #2586

3 years agoMerge pull request #2583 from nullcatalyst/bazel-windows-bat
greg-lunarg [Mon, 22 Mar 2021 17:49:55 +0000 (11:49 -0600)]
Merge pull request #2583 from nullcatalyst/bazel-windows-bat

Add cmd_bat action to bazel export_spirv_headers target

3 years agoMerge pull request #2582 from JustSid/master
greg-lunarg [Mon, 22 Mar 2021 17:44:52 +0000 (11:44 -0600)]
Merge pull request #2582 from JustSid/master

Fixed OpGroupNonUniformQuadBroadcast Direction operand being marked as a literal

3 years agoAdd cmd_bat action to bazel export_spirv_headers target
Scott Bennett [Thu, 18 Mar 2021 20:42:51 +0000 (16:42 -0400)]
Add cmd_bat action to bazel export_spirv_headers target

Only having `cmd` rather than separate `cmd_bash` and `cmd_bat` (or
`cmd_ps`) requires bash to be installed on Windows. So adding support
for `cmd_bat` makes glslangValidator easier to compile on Windows.

3 years agoMerge pull request #2581 from mbechard/InconsistentGLPerVertex
greg-lunarg [Fri, 19 Mar 2021 23:38:51 +0000 (17:38 -0600)]
Merge pull request #2581 from mbechard/InconsistentGLPerVertex

Partial fix for inconsistencies re: #2578

3 years agoFixed OpGroupNonUniformQuadBroadcast Direction operand being marked as a literal
Sidney Just [Fri, 19 Mar 2021 20:26:53 +0000 (13:26 -0700)]
Fixed OpGroupNonUniformQuadBroadcast Direction operand being marked as a literal

3 years agoPartial fix for inconsistencies re: #2578
Malcolm Bechard [Thu, 18 Mar 2021 20:58:40 +0000 (16:58 -0400)]
Partial fix for inconsistencies re: #2578

gl_SecondaryPositionNV and gl_PositionPerViewNV are inconsistently
declared inside and outside of gl_PerVertex. This breaks interface block
matching. For now ignore these errors since it should be fixed with how
they are declared.

3 years agoMerge pull request #2579 from mbechard/master
greg-lunarg [Thu, 18 Mar 2021 23:22:13 +0000 (17:22 -0600)]
Merge pull request #2579 from mbechard/master

Fix issue with remapping global uniform blocks

3 years agoMerge pull request #2574 from feifei14119/master
greg-lunarg [Thu, 18 Mar 2021 00:21:16 +0000 (18:21 -0600)]
Merge pull request #2574 from feifei14119/master

fix typo for u64vec2/3/4 type define value

3 years agoFix issue with remapping global uniform blocks
Malcolm Bechard [Wed, 17 Mar 2021 22:47:13 +0000 (18:47 -0400)]
Fix issue with remapping global uniform blocks

Avoid adding global uniform blocks to stages that don't already have it.
Otherwise multiple stages point to the same block object, and a
remapping that occurs later on will change the mapping on multiple
stages.

3 years agoMerge pull request #2577 from mbechard/master
greg-lunarg [Wed, 17 Mar 2021 21:46:13 +0000 (15:46 -0600)]
Merge pull request #2577 from mbechard/master

fix variable capitalization. Don't initialize it in the struct's constructor

3 years agofix variable capitilization. Don't initialize it in the struct's constructor
Malcolm Bechard [Tue, 16 Mar 2021 23:00:52 +0000 (19:00 -0400)]
fix variable capitilization. Don't initialize it in the struct's constructor

3 years agoMerge pull request #2576 from KhronosGroup/revert-2569-revert-2242-GL_EXT_vulkan_glsl...
greg-lunarg [Mon, 15 Mar 2021 19:38:49 +0000 (13:38 -0600)]
Merge pull request #2576 from KhronosGroup/revert-2569-revert-2242-GL_EXT_vulkan_glsl_relaxed

Revert "Revert "GL_ext_vulkan_glsl_relaxed extension support, and cross stage aware IO mapper""

3 years agoRevert "Revert "GL_ext_vulkan_glsl_relaxed extension support, and cross stage aware...
greg-lunarg [Mon, 15 Mar 2021 17:26:11 +0000 (11:26 -0600)]
Revert "Revert "GL_ext_vulkan_glsl_relaxed extension support, and cross stage aware IO mapper""

3 years ago1. fix macro definition value for unsinged-int64-vector, according to kronos spec...
feifei14119 [Mon, 15 Mar 2021 08:54:31 +0000 (16:54 +0800)]
1. fix macro definition value for unsinged-int64-vector, according to kronos spec at https://khronos.org/registry/OpenGL/extensions/ARB/ARB_gpu_shader_int64.txt; 2. fix typo in reflection

3 years agoMerge pull request #2569 from KhronosGroup/revert-2242-GL_EXT_vulkan_glsl_relaxed
greg-lunarg [Wed, 10 Mar 2021 21:05:36 +0000 (14:05 -0700)]
Merge pull request #2569 from KhronosGroup/revert-2242-GL_EXT_vulkan_glsl_relaxed

Revert "GL_ext_vulkan_glsl_relaxed extension support, and cross stage aware IO mapper"

3 years agoRevert "GL_ext_vulkan_glsl_relaxed extension support, and cross stage aware IO mapper"
greg-lunarg [Wed, 10 Mar 2021 18:26:43 +0000 (11:26 -0700)]
Revert "GL_ext_vulkan_glsl_relaxed extension support, and cross stage aware IO mapper"

3 years agoMerge pull request #2565 from greg-lunarg/i2564
greg-lunarg [Tue, 9 Mar 2021 09:15:26 +0000 (02:15 -0700)]
Merge pull request #2565 from greg-lunarg/i2564

Pass correct proxy type for atomicStore

3 years agoMerge pull request #2242 from mbechard/GL_EXT_vulkan_glsl_relaxed
greg-lunarg [Mon, 8 Mar 2021 21:43:32 +0000 (14:43 -0700)]
Merge pull request #2242 from mbechard/GL_EXT_vulkan_glsl_relaxed

GL_ext_vulkan_glsl_relaxed extension support, and cross stage aware IO mapper

3 years agoPass correct proxy type for atomicStore
Greg Fischer [Mon, 8 Mar 2021 21:02:06 +0000 (14:02 -0700)]
Pass correct proxy type for atomicStore

Fixes #2564

3 years agoImplement GL_EXT_vulkan_glsl_relaxed option
will brown [Wed, 10 Jun 2020 00:43:48 +0000 (20:43 -0400)]
Implement GL_EXT_vulkan_glsl_relaxed option

3 years agoMerge pull request #2560 from amdrexu/bugfix
greg-lunarg [Mon, 8 Mar 2021 17:31:48 +0000 (10:31 -0700)]
Merge pull request #2560 from amdrexu/bugfix

SPV: The capability string for RayTracingProvisionalKHR is missing

3 years agoSPV: The capability string for RayTracingProvisionalKHR is missing
Rex Xu [Thu, 4 Mar 2021 09:00:49 +0000 (17:00 +0800)]
SPV: The capability string for RayTracingProvisionalKHR is missing

Add it to GLSLang disassembler.

3 years agoMerge pull request #2559 from greg-lunarg/i2555
greg-lunarg [Tue, 2 Mar 2021 04:05:58 +0000 (21:05 -0700)]
Merge pull request #2559 from greg-lunarg/i2555

Allow DepthUnchanged and DepthReplaced Modes in same SPIR-V module.

3 years agoAllow DepthUnchanged and DepthReplaced Modes in same SPIR-V module.
Greg Fischer [Tue, 2 Mar 2021 00:45:03 +0000 (17:45 -0700)]
Allow DepthUnchanged and DepthReplaced Modes in same SPIR-V module.

Fixes #2555

3 years agoMerge pull request #2558 from greg-lunarg/i2551
greg-lunarg [Mon, 1 Mar 2021 21:11:10 +0000 (14:11 -0700)]
Merge pull request #2558 from greg-lunarg/i2551

Allow grad texture ops in all shaders

3 years agoAllow grad texture ops in all shaders
Greg Fischer [Mon, 1 Mar 2021 19:33:08 +0000 (12:33 -0700)]
Allow grad texture ops in all shaders

Fixes #2551

3 years agoMerge pull request #2557 from greg-lunarg/i2552b
greg-lunarg [Mon, 1 Mar 2021 17:41:30 +0000 (10:41 -0700)]
Merge pull request #2557 from greg-lunarg/i2552b

Fix off-by-1 bug in gl_MaxCombinedTextureImageUnits check

3 years agoMerge pull request #2554 from proydakov/Try-to-find-python-interpreter-from-host...
greg-lunarg [Sat, 27 Feb 2021 01:06:27 +0000 (18:06 -0700)]
Merge pull request #2554 from proydakov/Try-to-find-python-interpreter-from-host-first

Returned using find_host_package for PythonInterp 3 instead of find_pachage.

3 years agoMerge pull request #2553 from amdrexu/bugfix
greg-lunarg [Sat, 27 Feb 2021 01:05:52 +0000 (18:05 -0700)]
Merge pull request #2553 from amdrexu/bugfix

SPV: Change the key of extBuiltinMap to std::string

3 years agoFix off-by-1 bug in gl_MaxCombinedTextureImageUnits check
Greg Fischer [Fri, 26 Feb 2021 23:59:51 +0000 (16:59 -0700)]
Fix off-by-1 bug in gl_MaxCombinedTextureImageUnits check

The problem was only with arrays of samplers.

Fixed #2552

3 years agoMerge pull request #2556 from greg-lunarg/i2541
greg-lunarg [Fri, 26 Feb 2021 22:51:48 +0000 (15:51 -0700)]
Merge pull request #2556 from greg-lunarg/i2541

Fix precision propagation around shifts

3 years agoFix precision propagation around shifts
Greg Fischer [Fri, 26 Feb 2021 18:34:51 +0000 (11:34 -0700)]
Fix precision propagation around shifts

Fixes #2541

3 years agoReturned using find_host_package for PythonInterp 3 instead of find_package.
Evgeny Proydakov [Fri, 26 Feb 2021 11:31:27 +0000 (14:31 +0300)]
Returned using find_host_package for PythonInterp 3 instead of find_package.

I changed this logic here: https://github.com/KhronosGroup/glslang/pull/2526/commits/05798c17fb17d339d66e064a407e75ceae4c0316
It was originally fixed here: https://github.com/KhronosGroup/glslang/commit/967fa92d14acea305267574faf63ebe753de98c4

3 years agoSPV: Change the key of extBuiltinMap to std::string
Rex Xu [Fri, 26 Feb 2021 09:25:45 +0000 (17:25 +0800)]
SPV: Change the key of extBuiltinMap to std::string

Using const char* is not a good choice. We assume strings are always
from spv::E_SPV_XXX definitions. However, it is not the case. We can
store the name strings of extended intruction set in local variables.

3 years agoMerge pull request #2544 from ZhiqianXia/master
greg-lunarg [Thu, 25 Feb 2021 17:38:39 +0000 (10:38 -0700)]
Merge pull request #2544 from ZhiqianXia/master

Replace log2 and exp2 math func.

3 years agofix a typo
ZhiqianXia [Thu, 25 Feb 2021 07:37:40 +0000 (15:37 +0800)]
fix a typo

3 years agoMerge pull request #2549 from jeremy-lunarg/hayes-2479
greg-lunarg [Wed, 24 Feb 2021 23:56:10 +0000 (16:56 -0700)]
Merge pull request #2549 from jeremy-lunarg/hayes-2479

Require fixed workgroup size declaration

3 years agoRequire fixed workgroup size declaration
Jeremy Hayes [Tue, 23 Feb 2021 01:21:25 +0000 (18:21 -0700)]
Require fixed workgroup size declaration

Fix 2479.

3 years agoMerge pull request #2546 from proydakov/msvc-noexcept-fix
greg-lunarg [Wed, 24 Feb 2021 19:02:07 +0000 (12:02 -0700)]
Merge pull request #2546 from proydakov/msvc-noexcept-fix

Fixed msvc 2019 nmake noexcept build.

3 years agoFixed msvc 2019 nmake noexcept build.
Evgeny Proydakov [Wed, 24 Jun 2020 17:01:18 +0000 (20:01 +0300)]
Fixed msvc 2019 nmake noexcept build.

By default cmake generates cxx_flags with /EHsc parameter.
I updated CMAKE_CXX_FLAGS string and removed /EHsc, also I added compile defenitions _HAS_EXCEPTIONS=0, it is mandatory for noexcept build with MSVC STL implementation.
Output files became smaller.

How to reproduce:

Visual Studio 2019 x64 command port

mkdir build-msvc2019
cd build-msvc2019
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=install ..
nmake

CXX FLAGS BEFORE:

-- CMAKE_C_FLAGS:   /DWIN32 /D_WINDOWS /W3
-- CMAKE_CXX_FLAGS: /DWIN32 /D_WINDOWS /W3 /GR- /EHsc
-- CMAKE_CXX_FLAGS_DEBUG:   /MDd /Zi /Ob0 /Od /RTC1
-- CMAKE_CXX_FLAGS_RELEASE: /MD /O2 /Ob2 /DNDEBUG
-- ENABLE_RTTI:       OFF
-- ENABLE_EXCEPTIONS: OFF

OUTPUT SIZE BEFORE:

Build folder size: 61,8 MB (64 808 580 bytes)

GLSLANG SIZE BEFORE:

glslang.lib 22,7 MB (23 887 150 bytes)

CXX FLAGS AFTER:

-- CMAKE_C_FLAGS:   /DWIN32 /D_WINDOWS /W3
-- CMAKE_CXX_FLAGS: /DWIN32 /D_WINDOWS /W3 /GR-
-- CMAKE_CXX_FLAGS_DEBUG:   /MDd /Zi /Ob0 /Od /RTC1
-- CMAKE_CXX_FLAGS_RELEASE: /MD /O2 /Ob2 /DNDEBUG
-- ENABLE_RTTI:       OFF
-- ENABLE_EXCEPTIONS: OFF

OUTPUT SIZE AFTER:

Build folder size: 58,4 MB (61 331 179 bytes)

GLSLANG SIZE AFTER:

glslang.lib 21,6 MB (22 655 252 bytes)

3 years agoMerge pull request #2537 from proydakov/fixed-cmake-warning
greg-lunarg [Tue, 23 Feb 2021 17:23:12 +0000 (10:23 -0700)]
Merge pull request #2537 from proydakov/fixed-cmake-warning

Fixed cmake generation warning for regeneration project build files.

3 years agoCode review. Thx `greg-lunarg` for comments.
Evgeny Proydakov [Tue, 23 Feb 2021 14:14:12 +0000 (17:14 +0300)]
Code review. Thx `greg-lunarg` for comments.

3 years agoReplace the old version math func with C++11 to
ZhiqianXia [Tue, 23 Feb 2021 02:00:25 +0000 (10:00 +0800)]
Replace the old version math func with C++11 to
prevent some presicion issue.

reference link:
https://www.cplusplus.com/reference/cmath/

Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
3 years agoMerge pull request #2525 from ZhiqianXia/master
greg-lunarg [Tue, 23 Feb 2021 00:36:30 +0000 (17:36 -0700)]
Merge pull request #2525 from ZhiqianXia/master

Cannot specify atomic counter with location.

3 years agoMerge pull request #2540 from dgkoch/dgkoch_build_fix
greg-lunarg [Tue, 23 Feb 2021 00:07:33 +0000 (17:07 -0700)]
Merge pull request #2540 from dgkoch/dgkoch_build_fix

Fix warning in build

3 years agoMerge pull request #2543 from greg-lunarg/chg11.2.0
greg-lunarg [Mon, 22 Feb 2021 20:54:00 +0000 (13:54 -0700)]
Merge pull request #2543 from greg-lunarg/chg11.2.0

Update CHANGES.md to 11.2.0 to sync with current tagging.

3 years agoUpdate CHANGES.md to 11.2.0 to sync with current tagging.
Greg Fischer [Mon, 22 Feb 2021 19:11:47 +0000 (12:11 -0700)]
Update CHANGES.md to 11.2.0 to sync with current tagging.

3 years agoFix warning in build
Daniel Koch [Fri, 19 Feb 2021 21:48:50 +0000 (16:48 -0500)]
Fix warning in build

glslang/MachineIndependent/SymbolTable.h:892:41: error: comparison of integers of
different signs: 'int' and 'const uint32_t' (aka 'const unsigned int') [-Werror,-Wsign-compare]
            uint64_t level = currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel();
                             ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
1 error generated.

3 years agoFixed cmake generation warning for regeneration project build files.
Evgeny Proydakov [Thu, 18 Feb 2021 23:18:17 +0000 (02:18 +0300)]
Fixed cmake generation warning for regeneration project build files.

[BEFORE]:

% cmake ..
CMake Warning (dev) at CMakeLists.txt:35 (project):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    CMAKE_PROJECT_VERSION
    CMAKE_PROJECT_VERSION_MAJOR
    CMAKE_PROJECT_VERSION_MINOR
    CMAKE_PROJECT_VERSION_PATCH
This warning is for project developers.  Use -Wno-dev to suppress it.

-- No build type selected, default to Debug
-- Found PythonInterp: /usr/local/bin/python3 (found version "3.9")
-- Found PythonInterp: /usr/local/bin/python3 (found suitable version "3.9", minimum required is "3")
-- optimizer enabled
-- Google Mock found - building tests
-- Configuring done

[AFTER]:

% cmake ..
-- No build type selected, default to Debug
-- Google Mock was not found - tests based on that will not build
-- Configuring done
-- Generating done

3 years agoMerge pull request #2536 from greg-lunarg/chg0
greg-lunarg [Thu, 18 Feb 2021 22:18:16 +0000 (15:18 -0700)]
Merge pull request #2536 from greg-lunarg/chg0

Update CHANGES for 11.1.0

3 years agoUpdate CHANGES for 11.1.0
Greg Fischer [Thu, 18 Feb 2021 19:04:17 +0000 (12:04 -0700)]
Update CHANGES for 11.1.0

3 years agoMerge pull request #2532 from juliusikkala/master
greg-lunarg [Mon, 15 Feb 2021 20:41:48 +0000 (13:41 -0700)]
Merge pull request #2532 from juliusikkala/master

Pass environment through PreprocessDeferred

3 years agoMerge pull request #2458 from ShchchowAMD/unique_id-fix
greg-lunarg [Mon, 15 Feb 2021 20:22:14 +0000 (13:22 -0700)]
Merge pull request #2458 from ShchchowAMD/unique_id-fix

Fix issue for new unique id system.

3 years agoFix issue for new unique id system. Add level bits to help verifying symbols and...
Chow [Thu, 12 Nov 2020 07:54:16 +0000 (15:54 +0800)]
Fix issue for new unique id system. Add level bits to help verifying symbols and split symbol tables.
For intermediates rebuilding, now need manually amending level bits for redeclaring built-ins.

3 years agoPass environment through PreprocessDeferred
Julius Ikkala [Sun, 14 Feb 2021 12:24:17 +0000 (14:24 +0200)]
Pass environment through PreprocessDeferred

3 years agoMerge pull request #2531 from greg-lunarg/kg116
greg-lunarg [Fri, 12 Feb 2021 00:30:24 +0000 (17:30 -0700)]
Merge pull request #2531 from greg-lunarg/kg116

Update spirv-tools and spirv-header known good.

3 years agoUpdate spirv-tools and spirv-header known good.
Greg Fischer [Thu, 11 Feb 2021 22:36:28 +0000 (15:36 -0700)]
Update spirv-tools and spirv-header known good.

This is being done to allow Vulkan validation layers to pick up
the new differentiated error code support in spirv-tools for
GPU-AV.

3 years agoMerge pull request #2526 from proydakov/regression-python3-is-required-even-without...
greg-lunarg [Tue, 9 Feb 2021 17:02:24 +0000 (10:02 -0700)]
Merge pull request #2526 from proydakov/regression-python3-is-required-even-without-using-SPIRV-Tools

Fixed issues 2496. Used option 4: parse_version.cmake to avoid python3 usage.

3 years agoCode review. Thx ben-clayton for comments.
Evgeny Proydakov [Sun, 7 Feb 2021 18:18:31 +0000 (21:18 +0300)]
Code review. Thx ben-clayton for comments.

3 years agoFixed issues 2496. Used option 4: parse_version.cmake to avoid python3 usage.
Evgeny Proydakov [Sun, 7 Feb 2021 12:37:03 +0000 (15:37 +0300)]
Fixed issues 2496. Used option 4: parse_version.cmake to avoid python3 usage.

https://github.com/KhronosGroup/glslang/issues/2496

3 years agoCannot specify atomic counter with location.
ZhiqianXia [Tue, 9 Feb 2021 01:42:48 +0000 (09:42 +0800)]
Cannot specify atomic counter with location.

Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
3 years agoCannot specify atomic counter with location.
ZhiqianXia [Tue, 9 Feb 2021 01:39:40 +0000 (09:39 +0800)]
Cannot specify atomic counter with location.

Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
3 years agoCannot specify atomic counter with location.
ZhiqianXia [Sun, 7 Feb 2021 09:20:14 +0000 (17:20 +0800)]
Cannot specify atomic counter with location.

Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
3 years agoMerge pull request #2523 from dneto0/remove-stray-semi
greg-lunarg [Wed, 3 Feb 2021 22:50:43 +0000 (15:50 -0700)]
Merge pull request #2523 from dneto0/remove-stray-semi

Remove useless semicolon

3 years agoRemove useless semicolon
David Neto [Wed, 3 Feb 2021 19:14:11 +0000 (14:14 -0500)]
Remove useless semicolon

The extra semicolon causes a build failure if warnings are turned up high, and
warnings-as-errors is on. (-Werror=extra-semi)

3 years agoMerge pull request #2517 from glebm/fix-ubsan-localintermediate
greg-lunarg [Mon, 1 Feb 2021 17:53:37 +0000 (10:53 -0700)]
Merge pull request #2517 from glebm/fix-ubsan-localintermediate

callGraph.push_front -> emplace_front to fix UBSAN

3 years agoMerge pull request #2512 from cmarcelo/GL_EXT_shared_memory_block
greg-lunarg [Mon, 1 Feb 2021 16:29:52 +0000 (09:29 -0700)]
Merge pull request #2512 from cmarcelo/GL_EXT_shared_memory_block

Add support for GL_EXT_shared_memory_block

3 years agocallGraph.push_front -> emplace_front to fix UBSAN
Gleb Mazovetskiy [Sat, 30 Jan 2021 15:58:29 +0000 (15:58 +0000)]
callGraph.push_front -> emplace_front to fix UBSAN

UBSAN rightly complains on `push_front` here:

    glslang/MachineIndependent/localintermediate.h:100:8: runtime error: load of value 160, which is not a valid value for type 'bool'
    #0 in glslang::TCall::TCall(glslang::TCall&&) glslang/MachineIndependent/localintermediate.h:100
    #1 in void __gnu_cxx::new_allocator<std::_List_node<glslang::TCall> >::construct<glslang::TCall, glslang::TCall>(glslang::TCall*, glslang::TCall&&) /usr/include/c++/10/ext/new_allocator.h:150
    #2 in void std::allocator_traits<std::allocator<std::_List_node<glslang::TCall> > >::construct<glslang::TCall, glslang::TCall>(std::allocator<std::_List_node<glslang::TCall> >&, glslang::TCall*, glslang::TCall&&) /usr/include/c++/10/bits/alloc_traits.h:512
    #3 in std::_List_node<glslang::TCall>* std::__cxx11::list<glslang::TCall, std::allocator<glslang::TCall> >::_M_create_node<glslang::TCall>(glslang::TCall&&) (...)
    #4 in void std::__cxx11::list<glslang::TCall, std::allocator<glslang::TCall> >::_M_insert<glslang::TCall>(std::_List_iterator<glslang::TCall>, glslang::TCall&&) /usr/include/c++/10/bits/stl_list.h:1911
    #5 in std::__cxx11::list<glslang::TCall, std::allocator<glslang::TCall> >::push_front(glslang::TCall&&) /usr/include/c++/10/bits/stl_list.h:1167
    #6 in glslang::TIntermediate::addToCallGraph(TInfoSink&, std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char> > const&) glslang/MachineIndependent/Intermediate.cpp:2860

What happens here:

1. TCall's bool fields are not initialized on construction.
2. `push_front` move the `TCall` passed into it.
3. The move constructor copies unitialized bool, which may have an
   out-of-range value.

What this fix does:

Calls `emplace_back` to ensure no copy/move constructor is called.

Fixes #2222
Refs #2112

3 years agoAdd support for GL_EXT_shared_memory_block
Caio Marcelo de Oliveira Filho [Tue, 2 Jun 2020 23:58:51 +0000 (16:58 -0700)]
Add support for GL_EXT_shared_memory_block

Uses SPV_KHR_workgroup_memory_explicit_layout.  Note that if
GL_EXT_scalar_block_layout is enabled, Workgroup blocks can also use
scalar layout.

3 years agoUpdate known_good.json to pick up SPV_KHR_workgroup_memory_explicit_layout
Caio Marcelo de Oliveira Filho [Tue, 12 May 2020 15:29:00 +0000 (08:29 -0700)]
Update known_good.json to pick up SPV_KHR_workgroup_memory_explicit_layout

Also update the test expectations regarding validation accordingly and
the in-tree spirv.hpp copy.

3 years agoConsider GL_EXT_scalar_block_layout when validating SPIR-V
Caio Marcelo de Oliveira Filho [Wed, 27 Jan 2021 08:30:59 +0000 (00:30 -0800)]
Consider GL_EXT_scalar_block_layout when validating SPIR-V

If GL_EXT_scalar_block_layout is requested by the shader, set the
option to allow scalar blocks in the SPIR-V validator.

Fix the existing tests using scalar layout to not expect "Validation
failed".

Fixes #2400.

3 years agoMerge pull request #2513 from jeffbolznv/missingcap
greg-lunarg [Thu, 28 Jan 2021 17:40:45 +0000 (10:40 -0700)]
Merge pull request #2513 from jeffbolznv/missingcap

Add missing capability when QueueFamily scope is used

3 years agoAdd missing capability when QueueFamily scope is used
Jeff Bolz [Wed, 27 Jan 2021 19:14:34 +0000 (13:14 -0600)]
Add missing capability when QueueFamily scope is used

Also, if this capability is added and the memory model is not
otherwise enabled by pragma, enable it as part of postprocessing.

3 years agoMerge pull request #2511 from alan-baker/GL_EXT_null_initializer
greg-lunarg [Tue, 26 Jan 2021 19:05:11 +0000 (12:05 -0700)]
Merge pull request #2511 from alan-baker/GL_EXT_null_initializer

Implement GL_EXT_null_initializer

3 years agoImplement GL_EXT_null_initializer
John Kessenich [Thu, 11 Jun 2020 14:30:03 +0000 (08:30 -0600)]
Implement GL_EXT_null_initializer

Adds null initializer syntax (empty braces)
Allows null initialization of shared variables

3 years agoMerge pull request #2508 from corporateshark/master
greg-lunarg [Thu, 21 Jan 2021 17:58:14 +0000 (10:58 -0700)]
Merge pull request #2508 from corporateshark/master

Fix missing enum values in the C-interface #2507

3 years agoFix missing enum values in the C-interface #2507
Sergey Kosarevsky [Wed, 20 Jan 2021 23:33:16 +0000 (02:33 +0300)]
Fix missing enum values in the C-interface #2507

3 years agoMerge pull request #2505 from ben-clayton/update-licnese-checker-cfg
greg-lunarg [Tue, 19 Jan 2021 18:05:02 +0000 (11:05 -0700)]
Merge pull request #2505 from ben-clayton/update-licnese-checker-cfg

license-checker.cfg: Update rules

3 years agoMerge pull request #2504 from cdotstout/fuchsia-cmake
greg-lunarg [Tue, 19 Jan 2021 17:59:05 +0000 (10:59 -0700)]
Merge pull request #2504 from cdotstout/fuchsia-cmake

Add CMake support for Fuchsia

3 years agolicense-checker.cfg: Update rules
Ben Clayton [Mon, 18 Jan 2021 12:27:00 +0000 (12:27 +0000)]
license-checker.cfg: Update rules

The license classification rules in github.com/google/licensecheck have been updated.

3 years agoAdd CMake support for Fuchsia
Craig Stout [Fri, 15 Jan 2021 18:30:23 +0000 (10:30 -0800)]
Add CMake support for Fuchsia

3 years agoMerge pull request #2498 from dezinjob/fix-option-replacement-vs
greg-lunarg [Thu, 7 Jan 2021 02:29:37 +0000 (19:29 -0700)]
Merge pull request #2498 from dezinjob/fix-option-replacement-vs

Fix option replacement when flags are empty

3 years agoMerge pull request #2500 from jeremy-lunarg/hayes-2497
greg-lunarg [Wed, 6 Jan 2021 17:48:00 +0000 (10:48 -0700)]
Merge pull request #2500 from jeremy-lunarg/hayes-2497

Prevent HLSL input under OpenGL semantics

3 years agoMerge pull request #2499 from greg-lunarg/i2494
greg-lunarg [Wed, 6 Jan 2021 01:38:50 +0000 (18:38 -0700)]
Merge pull request #2499 from greg-lunarg/i2494

Fix debugInfo test to target vulkan1.1 as intended

3 years agoPrevent HLSL input under OpenGL semantics
Jeremy Hayes [Tue, 5 Jan 2021 22:54:41 +0000 (15:54 -0700)]
Prevent HLSL input under OpenGL semantics

Fix #2497.