* 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
* 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>
* 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
This introduces five new "Validation failures":
- baseResults/hlsl.semantic.vert: issue with gl_ClipDistance/CullDistance
- baseResults/spv.430.vert: issue gl_ClipDistance
- baseResults/spv.450.tesc: still unknown
- baseResults/spv.dataOut.frag: gl_FragData should not be supported, problem with front end
- baseResults/spv.meshShaderPerViewUserDefined.mesh: seems okay, maybe a problem with SPIRV-Tools
* Update tests according to spirv-opt update
We refactored function inlining pass of spirv-opt and it results in
different numbering of result ids in SPIR-V code. This commit updates
test cases to avoid a test failure according to the spirv-opt update.
* Update known good
Update the known good SPIRV-Tools commit to eventually propagate the
commit allowing the ray tracing stages in pass instrumentation to the
vulkan validation layers (validation layers depends on glslang which
depends on spirv-tools).
Including spirv and AST tests
Also increase size of TBuiltInVariable bitfields since we've now exceeded 127
and add a static_assert to make this easier to find next time it happens!
You may need to install python 3.x and also
[windows users] may need to get it in your path in front of python 2.7.x.
If you don't need the external projects (i.e., SPIRV-Tools) and don't want
to upgrade to python 3, don't create the External subdirectory and CMake
won't require python 3. (CMake has a bug that makes it find the wrong one
on a first pass if the top level does not require the version needed by
lower levels.)
Includes the following:
Add Vulkan 1.1 capability sets
Don't merge types of resources
Remove stores of undef.
Make sure the constant folder get the correct type.
Includes the following spirv-opt improvements:
Preserve inst-to-block and def-use in passes.
Add store for var initializer in inlining.
Handle types with self references.
Includes:
Fold divide and multiply by same value.
Allow ADCE to remove more instructions.
Remove dead Workgroup variables in ADCE.
Fold fclamp feeding compare.
Add pass to fold a load feeding an extract.
Remove redundant stores.
SROA: Only create symbols that are loaded.
Get ADCE to handle OpCopyMemory
Remove the limit on struct size in SROA.
Notably, this includes the following:
- Fix exponential performance of DeadInsertElim
- Constant folding of OpVectorTimesScalar
- Add Vector DCE
- Add store-store elimination to LocalSingleBlockElim
- Improve folding of OpVectorTimesScalar and OpPhi
- Fixes handling of kill and unreachable ops in inlining
Changes include:
Fix SSA rewrite for nested loops.
Add support for two new extensions:
- SPV_NV_shader_subgroup_partitioned
- SPV_EXT_descriptor_indexing
Legalize OpImageTexelPointer
Copy propagate arrays
Contains the following improvements:
Fixes 1341: Atomics (and other instructions with side-effects) removed.
Add folding for redundant add/sub/mul/div/mix operations
Add constant folding rules for floating-point comparison
Add folding of redundant OpSelect insns
Add folding of OpCompositeExtract and OpConstantComposite
Update SPIRV-Tools. Relevant functional changes:
- Optimizer enhancements:
- ADCE now removes OpSwitch
- Block merging occurs in more cases
- Optimizer fixes:
- Constant propagation (CCP): support matrix constants
- #1199: Optimizer: Fix CCP: don't propagate spec constants.
- #1203: Optimizer: Fix common uniform elim bug introduced by refactoring.
- #1210: Optimizer: Aggressive dead code elimination: Fix 'break' identification.
- #1212: Optimizer: Aggressive dead code elimination: Was skipping too many instructions.
- #1214: Optimizer: Aggressive dead code elimination: Fix infinite loop.
- #1228: Optimizer: Fix CCP: Handling of varying Phi nodes; was resulting in infinite loop.
- #1245: Optimizer: Dead branch elimination: Avoid a null pointer dereference.
- #1250: Optimizer: Dead branch elimination: Avoid spuriously reporting a change.
- #1262: Support building on VisualStudio 2013 again
Update SPIRV-Headers, with "unified1" directory.
Updated one Glslang legalization test base result due to better block merging.
Also added known-good mechanism to fetch latest validated spirv-tools.
Also added -Od and -Os to disable optimizer and optimize for size.
Fetching spirv-tools is optional for both glsl and hlsl. Legalization
of hlsl is done by default if spirv-opt is present at cmake time.
Optimization for glsl is currently done through the option -Os.
Legalization testing is currently only done on four existing shaders.
A separate baseLegalResults directory holds those results. All previous
testing is done with the optimizer disabled.