diff options
author | Chip Davis <cdavis@codeweavers.com> | 2020-04-16 03:22:16 +0300 |
---|---|---|
committer | Chip Davis <cdavis@codeweavers.com> | 2020-04-16 03:25:18 +0300 |
commit | 96f7008aa8a4c51df623b594679e2029e088ac81 (patch) | |
tree | b284e863b50af212658e136dbd745afcf0e9bb50 /reference/opt/shaders-msl/asm | |
parent | fbc560782c42bab4581dbc7705da5013bf864956 (diff) |
MSL: Force disabled fragment builtins to have the right name.
DXVK emits SPIR-V where fragment shader builtins have names derived from
DXBC assembly, e.g. `oDepth` for `FragDepth`. When we declared the
disabled output, we used this name, but when referencing it, we
continued to use the GLSL name. This breaks compilation.
Diffstat (limited to 'reference/opt/shaders-msl/asm')
-rw-r--r-- | reference/opt/shaders-msl/asm/frag/disable-renamed-output.frag-output.asm.frag | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/reference/opt/shaders-msl/asm/frag/disable-renamed-output.frag-output.asm.frag b/reference/opt/shaders-msl/asm/frag/disable-renamed-output.frag-output.asm.frag new file mode 100644 index 00000000..b64ccabe --- /dev/null +++ b/reference/opt/shaders-msl/asm/frag/disable-renamed-output.frag-output.asm.frag @@ -0,0 +1,35 @@ +#include <metal_stdlib> +#include <simd/simd.h> + +using namespace metal; + +struct main0_out +{ + float4 o1 [[color(1)]]; + float4 o3 [[color(3)]]; + float4 o6 [[color(6)]]; + float4 o7 [[color(7)]]; +}; + +fragment main0_out main0() +{ + float4 o0; + float4 o2; + float4 o4; + float4 o5; + float gl_FragDepth; + int gl_FragStencilRefARB; + main0_out out = {}; + o0 = float4(0.0, 0.0, 0.0, 1.0); + out.o1 = float4(1.0, 0.0, 0.0, 1.0); + o2 = float4(0.0, 1.0, 0.0, 1.0); + out.o3 = float4(0.0, 0.0, 1.0, 1.0); + o4 = float4(1.0, 0.0, 1.0, 0.5); + o5 = float4(0.25); + out.o6 = float4(0.75); + out.o7 = float4(1.0); + gl_FragDepth = 0.89999997615814208984375; + gl_FragStencilRefARB = uint(127); + return out; +} + |