platform/upstream/glslang.git
4 years agoRe-add NV enums for raytracing to prevent build breaks.
alelenv [Wed, 18 Mar 2020 16:30:05 +0000 (09:30 -0700)]
Re-add NV enums for raytracing to prevent build breaks.

4 years agoBump version (also fix line endings the grammar).
John Kessenich [Wed, 18 Mar 2020 14:35:40 +0000 (08:35 -0600)]
Bump version (also fix line endings the grammar).

4 years agoMerge pull request #2130 from dgkoch/EXT_ray_tracing
John Kessenich [Wed, 18 Mar 2020 04:14:21 +0000 (22:14 -0600)]
Merge pull request #2130 from dgkoch/EXT_ray_tracing

Add support for GLSL_EXT_ray_tracing

4 years agoupdate known_good
Daniel Koch [Tue, 17 Mar 2020 23:51:11 +0000 (19:51 -0400)]
update known_good

4 years agoAdd support for GLSL_EXT_ray_tracing
Daniel Koch [Wed, 18 Mar 2020 00:42:47 +0000 (20:42 -0400)]
Add support for GLSL_EXT_ray_tracing

and SPV_KHR_ray_tracing

4 years agoSPV headers: Bump up to the latest header.
John Kessenich [Tue, 17 Mar 2020 14:00:41 +0000 (08:00 -0600)]
SPV headers: Bump up to the latest header.

This contains the base for ray tracing extensions.

4 years agoMerge pull request #2129 from jeffbolznv/memoryBarrierAtomicCounter
John Kessenich [Tue, 17 Mar 2020 07:05:35 +0000 (01:05 -0600)]
Merge pull request #2129 from jeffbolznv/memoryBarrierAtomicCounter

Forbid memoryBarrierAtomicCounter for Vulkan compiles

4 years agoForbid memoryBarrierAtomicCounter for Vulkan compiles
Jeff Bolz [Tue, 17 Mar 2020 04:53:04 +0000 (23:53 -0500)]
Forbid memoryBarrierAtomicCounter for Vulkan compiles

4 years agoFix #2005. Allow multiple compilation units to declare identical push_constant blocks...
Malcolm Bechard [Mon, 16 Mar 2020 14:51:15 +0000 (10:51 -0400)]
Fix #2005. Allow multiple compilation units to declare identical push_constant blocks (#2123)

* Fixes #2005

Allow multiple units in a stage to have push_constants as long
as the blocks match.
Requires #2006 to be fixed to be functional.

* tweaks to #2005 fix after some testing

* add unit tests for push constants across multiple compilation units

For #2005

* update reference output for tests that fail validation

* fix uninitialized result.validationResult

4 years agoAdd flag to check whether offset is implicit or explicit (#2031)
Chow [Wed, 11 Mar 2020 09:59:25 +0000 (17:59 +0800)]
Add flag to check whether offset is implicit or explicit (#2031)

When we use unsized array in shader storage buffer, glslang calculate the offset during delcaring the block, it may lead to incorrect block offsets when its implicit array size changed.

So here is what we do:
1. For GLSL, we add flag explicitOffset in TQualifier, and set it when layout offset is specified explicitly
2. By using this flag we could tell difference as whether it is an explicit offset, and recalculate the block member offset conditionally in OpenGL.

4 years agoUse strcmp for all of the extended instruction set checks in the disassembler (#2107)
Ryan Harrison [Wed, 11 Mar 2020 07:00:13 +0000 (03:00 -0400)]
Use strcmp for all of the extended instruction set checks in the disassembler (#2107)

Fixes #2106

* Convert memcmps to strcmps

4 years agoMerge pull request #2110 from jeffbolznv/escapeseq
John Kessenich [Wed, 11 Mar 2020 05:55:48 +0000 (23:55 -0600)]
Merge pull request #2110 from jeffbolznv/escapeseq

EXT_debug_printf - make escape sequences better match C/C++

4 years agoEXT_debug_printf - make escape sequences better match C/C++
Jeff Bolz [Tue, 10 Mar 2020 15:23:07 +0000 (10:23 -0500)]
EXT_debug_printf - make escape sequences better match C/C++

4 years agoMerge pull request #2105 from jeffbolznv/nonunif
John Kessenich [Tue, 10 Mar 2020 09:50:27 +0000 (03:50 -0600)]
Merge pull request #2105 from jeffbolznv/nonunif

Allow nonuniformEXT() on sampler types

4 years agoMerge pull request #2109 from jeffbolznv/disable_escape
John Kessenich [Tue, 10 Mar 2020 04:53:51 +0000 (22:53 -0600)]
Merge pull request #2109 from jeffbolznv/disable_escape

disable escape sequences for #line and #error

4 years agodisable escape sequences for #line and #error
Jeff Bolz [Tue, 10 Mar 2020 02:09:18 +0000 (21:09 -0500)]
disable escape sequences for #line and #error

4 years agoDecorate accesschain operand for nonuniform UBO loads
Jeff Bolz [Mon, 9 Mar 2020 16:31:15 +0000 (11:31 -0500)]
Decorate accesschain operand for nonuniform UBO loads

This is conservative and still also decorates the loaded value.

4 years agoAllow nonuniformEXT() on sampler types.
Jeff Bolz [Mon, 9 Mar 2020 15:48:12 +0000 (10:48 -0500)]
Allow nonuniformEXT() on sampler types.

Also add missing NonUniformEXT decoration on OpImageTexelPointer.

4 years agoMerge pull request #2103 from kainino0x/web-cmake-typo
John Kessenich [Mon, 9 Mar 2020 08:03:02 +0000 (02:03 -0600)]
Merge pull request #2103 from kainino0x/web-cmake-typo

Fix typo in Web CMakeLists

4 years agoMerge pull request #2102 from sfricke-samsung/sfricke-samsung-android-build
John Kessenich [Mon, 9 Mar 2020 07:54:39 +0000 (01:54 -0600)]
Merge pull request #2102 from sfricke-samsung/sfricke-samsung-android-build

Add Android build instructions to README

4 years agoMerge pull request #2101 from travisfoo/master
John Kessenich [Mon, 9 Mar 2020 07:53:41 +0000 (01:53 -0600)]
Merge pull request #2101 from travisfoo/master

add c wrapper for standalone ResourceLimits and remove that dependency from glslang_c_interface

4 years agoFix typo in Web CMakeLists
Kai Ninomiya [Sat, 7 Mar 2020 03:13:16 +0000 (19:13 -0800)]
Fix typo in Web CMakeLists

4 years agoadd missing string.h header for resource_limits_c.cpp
Travis Fort [Fri, 6 Mar 2020 15:31:14 +0000 (10:31 -0500)]
add missing string.h header for resource_limits_c.cpp

4 years agoadd c wrapper for standalone ResourceLimits and remove that dependency from glslang_c...
Travis Fort [Fri, 6 Mar 2020 15:06:47 +0000 (10:06 -0500)]
add c wrapper for standalone ResourceLimits and remove that dependency from glslang_c_interface

4 years agoMerge pull request #2100 from travisfoo/master
John Kessenich [Fri, 6 Mar 2020 07:14:41 +0000 (00:14 -0700)]
Merge pull request #2100 from travisfoo/master

Fix for #2099: add c interface support for TBuiltInResource and glslang::DefaultTBuiltInResource

4 years agoMerge pull request #2098 from jeffbolznv/debugprintf
John Kessenich [Fri, 6 Mar 2020 07:12:27 +0000 (00:12 -0700)]
Merge pull request #2098 from jeffbolznv/debugprintf

GL_EXT_debug_printf implementation

4 years agoadd stdbool.h to properly support bool type
Travis Fort [Fri, 6 Mar 2020 01:49:49 +0000 (20:49 -0500)]
add stdbool.h to properly support bool type

4 years agoadd c interface support for TBuiltInResource and glslang::DefaultTBuiltInResource
Travis Fort [Thu, 5 Mar 2020 21:05:07 +0000 (16:05 -0500)]
add c interface support for TBuiltInResource and glslang::DefaultTBuiltInResource

4 years agoGL_EXT_debug_printf implementation
Jeff Bolz [Fri, 31 May 2019 18:06:01 +0000 (13:06 -0500)]
GL_EXT_debug_printf implementation

4 years agoAdd Android build instructions to README
Spencer Fricke [Wed, 4 Mar 2020 23:33:59 +0000 (15:33 -0800)]
Add Android build instructions to README

4 years agoImprove formatting.
John Kessenich [Wed, 4 Mar 2020 07:15:20 +0000 (00:15 -0700)]
Improve formatting.

4 years agoAdd "news" section and component status.
John Kessenich [Wed, 4 Mar 2020 07:07:50 +0000 (00:07 -0700)]
Add "news" section and component status.

Includes an additional deprecation and rationalizing the beginning sections.

4 years agoFix long lines in the SPIR-V generator, retrigger bots.
John Kessenich [Tue, 3 Mar 2020 17:25:07 +0000 (10:25 -0700)]
Fix long lines in the SPIR-V generator, retrigger bots.

4 years agoFix #1843: Handle built-in function output parameters to a swizzled arg
John Kessenich [Tue, 3 Mar 2020 14:21:37 +0000 (07:21 -0700)]
Fix #1843: Handle built-in function output parameters to a swizzled arg

In GLSL/HLSL/AST,  v.zyx is an l-value, but not in SPIR-V, which cannot represent it.
So, a temporary is used instead.

4 years agoCopyright update, mostly to trigger bots again.
John Kessenich [Sun, 1 Mar 2020 11:51:40 +0000 (04:51 -0700)]
Copyright update, mostly to trigger bots again.

4 years agoFix #2095: correct the indentation.
John Kessenich [Sun, 1 Mar 2020 09:16:51 +0000 (02:16 -0700)]
Fix #2095: correct the indentation.

This also made it obvious some code was (functionally correctly)
repeated, so deleted that too.

4 years agoFix #1461: set the SPIRV-Tools' optimizer's target environment.
John Kessenich [Fri, 28 Feb 2020 14:10:59 +0000 (07:10 -0700)]
Fix #1461: set the SPIRV-Tools' optimizer's target environment.

4 years agoFix #2091, remove incorrect assert for division by 0.0.
John Kessenich [Fri, 28 Feb 2020 11:09:29 +0000 (04:09 -0700)]
Fix #2091, remove incorrect assert for division by 0.0.

4 years agoMerge pull request #2093 from LilyWangL/vcpkg-instructions
John Kessenich [Fri, 28 Feb 2020 08:01:47 +0000 (01:01 -0700)]
Merge pull request #2093 from LilyWangL/vcpkg-instructions

Add vcpkg installation instructions

4 years agoMerge pull request #2092 from corporateshark/master
John Kessenich [Fri, 28 Feb 2020 07:26:33 +0000 (00:26 -0700)]
Merge pull request #2092 from corporateshark/master

Fix for #2075: removed DefaultTBuiltInResource from glslang_c_interface.cpp

4 years agoAdd vcpkg installation instructions
wangli28 [Fri, 28 Feb 2020 06:41:18 +0000 (06:41 +0000)]
Add vcpkg installation instructions

4 years agoFix for #2075: removed DefaultTBuiltInResource from glslang_c_interface.cpp
Sergey Kosarevsky [Thu, 27 Feb 2020 23:18:37 +0000 (02:18 +0300)]
Fix for #2075: removed DefaultTBuiltInResource from glslang_c_interface.cpp

4 years agoMerge pull request #2090 from amdrexu/bugfix
John Kessenich [Sat, 22 Feb 2020 14:52:12 +0000 (07:52 -0700)]
Merge pull request #2090 from amdrexu/bugfix

Fix an issue of SPV generation for imageAtomicStore.

4 years agoFix an issue of SPV generation for imageAtomicStore.
Rex Xu [Sat, 22 Feb 2020 14:04:31 +0000 (22:04 +0800)]
Fix an issue of SPV generation for imageAtomicStore.

For GLSL function imageAtomicStore, it will be translated to
OpImageTexelPointer + OpAtomicStore. The result type of
OpImageTexelPointer must be the same as the sampled type of OpTypeImage.
On translation, the result type is mistakenly fetched from operand list
operands[2] while operands[2] corresponds to sampleNum whose type is
always uint. This leads to an error if the image type is iimageXXX that is
int image.

4 years agoMerge pull request #2086 from samuelig/SPV_AMD_shader_image_load_store_lod
John Kessenich [Thu, 20 Feb 2020 06:25:39 +0000 (23:25 -0700)]
Merge pull request #2086 from samuelig/SPV_AMD_shader_image_load_store_lod

SPV_AMD_shader_image_load_store_lod is now validated by spirv-tools

4 years agoSPV_AMD_shader_image_load_store_lod is now validated by spirv-tools
Samuel Iglesias Gonsálvez [Mon, 17 Feb 2020 14:42:00 +0000 (15:42 +0100)]
SPV_AMD_shader_image_load_store_lod is now validated by spirv-tools

4 years agoMerge pull request #2089 from Roy-AMD/Fix-iomapper-issue
John Kessenich [Wed, 19 Feb 2020 10:51:38 +0000 (03:51 -0700)]
Merge pull request #2089 from Roy-AMD/Fix-iomapper-issue

Fix iomapper issue

4 years agoFix iomapper issue
Roy.li [Wed, 19 Feb 2020 08:38:02 +0000 (16:38 +0800)]
Fix iomapper issue

Use type name to index map to instead of use instance name to index map, or anonymous block will cause a map issue.

4 years agoMerge pull request #2087 from KhronosGroup/fix-2070-implicit-conv-single-arg
John Kessenich [Tue, 18 Feb 2020 14:27:50 +0000 (07:27 -0700)]
Merge pull request #2087 from KhronosGroup/fix-2070-implicit-conv-single-arg

HLSL: Fix part of #2070: Correctly handle promotion for <unary-op>(int).

4 years agoFix part of #2070: Correctly handle promotion for <unary-op>(int).
John Kessenich [Tue, 11 Feb 2020 13:23:48 +0000 (06:23 -0700)]
Fix part of #2070: Correctly handle promotion for <unary-op>(int).

This still only handles a scalar correctly, and some
vector cases need additional fixes.

4 years agoMerge pull request #2084 from durswd/enable_rtti
John Kessenich [Tue, 18 Feb 2020 02:27:46 +0000 (19:27 -0700)]
Merge pull request #2084 from durswd/enable_rtti

Add an option to make RTTI enabled

4 years agoAdd an option to make RTTI enabled
durswd [Mon, 17 Feb 2020 17:37:09 +0000 (02:37 +0900)]
Add an option to make RTTI enabled

4 years agoMerge pull request #2081 from kainino0x/split-emscripten-from-glslang.js
John Kessenich [Fri, 7 Feb 2020 13:10:29 +0000 (06:10 -0700)]
Merge pull request #2081 from kainino0x/split-emscripten-from-glslang.js

CMake: Split "is emscripten" config from "enable glslang.js"

4 years agoSplit "is emscripten" config from "enable glslang.js"
Kai Ninomiya [Thu, 6 Feb 2020 21:36:52 +0000 (13:36 -0800)]
Split "is emscripten" config from "enable glslang.js"

This should enable glslang to be used as a dependency of other projects
that target WebAssembly, instead of assuming "EMSCRIPTEN" => "Want
glslang.js".

4 years agoMerge pull request #2079 from dneto0/warnings
John Kessenich [Thu, 6 Feb 2020 16:12:50 +0000 (09:12 -0700)]
Merge pull request #2079 from dneto0/warnings

Avoid enum-compare warning, missing cases in switch

4 years agoAvoid enum-compare warning
David Neto [Thu, 6 Feb 2020 10:43:43 +0000 (05:43 -0500)]
Avoid enum-compare warning

4 years agoMerge pull request #2028 from ShchchowAMD/constant_expressions_array_mod
John Kessenich [Thu, 6 Feb 2020 09:56:37 +0000 (02:56 -0700)]
Merge pull request #2028 from ShchchowAMD/constant_expressions_array_mod

GLSL: Support constant folding for mod

4 years agoMerge pull request #2078 from amdrexu/bugfix
John Kessenich [Thu, 6 Feb 2020 09:20:47 +0000 (02:20 -0700)]
Merge pull request #2078 from amdrexu/bugfix

GLSL: Fix semantic error for GL_KHR_memory_scope_semantics

4 years agoFix a parser error of GL_KHR_memory_scope_semantics
Rex Xu [Thu, 6 Feb 2020 08:51:10 +0000 (16:51 +0800)]
Fix a parser error of GL_KHR_memory_scope_semantics

When 2DMS or 2DMSArray is used, IMAGE_PARAMS will take an additional
paramter to represent sample number. The semantics check should get the
correct semantics values, taking this case into account.

4 years agoMerge pull request #2077 from kainino0x/configurable-target-pr
John Kessenich [Wed, 5 Feb 2020 09:02:51 +0000 (02:02 -0700)]
Merge pull request #2077 from kainino0x/configurable-target-pr

glslang.js: Make the SPIR-V target version configurable (1.0 ~ 1.5) and default to 1.0

4 years agoglslang.js: Make the SPIR-V target version configurable (1.0 ~ 1.5)
Kai Ninomiya [Fri, 24 Jan 2020 06:22:34 +0000 (22:22 -0800)]
glslang.js: Make the SPIR-V target version configurable (1.0 ~ 1.5)

4 years agoMerge pull request #2073 from tsuoranta/fix-memory-corruption
John Kessenich [Tue, 4 Feb 2020 08:24:39 +0000 (01:24 -0700)]
Merge pull request #2073 from tsuoranta/fix-memory-corruption

Fix memory corruption in TGlslIoMapper

4 years agoFix memory corruption in TGlslIoMapper
Timo Suoranta [Sun, 2 Feb 2020 09:31:49 +0000 (11:31 +0200)]
Fix memory corruption in TGlslIoMapper

4 years agoMerge pull request #2071 from jeffbolznv/version_less
John Kessenich [Thu, 30 Jan 2020 07:58:38 +0000 (00:58 -0700)]
Merge pull request #2071 from jeffbolznv/version_less

Use NOT ... VERSION_LESS instead of VERSION_GREATER_EQUAL

4 years agoUse NOT ... VERSION_LESS instead of VERSION_GREATER_EQUAL
Jeff Bolz [Thu, 30 Jan 2020 03:39:13 +0000 (21:39 -0600)]
Use NOT ... VERSION_LESS instead of VERSION_GREATER_EQUAL

4 years agoMerge pull request #2068 from jljusten/standalone-fix-long-help
John Kessenich [Wed, 29 Jan 2020 05:25:17 +0000 (22:25 -0700)]
Merge pull request #2068 from jljusten/standalone-fix-long-help

standalone: Fix --help

4 years agostandalone: Fix --help
Jordan Justen [Tue, 28 Jan 2020 20:18:12 +0000 (12:18 -0800)]
standalone: Fix --help

Fixes: bd97b6f9 ("Command-line: Give better error messages. From #1829.")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
4 years agoMerge pull request #2065 from zoddicus/fixChromiumDawnRolls
John Kessenich [Mon, 27 Jan 2020 19:35:25 +0000 (12:35 -0700)]
Merge pull request #2065 from zoddicus/fixChromiumDawnRolls

Use correct enum type in case statement

4 years agoUse correct enum type in case statement
Ryan Harrison [Mon, 27 Jan 2020 19:31:45 +0000 (14:31 -0500)]
Use correct enum type in case statement

Two similarly named enums led to the wrong one being used here, this
is getting caught in the Chromium and Dawn DEPS rolls.

4 years agoBuild: Fix more build warnings caused by PR #2038.
John Kessenich [Mon, 27 Jan 2020 17:16:25 +0000 (10:16 -0700)]
Build: Fix more build warnings caused by PR #2038.

Revisit fix for #2062 for consistency with this commit.

4 years agoMerge pull request #1940 from tsuoranta/fix-gcc9
John Kessenich [Mon, 27 Jan 2020 08:02:08 +0000 (01:02 -0700)]
Merge pull request #1940 from tsuoranta/fix-gcc9

Fix for GCC 9 / Werror=deprecated-copy

4 years agoMerge pull request #2035 from ShchchowAMD/builtin_max_limits
John Kessenich [Mon, 27 Jan 2020 05:38:13 +0000 (22:38 -0700)]
Merge pull request #2035 from ShchchowAMD/builtin_max_limits

Add Tess machine dependent built-in variables initialization for GLES…

4 years agoBuild warning: Fix #2062, missing enum value in a switch.
John Kessenich [Mon, 27 Jan 2020 04:37:38 +0000 (21:37 -0700)]
Build warning: Fix #2062, missing enum value in a switch.

4 years agoMerge pull request #2038 from corporateshark/c_interface
John Kessenich [Fri, 24 Jan 2020 11:10:09 +0000 (04:10 -0700)]
Merge pull request #2038 from corporateshark/c_interface

Implemented C-language interface for glslang

4 years agoMerge pull request #8 from KhronosGroup/master
Roy.li [Tue, 21 Jan 2020 03:22:30 +0000 (11:22 +0800)]
Merge pull request #8 from KhronosGroup/master

Merge code

4 years agoHLSL: Fix #1974: ignore input primitives on non-entry-point functions.
John Kessenich [Fri, 17 Jan 2020 07:11:12 +0000 (00:11 -0700)]
HLSL: Fix #1974: ignore input primitives on non-entry-point functions.

4 years agoFix #2059, and also attempt to skip test bots [skip ci]
John Kessenich [Thu, 16 Jan 2020 07:52:28 +0000 (00:52 -0700)]
Fix #2059, and also attempt to skip test bots [skip ci]

4 years agoMerge pull request #2033 from ShchchowAMD/binding_contradictory
John Kessenich [Thu, 16 Jan 2020 07:23:03 +0000 (00:23 -0700)]
Merge pull request #2033 from ShchchowAMD/binding_contradictory

Add Error check flag in io mapper

4 years agoAdd Error check flag in io mapper
Chow [Tue, 24 Dec 2019 03:49:02 +0000 (11:49 +0800)]
Add Error check flag in io mapper

GLSL could detect contradictory uniform binding, but missing error reporting, even if we could now observe error inside infosink.

Add error check when first time validate uniform binding. When doing traversal, it should be zero error.

This error check flag will be used during linking time. To quickly report errors like contradictory uniform bindings.

Add error check flags for TDefaultGlslIoResolver when catching EPrefixInternalError

4 years agoMerge pull request #2058 from KhronosGroup/vulkan-1.2
John Kessenich [Wed, 15 Jan 2020 17:48:58 +0000 (10:48 -0700)]
Merge pull request #2058 from KhronosGroup/vulkan-1.2

SPV/Vulkan: Add support for Vulkan 1.2, which defaults to SPIR-V 1.5.

4 years agoUpdate to latest SPIRV-Tools, supporting Vulkan 1.2.
John Kessenich [Wed, 15 Jan 2020 16:35:48 +0000 (09:35 -0700)]
Update to latest SPIRV-Tools, supporting Vulkan 1.2.

4 years agoSPV/Vulkan: Add support for Vulkan 1.2, which defaults to SPIR-V 1.5.
John Kessenich [Wed, 15 Jan 2020 07:10:41 +0000 (00:10 -0700)]
SPV/Vulkan: Add support for Vulkan 1.2, which defaults to SPIR-V 1.5.

4 years agoMerge pull request #2046 from Roy-AMD/Fix-multiple-AST-spv-generate-crash-issue
John Kessenich [Fri, 10 Jan 2020 17:19:24 +0000 (10:19 -0700)]
Merge pull request #2046 from Roy-AMD/Fix-multiple-AST-spv-generate-crash-issue

Fix glslang can't link multiple AST in a single stage

4 years agoMerge pull request #1998 from ShchchowAMD/ARB_gpu_shader_fp64
John Kessenich [Wed, 8 Jan 2020 13:18:44 +0000 (06:18 -0700)]
Merge pull request #1998 from ShchchowAMD/ARB_gpu_shader_fp64

Add support for ARB_gpu_shader_fp64

4 years agoPublic: replaced tabs with spaces
Sergey Kosarevsky [Wed, 8 Jan 2020 11:26:44 +0000 (14:26 +0300)]
Public: replaced tabs with spaces

4 years agoCInterface: replaced tabs with spaces
Sergey Kosarevsky [Wed, 8 Jan 2020 11:25:56 +0000 (14:25 +0300)]
CInterface: replaced tabs with spaces

4 years agoMerge pull request #2052 from KhronosGroup/fix-processed-def-undef-1829
John Kessenich [Wed, 8 Jan 2020 09:21:34 +0000 (02:21 -0700)]
Merge pull request #2052 from KhronosGroup/fix-processed-def-undef-1829

Fix #1829: Allow "--" options for def/undef, for OpModuleProcessed.

4 years agoFix #1829: Add "--" command-line options for macro def/undef.
John Kessenich [Tue, 7 Jan 2020 14:03:11 +0000 (07:03 -0700)]
Fix #1829: Add "--" command-line options for macro def/undef.

This allows OpModuleProcessed logging to be consistent with everything taking
"--" options.

4 years agoMove symbol builtin check to grammar stage
Chow [Wed, 8 Jan 2020 06:07:50 +0000 (14:07 +0800)]
Move symbol builtin check to grammar stage

FYI, move builtin check to type symbol check.
Avoid modifying interface doubleCheck().

4 years agoMerge pull request #2048 from Roy-AMD/Add-missing-extension-defination
John Kessenich [Tue, 7 Jan 2020 08:32:53 +0000 (01:32 -0700)]
Merge pull request #2048 from Roy-AMD/Add-missing-extension-defination

Add missing extension defination

4 years agoAdd missing extension defination
Roy [Mon, 6 Jan 2020 07:02:14 +0000 (15:02 +0800)]
Add missing extension defination

This micro should been defined 1, if opengl 2.0 is required.

4 years agoMerge pull request #2032 from ShchchowAMD/atomic-uint-binding
John Kessenich [Tue, 7 Jan 2020 06:49:23 +0000 (23:49 -0700)]
Merge pull request #2032 from ShchchowAMD/atomic-uint-binding

Modify max binding checks for atomic_uint

4 years agoMerge pull request #2050 from ShchchowAMD/built_in_MaxVector
John Kessenich [Mon, 6 Jan 2020 16:21:33 +0000 (09:21 -0700)]
Merge pull request #2050 from ShchchowAMD/built_in_MaxVector

Add builtin constants gl_MaxFragmentUniformVectors and gl_MaxVertexUniformVectors.

4 years agoBump revision
John Kessenich [Mon, 6 Jan 2020 14:50:40 +0000 (07:50 -0700)]
Bump revision

4 years agoAdd builtin constants
Chow [Mon, 6 Jan 2020 07:53:20 +0000 (15:53 +0800)]
Add builtin constants

Add builtin constants:

gl_MaxFragmentUniformVectors and gl_MaxVertexUniformVectors.
They should both be available since version 410 for core.

4 years agoAdd support for ARB_gpu_shader_fp64
Chow [Tue, 26 Nov 2019 09:27:33 +0000 (17:27 +0800)]
Add support for ARB_gpu_shader_fp64

GLSL Version : >= 150

Purpose:
Allow users to use features by enabling this extension, even in low versions.

Extension Name:
ARB_gpu_shader_fp64

Builtin-variables:
Nah

Builtin-functions:
functions overloaded for this extension, please check registry in reference.

Keywords:
Double

Features:
add support for type "double"

Reference:
https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_gpu_shader_fp64.txt

Add support for implicit conversion

1. Remove builtin double vertex (this is introduced by vertex_attrib_64bit
2. Add extension check and implicit conversion as double has been introduced
3. Add test results.

4 years agoFix glslang can't link multiple AST in a single stage
Roy [Fri, 3 Jan 2020 08:21:34 +0000 (16:21 +0800)]
Fix glslang can't link multiple AST in a single stage

Root cause:
GlslangToSpv use symbol structure's ptr as a map key, but multiple shader object can build a new AST.
In the AST the the same symbol has different ptr point to their structure, so indext map faild.

solution:
Add a new map glslangTypeToIdMap to map ptr to symbol id, and use symbol id to index memberRemapper.

4 years agoCInterface: added static asserts to compare C/C++ enums
Sergey Kosarevsky [Mon, 30 Dec 2019 08:13:06 +0000 (11:13 +0300)]
CInterface: added static asserts to compare C/C++ enums

4 years agoAdded LAST_ELEMENT_MARKER for every enum used in the C interface
Sergey Kosarevsky [Mon, 30 Dec 2019 08:11:55 +0000 (11:11 +0300)]
Added LAST_ELEMENT_MARKER for every enum used in the C interface

4 years agoMerge pull request #1997 from ShchchowAMD/ARB_uniform_buffer_object
John Kessenich [Mon, 30 Dec 2019 04:33:41 +0000 (21:33 -0700)]
Merge pull request #1997 from ShchchowAMD/ARB_uniform_buffer_object

Add support for ARB_uniform_buffer_object