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:
authorHans-Kristian Arntzen <post@arntzen-software.no>2019-07-01 11:57:27 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2019-07-01 11:57:27 +0300
commitf8b084de61523957546429c627950adf1803afc3 (patch)
tree5ce3b6cae700daed5c2405d7ea9f8adcf713cc53 /reference/shaders-hlsl
parent04e29895a36b973652aa13c9e17fa6d637ae3f72 (diff)
MSL/HLSL: Support OpOuterProduct.
Diffstat (limited to 'reference/shaders-hlsl')
-rw-r--r--reference/shaders-hlsl/comp/outer-product.comp48
1 files changed, 48 insertions, 0 deletions
diff --git a/reference/shaders-hlsl/comp/outer-product.comp b/reference/shaders-hlsl/comp/outer-product.comp
new file mode 100644
index 00000000..71613d4f
--- /dev/null
+++ b/reference/shaders-hlsl/comp/outer-product.comp
@@ -0,0 +1,48 @@
+RWByteAddressBuffer _21 : register(u0);
+ByteAddressBuffer _26 : register(t1);
+
+void comp_main()
+{
+ float2x2 _32 = float2x2(asfloat(_26.Load2(0)) * asfloat(_26.Load2(0)).x, asfloat(_26.Load2(0)) * asfloat(_26.Load2(0)).y);
+ _21.Store2(0, asuint(_32[0]));
+ _21.Store2(8, asuint(_32[1]));
+ float2x3 _41 = float2x3(asfloat(_26.Load3(16)) * asfloat(_26.Load2(0)).x, asfloat(_26.Load3(16)) * asfloat(_26.Load2(0)).y);
+ _21.Store3(16, asuint(_41[0]));
+ _21.Store3(32, asuint(_41[1]));
+ float2x4 _50 = float2x4(asfloat(_26.Load4(32)) * asfloat(_26.Load2(0)).x, asfloat(_26.Load4(32)) * asfloat(_26.Load2(0)).y);
+ _21.Store4(48, asuint(_50[0]));
+ _21.Store4(64, asuint(_50[1]));
+ float3x2 _58 = float3x2(asfloat(_26.Load2(0)) * asfloat(_26.Load3(16)).x, asfloat(_26.Load2(0)) * asfloat(_26.Load3(16)).y, asfloat(_26.Load2(0)) * asfloat(_26.Load3(16)).z);
+ _21.Store2(80, asuint(_58[0]));
+ _21.Store2(88, asuint(_58[1]));
+ _21.Store2(96, asuint(_58[2]));
+ float3x3 _66 = float3x3(asfloat(_26.Load3(16)) * asfloat(_26.Load3(16)).x, asfloat(_26.Load3(16)) * asfloat(_26.Load3(16)).y, asfloat(_26.Load3(16)) * asfloat(_26.Load3(16)).z);
+ _21.Store3(112, asuint(_66[0]));
+ _21.Store3(128, asuint(_66[1]));
+ _21.Store3(144, asuint(_66[2]));
+ float3x4 _74 = float3x4(asfloat(_26.Load4(32)) * asfloat(_26.Load3(16)).x, asfloat(_26.Load4(32)) * asfloat(_26.Load3(16)).y, asfloat(_26.Load4(32)) * asfloat(_26.Load3(16)).z);
+ _21.Store4(160, asuint(_74[0]));
+ _21.Store4(176, asuint(_74[1]));
+ _21.Store4(192, asuint(_74[2]));
+ float4x2 _82 = float4x2(asfloat(_26.Load2(0)) * asfloat(_26.Load4(32)).x, asfloat(_26.Load2(0)) * asfloat(_26.Load4(32)).y, asfloat(_26.Load2(0)) * asfloat(_26.Load4(32)).z, asfloat(_26.Load2(0)) * asfloat(_26.Load4(32)).w);
+ _21.Store2(208, asuint(_82[0]));
+ _21.Store2(216, asuint(_82[1]));
+ _21.Store2(224, asuint(_82[2]));
+ _21.Store2(232, asuint(_82[3]));
+ float4x3 _90 = float4x3(asfloat(_26.Load3(16)) * asfloat(_26.Load4(32)).x, asfloat(_26.Load3(16)) * asfloat(_26.Load4(32)).y, asfloat(_26.Load3(16)) * asfloat(_26.Load4(32)).z, asfloat(_26.Load3(16)) * asfloat(_26.Load4(32)).w);
+ _21.Store3(240, asuint(_90[0]));
+ _21.Store3(256, asuint(_90[1]));
+ _21.Store3(272, asuint(_90[2]));
+ _21.Store3(288, asuint(_90[3]));
+ float4x4 _98 = float4x4(asfloat(_26.Load4(32)) * asfloat(_26.Load4(32)).x, asfloat(_26.Load4(32)) * asfloat(_26.Load4(32)).y, asfloat(_26.Load4(32)) * asfloat(_26.Load4(32)).z, asfloat(_26.Load4(32)) * asfloat(_26.Load4(32)).w);
+ _21.Store4(304, asuint(_98[0]));
+ _21.Store4(320, asuint(_98[1]));
+ _21.Store4(336, asuint(_98[2]));
+ _21.Store4(352, asuint(_98[3]));
+}
+
+[numthreads(1, 1, 1)]
+void main()
+{
+ comp_main();
+}