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-06-07GLSL: Add missing KHR barycentric references.Hans-Kristian Arntzen
2022-05-27GLSL: Add basic support for GL_EXT_shader_atomic_float.Hans-Kristian Arntzen
2022-05-18Promote Unreachable cases into break to avoid fallthrough.Hans-Kristian Arntzen
HLSL is very fussy about fallthrough in switch blocks, so promote Unreachable blocks to breaks if they are inside a switch construct. Some false positives are possible in weird multi-break scenarios, but this is benign.
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.
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-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-03GLSL: Implement control flow hints.Hans-Kristian Arntzen
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-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.
2020-11-23GLSL: Emit storage qualifiers for buffer_reference.Hans-Kristian Arntzen
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-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-29Fix bug with control dependent expression tracking.Hans-Kristian Arntzen
For a direct branch without merge, we lost control dependent expressions.
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-20GLSL: Add more test shaders for hit attribute types.Hans-Kristian Arntzen
2020-05-20GLSL: Support ray payloads and hit attributes declared as Block.Hans-Kristian Arntzen
2020-05-20GLSL: Add some more focused RT test shaders.Hans-Kristian Arntzen
2020-05-08Support gl_InstanceID in RT shaders.Hans-Kristian Arntzen
2020-04-21Ensure unpack/pack2x32 tests are compatible with test suite.Hans-Kristian Arntzen
2020-03-04Add test for disable-storage-image-qualifier-deduction.Hans-Kristian Arntzen
2020-01-27GLSL: Support GL_ARB_enchanced_layouts for XFB.Hans-Kristian Arntzen
2020-01-15GLSL: Implement geometry shader passthrough extension.Hans-Kristian Arntzen
2019-12-10GLSL: Fix array of input patch variables.Hans-Kristian Arntzen
Hoist out the hack to make array sizes unsized to a place where we can differentiate patch variables from control point variables.
2019-12-09GLSL: Fix EmitStreamVertex/Primitive.Hans-Kristian Arntzen
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-05Move all .invalid shaders into no-opt folders.Dan Sinclair
2019-11-04GLSL: Fix issue with array-of-array inputs in tess.Hans-Kristian Arntzen
Only one dimension can be unsized and wrong dimension was used for unrolling purposes.
2019-10-14HLSL: Fix unrolled S/G LE/LT/GE/GT opcodes.Hans-Kristian Arntzen
Need to bitcast the unrolled expressions as well.
2019-10-07Do not consider aliased struct types if the master is not a block.Hans-Kristian Arntzen
It is possible for a shader to declare two plain struct types which simply share the same OpName without there being an implicit value/buffer alias relationship. For to_member_name(), make sure to use the type alias master when resolving member names. The member name may be different in a type alias master if the SPIR-V is being intentionally difficult.
2019-09-02Support the SPV_EXT_fragment_shader_interlock extension.Chip Davis
This was straightforward to implement in GLSL. The `ShadingRateInterlockOrderedEXT` and `ShadingRateInterlockUnorderedEXT` modes aren't implemented yet, because we don't support `SPV_NV_shading_rate` or `SPV_EXT_fragment_invocation_density` yet. HLSL and MSL were more interesting. They don't support this directly, but they do support marking resources as "rasterizer ordered," which does roughly the same thing. So this implementation scans all accesses inside the critical section and marks all storage resources found therein as rasterizer ordered. They also don't support the fine-grained controls on pixel- vs. sample-level interlock and disabling ordering guarantees that GLSL and SPIR-V do, but that's OK. "Unordered" here merely means the order is undefined; that it just so happens to be the same as rasterizer order is immaterial. As for pixel- vs. sample-level interlock, Vulkan explicitly states: > With sample shading enabled, [the `PixelInterlockOrderedEXT` and > `PixelInterlockUnorderedEXT`] execution modes are treated like > `SampleInterlockOrderedEXT` or `SampleInterlockUnorderedEXT` > respectively. and: > If [the `SampleInterlockOrderedEXT` or `SampleInterlockUnorderedEXT`] > execution modes are used in single-sample mode they are treated like > `PixelInterlockOrderedEXT` or `PixelInterlockUnorderedEXT` > respectively. So this will DTRT for MoltenVK and gfx-rs, at least. MSL additionally supports multiple raster order groups; resources that are not accessed together can be placed in different ROGs to allow them to be synchronized separately. A more sophisticated analysis might be able to place resources optimally, but that's outside the scope of this change. For now, we assign all resources to group 0, which should do for our purposes. `glslang` doesn't support the `RasterizerOrdered` UAVs this implementation produces for HLSL, so the test case needs `fxc.exe`. It also insists on GLSL 4.50 for `GL_ARB_fragment_shader_interlock`, even though the spec says it needs either 4.20 or `GL_ARB_shader_image_load_store`; and it doesn't support the `GL_NV_fragment_shader_interlock` extension at all. So I haven't been able to test those code paths. Fixes #1002.
2019-08-28GLSL: Fix post-depth coverage for ESSL.Chip Davis
ESSL does not support `GL_ARB_post_depth_coverage`. There, we must use `GL_EXT_post_depth_coverage`. I've added this as a fallback for desktop as well. Note that `GL_EXT_post_depth_coverage` also requires the fragment shader to set `early_fragment_tests` explicitly, while `GL_ARB_post_depth_coverage` does not. It doesn't really matter either way, since `SPV_KHR_post_depth_coverage` *also* requires both execution modes to be explicitly set.
2019-07-25Vulkan GLSL: Support disabling samplerless texture function EXT.Hans-Kristian Arntzen
Some platforms support Vulkan GLSL, but not this extension apparently ...