mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Implement pixel data reinterpretation on EFB format change.
Whatever that means, it fixes that stupid Super Mario Sunshine glitch and possibly lots of other stuff, so test as many glitchy games as possible with this ;) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6669 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -85,6 +85,18 @@ public:
|
||||
static LPDIRECT3DSURFACE9 GetEFBColorReadSurface() { return s_efb.color_ReadBuffer; }
|
||||
static LPDIRECT3DSURFACE9 GetEFBDepthReadSurface() { return s_efb.depth_ReadBuffer; }
|
||||
|
||||
static LPDIRECT3DTEXTURE9 GetEFBColorReinterpretTexture() { return s_efb.color_reinterpret_texture; }
|
||||
static LPDIRECT3DSURFACE9 GetEFBColorReinterpretSurface() { return s_efb.color_reinterpret_surface; }
|
||||
static void SwapReinterpretTexture()
|
||||
{
|
||||
LPDIRECT3DSURFACE9 swapsurf = GetEFBColorReinterpretSurface();
|
||||
LPDIRECT3DTEXTURE9 swaptex = GetEFBColorReinterpretTexture();
|
||||
s_efb.color_reinterpret_surface = GetEFBColorRTSurface();
|
||||
s_efb.color_reinterpret_texture = GetEFBColorTexture();
|
||||
s_efb.color_surface = swapsurf;
|
||||
s_efb.color_texture = swaptex;
|
||||
}
|
||||
|
||||
private:
|
||||
XFBSourceBase* CreateXFBSource(unsigned int target_width, unsigned int target_height);
|
||||
void GetTargetSize(unsigned int *width, unsigned int *height, const EFBRectangle& sourceRc);
|
||||
@ -98,6 +110,9 @@ private:
|
||||
LPDIRECT3DTEXTURE9 depth_texture;//Texture thats contains the depth data of the render target
|
||||
LPDIRECT3DTEXTURE9 depthRead_texture;//4 pixel texture for temporal data store
|
||||
|
||||
LPDIRECT3DTEXTURE9 color_reinterpret_texture;//buffer used for ReinterpretPixelData
|
||||
LPDIRECT3DSURFACE9 color_reinterpret_surface;//corresponding surface
|
||||
|
||||
LPDIRECT3DSURFACE9 depth_surface;//Depth Surface
|
||||
LPDIRECT3DSURFACE9 color_surface;//Color Surface
|
||||
LPDIRECT3DSURFACE9 color_ReadBuffer;//Surface 0 of colorRead_texture
|
||||
|
Reference in New Issue
Block a user