MSL: Split out early_fragment_tests.

Was causing compilation failures, jumped the merge a bit too soon.
This commit is contained in:
Hans-Kristian Arntzen 2018-11-12 16:20:49 +01:00
parent 4e5c8d7199
commit d6be21543d
9 changed files with 47 additions and 6 deletions

View File

@ -8,7 +8,7 @@ struct main0_out
float gl_FragDepth [[depth(greater)]];
};
[[ early_fragment_tests ]] fragment main0_out main0()
fragment main0_out main0()
{
main0_out out = {};
out.gl_FragDepth = 0.5;

View File

@ -8,7 +8,7 @@ struct main0_out
float gl_FragDepth [[depth(less)]];
};
[[ early_fragment_tests ]] fragment main0_out main0()
fragment main0_out main0()
{
main0_out out = {};
out.gl_FragDepth = 0.5;

View File

@ -0,0 +1,17 @@
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct main0_out
{
float4 FragColor [[color(0)]];
};
[[ early_fragment_tests ]] fragment main0_out main0()
{
main0_out out = {};
out.FragColor = float4(1.0);
return out;
}

View File

@ -8,7 +8,7 @@ struct main0_out
float gl_FragDepth [[depth(greater)]];
};
[[ early_fragment_tests ]] fragment main0_out main0()
fragment main0_out main0()
{
main0_out out = {};
out.gl_FragDepth = 0.5;

View File

@ -8,7 +8,7 @@ struct main0_out
float gl_FragDepth [[depth(less)]];
};
[[ early_fragment_tests ]] fragment main0_out main0()
fragment main0_out main0()
{
main0_out out = {};
out.gl_FragDepth = 0.5;

View File

@ -0,0 +1,17 @@
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct main0_out
{
float4 FragColor [[color(0)]];
};
[[ early_fragment_tests ]] fragment main0_out main0()
{
main0_out out = {};
out.FragColor = float4(1.0);
return out;
}

View File

@ -1,5 +1,4 @@
#version 450
layout(early_fragment_tests) in;
layout(depth_greater) out float gl_FragDepth;
void main()

View File

@ -1,5 +1,4 @@
#version 450
layout(early_fragment_tests) in;
layout(depth_less) out float gl_FragDepth;
void main()

View File

@ -0,0 +1,9 @@
#version 450
layout(early_fragment_tests) in;
layout(location = 0) out vec4 FragColor;
void main()
{
FragColor = vec4(1.0);
}