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>2021-01-07 16:30:35 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2021-01-08 12:17:42 +0300
commit3136e342157d0b29efba7402e33e23d7373b893c (patch)
treeb9785eefedd614b1d71d6d3f2bc1a18c013d7f23 /reference/shaders-msl-no-opt
parent134a520034079692a5f3b0acb204bb916fb1ff10 (diff)
MSL: Always use input_attachment_index for framebuffer fetch binding.
--msl-decoration-binding would end up overriding the input attachment index to binding which is very unexpected and broken.
Diffstat (limited to 'reference/shaders-msl-no-opt')
-rw-r--r--reference/shaders-msl-no-opt/frag/subpass-input.decoration-binding.ios.framebuffer-fetch.msl2.argument.frag23
1 files changed, 23 insertions, 0 deletions
diff --git a/reference/shaders-msl-no-opt/frag/subpass-input.decoration-binding.ios.framebuffer-fetch.msl2.argument.frag b/reference/shaders-msl-no-opt/frag/subpass-input.decoration-binding.ios.framebuffer-fetch.msl2.argument.frag
new file mode 100644
index 00000000..8c7f67b6
--- /dev/null
+++ b/reference/shaders-msl-no-opt/frag/subpass-input.decoration-binding.ios.framebuffer-fetch.msl2.argument.frag
@@ -0,0 +1,23 @@
+#include <metal_stdlib>
+#include <simd/simd.h>
+
+using namespace metal;
+
+struct spvDescriptorSetBuffer0
+{
+ sampler uSampler [[id(8)]];
+ texture2d<float> uTex [[id(9)]];
+};
+
+struct main0_out
+{
+ float4 FragColor [[color(0)]];
+};
+
+fragment main0_out main0(constant spvDescriptorSetBuffer0& spvDescriptorSet0 [[buffer(0)]], float4 uSub [[color(1)]])
+{
+ main0_out out = {};
+ out.FragColor = uSub + spvDescriptorSet0.uTex.sample(spvDescriptorSet0.uSampler, float2(0.5));
+ return out;
+}
+