Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-02GLSL: Handle more proper semantics for RelaxedPrecision.Hans-Kristian Arntzen
GLSL and RelaxedPrecision are quite different in what they affect. RelaxedPrecision affects operations, while this is merely implied in GLSL based on inputs. This leads to situations where we have to promote mediump inputs to highp, and the simplest approach is to force highp temporaries for inputs which are consumed in a highp context. For completeness, we also demote RelaxedPrecision inputs to mediump variables. PHI is handled by copying the PHI into a temporary. We have to be very careful with hoisted temporaries, since the child temporary will not be analyzed up-front. We inherit the hoisted-ness state and emit the hoisted child temporary as necessary. When faking the temporaries with OpCopyObject, we make sure to block any variable hoisting. Hoisting children of PHI variables is fine, since PHIs are not hoisted with the same framework as other temporaries.
2022-03-03Add relax_nan_checks options.Hans-Kristian Arntzen
Makes codegen from typical D3D emulation SPIR-V more readable. Also makes cross compilation with NotEqual more sensible. It's very rare to actually need the strict NaN-checks in practice. Also, glslang now emits UnordNotEqual by default it seems, so give up trying to assume OrdNotEqual. Harmonize for UnordNotEqual as the sane default.
2022-01-14Update references for GL_EXT_texture_buffer.Hans-Kristian Arntzen
2022-01-05Roll dependencies.Hans-Kristian Arntzen
2021-12-07Clamp vector element access to vector size.Sebastián Aedo
In cases where we know the size of the vector and the index at compile time, we can check if it's accessing in bounds and rely in undefined behavior otherwise. Signed-off-by: Sebastián Aedo <saedo@codeweavers.com>
2021-11-26MSL: Add 64 bit switch supportSebastián Aedo
Add 64 bit switch support for MSL version 2.2. * Also fixes a wrong endianness conversion. Signed-off-by: Sebastián Aedo <saedo@codeweavers.com>
2021-11-07GLSL: Deal with buffer_reference_align.Hans-Kristian Arntzen
This is somewhat awkward to support, but the best effort we can do here is to analyze various Load/Store opcodes and deduce the ideal overall alignment based on this. This is not a 100% perfect solution, but should be correct for any reasonable use case. Also fix various nitpicks with BDA support while I'm at it.
2021-11-07Handle Modf/Frexp in more cases.Hans-Kristian Arntzen
Consider it a write to a variable, similar to OpStore.
2021-10-25SPIRV-Cross contribution needed for `INTEL_fragment_shader_ordering`Erfan Ahmadi
2021-09-12MSL: Return fragment function value even when last SPIR-V Op is discard ↵Bill Hollings
(OpKill). Add test shader for new functionality. Add legacy test reference shader for unrelated buffer-bitcast test, that doesn't seem to have been added previously.
2021-09-05Add tests for OpSpecConstantOp ops OpQuantizeToF16 and OpSRem.Bill Hollings
Tests provided by @cdavis5e.
2021-09-02GLSL: Emit GL_EXT_buffer_reference_uvec2 as required.Hans-Kristian Arntzen
2021-07-19GLSL: Implement GL_EXT_ray_query.Hans-Kristian Arntzen
2021-06-30GLSL: Support pervertexNV in NV barycentric extension.Hans-Kristian Arntzen
2021-06-28Handle SPIR-V 1.4 selection constructs.Hans-Kristian Arntzen
Fix bug in to_trivial_mix_op, where we made a pre-1.4 assumption that component count of selector is equal to value component count.
2021-06-03Ensure loop control flow hints only appear above loops.Hans-Kristian Arntzen
2021-06-03GLSL: Implement control flow hints.Hans-Kristian Arntzen
2021-05-26Add comment after inf/nan float number for clarifying.xndcn
2021-05-07Honor NoContraction qualifier.Hans-Kristian Arntzen
We'll need to force a temporary and mark it as precise. MSL is a little weird here, but we can piggyback on top of the invariant float math option here to force fma() operations everywhere.
2021-05-07Update reference output.Hans-Kristian Arntzen
2021-04-22Rewrite how non-uniform qualifiers are handled.Hans-Kristian Arntzen
Remove all shenanigans with propagation, and only consume nonuniform qualifiers exactly where needed (last minute).
2021-01-22GLSL: Handle tracing against incoming payload/callable.Hans-Kristian Arntzen
2021-01-08GLSL: Support both SPV_KHR_ray_tracing and NV_ray_tracing.Hans-Kristian Arntzen
Fairly minor differences, so can keep them side by side without too much effort. NV support is effectively deprecated now however. - Add OpConvertUToAccelerationStructureKHR - Ignore/Terminate ray is now a terminator in KHR, but a call in NV. - Fix some bugs with reportIntersection.
2021-01-08Roll dependencies.Hans-Kristian Arntzen
2021-01-07MSL: Always enable Outputs in vertex stages.Hans-Kristian Arntzen
Subsequent stages can legally attempt to read from these variables, which causes compilation failure. Always make sure we emit user outputs in vertex shaders if they are active in the entry point.
2021-01-05GLSL: Handle some extreme edge cases in Output variable initialization.Hans-Kristian Arntzen
Deal with patch blocks, arrays of patch blocks, arrays of blocks, etc.
2020-11-23GLSL: Emit storage qualifiers for buffer_reference.Hans-Kristian Arntzen
2020-11-23Normalize all internal workaround methods to use spv prefix.Hans-Kristian Arntzen
We have been interchanging spv and SPIRV_Cross_ for a while, which causes weirdness since we don't explicitly ban SPIRV_Cross identifiers, as these identifiers are generally used for interface variable workarounds.
2020-11-07Merge pull request #1530 from rdb/legacy-glsl-roundHans-Kristian Arntzen
GLSL: Provide round/roundEven for legacy GLSL
2020-11-07Merge pull request #1527 from rdb/legacy-transposeHans-Kristian Arntzen
GLSL: implement transpose() in GLSL 1.10 / ES 1.00
2020-11-07GLSL: implement transpose() in GLSL 1.10 / ES 1.00rdb
2020-11-06GLSL: Fix round/roundEven for legacy GLSL.rdb
2020-11-06GLSL: Fix support for textureLod in legacy vertex shadersrdb
2020-10-27GLSL: Support a workaround for loading row-major matrices.Hans-Kristian Arntzen
On AMD Windows OpenGL, it has been reported that we need to load matrices via a wrapper function.
2020-09-30GLSL: Add support for transform_feedback3 geometry streams.Hans-Kristian Arntzen
2020-09-22Roll dependencies.dan sinclair
This CL rolls the spirv-tools, spirv-headers and glslang dependencies.
2020-09-17Deal with case where a selection construct conditionally merges/breaks.Hans-Kristian Arntzen
2020-07-29GLSL: Be more aggressive about using type_alias.Hans-Kristian Arntzen
To facilitate an improved linking-by-name use case for older GL, we will be more aggressive about merging struct definitions, even for rather unrelated cases where we don't strictly need to use type aliases.
2020-07-23Roll GLSLang, SPIRV-Headers and SPIRV-Tools.dan sinclair
This Cl updates the various dependencies and the test file outputs.
2020-07-06Roll deps.dan sinclair
This CL updates the GLSLang and SPIRV-Tools depedencies and updates test files as needed.
2020-07-06GLSL: Support I/O flattening with arrays as final type.Hans-Kristian Arntzen
2020-07-03GLSL: Support multi-level struct flattening for I/O.Hans-Kristian Arntzen
2020-06-30GLSL: Fix nested legacy switch workarounds.Hans-Kristian Arntzen
2020-06-29Merge pull request #1410 from KhronosGroup/fix-14062020-06-29Hans-Kristian Arntzen
GLSL: Support switch more properly in legacy ESSL
2020-06-29GLSL: Implement switch on ESSL 1.0.Hans-Kristian Arntzen
Cannot use switch on legacy ESSL, fallback to plain branches.
2020-06-29Implement context-sensitive expression read tracking.Hans-Kristian Arntzen
When inside a loop, treat any read of outer expressions to happen multiple times, forcing a temporary of said outer expressions. This avoids the problem where we can end up relying on loop-invariant code motion to happen in the compiler when converting optimized shaders.
2020-06-29Fix bug with control dependent expression tracking.Hans-Kristian Arntzen
For a direct branch without merge, we lost control dependent expressions.
2020-06-23HLSL: Workaround FXC bugs with degenerate switch blocks.Hans-Kristian Arntzen
When we see a switch block which only contains one default block, emit a do {} while(false) statement instead, which is far more idiomatic and readable anyways.
2020-06-22Roll deps and update tests.dan sinclair
This CL rolls the GLSlang, SPIRV-Tools and SPIRV-Headers dependencies and updates the various test files.
2020-05-22GLSL: Improve support for GL_ARB_shader_draw_parameters in desktop GLSL.Hans-Kristian Arntzen
Opt-in to using the extension to support gl_InstanceIndex.