1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Add CopyToRDRAM modes to Config: disable, sync, async.

copyToRDRAM option can take 'async' value.
copyDepthToRDRAM is still sync mode only.
This commit is contained in:
Sergey Lipskiy 2015-10-03 23:55:09 +06:00
parent 23de60b500
commit 2483f03159
5 changed files with 13 additions and 7 deletions

View File

@ -47,9 +47,9 @@ void Config::resetToDefaults()
#else
frameBufferEmulation.enable = 1;
#endif
frameBufferEmulation.copyDepthToRDRAM = 0;
frameBufferEmulation.copyDepthToRDRAM = ctDisable;
frameBufferEmulation.copyFromRDRAM = 0;
frameBufferEmulation.copyToRDRAM = 1;
frameBufferEmulation.copyToRDRAM = ctSync;
frameBufferEmulation.detectCFB = 0;
frameBufferEmulation.N64DepthCompare = 0;
frameBufferEmulation.aspect = 1;

View File

@ -63,6 +63,12 @@ struct Config
aTotal = 4
};
enum CopyToRDRAM {
ctDisable = 0,
ctSync,
ctAsync
};
struct {
u32 enable;
u32 copyToRDRAM;

View File

@ -934,7 +934,7 @@ void FrameBufferToRDRAM::Init()
glBindBuffer(GL_PIXEL_PACK_BUFFER, m_aPBO[1]);
glBufferData(GL_PIXEL_PACK_BUFFER, m_pTexture->textureBytes, NULL, GL_DYNAMIC_READ);
glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
m_bSync = true;
m_bSync = config.frameBufferEmulation.copyToRDRAM == Config::ctSync;
m_curIndex = 0;
}

View File

@ -209,9 +209,9 @@ void RSP_ProcessDList()
}
}
if (config.frameBufferEmulation.copyToRDRAM)
if (config.frameBufferEmulation.copyToRDRAM != Config::ctDisable)
FrameBuffer_CopyToRDRAM(gDP.colorImage.address);
if (config.frameBufferEmulation.copyDepthToRDRAM)
if (config.frameBufferEmulation.copyDepthToRDRAM != Config::ctDisable)
FrameBuffer_CopyDepthBuffer(gDP.colorImage.address);
RSP.busy = FALSE;

View File

@ -883,9 +883,9 @@ void gDPTextureRectangleFlip( f32 ulx, f32 uly, f32 lrx, f32 lry, s32 tile, f32
void gDPFullSync()
{
if (RSP.bLLE) {
if (config.frameBufferEmulation.copyToRDRAM)
if (config.frameBufferEmulation.copyToRDRAM != Config::ctDisable)
FrameBuffer_CopyToRDRAM(gDP.colorImage.address);
if (config.frameBufferEmulation.copyDepthToRDRAM)
if (config.frameBufferEmulation.copyDepthToRDRAM != Config::ctDisable)
FrameBuffer_CopyDepthBuffer(gDP.colorImage.address);
}