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 14:18:07 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2021-01-07 17:32:15 +0300
commit03ee71e86c8ac46bc40e8236c54141832a686478 (patch)
tree1140879c3f370dff14fc6f133378c962c2cac96d /reference/shaders-hlsl-no-opt/asm/frag/only-initializer-frag-depth.asm.frag
parent3776d8978c19ecd3e4d8037aa26ac956cc52c1b9 (diff)
Add test for pure initializer gl_FragDepth.
Tests that the builtin is considered active.
Diffstat (limited to 'reference/shaders-hlsl-no-opt/asm/frag/only-initializer-frag-depth.asm.frag')
-rw-r--r--reference/shaders-hlsl-no-opt/asm/frag/only-initializer-frag-depth.asm.frag17
1 files changed, 17 insertions, 0 deletions
diff --git a/reference/shaders-hlsl-no-opt/asm/frag/only-initializer-frag-depth.asm.frag b/reference/shaders-hlsl-no-opt/asm/frag/only-initializer-frag-depth.asm.frag
new file mode 100644
index 00000000..dcbe5d13
--- /dev/null
+++ b/reference/shaders-hlsl-no-opt/asm/frag/only-initializer-frag-depth.asm.frag
@@ -0,0 +1,17 @@
+static float gl_FragDepth = 0.5f;
+struct SPIRV_Cross_Output
+{
+ float gl_FragDepth : SV_Depth;
+};
+
+void frag_main()
+{
+}
+
+SPIRV_Cross_Output main()
+{
+ frag_main();
+ SPIRV_Cross_Output stage_output;
+ stage_output.gl_FragDepth = gl_FragDepth;
+ return stage_output;
+}