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-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-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-09-05Add tests for OpSpecConstantOp ops OpQuantizeToF16 and OpSRem.Bill Hollings
Tests provided by @cdavis5e.
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-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-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-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-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-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-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-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.
2020-05-20Roll dependenciesdan sinclair
This CL updates the GLSLang, SPIRV-Tools and SPIRV-Headers dependencies.
2020-04-21Ensure unpack/pack2x32 tests are compatible with test suite.Hans-Kristian Arntzen
2020-02-19Roll GLSLang, SPIRV-Tools and SPIRV-HeadersDan Sinclair
This CL rolls the various dependencies of SPIRV-Cross and updates the tests as needed.
2019-12-03Roll SPIRV-Tools, SPIRV-Headers and GLSLangDan Sinclair
This CL updates the three depdencies and updates the tests to handle the new validation errors which are produced.
2019-11-06Merge branch 'deps' of git://github.com/dj2/SPIRV-CrossHans-Kristian Arntzen
2019-11-05Move all .invalid shaders into no-opt folders.Dan Sinclair
2019-11-05Roll GLSLang and SPIRV-ToolsDan Sinclair
This CL rolls the GLSLang and SPIRV-Tools dependencies to tip-of-tree and updates the tests as required.
2019-10-22Merge remote-tracking branch 'upstream/master'Lukas Hermanns
2019-10-14HLSL: Fix unrolled S/G LE/LT/GE/GT opcodes.Hans-Kristian Arntzen
Need to bitcast the unrolled expressions as well.
2019-09-11Update the Metal shaders to account for changes in the shader compilation.Mark Satterthwaite
2019-08-27Move branchless analysis to CFG.Hans-Kristian Arntzen
Traverse backwards instead, far more robust. Should elide basically all redundant continue; statements now.
2019-08-27Elide branches to continue block when continue block is also a merge.Hans-Kristian Arntzen
2019-07-26Do not force temporary unless continue-only for loop dominates.Hans-Kristian Arntzen
We would force temporaries in unexpected places, causing assertions to throw if access chains were consumed in such loops.
2019-07-25Merge pull request #1099 from KhronosGroup/fix-1091Hans-Kristian Arntzen
Missed case where DoWhile continue block deals with Phi.
2019-07-25Missed case where DoWhile continue block deals with Phi.Hans-Kristian Arntzen
2019-07-25Vulkan GLSL: Support disabling samplerless texture function EXT.Hans-Kristian Arntzen
Some platforms support Vulkan GLSL, but not this extension apparently ...
2019-07-24Do not eagerly invalidate all active variables on a branch.Hans-Kristian Arntzen
This is not necessary, as we must emit an invalidating store before we potentially consume an invalid expression. In fact, we're a bit conservative here in this case for example: int tmp = variable; if (...) { variable = 10; } else { // Consuming tmp here is fine, but it was // invalidated while emitting other branch. // Technically, we need to study if there is an invalidating store // in the CFG between the loading block and this block, and the other // branch will not be a part of that analysis. int tmp2 = tmp * tmp; } Fixing this case means complex CFG traversal *everywhere*, and it feels like overkill. Fixing this exposed a bug with access chains, so fix a bug where expression dependencies were not inherited properly in access chains. Access chains are now considered forwarded if there is at least one dependency which is also forwarded.
2019-07-05Add simple test for extended debug operations.Hans-Kristian Arntzen
2019-06-27Handle more cases with FP16 and texture sampling.Hans-Kristian Arntzen
2019-06-25Fix declaration of loop variables with a Phi helper copy.Hans-Kristian Arntzen
Certain Phi variables need to maintain a temporary copy, but we forgot to declare them when the master variable is a loop variable itself.
2019-06-20Rewrite how switch block case labels are emitted.Hans-Kristian Arntzen
2019-05-28Support emitting OpLine directive.Hans-Kristian Arntzen
Facilitates easier mapping from source language to cross-compiled output in tooling.
2019-04-05Detect invalid DoWhileLoop early.Hans-Kristian Arntzen
We had a bug where error conditions in DoWhileLoop emit path would not detect that statements were being emitted due to the masking behavior which happens when force_recompile is true. Fix this. Also, refactor force_recompile into member functions so we can properly break on any situation where this is set, without having to rely on watchpoints in debuggers.
2019-03-21GLSL/HLSL: Implement NMin/NMax/NClamp.Hans-Kristian Arntzen
Need to emulate these calls for correctness.
2019-03-21GLSL: Deal with array loads from input in tessellation.Hans-Kristian Arntzen
We have an edge case where the array is declared with a concrete size, but in GLSL we must emit an unsized array, which breaks array copies. Deal explicitly with this.
2019-03-21GLSL: Unroll loads from builtin pos/point arrays.Hans-Kristian Arntzen
Odd-ball case for certain geometry shaders coming from HLSL.
2019-02-22MSL: Fix textures which are sampled and compared against.Hans-Kristian Arntzen
depth2d in MSL only returns float, not float4, even for normal sampling. We need to conditionally remap-swizzle back to float4.
2019-02-20Fix case where a struct is loaded which contains a row-major matrix.Hans-Kristian Arntzen
2019-02-13GLSL: Fix block name shenanigans in edge cases.Hans-Kristian Arntzen
When we force recompile, the old var.self name we used as a fallback name might have been disturbed, so we should recover certain names back to their original form in case we are forced to take a recompile to make the naming algorithm more deterministic.
2019-02-06Support LUTs in single-function CFGs on Private storage class.Hans-Kristian Arntzen
Fairly common pattern in unoptimized SPIR-V. Support this case as well.
2019-01-30Update to latest glslang/SPIRV-Tools.Hans-Kristian Arntzen
Fix various bugs along the way.