forked from KhronosGroup/glslang
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge latest glslang (11.5.0 and later) #2
Merged
jsmall-zzz
merged 1,056 commits into
shader-slang:master
from
jsmall-zzz:feature/glslang-11-5-0b
Jul 20, 2021
Merged
Merge latest glslang (11.5.0 and later) #2
jsmall-zzz
merged 1,056 commits into
shader-slang:master
from
jsmall-zzz:feature/glslang-11-5-0b
Jul 20, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…KhronosGroup#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.
…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.
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 ```
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 KhronosGroup#2423
Add basic GN configurations
…ing_rate Add GL_EXT_fragment_shading_rate
Kokoro: Add configurations for GN presubmit
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.
Fix GN build and presubmits
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.
HLSL: Add support for printf().
NonUniform SPIR-V fixes.
…osGroup#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
…hronosGroup#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 dccca82. * 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 670536b)
… API interface (KhronosGroup#2442) * Add new SpirvToolsDisassemble API interface + Improve Doc on existing API interface (KhronosGroup#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.
Getting error about undefined symbol (include_dir) at line 320. Was trying to append to a non-existant variable. Bug KhronosGroup#2445
…nosGroup#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.
* 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>
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.
…onosGroup#2462) Use of gl_Layer and gl_ViewportIndex in tessellation and vertex shaders should not trigger the addition of the Geometry capability. Fixes KhronosGroup#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 KhronosGroup/SPIRV-Headers#179 to fix the grammar upstream.
no longer causes an incorrect error if the current unit has local_size set, but the incoming unit does not
…p#2463) Fixes a crash in ANGLE. Closes: KhronosGroup#2452
Add support for float spec const vector initialization
avoid declaring them in GLSL 1.50+ if core profile is chosen by the version statement fixes KhronosGroup#2663
Fix SPIR-V remapper not remapping OpExtInst instruction set IDs
Update SPIRV-Tools and SPIRV-Headers
Output variables in GLCompute shaders is not supported in Vulkan. Recent upgrade of spirv-tools revealed this problem.
Remove output variables from compute regression tests
Implement the extension GL_EXT_spirv_intrinsics
…omic_float2 Implement GLSL_EXT_shader_atomic_float2
Remove an unused variable that causes build failures in downstream repository.
only declare compatibility gl_ variables in compatibility mode
Remove unused variable Num_string_literal_EXTs
It was missing, and was breaking the build for Android.mk.
Android.mk: Add SpirvIntrinsics.cpp
Update known goods and CHANGES for 11.5.0
Atomic memory function can only be used for shader storage block member or shared variable.
Add support for gl_MaxVaryingVectors for ogl.
…ock member or shared variable."
…ster Revert "Atomic memory function can only be used for shader storage block member or shared variable."
SPIR-V disallows bool in interface blocks, which is emulated with uint. When loading a bool variable (through accessChainLoad()), it's converted from uint to bool if it came from an interface block. This was handled for bool and bvecN, but not for bool arrays. This change implements the conversion for bool arrays. Closes KhronosGroup#2694
…niform-load Fix loading bool arrays from interface blocks
… feature/glslang-11-5-0b
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.