Well this commit has 2 parts:

first part if fixing, fixed, i thing, the flickering that everyone has reported, at least in my case i only have flickering in the one texture in one game and now is fixed. The other fix is not for an reported issue, is more a correctness fix, running dolphin with pix to review debug errors, result in a ton of warnings and error, now with this commit, at least for ati, there no more error or warnings, this means, correct management and state change, no accurate emulation, for this still a lot of work to do.
for this part of the commit please give me feedback and let me know of remaining issues

Te second part is the partial implementation of efb to ram copy in d3d, this won't brake anything because is commented but i commit this to ask for help from ector and donko in some errors remaining in the implementation related to differences between opengl an d3d.
if you want to test this you have to uncomment line 150 to 155 of bpstruct.cpp

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4594 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado
2009-11-20 18:46:30 +00:00
parent 47f3c5bc31
commit 802c112ad9
9 changed files with 324 additions and 277 deletions

View File

@ -24,6 +24,7 @@
#include "VertexShaderManager.h"
#include "Utils.h"
#include "debugger/debugger.h"
#include "TextureConverter.h"
bool textureChanged[8];
@ -145,24 +146,24 @@ void CopyEFB(const BPCmd &bp, const EFBRectangle &rc, const u32 &address, const
{
if (!g_ActiveConfig.bEFBCopyDisable)
{
//if (g_ActiveConfig.bCopyEFBToRAM)
//uncomment this to see the efb to ram work in progress
/*if (g_ActiveConfig.bCopyEFBToRAM)
{
// To RAM, not implemented yet
//TextureConverter::EncodeToRam(address, fromZBuffer, isIntensityFmt, copyfmt, scaleByHalf, rc);
//else // To D3D Texture
TextureCache::CopyRenderTargetToTexture(address, fromZBuffer, isIntensityFmt, copyfmt, scaleByHalf, rc);
DEBUGGER_PAUSE_LOG_AT(NEXT_EFB_CMD,false,
{printf("EFB to texture: addr = %08X\n",address);});
TextureConverter::EncodeToRam(address, fromZBuffer, isIntensityFmt, copyfmt, scaleByHalf, rc);
}
else // To D3D Texture*/
{
TextureCache::CopyRenderTargetToTexture(address, fromZBuffer, isIntensityFmt, copyfmt, scaleByHalf, rc);
}
}
}
void ClearScreen(const BPCmd &bp, const EFBRectangle &rc)
{
// TODO: Scale EFBRectangle correctly
// it seems that the GC is able to alpha blend on color-fill
// we cant do that so if alpha is != 255 we skip it
VertexShaderManager::SetViewportChanged();
bool colorEnable = bpmem.blendmode.colorupdate;
bool alphaEnable = (bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24 && bpmem.blendmode.alphaupdate);