David Neto [Tue, 15 Dec 2020 17:19:00 +0000 (12:19 -0500)]
Test updates for ImageRead result type validation
See #2486
David Neto [Tue, 15 Dec 2020 17:09:50 +0000 (12:09 -0500)]
Update known_good, pick up ImageRead result validation
Pick up https://github.com/KhronosGroup/SPIRV-Tools/pull/4072
which validates the result type of OpImageRead.
This also requires test expectation updates.
See #2486 tracks the needed upate to Glslang code generation.
Daniel Koch [Sat, 12 Dec 2020 17:34:24 +0000 (12:34 -0500)]
Fix SPV return type of rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT (#2484)
Issue #2483
According to GLSL spec the prototype is:
uint rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT(rayQueryEXT q, bool committed);
but that was incorrectly getting translated to SPIRV as an `int`, and this was
causing SPIR-V validation errors when used.
Added explicit testing for the return types of all the builtin functions in GL_EXT_ray_query
greg-lunarg [Fri, 11 Dec 2020 22:08:50 +0000 (15:08 -0700)]
Merge pull request #2482 from greg-lunarg/gtfix3
Update README to avoid googletest breakage
Greg Fischer [Fri, 11 Dec 2020 18:27:09 +0000 (11:27 -0700)]
Update README to avoid googletest breakage
Additional fix for #2480
greg-lunarg [Fri, 11 Dec 2020 17:46:44 +0000 (10:46 -0700)]
Fix Travis to use pre-breakage googletest (#2481)
greg-lunarg [Tue, 8 Dec 2020 01:20:27 +0000 (18:20 -0700)]
Update spirv-tools known-good #2 - Pick up ray tracing terminator fix (#2478)
greg-lunarg [Thu, 3 Dec 2020 20:07:33 +0000 (13:07 -0700)]
Update spirv-tools known-good (#2473)
Daniel Koch [Mon, 30 Nov 2020 16:57:34 +0000 (11:57 -0500)]
update spirv-headers and fix handling of gl_HitTEXT (#2471)
* update spirv-headers and fix handling of gl_HitTEXT
Update spirv-headers known_good to
f027d53ded7e230e008d37c8b47ede7cd308e19d
and update SPIRV/spirv.hpp to copy from that version as well.
In GLSL gl_HitTNV/gl_HitTEXT is defined as an alias of gl_RayTmaxNV/gl_RayTmaxEXT
SPV_NV_ray_tracing has a dedicated HitTNV which gl_HitTNV maps to.
For SPV_KHR_ray_tracing, gl_HitTEXT gets mapped to a RayTmaxKHR decoraged variable
to simplify the SPIRV consumer.
This change fixes the mapping for the GL_EXT_ray_tracing extension, and updates
the test results to match.
* update MissNV shader test to not use ObjectRay builtins
They shouldn't existing in the miss stage because there is no object intersected
Daniel Koch [Wed, 25 Nov 2020 04:06:16 +0000 (23:06 -0500)]
Add ray query capability if acceleration structure or ray query types declared (#2469)
* Add ray query capability if acceleration structure used
Fixes #2430
in non-ray tracing stages and the extension is enabled
* Add ray query capability if ray query declared
* Fix printing of TypeRayQueryKHR
It's no longer spelled with "Provisional"
Daniel Koch [Mon, 23 Nov 2020 20:41:27 +0000 (15:41 -0500)]
Updates for final Vulkan ray tracing extensions (#2466)
* Fix traceRay/executeCallable to have id instead of constant.
Update to final (non-provisional) SPIR-V capabilities
(includes review feedback)
- Change visibilty of findLinkerObjects.
See merge request GLSL/glslang!78
* Add support for OpConvertUToAccelerationStructureKHR.
GLSL : https://gitlab.khronos.org/GLSL/GLSL/-/merge_requests/60
SPV : https://gitlab.khronos.org/spirv/spirv-extensions/-/merge_requests/182
See merge request GLSL/glslang!77
* Add volatile qualifier to certain builtins for ray tracing.
See merge request GLSL/glslang!81
* make gl_RayTmaxEXT volatile in intersection shader
Vulkan Issue #2268
* Add testing for layouts on SBT
vulkan/vulkan#2230
- no layout specified should be same as std430
- explicitly test std140, std430, scalar layouts
See merge request GLSL/glslang!86
* Support for new opcodes OpIgnoreIntersectionKHR and OpTerminateRayKHR
vulkan/vulkan#2374
Add support for ignoreIntersectionEXT and terminateRayEXT as block
terminator statements.
See merge request GLSL/glslang!87
* Fix code-generation issues with global ray query variables
See merge request GLSL/glslang!88
* update dependencies for spirv-headers and tools
And update mesh shader results
* Fix indeterminate argument ordering
Authored-by: David Neto <dneto@google.com>
Co-authored-by: Ashwin Lele (NVIDIA Corporation) <alele@nvidia.com>
Co-authored-by: Neslisah <Neslisah.Torosdagli@amd.com>
Shahbaz Youssefi [Mon, 16 Nov 2020 17:22:34 +0000 (12:22 -0500)]
Compile out code for GL_EXT_shader_image_int64 for ANGLE (#2463)
Fixes a crash in ANGLE.
Closes: #2452
Malcolm Bechard [Thu, 12 Nov 2020 20:55:50 +0000 (15:55 -0500)]
tweak local_size comparison a bit (#2456)
no longer causes an incorrect error if the current unit has local_size
set, but the incoming unit does not
David Neto [Thu, 12 Nov 2020 20:00:16 +0000 (15:00 -0500)]
Avoid spuriously adding Geometry capability for vert, tesc, tese (#2462)
Use of gl_Layer and gl_ViewportIndex in tessellation and vertex
shaders should not trigger the addition of the Geometry capability.
Fixes #2461
Added tests for use of gl_Layer and gl_ViewportIndex in a tessellation
evaluation shader.
Several tests for NVIDIA features for tessellation, vertex, or mesh
shaders now lose the Geometry or MultiViewport capabilities.
This is ok because the functionality is already covered by
the ShaderViewportIndexLayerNV capability.
The spv.meshShaderPerViewBuiltins.mesh test now fails validation
because the validator does not know that PrimitiveId (and possibly
other) builtins are enabled by the MeshShadingNV capability.
I filed https://github.com/KhronosGroup/SPIRV-Headers/issues/179 to
fix the grammar upstream.
greg-lunarg [Thu, 12 Nov 2020 18:10:07 +0000 (11:10 -0700)]
New nonuniform analysis (#2457)
This implements a new nonunifom analysis suggested by @jbolz. This change
generates nonUniform decorations that were previously missing and avoids
generation of incorrect decorations. Most notably, it now generates
decorations for nonuniform functions and out params. It avoids generating
decorations for lvalues which themselves are not nonuniform.
Jesse Hall [Mon, 9 Nov 2020 16:30:01 +0000 (08:30 -0800)]
Implement GL_EXT_terminate_invocation (#2454)
* Implement GL_EXT_terminate_invocation.
* terminateInvocation: declare the SPV extension
* Update test results for spirv-tools and bison version bumps
Co-authored-by: John Kessenich <cepheus@frii.com>
rdb [Fri, 6 Nov 2020 17:51:07 +0000 (18:51 +0100)]
Fix token-pasting macros not working in preprocessor directives. (#2453)
Fixes #2443
Chow [Thu, 5 Nov 2020 17:33:45 +0000 (01:33 +0800)]
Fix warning in iomapper. (#2449)
ATT.
Tobski [Wed, 4 Nov 2020 16:24:23 +0000 (16:24 +0000)]
Add GL_EXT_shader_image_int64 support (#2409)
Chow [Tue, 3 Nov 2020 20:34:19 +0000 (04:34 +0800)]
8. io mapping refine & qualifier member check & resolver expand (#2396)
* Code refine and adding missing features
1. Add new level for built in symbols.
2. Fix issues for structure members' qualifiers.
3. Global qualifier fix.
4. IO Mapper refine. Add support for checking with mangle names.
* Additional missing features
* Invariant member. (Only check non-interface).
* Split block nesting level and struct nesting level. To fix issues of checking 'invariant' qualifier.
Current grammar would check block/struct member without its parent class's information.
So we split nesting level, and 'invariant' would only be checked within a struct.
* Format anonymous block names. Refine codes for symbols from all kinds of resouces.
* Fix writeonly check.
* Use LValueBase to find operator.
* Fix random null ptr issue.
* invariant check, stage in io mapping, reference parameter should be used and remove wrong codes introduced with ordering vector.
* Remained: to be fixed with double check link.vk.multiblocksValid
* Fix version error.
invariant
* Revert loc modification.
Courtney Goeltzenleuchter [Tue, 3 Nov 2020 04:22:55 +0000 (21:22 -0700)]
Fix build error with Chromium & ANGLE (#2446)
Getting error about undefined symbol (include_dir) at line 320.
Was trying to append to a non-existant variable.
Bug #2445
pheonix [Mon, 2 Nov 2020 21:40:50 +0000 (13:40 -0800)]
Add new SpirvToolsDisassemble API interface + Improve Doc on existing API interface (#2442)
* Add new SpirvToolsDisassemble API interface + Improve Doc on existing API interface (#2408)
* Add more flexible SpirvToolsDisassemble interface to allow specifying spv_target_env for disassembly output.
Improve documentation on existing SpirvToolsDisassemble interface.
* Update pre-processor check - following existing ENABLE_OPT checks.
* Fix not-found header paths for glslangValidator and glslangtests.
* Add spirv_tools/include path where there is an ENABLE_OPT=1 in the BUILD.gn configuration.
Sidney Just [Mon, 2 Nov 2020 19:27:40 +0000 (11:27 -0800)]
Support for CapabilityShaderViewportIndex and CapabilityShaderLayer (#2432)
* When targeting SPIR-V 1.5, using gl_ViewportIndex will emit OpCapability ShaderViewportIndex and using gl_Layer will emit OpCapability CapabilityShaderLayer. OpCapability ShaderViewportIndexLayerEXT will only get emitted if the target < SPIR-V 1.5
* When using one of the viewport/layer arrays extensions, fallback to OpCapability ShaderViewportIndexLayerEXT, even when targeting SPIR-V 1.5
* Revert "When using one of the viewport/layer arrays extensions, fallback to OpCapability ShaderViewportIndexLayerEXT, even when targeting SPIR-V 1.5"
This reverts commit
dccca82f4076ea6e2bc01dd6d1e5d290c59fab20.
* Using gl_Layer and gl_ViewportIndex outside of the geometry shader stage still requires one of the viewport extensions even when targeting SPIR-V 1.5
(Fixes a problem introduced by
670536b663f396815645b2f907f0ee92117b44f0)
Jaebaek Seo [Mon, 2 Nov 2020 17:49:31 +0000 (12:49 -0500)]
Do not use PropagateLineInfoPass and RedundantLineInfoElimPass (#2440)
* Do not use PropagateLineInfoPass and RedundantLineInfoElimPass
Since spirv-opt will remove PropagateLineInfoPass and
RedundantLineInfoElimPass, glslang should not use it. spirv-opt will
propagate the line instructions and eliminate the redundant lines by
default in IR loading/emission.
* Update known_good.json for spirv-tool
John Kessenich [Fri, 30 Oct 2020 21:10:11 +0000 (15:10 -0600)]
Merge pull request #2387 from BNieuwenhuizen/nonuniform
NonUniform SPIR-V fixes.
John Kessenich [Mon, 26 Oct 2020 20:29:10 +0000 (14:29 -0600)]
Merge pull request #2435 from amdrexu/feature
HLSL: Add support for printf().
Rex Xu [Fri, 23 Oct 2020 14:54:35 +0000 (22:54 +0800)]
HLSL: Add support for printf().
Translate printf() to what GL_EXT_debug_printf has done. HLSL could
define non-constant string variable and we don't have such features
in SPIR-V, so just support constant string variable.
John Kessenich [Thu, 22 Oct 2020 16:35:16 +0000 (10:35 -0600)]
Merge pull request #2429 from ben-clayton/test-gn-presubmit
Fix GN build and presubmits
Ben Clayton [Wed, 21 Oct 2020 12:36:50 +0000 (13:36 +0100)]
Fix GN build and presubmits
Add missing `.cfg` files for GN presubmit.
Add missing `recursedeps` in the `DEPS` file.
Call `./update_glslang_sources.py` before attempting to build.
Add more GN spew to the `.gitignore` file.
John Kessenich [Tue, 20 Oct 2020 23:21:56 +0000 (17:21 -0600)]
Merge pull request #2427 from ben-clayton/gn
Kokoro: Add configurations for GN presubmit
John Kessenich [Tue, 20 Oct 2020 21:25:26 +0000 (15:25 -0600)]
Merge pull request #2428 from Tobski/GL_EXT_fragment_shading_rate
Add GL_EXT_fragment_shading_rate
John Kessenich [Tue, 20 Oct 2020 20:46:15 +0000 (14:46 -0600)]
SPV: Update to the latest SPIR-V header, includes variable-rate shading
Chow [Thu, 2 Jul 2020 07:50:36 +0000 (15:50 +0800)]
Add GL_EXT_fragment_shading_rate
Ben Clayton [Tue, 20 Oct 2020 10:12:26 +0000 (11:12 +0100)]
Kokoro: Add configurations for GN presubmit
Issue: #2421
John Kessenich [Mon, 19 Oct 2020 23:29:18 +0000 (17:29 -0600)]
Merge pull request #2422 from ben-clayton/gn
Add basic GN configurations
Ben Clayton [Mon, 19 Oct 2020 21:21:12 +0000 (22:21 +0100)]
Fix uninitialized use of TIntermediate::resource (#2424)
TIntermediate was constructed without initializing any of the `resources` fields,
and `TProgram::linkStage()` was not calling `TIntermediate::setLimits()`
after constructing new `TIntermediate`s for non-first stages.
Fields of `resources` were then read in `TIntermediate::finalCheck()`
triggering undefined behavior.
This CL makes three changes:
(1) `TIntermediate::setLimits()` is now called for non-first stages by
copying the `firstIntermediate`'s limits. This ensures that the
`resources` fields is initialized, fixing the bug.
(2) `TIntermediate::resources` is now wrapped in a `MustBeAssigned<>`
helper struct, asserting in non-release builds that this field is
always initialized before reading.
(3) `TIntermediate::resources` is now zero-initialized, so that if
the `TIntermediate::resources` field is not set in a release build
(and so the `assert()` will be disabled) behavior is still
deterministic.
Fixes #2423
Ben Clayton [Fri, 16 Oct 2020 13:26:05 +0000 (14:26 +0100)]
Add GN build instructions to README.md
Ben Clayton [Fri, 16 Oct 2020 11:47:38 +0000 (12:47 +0100)]
Add basic GN configurations
This allows glslang to be build standalone using the gn build system.
To build with gn:
```
gclient sync --gclientfile=standalone.gclient
gn gen out/default
cd out/default
ninja
```
Triang3l [Mon, 12 Oct 2020 16:33:01 +0000 (19:33 +0300)]
SPIR-V: Remove SpvTools.h include from disassemble.cpp (#2417)
disassemble.cpp appears not to be using anything from SpvTools.h, but the inclusion of it prevents standalone building of the SPIR-V portion (for instance, when needed purely for generation and disassembly) without SPIRV-Tools dependency.
Rémi Verschelde [Mon, 12 Oct 2020 16:08:47 +0000 (18:08 +0200)]
Remove executable bits from code/data files (#2420)
David Neto [Wed, 7 Oct 2020 22:10:27 +0000 (18:10 -0400)]
Add test case for read-only storage texture passed to helper function (#2414)
This is based on spv.paramMemory.frag.out which exercises the
writeonly storage image case.
This appears to need desktop GLSL.
The generated SPIR-V fails validation because the image_write function
takes a parameter which is pointer to an OpTypeImage with Unknown format.
But the parameters passed in are pointer to OpTypeImage with formats Rgba32f
and Rgba16f. The validator rejects this, saying the parameter types must
match.
jonahryandavis [Wed, 7 Oct 2020 17:32:49 +0000 (13:32 -0400)]
Disable -Wno-conversion on MSVC compiler (#2410)
John Kessenich [Mon, 5 Oct 2020 22:58:31 +0000 (16:58 -0600)]
Revert "Add new SpirvToolsDisassemble API interface + Improve Doc on existing API interface (#2408)"
See issue #2413.
This reverts commit
d1929f359a1035cb169ec54630c24ae6ce0bcc21.
pheonix [Mon, 5 Oct 2020 15:59:27 +0000 (08:59 -0700)]
Add new SpirvToolsDisassemble API interface + Improve Doc on existing API interface (#2408)
* Add more flexible SpirvToolsDisassemble interface to allow specifying spv_target_env for disassembly output.
Improve documentation on existing SpirvToolsDisassemble interface.
* Update pre-processor check - following existing ENABLE_OPT checks.
* Fix not-found header paths for glslangValidator and glslangtests.
John Kessenich [Mon, 28 Sep 2020 00:15:41 +0000 (18:15 -0600)]
Revert "Add more flexible SpirvToolsDisassemble interface to allow specifying spv_target_env for disassembly output. (#2406)"
This reverts commit
2eed8236d07d50f35c466d723651d86284c60161.
pheonix [Sun, 27 Sep 2020 23:53:18 +0000 (16:53 -0700)]
Add more flexible SpirvToolsDisassemble interface to allow specifying spv_target_env for disassembly output. (#2406)
Improve documentation on existing SpirvToolsDisassemble interface.
Fix cmake build scripts to account for `spirv-tools` external when -DENABLE_OPT=ON
craig stout [Sun, 27 Sep 2020 00:43:30 +0000 (20:43 -0400)]
[spirv-remap] Fix undefined behavior in hashing (#2403)
There's a statement that intends to generate a 32-bit hashcode, but due
to integer promotion, the intermediate values can trigger signed integer
overflow, which is undefined behavior.
To avoid this, cast at least one operand to unsigned int before
multiplying, which will cause the result to be promoted to unsigned int
instead of signed int.
With this patch, I'm able to build core for qemu-x64 with host_asan-ubsan.
Fixed: 60128
Change-Id: Idd644e534116bf29dca8013936ac39901bbe68fc
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/glslang/+/428254
Reviewed-by: John Bauman <jbauman@google.com>
Co-authored-by: Drew Fisher <zarvox@google.com>
craig stout [Sat, 26 Sep 2020 17:02:33 +0000 (13:02 -0400)]
[Wconversion] Suppress glslang issue (#2404)
The glslang public includes dir contains headers with implicit
conversion issues. Add -Wno-conversion to glslang's public config.
Bug: 60140
Bug: 58162
Change-Id: Iec27cb4242e9fdceddd6a3e02044a0bccfa0ce36
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/glslang/+/429054
Reviewed-by: Petr Hosek <phosek@google.com>
Co-authored-by: Shai Barack <shayba@google.com>
greg-lunarg [Fri, 25 Sep 2020 02:07:15 +0000 (20:07 -0600)]
Update spirv-tools and spirv-headers known goods (#2401)
Rex Xu [Fri, 18 Sep 2020 13:18:35 +0000 (21:18 +0800)]
SPIRV: Add more utility functions to build some opcodes (#2398)
Add more builder functions to OpExecutionMode, OpExecutionModeId,
OpDecorateString, OpMemberDecorateString.
According to SPIR-V, OpExecutionMode and OpExecutionModeId could
take variable extra operands. Current implementation doesn't support
this and assumes at most 3 operands are extra operands. It is not
true. Similarly, OpDecorateString and OpMemberDecorateString could
support multiple strings either as literal strings or as string
operands. Further, OpDecorate and OpDecorateId have the same problem,
taking variable extra operands.
Chow [Tue, 15 Sep 2020 03:46:24 +0000 (11:46 +0800)]
Preprocessor related issue fix (#2378)
* Preprocessor related fix
1). Accoding to ESSL spec : All macro names containing two consecutive underscores ( __ ) are reserved for future use as predefined macro names, so just report a warning instead of error when the shader defines the macro names begining with '__';
2. According to spec: If an implementation does not recognize the tokens following #pragma, then it will ignore that pragma, so report a compile-time warning intead of error for the following statement:
#pragma debug(1.23)
3. The 'defined' macro should be allowed to expand and '__LINE__' should be allowed to be replaced with its original line number (otherwise, other expanding macros may change this value).
4. Add a flag 'indentifierSeen' in PPContext to indicate whether the any non-preprocessor tokens is existed before the extension directives, because the built-in symbols and functions are parsed before paring the user shader, so add a 'shaderSource' flag to check this error only for the user shader source;
5. Add missing type int16 and uint16.
* Add test results, remove restriction of #extension.
1. Remove extension restriction in first line , as this is contraversy now.
2. The following shader is compiled failed as glslang consider the keyword 'defined' can not be undefined(in the 9th line: "#define defined BBB")
The shader is as following:
According to ES3.0 spec: It is an error to undefine or to redefine a built-in (pre-defined) macro name.
This rule is aimed to the __LINE__, __FILE__, __VERSION__ and GL_ES,
the keyword "defined" should not be restricted by this rule,
so change the compile error to warning and make the following shader compile successfully.
* 1. Using relaxedError to control error/warning report level. 2. remove #extension restriction. 3. Fix version related issue.
1. Using relaxedError to control error/warning report level. 2. remove #extension restriction. 3. Fix version related issue.
* Add test results
* Turn conditional warnings about pragma to unconditional ones.
Rex Xu [Mon, 14 Sep 2020 15:57:09 +0000 (11:57 -0400)]
SPIRV: Add disassembly support for multiple literal strings (#2397)
According to the extension SPV_GOOGLE_decorate_string,
OpDecorateString (or OpMemberDecorateString) ought to be capable of
supporting multiple literal strings. Each literal strings are padded
with null terminator to make word alignment. The layout is:
Inst | Target | Decoration | Literal String, Literal String, ...
Chow [Mon, 14 Sep 2020 14:00:48 +0000 (22:00 +0800)]
Fix scope definition in ES 100. (#2379)
* Remove image2DShadow and other 3 tokens. Refine codes.
Remove image2DShadow and other 3 tokens. Refine codes.
* 110scope.vert has redefinition part of what's removed from 100scope.vert
johnkslang [Mon, 14 Sep 2020 08:49:38 +0000 (02:49 -0600)]
Fix #2385: guard against constant_id on non-const.
John Kessenich [Sun, 13 Sep 2020 04:45:53 +0000 (22:45 -0600)]
Merge pull request #2394 from ShabbyX/subpassLoad
Allow subpassLoad for ANGLE
John Kessenich [Sun, 13 Sep 2020 04:45:22 +0000 (22:45 -0600)]
Merge pull request #2395 from nihui/patch-4
Find python interpreter from host when cross-compiling
nihui [Sat, 12 Sep 2020 03:18:02 +0000 (11:18 +0800)]
Try to find python interpreter from host first
Shahbaz Youssefi [Sat, 12 Sep 2020 02:30:49 +0000 (22:30 -0400)]
Allow subpassLoad for ANGLE
Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
Greg Fischer [Wed, 9 Sep 2020 21:44:52 +0000 (15:44 -0600)]
Add texture sample to nonuniform test
This verifies that the nonuniform decoration does NOT propagate
to the OpSampledImage.
Greg Fischer [Wed, 9 Sep 2020 02:01:55 +0000 (20:01 -0600)]
Add buffer store to nonuniform tests
Bas Nieuwenhuizen [Thu, 3 Sep 2020 01:09:39 +0000 (03:09 +0200)]
SPV: Add NonUniform decoration for constructors.
This is missing in particular for OpSampledImage, which can be
a direct argument for texture operations.
Bas Nieuwenhuizen [Thu, 3 Sep 2020 01:04:13 +0000 (03:04 +0200)]
SPV: Add NonUniform decoration for OpImages created during lowering.
By directly creating the OpImage instructions we were not propagating
the appropriate decorations.
Since this had a lot of cases I centralized the OpImage creation
a bit too.
Bas Nieuwenhuizen [Mon, 24 Aug 2020 21:27:26 +0000 (23:27 +0200)]
SPV: Add NonUniform decorations for stores.
The direct pointer argument to stores has to use
the NonUniform decoration but we were not using
qualifiers at all to decorate the NonUniform pointer.
(Test fixes by Greg Fischer <greg@lunarg.com>)
John Kessenich [Tue, 8 Sep 2020 11:39:06 +0000 (05:39 -0600)]
Merge pull request #2388 from Tobski/rq-initialization-error
Error when initializing rayQuery with assignment
Tobias Hector [Tue, 8 Sep 2020 10:10:27 +0000 (11:10 +0100)]
Added missing copyright amendment
John Kessenich [Mon, 7 Sep 2020 05:05:14 +0000 (23:05 -0600)]
Merge pull request #2386 from amdrexu/bugfix
Parser: Fix wrong names of extension macros
John Kessenich [Mon, 7 Sep 2020 04:48:24 +0000 (22:48 -0600)]
Merge pull request #2389 from amdrexu/bugfix2
SPIRV: Fix some disassembly issues
Rex Xu [Mon, 7 Sep 2020 03:09:21 +0000 (11:09 +0800)]
SPIRV: Fix some disassembly issues
- OpExecutionModeId is not supported in disassembly.
- Some execution modes are missing in disassembled strings.
Tobias Hector [Thu, 3 Sep 2020 14:14:14 +0000 (15:14 +0100)]
Error when initializing rayQuery with assignment
Rex Xu [Wed, 2 Sep 2020 15:03:03 +0000 (23:03 +0800)]
Parser: Fix wrong names of extension macros
The names of some extension macros are wrong because of coding typos.
John Kessenich [Wed, 26 Aug 2020 18:17:42 +0000 (12:17 -0600)]
Merge pull request #2380 from null77/suppress-override-warnings
Suppress two override suggestion warnings.
Jamie Madill [Wed, 26 Aug 2020 04:54:50 +0000 (00:54 -0400)]
Suppress two override suggestion warnings.
We're turning these on in ANGLE and want to keep the build clean.
johnkslang [Sun, 23 Aug 2020 07:31:49 +0000 (01:31 -0600)]
Revert "Merge pull request #2371 from RafaelMarinheiro/master"
This reverts commit
f257e0ea6b9aeab2dc7af3207ac6d29d2bbc01d0, reversing
changes made to
8f0c6bd7732331186b66118d4613cd0dc7076de4.
John Kessenich [Sun, 23 Aug 2020 06:43:18 +0000 (00:43 -0600)]
Merge pull request #2375 from juliusikkala/master
Obey ENABLE_PCH CMake option
Julius Ikkala [Fri, 21 Aug 2020 15:44:06 +0000 (18:44 +0300)]
Obey ENABLE_PCH CMake option
John Kessenich [Mon, 17 Aug 2020 10:04:32 +0000 (04:04 -0600)]
Merge pull request #2371 from RafaelMarinheiro/master
Use --test-root to pass files to Bazel tests.
John Kessenich [Mon, 17 Aug 2020 09:02:44 +0000 (03:02 -0600)]
Merge pull request #2369 from ezdiy/c_api_export
GLSLANG_EXPORT for C APIs.
johnkslang [Sat, 15 Aug 2020 01:39:28 +0000 (19:39 -0600)]
Build: fix a build warning
Rafael Marinheiro [Fri, 14 Aug 2020 21:00:58 +0000 (22:00 +0100)]
Use --test-root to pass files to Bazel tests.
The current implementation makes tests fail when it is imported from a
different Bazel workspace. We fix that by using
the --test-root flag to pass the rootpath to the
tests.
John Kessenich [Fri, 14 Aug 2020 15:41:18 +0000 (09:41 -0600)]
Merge pull request #2367 from KhronosGroup/fix-semantic-checking
Remove incorrect style of extension-based semantic checking.
johnkslang [Fri, 14 Aug 2020 14:40:06 +0000 (08:40 -0600)]
Fix #2366, fix #2358, correctly separate out numerical feature checking
We need separate concepts for
- total set of extensions ever enabled, for the back end
- current state of extensions, for parsing
- the set of features currently enabled for building the AST
johnkslang [Fri, 14 Aug 2020 08:16:19 +0000 (02:16 -0600)]
Non-functional (almost): Refactor when 'extensionRequested' is called.
This detangles incorrect conflation of HLSL with GLSL extensions,
defers asking expensive questions until it's time to ask, and removes
some dead code.
johnkslang [Fri, 14 Aug 2020 06:36:19 +0000 (00:36 -0600)]
Non-functional: Remove reinventing the scalar type, note code issues
The scalar type was already the basic type passed in.
Also factored out of this the checking of extensions for 8/16-bit stuff.
This code seems wrong in several ways, but for now just documenting it.
johnkslang [Tue, 11 Aug 2020 08:27:44 +0000 (02:27 -0600)]
Non-functional: spellings of "destinaton" and "addPairConversion"
John Kessenich [Wed, 12 Aug 2020 17:24:59 +0000 (11:24 -0600)]
Merge pull request #2370 from alan-baker/update-tools
Update tools
Alan Baker [Wed, 12 Aug 2020 13:04:56 +0000 (09:04 -0400)]
Update test expectations
Alan Baker [Wed, 12 Aug 2020 13:04:24 +0000 (09:04 -0400)]
Update SPIRV-Tools and SPIRV-Headers known good
Ez Diy [Mon, 10 Aug 2020 20:26:41 +0000 (22:26 +0200)]
GLSLANG_EXPORT for C APIs.
Fixes FFI breakage introduced in #2283
johnkslang [Fri, 7 Aug 2020 08:26:04 +0000 (02:26 -0600)]
Non-functional: correctly do GL_EXT_buffer_reference2 semantic checking
See #2366 for detail.
johnkslang [Thu, 6 Aug 2020 11:24:24 +0000 (05:24 -0600)]
Non-functional: consistently use 'const TSourceLoc&' to pass location.
johnkslang [Thu, 6 Aug 2020 07:34:14 +0000 (01:34 -0600)]
SPV: Fix #1829: don't emit OpModuleProcessed use-storage-buffer
John Kessenich [Wed, 5 Aug 2020 17:45:39 +0000 (11:45 -0600)]
Merge pull request #2365 from KhronosGroup/update-gtests
Build/Test: Dropping VS 2013 allows using the latest googletests
johnkslang [Wed, 5 Aug 2020 11:23:04 +0000 (05:23 -0600)]
Build/Test: Dropping 2013 allows using the latest googletests.
These have a new spelling: INSTANTIATE_TEST_CASE_P -> INSTANTIATE_TEST_SUITE_P
johnkslang [Tue, 4 Aug 2020 13:17:39 +0000 (07:17 -0600)]
SPV: Standalone; sanity check the client GLSL input semantics option value.
johnkslang [Tue, 4 Aug 2020 09:00:32 +0000 (03:00 -0600)]
SPV: Use more correct SPV-Tools environment, partially addressing #2290
johnkslang [Tue, 4 Aug 2020 08:13:50 +0000 (02:13 -0600)]
SPV: Fix #2363: include trailing newline named text SPV output.
John Kessenich [Mon, 3 Aug 2020 07:28:52 +0000 (01:28 -0600)]
Merge pull request #2362 from ShabbyX/optimize_for_angle
Use GLSLANG_ANGLE to strip features to what ANGLE requires
John Kessenich [Mon, 3 Aug 2020 06:12:02 +0000 (00:12 -0600)]
Merge pull request #2361 from ben-clayton/revert-thread-local
Revert changes that migrate to `thread_local`.
Shahbaz Youssefi [Fri, 3 Jul 2020 19:42:53 +0000 (15:42 -0400)]
Use GLSLANG_ANGLE to strip features to what ANGLE requires
This change strips a few features similar to GLSLANG_WEB but doesn't
remove every detail like the latter. It also hardcodes profile/version
to core/450.
In particular, TBuiltIns::initialize is specialized to remove most of
what is not supported or won't be supported by ANGLE. The result of
this function is parsed with TParseContext::parseShaderStrings which is
a performance bottleneck.
This change shaves about 300KB off of ANGLE's binary size and reduces
the cost of SetupBuiltinSymbolTable to nearly a sixth.
Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
Ben Clayton [Fri, 31 Jul 2020 06:09:17 +0000 (07:09 +0100)]
Revert changes that migrate to `thread_local`.
iOS 8 does not support `thread_local`, which is still in use.
Another approach will have to be found.
This change is a revert of the following changes:
a3845240 - "Simplify PoolAlloc with use of thread_local."
abf92c80 - "Deprecate InitializeDll functions"
33585c87 - "Limit visibility of symbols for internal libraries"
Issue: #2346