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
diff options
context:
space:
mode:
authorBill Hollings <bill.hollings@brenwill.com>2021-09-25 21:36:42 +0300
committerBill Hollings <bill.hollings@brenwill.com>2021-09-25 21:36:42 +0300
commitba66a914020c2b00a353c23e495159a172cb965f (patch)
tree2b135883f6b4384222dbfd28fe7bc2c9b5f03beb /reference/opt/shaders-msl
parenta2671e35b07474cdf87fc9a695c07f33f6e06e38 (diff)
MSL: Use vec<T, n> in template SpvHalfTypeSelector for function spvQuantizeToF16().
Adjust SPIRV-Cross unit test reference shaders to accommodate these changes.
Diffstat (limited to 'reference/opt/shaders-msl')
-rw-r--r--reference/opt/shaders-msl/asm/comp/quantize.asm.comp4
1 files changed, 1 insertions, 3 deletions
diff --git a/reference/opt/shaders-msl/asm/comp/quantize.asm.comp b/reference/opt/shaders-msl/asm/comp/quantize.asm.comp
index 81a1a89b..b7e6f919 100644
--- a/reference/opt/shaders-msl/asm/comp/quantize.asm.comp
+++ b/reference/opt/shaders-msl/asm/comp/quantize.asm.comp
@@ -15,9 +15,7 @@ struct SSBO0
template <typename F> struct SpvHalfTypeSelector;
template <> struct SpvHalfTypeSelector<float> { public: using H = half; };
-template <> struct SpvHalfTypeSelector<float2> { public: using H = half2; };
-template <> struct SpvHalfTypeSelector<float3> { public: using H = half3; };
-template <> struct SpvHalfTypeSelector<float4> { public: using H = half4; };
+template<uint N> struct SpvHalfTypeSelector<vec<float, N>> { using H = vec<half, N>; };
template<typename F, typename H = typename SpvHalfTypeSelector<F>::H>
[[clang::optnone]] F spvQuantizeToF16(F val)
{