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-18Test aliased names in declared LUTs.Hans-Kristian Arntzen
2022-01-18Handle aliased names in spec constants.Hans-Kristian Arntzen
Need to register resource name.
2022-01-17MSL: Handle constant construct of block-like array types.Hans-Kristian Arntzen
Need this to be context sensitive, since array of block-like struct is template, but struct of block-like array is C-style. Also, test a mix and match, so we have constant array of block-like struct with array inside. :v
2022-01-17MSL: Handle signed atomic min/max.Hans-Kristian Arntzen
C++ deduces this based on the pointer type, so cast to atomic_uint/int if we have to.
2022-01-06Add support for LocalSizeId.Hans-Kristian Arntzen
WorkgroupSize builtin is deprecated in 1.6 and LocalSizeId is supported in Vulkan starting with maintenance4.
2021-11-07Merge pull request #1804 from KhronosGroup/fix-1759Hans-Kristian Arntzen
MSL: Handle non-thread storage class in Modf/Frexp pointer versions.
2021-11-07MSL: Handle non-thread storage class in Modf/Frexp pointer versions.Hans-Kristian Arntzen
2021-11-07Handle Modf/Frexp in more cases.Hans-Kristian Arntzen
Consider it a write to a variable, similar to OpStore.
2021-10-13Test behavior around OpSelect with matrices.Hans-Kristian Arntzen
2021-10-13Fix wrong detection of trivial_mix_op.Hans-Kristian Arntzen
Effectively, only the last component of the select was considered, need to correctly early out if any case is hit.
2021-09-30Improve handling of INT_MIN/INT64_MIN literals.Hans-Kristian Arntzen
We cannot naively convert these to decimal literals. C/C++ (and thus MSL) has extremely awkward literal promotion rules.
2021-08-23MSL: Consider that function/private variables can be block-like.Hans-Kristian Arntzen
Handles a special case with array copies. The implementation of this fix is not perfect, but should be good enough for time being.
2021-07-13MSL: Add test for scalar access chain pull interpolant.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-03Handle odd type for textureGather component.Hans-Kristian Arntzen
2021-05-21MSL: Improve handling of split tessellation access chains.Hans-Kristian Arntzen
2021-04-23MSL: Use proper array for quad tess levels.Hans-Kristian Arntzen
We need to handle loads from array as well, so the float4 hack doesn't work.
2021-04-19MSL: Handle loading Clip/CullDistance in TESE.Hans-Kristian Arntzen
Need to allow the flattened space to go through in some edge cases where we cannot reasonably unflatten.
2021-04-19MSL: Correctly analyze if builtin block is active.Hans-Kristian Arntzen
Need to consider all members, bi_type is invalid for Blocks, need to look at member decorations.
2021-04-19MSL: Test that we can capture cull distance to buffer.Hans-Kristian Arntzen
2021-04-19MSL: Emit multiple threadgroup slices for multi-patch.Hans-Kristian Arntzen
Multiple patches can run in the same workgroup when using multi-patch mode, so we need to allocate enough storage to avoid false sharing.
2021-04-19MSL: Fix initialization of masked threadgroup variables.Hans-Kristian Arntzen
2021-03-09Merge pull request #1635 from KhronosGroup/fix-1627Hans-Kristian Arntzen
Handle edge cases in OpCopyMemory.
2021-03-08Handle edge cases in OpCopyMemory.Hans-Kristian Arntzen
Implement this by synthesizing an OpLoad/OpStore pair instead.
2021-03-08MSL: Add test for logical subgroup arith ops.Hans-Kristian Arntzen
2021-02-26MSL: Deal with pointer-to-pointer qualifier ordering.Hans-Kristian Arntzen
2021-02-17Merge pull request #1622 from KhronosGroup/fix-1619Hans-Kristian Arntzen
MSL: Handle load and store to TessLevel array in TESC.
2021-02-17MSL: Handle load and store to TessLevel array in TESC.Hans-Kristian Arntzen
More edge cases ... :(
2021-02-17MSL: Gracefully assign automatic input locations to builtin attributes.Hans-Kristian Arntzen
2021-02-15MSL: Fixup type when using tessellation levels in TESC functions.Hans-Kristian Arntzen
Need to rewrite array size depending on execution mode.
2021-01-22Check entry point variables in is_hidden_variables.Hans-Kristian Arntzen
Need to be careful not to emit globals we're not supposed to.
2021-01-08MSL: Fix various bugs with framebuffer fetch on macOS and argument buffers.fix-1582Hans-Kristian Arntzen
Introduce a helper to make it clearer if a resource can be considered for argument buffers or not.
2021-01-08MSL: Always use input_attachment_index for framebuffer fetch binding.Hans-Kristian Arntzen
--msl-decoration-binding would end up overriding the input attachment index to binding which is very unexpected and broken.
2021-01-07Add test for pure initializer gl_FragDepth.Hans-Kristian Arntzen
Tests that the builtin is considered active.
2021-01-07MSL: Make sure initialized output builtins are considered active.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-07MSL: Only consider builtin variables if they are part of IO interface.Hans-Kristian Arntzen
2021-01-05MSL: Emit correct initializer for tessellation control points.Hans-Kristian Arntzen
2021-01-05MSL: Handle initializers for tess levels.Hans-Kristian Arntzen
2021-01-04More robust handling of initialized output builtin variables.Hans-Kristian Arntzen
2021-01-04Handle output IO block initializers more robustly.Hans-Kristian Arntzen
2021-01-04Handle reserved identifiers for functions.Hans-Kristian Arntzen
gl_ identifiers are already handled by fixups, so remove redundant code.
2021-01-04MSL: Handle reserved identifiers for entry point.Hans-Kristian Arntzen
We only considered invalid names, and overwrote the alias for the function. The correct fix is to replace illegal names early, do the reserved fixup, then copy back alias to entry point name.
2020-12-07GLSL: Emit nonuniformEXT in correct place for late-combined samplers.Hans-Kristian Arntzen
Need to emit nonuniformEXT(sampler2D()) since constructor expressions in Vulkan GLSL do not propgate the nonuniform qualifier.
2020-11-25spirv_msl: Don't add fixup hooks for builtin variables if they're unused.comex
This is necessary to avoid invalid output because of how implicit dependencies on builtins work. For example, the fixup for `BuiltInSubgroupEqMask` initializes the variable based on `builtin_subgroup_invocation_id_id`, a field storing the ID for a variable with decoration `BuiltInSubgroupLocalInvocationId`. This could be either a variable that already exists in the input (spirv_msl.cpp:300) or, if necessary, a newly created one (spirv_msl.cpp:621). In both cases, though, `builtin_subgroup_invocation_id_id` is only set under the condition `need_subgroup_mask || needs_subgroup_invocation_id`. `need_subgroup_mask` is true if any of the `BuiltInSubgroupXXMask` are set in `active_input_builtins`. Normally, if the program contains `BuiltInSubgroupEqMask`, `Compiler::ActiveBuiltinHandler` will set it in `active_input_builtins`. But this only happens if the variable is actually used, whereas `fix_up_shader_inputs_outputs` loops over all variables in the program regardless of whether they're used. If `BuiltInSubgroupEqMask` is not used, `builtin_subgroup_invocation_id_id` is never set, but before this patch the fixup hook would try to use it anyway, producing MSL that references a nonexistent variable named `_0`. Avoid this by changing `fix_up_shader_inputs_outputs` to skip builtins which are not set in `active_input_builtins` or `active_output_builtins`. And add a test case.
2020-11-21MSL: Expand subgroup support.Chip Davis
Add support for declaring a fixed subgroup size. Metal, like Vulkan with `VK_EXT_subgroup_size_control`, allows the thread execution width to vary depending on factors such as register usage. Unfortunately, this breaks several tests that depend on the subgroup size being what the device says it is. So we'll fix the subgroup size at the size the device declares. The extra invocations in the subgroup will appear to be inactive. Because of this, the ballot mask builtins are now ANDed with the active subgroup mask. Add support for emulating a subgroup of size 1. This is intended to be used by Vulkan Portability implementations (e.g. MoltenVK) when the hardware/software combo provides insufficient support for subgroups. Luckily for us, Vulkan 1.1 only requires that the subgroup size be at least 1. Add support for quadgroup and SIMD-group functions which were added to iOS in Metal 2.2 and 2.3. This will allow clients to take advantage of expanded quadgroup and SIMD-group support in recent Metal versions and on recent Apple GPUs (families 6 and 7). Gut emulation of subgroup builtins in fragment shaders. It turns out codegen for the SIMD-group functions in fragment wasn't implemented for AMD on Mojave; it's a safe bet that it wasn't implemented for the other drivers either. Subgroup support in fragment shaders now requires Metal 2.2.
2020-11-06MSL: Fix regression in image gather handling.Hans-Kristian Arntzen
It was not always possible to get backing variable for a late-combined image sampler.
2020-10-29MSL: Allow framebuffer fetch on Mac in MSL 2.3.Chip Davis
Another Apple GPU feature that will now be supported on Apple Silicon Macs.
2020-10-26MSL: Do not use component::x gather for depth2d textures.Hans-Kristian Arntzen
2020-10-24MSL: Cast broadcast booleans to ushort.Chip Davis
Metal doesn't support broadcasting or shuffling boolean values, but we can work around that by casting it to `ushort`, then casting it back to `bool`. I used `ushort` instead of `uint` because 16-bit values give better throughput on Apple GPUs.