summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/UberShaderPixel.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2017-09-05 23:24:32 +1000
committerStenzek <stenzek@gmail.com>2017-09-05 23:49:42 +1000
commit6d32cce2f5701a897ddd95bf702e5ae29ab1c546 (patch)
tree2a3169954dd9a10a595306e446098ea88d21ccec /Source/Core/VideoCommon/UberShaderPixel.cpp
parent3e47baa40cb86945f4c1bcc43112a67c2cd96b48 (diff)
ShaderGen: Output uint when logic op is enabled for D3D ubershaders
Diffstat (limited to 'Source/Core/VideoCommon/UberShaderPixel.cpp')
-rw-r--r--Source/Core/VideoCommon/UberShaderPixel.cpp32
1 files changed, 19 insertions, 13 deletions
diff --git a/Source/Core/VideoCommon/UberShaderPixel.cpp b/Source/Core/VideoCommon/UberShaderPixel.cpp
index 4e760408c5..0ba299260f 100644
--- a/Source/Core/VideoCommon/UberShaderPixel.cpp
+++ b/Source/Core/VideoCommon/UberShaderPixel.cpp
@@ -654,13 +654,19 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
if (early_depth && host_config.backend_early_z)
out.Write("[earlydepthstencil]\n");
- out.Write("void main(\n"
- " out float4 ocol0 : SV_Target0,\n"
- " out float4 ocol1 : SV_Target1,\n"
- " %s\n",
- per_pixel_depth ? "\n out float depth : SV_Depth," : "");
+ out.Write("void main(\n");
+ if (uid_data->uint_output)
+ {
+ out.Write(" out uint4 ocol0 : SV_Target,\n");
+ }
+ else
+ {
+ out.Write(" out float4 ocol0 : SV_Target0,\n"
+ " out float4 ocol1 : SV_Target1,\n");
+ }
+ if (per_pixel_depth)
+ out.Write(" out float depth : SV_Depth,\n");
out.Write(" in float4 rawpos : SV_Position,\n");
-
out.Write(" in %s float4 colors_0 : COLOR0,\n", GetInterpolationQualifier(msaa, ssaa));
out.Write(" in %s float4 colors_1 : COLOR1", GetInterpolationQualifier(msaa, ssaa));
@@ -1186,14 +1192,14 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
out.Write(" else\n"
" ocol0.a = float(TevResult.a >> 2) / 63.0;\n"
" \n");
- }
- if (use_dual_source)
- {
- out.Write(" // Dest alpha override (dual source blending)\n"
- " // Colors will be blended against the alpha from ocol1 and\n"
- " // the alpha from ocol0 will be written to the framebuffer.\n"
- " ocol1 = float4(0.0, 0.0, 0.0, float(TevResult.a) / 255.0);\n");
+ if (use_dual_source)
+ {
+ out.Write(" // Dest alpha override (dual source blending)\n"
+ " // Colors will be blended against the alpha from ocol1 and\n"
+ " // the alpha from ocol0 will be written to the framebuffer.\n"
+ " ocol1 = float4(0.0, 0.0, 0.0, float(TevResult.a) / 255.0);\n");
+ }
}
if (bounding_box)