1. 30 Jan, 2021 1 commit
    • callGraph.push_front -> emplace_front to fix UBSAN · 546f626c
      Gleb Mazovetskiy authored
      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
  2. 28 Jan, 2021 1 commit
  3. 27 Jan, 2021 1 commit
  4. 26 Jan, 2021 1 commit
  5. 25 Jan, 2021 1 commit
  6. 21 Jan, 2021 1 commit
  7. 20 Jan, 2021 1 commit
  8. 19 Jan, 2021 2 commits
  9. 18 Jan, 2021 1 commit
  10. 15 Jan, 2021 1 commit
  11. 07 Jan, 2021 1 commit
  12. 06 Jan, 2021 2 commits
  13. 05 Jan, 2021 3 commits
  14. 24 Dec, 2020 2 commits
  15. 23 Dec, 2020 1 commit
  16. 18 Dec, 2020 2 commits
  17. 16 Dec, 2020 2 commits
  18. 15 Dec, 2020 5 commits
  19. 12 Dec, 2020 1 commit
  20. 11 Dec, 2020 3 commits
  21. 08 Dec, 2020 1 commit
  22. 03 Dec, 2020 1 commit
  23. 30 Nov, 2020 1 commit
    • update spirv-headers and fix handling of gl_HitTEXT (#2471) · e11a2c8b
      Daniel Koch authored
      * 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
  24. 25 Nov, 2020 1 commit
  25. 23 Nov, 2020 1 commit
    • Updates for final Vulkan ray tracing extensions (#2466) · ffccefdd
      Daniel Koch authored
      * 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: 's avatarDavid Neto <dneto@google.com>
      Co-authored-by: 's avatarAshwin Lele (NVIDIA Corporation) <alele@nvidia.com>
      Co-authored-by: 's avatarNeslisah <Neslisah.Torosdagli@amd.com>
  26. 16 Nov, 2020 1 commit
  27. 12 Nov, 2020 1 commit