gsdx-d3d11: Move colclip code to blending function.

Also disable a log that was accidentally enabled/pushed.
This commit is contained in:
lightningterror 2019-04-25 16:48:07 +02:00
parent a0c6c1cb9f
commit 3408d1a873
2 changed files with 13 additions and 13 deletions

View File

@ -801,6 +801,18 @@ void GSRendererDX11::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sou
//ASSERT(0);
}
}
// Color clip
if (m_env.COLCLAMP.CLAMP == 0 && rt)
{
// fprintf(stderr, "COLCLIP HDR mode ENABLED\n");
GSVector4 dRect(ComputeBoundingBox(rtscale, rtsize));
GSVector4 sRect = dRect / GSVector4(rtsize.x, rtsize.y).xyxy();
hdr_rt = dev->CreateRenderTarget(rtsize.x, rtsize.y, DXGI_FORMAT_R32G32B32A32_FLOAT);
// Warning: StretchRect must be called before BeginScene otherwise
// vertices will be overwritten. Trust me you don't want to do that.
dev->StretchRect(rt, sRect, hdr_rt, dRect, ShaderConvert_COPY, false);
}
}
if (m_ps_sel.dfmt == 1)
@ -829,18 +841,6 @@ void GSRendererDX11::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sou
//
bool hdr_colclip = m_env.COLCLAMP.CLAMP == 0 && rt;
if (hdr_colclip)
{
// fprintf(stderr, "COLCLIP HDR mode ENABLED\n");
GSVector4 dRect(ComputeBoundingBox(rtscale, rtsize));
GSVector4 sRect = dRect / GSVector4(rtsize.x, rtsize.y).xyxy();
hdr_rt = dev->CreateRenderTarget(rtsize.x, rtsize.y, DXGI_FORMAT_R32G32B32A32_FLOAT);
// Warning: StretchRect must be called before BeginScene otherwise
// vertices will be overwritten. Trust me you don't want to do that.
dev->StretchRect(rt, sRect, hdr_rt, dRect, ShaderConvert_COPY, false);
}
dev->BeginScene();
// om

View File

@ -905,7 +905,7 @@ GSRendererOGL::PRIM_OVERLAP GSRendererOGL::PrimitiveOverlap()
}
#endif
fprintf(stderr, "%d: Yes, code can be optimized (draw of %d vertices)\n", s_n, count);
// fprintf(stderr, "%d: Yes, code can be optimized (draw of %d vertices)\n", s_n, count);
return overlap;
}