Skip to content
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

Upgrade to Glslang as of 07-27-2020 #1

Merged
merged 744 commits into from
Jul 29, 2020

Conversation

jsmall-zzz
Copy link

No description provided.

neslimsah and others added 30 commits March 23, 2020 13:49
And suppress some warnings that are too verbose in Web builds.
Fix build on CMake 2.8, and fix Web build
The indentation implies this was the intention. Noticed the issue while trying to compile our code with -Werror -Wall
GL_EXT_ray_query pass-by-reference issues
GL_EXT_ray_query accelerationStructureEXT
Update spirv-tools known_good to latest stable
johnkslang and others added 27 commits July 14, 2020 16:11
…st-output

Kokoro: Print test output to stdout
`glslangValidator` will only return [the codes 0..6](https://github.com/KhronosGroup/glslang/blob/b481744aea1ecf52ee4591afaa0f5e270b9d1636/StandAlone/StandAlone.cpp#L117-L125). Fail the test if anything else is returned (like due to the exe crashing).

Also set `LD_LIBRARY_PATH` to contain the `lib` directory before calling glslang.
runtests: Check error codes, set LD_LIBRARY_PATH
When a return value's type has no precision qualification (e.g., the return
expression is formed from a constructor), and the formal function return type
has a precision qualification, back propagate that from the return type to the
type of the return value's expression.
GLSL/SPV: Propagaet precision qualifier from function to return value.
`license-checker` will be updated to support `**` based wildcards. As part of this, `license-checker` will now traverse into subdirectories that would previously be excluded when the parent directory is excluded.

This change adds new rules that work with both the old version and new, to ease migration.
…checker-rules

Add new rules for update of license-checker
`license-checker` has been updated to support `**` wildcards simplifying the ruless, and multiple license configs.

Add a new config for the bison generated files to ensure their licenses don't change.
…-cfg

Update license-checker.cfg with simplified rules
This was scheduled for today - 20th July 2020.

Updates Appveyor configs to use VS2015 instead.
when traversing the AST to find live UBOs etc, also traverse
references to global module-level variables, incase they are
being filled in from UBOs etc.
Finalize glslang 10.15.3847, start glslang 11, drop support for VS2013
glslang is using C++ 11, which has first class support for variables of the `thread_local` storage class.

By dropping the use of the `OS_[GS]etTLSValue`, we can simplify the logic, and have it support a thread-local default allocator if none is provided.

Issue: KhronosGroup#2346
These were only used for TThreadPool, which now uses `thread_local`.
also search global sequences for live variables
Simplify PoolAlloc by using `thread_local`
Also remove `SPIRV/doc.cpp` from the `SPVRemapper` target as this
is part of `SPIRV`, causing ODR violations. Instead have
`SPVRemapper` link against `SPIRV`.

Fixes ODR violations.
Limit visibility of symbols for internal libraries
…_atomic_float

Add changes for SPV_EXT_shader_atomic_float_add
Update spirv-tools known-good to most recent stable
@tangent-vector tangent-vector merged commit e042508 into shader-slang:master Jul 29, 2020
jsmall-zzz pushed a commit that referenced this pull request Jul 20, 2021
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 KhronosGroup#2222
Refs KhronosGroup#2112
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet