mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 18:19:49 -06:00
Small fix for the last commit, and a little fix for disable fog to really disable it :)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4662 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -835,7 +835,6 @@ void UpdateViewport()
|
||||
int Y = (int)(ceil(xfregs.rawViewport[4] + xfregs.rawViewport[1] - (scissorYOff)) * MValueY);
|
||||
int Width = (int)ceil((int)(2 * xfregs.rawViewport[0]) * MValueX);
|
||||
int Height = (int)ceil((int)(-2 * xfregs.rawViewport[1]) * MValueY);
|
||||
|
||||
if(Width < 0)
|
||||
{
|
||||
X += Width;
|
||||
@ -863,20 +862,6 @@ void UpdateViewport()
|
||||
//some games set invalids values for z min and z max so fix them to the max an min alowed and let the shaders do this work
|
||||
vp.MinZ = 0.0f;//(xfregs.rawViewport[5] - xfregs.rawViewport[2]) / 16777216.0f;
|
||||
vp.MaxZ =1.0f;// xfregs.rawViewport[5] / 16777216.0f;
|
||||
/*if(vp.MinZ < 0.0f)
|
||||
vp.MinZ = 0.0f;
|
||||
if(vp.MinZ > 1.0f)
|
||||
vp.MinZ = 1.0f;
|
||||
if(vp.MaxZ < 0.0f)
|
||||
vp.MaxZ = 0.0f;
|
||||
if(vp.MaxZ > 1.0f)
|
||||
vp.MaxZ = 1.0f;
|
||||
if(vp.MinZ > vp.MaxZ)
|
||||
{
|
||||
float temp = vp.MinZ;
|
||||
vp.MinZ = vp.MaxZ;
|
||||
vp.MaxZ = temp;
|
||||
}*/
|
||||
D3D::dev->SetViewport(&vp);
|
||||
}
|
||||
|
||||
@ -918,7 +903,7 @@ void Renderer::SetBlendMode(bool forceUpdate)
|
||||
// 2 - reverse subtract enable (else add)
|
||||
// 3-5 - srcRGB function
|
||||
// 6-8 - dstRGB function
|
||||
if(bpmem.blendmode.logicopenable)
|
||||
if(bpmem.blendmode.logicopenable && bpmem.blendmode.logicmode != 3)
|
||||
return;
|
||||
u32 newval = bpmem.blendmode.subtract << 2;
|
||||
|
||||
@ -1043,8 +1028,9 @@ void Renderer::SetDepthMode()
|
||||
|
||||
void Renderer::SetLogicOpMode()
|
||||
{
|
||||
if (bpmem.blendmode.logicopenable)
|
||||
if (bpmem.blendmode.logicopenable && bpmem.blendmode.logicmode != 3)
|
||||
{
|
||||
s_blendMode = 0;
|
||||
D3D::SetRenderState(D3DRS_ALPHABLENDENABLE, 1);
|
||||
D3D::SetRenderState(D3DRS_BLENDOP, d3dLogincOPop[bpmem.blendmode.logicmode]);
|
||||
D3D::SetRenderState(D3DRS_SRCBLEND, d3dLogicOpSrcFactors[bpmem.blendmode.logicmode]);
|
||||
|
@ -219,7 +219,7 @@ void TextureCache::Cleanup()
|
||||
d3d_fmt = D3DFMT_A8L8;
|
||||
break;
|
||||
case PC_TEX_FMT_I8:
|
||||
case PC_TEX_FMT_I4_AS_I8:
|
||||
case PC_TEX_FMT_I4_AS_I8:
|
||||
d3d_fmt = D3DFMT_A8L8;
|
||||
break;
|
||||
case PC_TEX_FMT_IA8:
|
||||
@ -251,6 +251,7 @@ void TextureCache::Cleanup()
|
||||
}
|
||||
D3DLOCKED_RECT Lock;
|
||||
entry.texture->LockRect(0, &Lock, NULL, 0);
|
||||
if(pcfmt != PC_TEX_FMT_I8 && pcfmt != PC_TEX_FMT_I4_AS_I8)
|
||||
TexDecoder_DirectDecode((u8*)Lock.pBits,ptr,expandedWidth,height,Lock.Pitch,tex_format,tlutaddr,tlutfmt);
|
||||
entry.texture->UnlockRect(0);
|
||||
entry.frameCount = frameCount;
|
||||
@ -442,7 +443,7 @@ TextureCache::TCacheEntry *TextureCache::Load(int stage, u32 address, int width,
|
||||
|
||||
DEBUGGER_PAUSE_LOG_AT(NEXT_NEW_TEXTURE,true,{printf("A new texture (%d x %d) is loaded", width, height);});
|
||||
return &entry;
|
||||
}
|
||||
}
|
||||
void TextureCache::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer, bool bIsIntensityFmt, u32 copyfmt, int bScaleByHalf, const EFBRectangle &source_rect)
|
||||
{
|
||||
int efb_w = source_rect.GetWidth();
|
||||
|
Reference in New Issue
Block a user