ShaderGen: Output uint when logic op is enabled for D3D ubershaders
This commit is contained in:
parent
3e47baa40c
commit
6d32cce2f5
|
@ -654,13 +654,19 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
|
||||||
if (early_depth && host_config.backend_early_z)
|
if (early_depth && host_config.backend_early_z)
|
||||||
out.Write("[earlydepthstencil]\n");
|
out.Write("[earlydepthstencil]\n");
|
||||||
|
|
||||||
out.Write("void main(\n"
|
out.Write("void main(\n");
|
||||||
" out float4 ocol0 : SV_Target0,\n"
|
if (uid_data->uint_output)
|
||||||
" out float4 ocol1 : SV_Target1,\n"
|
{
|
||||||
" %s\n",
|
out.Write(" out uint4 ocol0 : SV_Target,\n");
|
||||||
per_pixel_depth ? "\n out float depth : SV_Depth," : "");
|
}
|
||||||
|
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 float4 rawpos : SV_Position,\n");
|
||||||
|
|
||||||
out.Write(" in %s float4 colors_0 : COLOR0,\n", GetInterpolationQualifier(msaa, ssaa));
|
out.Write(" in %s float4 colors_0 : COLOR0,\n", GetInterpolationQualifier(msaa, ssaa));
|
||||||
out.Write(" in %s float4 colors_1 : COLOR1", GetInterpolationQualifier(msaa, ssaa));
|
out.Write(" in %s float4 colors_1 : COLOR1", GetInterpolationQualifier(msaa, ssaa));
|
||||||
|
|
||||||
|
@ -1186,7 +1192,6 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
|
||||||
out.Write(" else\n"
|
out.Write(" else\n"
|
||||||
" ocol0.a = float(TevResult.a >> 2) / 63.0;\n"
|
" ocol0.a = float(TevResult.a >> 2) / 63.0;\n"
|
||||||
" \n");
|
" \n");
|
||||||
}
|
|
||||||
|
|
||||||
if (use_dual_source)
|
if (use_dual_source)
|
||||||
{
|
{
|
||||||
|
@ -1195,6 +1200,7 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
|
||||||
" // the alpha from ocol0 will be written to the framebuffer.\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");
|
" ocol1 = float4(0.0, 0.0, 0.0, float(TevResult.a) / 255.0);\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (bounding_box)
|
if (bounding_box)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue