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-01-05Roll dependencies.Hans-Kristian Arntzen
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-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-02GLSL: Emit GL_EXT_buffer_reference_uvec2 as required.Hans-Kristian Arntzen
2021-07-19GLSL: Implement GL_EXT_ray_query.Hans-Kristian Arntzen
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.
2020-11-23GLSL: Emit storage qualifiers for buffer_reference.Hans-Kristian Arntzen
2020-09-22Roll dependencies.dan sinclair
This CL rolls the spirv-tools, spirv-headers and glslang dependencies.
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-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-21Merge pull request #1370 from dj2/roll_deps_20Hans-Kristian Arntzen
Roll dependencies
2020-05-20Roll dependenciesdan sinclair
This CL updates the GLSLang, SPIRV-Tools and SPIRV-Headers dependencies.
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-03-30Roll GLSLang, SPIRV-Tools and SPIRV-Headersdan sinclair
This CL rolls the various dependencies and updates tests as needed.
2019-11-05Move all .invalid shaders into no-opt folders.Dan Sinclair
2019-09-18Update external/ to SPIR-V 1.5Ryan Harrison
Rolled the hashes used for glslang, SPIRV-Tools, and SPIRV-Headers to HEAD, which includes the update to 1.5. Added passing '--amb' to glslang, so I didn't have to explicitly set bindings in a large number of test shaders that currently don't, and now glslang considers them invalid. Marked all shaders that no longer pass spirv-val as .invalid.
2019-07-19Don't forward uses of an OpIsHelperInvocationEXT op.Chip Davis
If this is computed *before* a `demote`, but used *after*, forwarding it will produce the wrong value. This does make for uglier shaders, but it's necessary right now to ensure correctness. I needed to use an assembly shader to produce the test for this. `spirv-opt` is not smart enough (or too smart?) to eliminate the variable that would be used in GLSL to express this.
2019-07-17Support the SPV_EXT_demote_to_helper_invocation extension.Chip Davis
This extension provides a new operation which causes a fragment to be discarded without terminating the fragment shader invocation. The invocation for the discarded fragment becomes a helper invocation, so that derivatives will remain defined. The old `HelperInvocation` builtin becomes undefined when this occurs, so a second new instruction queries the current helper invocation status. This is only fully supported for GLSL. HLSL doesn't support the `IsHelperInvocation` operation and MSL doesn't support the `DemoteToHelperInvocation` op. Fixes #1052.
2019-07-15Merge branch 'device-group' of git://github.com/cdavis5e/SPIRV-CrossHans-Kristian Arntzen
2019-07-14Update external repos.Chip Davis
Fix fallout from changes. There's a bug in glslang that prevents `float16_t`, `[u]int16_t`, and `[u]int8_t` constants from adding the corresponding SPIR-V capabilities. SPIRV-Tools, meanwhile, tightened validation so that these constants are only valid if the corresponding `Float16`, `Int16`, and `Int8` caps are on. This affects the `16bit-constants.frag` test for GLSL and MSL.
2019-07-14Support the SPV_KHR_device_group extension.Chip Davis
The only piece added by this extension is the `DeviceIndex` builtin, which tells the shader which device in a grouped logical device it is running on. Metal's pipeline state objects are owned by the `MTLDevice` that created them. Since Metal doesn't support logical grouping of devices the way Vulkan does, we'll thus have to create a pipeline state for each device in a grouped logical device. The upcoming peer group support in Metal 3 will not change this. For this reason, for Metal, the device index is supplied as a constant at pipeline compile time. There's an interaction between `VK_KHR_device_group` and `VK_KHR_multiview` in the `VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT`, which defines the view index to be the same as the device index. The new `view_index_from_device_index` MSL option supports this functionality.
2019-06-06Deal with case where a variable is dominated by inner part of a loop.Hans-Kristian Arntzen
There is a risk that we try to preserve a loop variable through multiple iterations, even though the dominating block is inside a loop. Fix this by analyzing if a block starts off by writing to a variable. In that case, there cannot be any preservation going on. If we don't, pretend the loop header is reading the variable, which moves the variable to an appropriate scope.
2019-05-28GLSL: Support std430 in UBOs with scalar layout.Hans-Kristian Arntzen
2019-05-09GLSL: Support OpBitcast for buffer references.Hans-Kristian Arntzen
Update glslang/SPIRV-Tools/SPIRV-Headers references.
2019-05-02GLSL: Support GL_EXT_nonuniform_qualifier.Hans-Kristian Arntzen
2019-04-26GLSL: Support GL_EXT_scalar_block_layout.2019-04-26Hans-Kristian Arntzen
2019-04-26GLSL: Implement GL_EXT_buffer_reference.Hans-Kristian Arntzen
Buffer objects can contain arbitrary pointers to blocks. We can also implement ConvertPtrToU and ConvertUToPtr. The latter can cast a uint64_t to any type as it pleases, so we will need to generate fake buffer reference blocks to be able to cast the type.
2019-03-27Make ray-tracing files .nocompat.Hans-Kristian Arntzen
2019-03-26Add generated reference shaders againPatrick Mours
2019-03-19GLSL: Support emitting push constant block as a plain UBO.Hans-Kristian Arntzen
2019-01-30GLSL/MSL: Implement 8-bit part of VK_KHR_shader_float16_int8.Hans-Kristian Arntzen
Storage was in place already, so mostly just dealing with bitcasts and constants. Simplies some of the bitcasting logic, and this exposed some bugs in the implementation. Refactor to use correct width integers with explicit bitcast opcodes.
2019-01-30Update to latest glslang/SPIRV-Tools.Hans-Kristian Arntzen
Fix various bugs along the way.
2019-01-10Rewrite how IDs are iterated over.Hans-Kristian Arntzen
This is a fairly fundamental change on how IDs are handled. It serves many purposes: - Improve performance. We only need to iterate over IDs which are relevant at any one time. - Makes sure we iterate through IDs in SPIR-V module declaration order rather than ID space. IDs don't have to be monotonically increasing, which was an assumption SPIRV-Cross used to have. It has apparently never been a problem until now. - Support LUTs of structs. We do this by interleaving declaration of constants and struct types in SPIR-V module order. To support this, the ParsedIR interface needed to change slightly. Before setting any ID with variant_set<T> we let ParsedIR know that an ID with a specific type has been added. The surface for change should be minimal. ParsedIR will maintain a per-type list of IDs which the cross-compiler will need to consider for later. Instead of looping over ir.ids[] (which can be extremely large), we loop over types now, using: ir.for_each_typed_id<SPIRVariable>([&](uint32_t id, SPIRVariable &var) { handle_variable(var); }); Now we make sure that we're never looking at irrelevant types.
2018-11-02Use specific base types for 8- and 16-bit integers.Chip Davis
2018-11-01Add support for 8- and 16-bit types to GLSL and MSL.Chip Davis
In GLSL, 8-bit types require GL_EXT_shader_8bit_storage. 16-bit types can use either GL_AMD_gpu_shader_int16/GL_AMD_gpu_shader_half_float or GL_EXT_shader_16bit_storage.
2018-11-01Deal with OpSpecConstantOp used as array size.Hans-Kristian Arntzen
When trying to validate buffer sizes, we usually need to bail out when using SpecConstantOps, but for some very specific cases where we allow unsized arrays currently, we can safely allow "unknown" sized arrays as well. This is probably the best we can do, when we have even more difficult cases than this, we throw a more sensible error message.
2018-11-01Add test case for local_size_x_id and some complex cases.Hans-Kristian Arntzen
2018-11-01Update tests.Hans-Kristian Arntzen
2018-11-01Alter the handling of spec consts in non-Vulkan GLSLGrigory Dzhavadyan
Previously, when generating non-Vulkan GLSL, each use of a spec constant would be subsituted for its default value and the declaration of the constant itself would be omitted completely. This change slightly alters this behavior. The uses of the constant are kept, as well as the declaration, although the latter is stripped of the layout qualifier. The declaration is also prepended with the following code: #ifndef <constant name>_value #define <constant name> <default constant value> #endif and the constant itself now looks like const <constant type> <constant name> = <constant name>_value; The rationale for this change is that it gives the user a way to provide custom values for specialization constants even when the target does not support them.
2018-06-25Support ternary expressions in OpSpecConstantOp.Hans-Kristian Arntzen
2018-05-02Deal with fake overloads when using combined image samplers.Hans-Kristian Arntzen
2018-04-27Remove some stale test files.Hans-Kristian Arntzen
2018-04-23Add new tests for combined arrays of sampler + image.Hans-Kristian Arntzen