GSDx: Fixed channel masking in DX9 HW. The red and blue channels were reversed.

GSDx: Removed discards from partial colclamp support as it wasn't doing much good and definitely won't be necessary with the next stage of support.  No significant functional change probably.

As before, please do a full rebuild of gsdx.  I hate it as much as you but don't know how to make VS smarter about this.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2712 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
sudonim1 2010-03-14 11:33:12 +00:00
parent 95af4c133e
commit ad21a894fc
4 changed files with 2 additions and 11 deletions

View File

@ -93,7 +93,6 @@ public:
GSVector4 MinMax;
GSVector4 MinF_TA;
GSVector4i MskFix;
GSVector4 ChannelMask;
struct PSConstantBuffer()
{
@ -103,7 +102,6 @@ public:
MinMax = GSVector4::zero();
MinF_TA = GSVector4::zero();
MskFix = GSVector4i::zero();
ChannelMask = GSVector4(1,1,1,1);
}
__forceinline bool Update(const PSConstantBuffer* cb)

View File

@ -228,7 +228,6 @@ public:
if (env.COLCLAMP.CLAMP == 0) {
ps_sel.colclip = 1;
ps_cb.ChannelMask = GSVector4((float)om_bsel.wr, (float)om_bsel.wg, (float)om_bsel.wb, (float)om_bsel.wa);
}
ps_sel.clr1 = om_bsel.IsCLR1();

View File

@ -310,9 +310,9 @@ void GSDevice9::SetupOM(OMDepthStencilSelector dssel, OMBlendSelector bsel, uint
}
}
if(bsel.wr) bs->RenderTargetWriteMask |= D3DCOLORWRITEENABLE_RED;
if(bsel.wr) bs->RenderTargetWriteMask |= D3DCOLORWRITEENABLE_BLUE;
if(bsel.wg) bs->RenderTargetWriteMask |= D3DCOLORWRITEENABLE_GREEN;
if(bsel.wb) bs->RenderTargetWriteMask |= D3DCOLORWRITEENABLE_BLUE;
if(bsel.wb) bs->RenderTargetWriteMask |= D3DCOLORWRITEENABLE_RED;
if(bsel.wa) bs->RenderTargetWriteMask |= D3DCOLORWRITEENABLE_ALPHA;
m_om_bs[bsel] = bs;

View File

@ -88,7 +88,6 @@ cbuffer cb1
float2 MinF;
float2 TA;
uint4 MskFix;
float4 ChannelMask;
};
float4 sample_c(float2 uv)
@ -167,7 +166,6 @@ float4 ps_params[7];
#define MinMax ps_params[3]
#define MinF ps_params[4].xy
#define TA ps_params[4].zw
#define ChannelMask ps_params[6]
float4 sample_c(float2 uv)
{
@ -515,10 +513,6 @@ float4 ps_color(PS_INPUT input)
}
if (PS_COLCLIP > 0)
{
//clip(128./255. - c.rgb * ChannelMask.rgb);
c.rgb *= ChannelMask.rgb;
if (all(c.rgb >= 128./255))
clip(-1);
c.rgb *= c.rgb < 128./255;
}