diff options
Diffstat (limited to 'reference')
3 files changed, 42 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; +} diff --git a/reference/shaders-msl-no-opt/asm/frag/only-initializer-frag-depth.asm.frag b/reference/shaders-msl-no-opt/asm/frag/only-initializer-frag-depth.asm.frag new file mode 100644 index 00000000..3f552ebb --- /dev/null +++ b/reference/shaders-msl-no-opt/asm/frag/only-initializer-frag-depth.asm.frag @@ -0,0 +1,17 @@ +#include <metal_stdlib> +#include <simd/simd.h> + +using namespace metal; + +struct main0_out +{ + float gl_FragDepth [[depth(any)]]; +}; + +fragment main0_out main0() +{ + main0_out out = {}; + out.gl_FragDepth = 0.5; + return out; +} + diff --git a/reference/shaders-no-opt/asm/frag/only-initializer-frag-depth.asm.frag b/reference/shaders-no-opt/asm/frag/only-initializer-frag-depth.asm.frag new file mode 100644 index 00000000..1041f711 --- /dev/null +++ b/reference/shaders-no-opt/asm/frag/only-initializer-frag-depth.asm.frag @@ -0,0 +1,8 @@ +#version 450 + +const float _3_init = 0.5; +void main() +{ + gl_FragDepth = _3_init; +} + |