mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Merge branch 'master' into wxw3-update
Conflicts: Source/Core/DolphinWX/Src/LogWindow.cpp
This commit is contained in:
@ -56,11 +56,12 @@ static bool bProcessFifoToLoWatermark = false;
|
||||
static bool bProcessFifoAllDistance = false;
|
||||
|
||||
volatile bool isPossibleWaitingSetDrawDone = false;
|
||||
volatile bool isHiWatermarkActive = false;
|
||||
volatile bool interruptSet= false;
|
||||
volatile bool interruptWaiting= false;
|
||||
volatile bool interruptTokenWaiting = false;
|
||||
volatile bool interruptFinishWaiting = false;
|
||||
volatile bool OnOverflow = false;
|
||||
volatile bool waitingForPEInterruptDisable = false;
|
||||
|
||||
bool IsOnThread()
|
||||
{
|
||||
@ -86,13 +87,12 @@ void DoState(PointerWrap &p)
|
||||
|
||||
p.Do(bProcessFifoToLoWatermark);
|
||||
p.Do(bProcessFifoAllDistance);
|
||||
|
||||
p.Do(isHiWatermarkActive);
|
||||
p.Do(isPossibleWaitingSetDrawDone);
|
||||
p.Do(interruptSet);
|
||||
p.Do(interruptWaiting);
|
||||
p.Do(interruptTokenWaiting);
|
||||
p.Do(interruptFinishWaiting);
|
||||
p.Do(OnOverflow);
|
||||
}
|
||||
|
||||
inline void WriteLow (volatile u32& _reg, u16 lowbits) {Common::AtomicStore(_reg,(_reg & 0xFFFF0000) | lowbits);}
|
||||
@ -135,16 +135,14 @@ void Init()
|
||||
bProcessFifoToLoWatermark = false;
|
||||
bProcessFifoAllDistance = false;
|
||||
isPossibleWaitingSetDrawDone = false;
|
||||
OnOverflow = false;
|
||||
isHiWatermarkActive = false;
|
||||
|
||||
et_UpdateInterrupts = CoreTiming::RegisterEvent("UpdateInterrupts", UpdateInterrupts_Wrapper);
|
||||
}
|
||||
|
||||
void Read16(u16& _rReturnValue, const u32 _Address)
|
||||
{
|
||||
|
||||
INFO_LOG(COMMANDPROCESSOR, "(r): 0x%08x", _Address);
|
||||
ProcessFifoEvents();
|
||||
switch (_Address & 0xFFF)
|
||||
{
|
||||
case STATUS_REGISTER:
|
||||
@ -173,11 +171,23 @@ void Read16(u16& _rReturnValue, const u32 _Address)
|
||||
case FIFO_LO_WATERMARK_HI: _rReturnValue = ReadHigh(fifo.CPLoWatermark); return;
|
||||
|
||||
case FIFO_RW_DISTANCE_LO:
|
||||
_rReturnValue = ReadLow (fifo.CPReadWriteDistance);
|
||||
if (IsOnThread())
|
||||
if(fifo.CPWritePointer >= fifo.SafeCPReadPointer)
|
||||
_rReturnValue = ReadLow (fifo.CPWritePointer - fifo.SafeCPReadPointer);
|
||||
else
|
||||
_rReturnValue = ReadLow (fifo.CPEnd - fifo.SafeCPReadPointer + fifo.CPWritePointer - fifo.CPBase + 32);
|
||||
else
|
||||
_rReturnValue = ReadLow (fifo.CPReadWriteDistance);
|
||||
DEBUG_LOG(COMMANDPROCESSOR, "read FIFO_RW_DISTANCE_LO : %04x", _rReturnValue);
|
||||
return;
|
||||
case FIFO_RW_DISTANCE_HI:
|
||||
_rReturnValue = ReadHigh(fifo.CPReadWriteDistance);
|
||||
if (IsOnThread())
|
||||
if(fifo.CPWritePointer >= fifo.SafeCPReadPointer)
|
||||
_rReturnValue = ReadHigh (fifo.CPWritePointer - fifo.SafeCPReadPointer);
|
||||
else
|
||||
_rReturnValue = ReadHigh (fifo.CPEnd - fifo.SafeCPReadPointer + fifo.CPWritePointer - fifo.CPBase + 32);
|
||||
else
|
||||
_rReturnValue = ReadHigh(fifo.CPReadWriteDistance);
|
||||
DEBUG_LOG(COMMANDPROCESSOR, "read FIFO_RW_DISTANCE_HI : %04x", _rReturnValue);
|
||||
return;
|
||||
case FIFO_WRITE_POINTER_LO:
|
||||
@ -358,6 +368,7 @@ void Write16(const u16 _Value, const u32 _Address)
|
||||
break;
|
||||
case FIFO_READ_POINTER_HI:
|
||||
WriteHigh((u32 &)fifo.CPReadPointer, _Value);
|
||||
fifo.SafeCPReadPointer = fifo.CPReadPointer;
|
||||
DEBUG_LOG(COMMANDPROCESSOR,"\t write to FIFO_READ_POINTER_HI : %04x", _Value);
|
||||
break;
|
||||
|
||||
@ -390,10 +401,6 @@ void Write16(const u16 _Value, const u32 _Address)
|
||||
|
||||
case FIFO_RW_DISTANCE_HI:
|
||||
WriteHigh((u32 &)fifo.CPReadWriteDistance, _Value);
|
||||
DEBUG_LOG(COMMANDPROCESSOR,"try to write to FIFO_RW_DISTANCE_HI : %04x", _Value);
|
||||
break;
|
||||
case FIFO_RW_DISTANCE_LO:
|
||||
WriteLow((u32 &)fifo.CPReadWriteDistance, _Value & 0xFFE0);
|
||||
if (fifo.CPReadWriteDistance == 0)
|
||||
{
|
||||
GPFifo::ResetGatherPipe();
|
||||
@ -403,6 +410,10 @@ void Write16(const u16 _Value, const u32 _Address)
|
||||
ResetVideoBuffer();
|
||||
}
|
||||
IncrementCheckContextId();
|
||||
DEBUG_LOG(COMMANDPROCESSOR,"try to write to FIFO_RW_DISTANCE_HI : %04x", _Value);
|
||||
break;
|
||||
case FIFO_RW_DISTANCE_LO:
|
||||
WriteLow((u32 &)fifo.CPReadWriteDistance, _Value & 0xFFE0);
|
||||
DEBUG_LOG(COMMANDPROCESSOR,"try to write to FIFO_RW_DISTANCE_LO : %04x", _Value);
|
||||
break;
|
||||
|
||||
@ -412,7 +423,6 @@ void Write16(const u16 _Value, const u32 _Address)
|
||||
|
||||
if (!IsOnThread())
|
||||
RunGpu();
|
||||
ProcessFifoEvents();
|
||||
}
|
||||
|
||||
void Read32(u32& _rReturnValue, const u32 _Address)
|
||||
@ -434,6 +444,19 @@ void STACKALIGN GatherPipeBursted()
|
||||
{
|
||||
if (!IsOnThread())
|
||||
RunGpu();
|
||||
else
|
||||
{
|
||||
// In multibuffer mode is not allowed write in the same fifo attached to the GPU.
|
||||
// Fix Pokemon XD in DC mode.
|
||||
if((ProcessorInterface::Fifo_CPUEnd == fifo.CPEnd) && (ProcessorInterface::Fifo_CPUBase == fifo.CPBase)
|
||||
&& fifo.CPReadWriteDistance > 0)
|
||||
{
|
||||
waitingForPEInterruptDisable = true;
|
||||
ProcessFifoAllDistance();
|
||||
waitingForPEInterruptDisable = false;
|
||||
}
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -449,26 +472,7 @@ void STACKALIGN GatherPipeBursted()
|
||||
Common::AtomicAdd(fifo.CPReadWriteDistance, GATHER_PIPE_SIZE);
|
||||
|
||||
if (!IsOnThread())
|
||||
{
|
||||
RunGpu();
|
||||
}
|
||||
else
|
||||
{
|
||||
if(fifo.CPReadWriteDistance == fifo.CPEnd - fifo.CPBase - 32)
|
||||
{
|
||||
if(!OnOverflow)
|
||||
NOTICE_LOG(COMMANDPROCESSOR,"FIFO is almost in overflown, BreakPoint: %i", fifo.bFF_Breakpoint);
|
||||
OnOverflow = true;
|
||||
while (!CommandProcessor::interruptWaiting && fifo.bFF_GPReadEnable &&
|
||||
fifo.CPReadWriteDistance > fifo.CPEnd - fifo.CPBase - 64)
|
||||
Common::YieldCPU();
|
||||
}
|
||||
else
|
||||
{
|
||||
OnOverflow = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_assert_msg_(COMMANDPROCESSOR, fifo.CPReadWriteDistance <= fifo.CPEnd - fifo.CPBase,
|
||||
"FIFO is overflown by GatherPipe !\nCPU thread is too fast!");
|
||||
@ -509,17 +513,15 @@ void AbortFrame()
|
||||
|
||||
void SetOverflowStatusFromGatherPipe()
|
||||
{
|
||||
if (!fifo.bFF_HiWatermarkInt) return;
|
||||
|
||||
fifo.bFF_HiWatermark = (fifo.CPReadWriteDistance > fifo.CPHiWatermark);
|
||||
fifo.bFF_LoWatermark = (fifo.CPReadWriteDistance < fifo.CPLoWatermark);
|
||||
|
||||
bool interrupt = fifo.bFF_HiWatermark && fifo.bFF_HiWatermarkInt &&
|
||||
m_CPCtrlReg.GPLinkEnable && m_CPCtrlReg.GPReadEnable;
|
||||
isHiWatermarkActive = fifo.bFF_HiWatermark && fifo.bFF_HiWatermarkInt && m_CPCtrlReg.GPReadEnable;
|
||||
|
||||
if (interrupt != interruptSet && interrupt)
|
||||
CommandProcessor::UpdateInterrupts(true);
|
||||
|
||||
if (isHiWatermarkActive)
|
||||
{
|
||||
interruptSet = true;
|
||||
INFO_LOG(COMMANDPROCESSOR,"Interrupt set");
|
||||
ProcessorInterface::SetInterrupt(INT_CAUSE_CP, true);
|
||||
}
|
||||
}
|
||||
|
||||
void SetCpStatus()
|
||||
@ -527,14 +529,12 @@ void SetCpStatus()
|
||||
// overflow & underflow check
|
||||
fifo.bFF_HiWatermark = (fifo.CPReadWriteDistance > fifo.CPHiWatermark);
|
||||
fifo.bFF_LoWatermark = (fifo.CPReadWriteDistance < fifo.CPLoWatermark);
|
||||
|
||||
// breakpoint
|
||||
|
||||
// breakpoint
|
||||
if (fifo.bFF_BPEnable)
|
||||
{
|
||||
if (fifo.CPBreakpoint == fifo.CPReadPointer)
|
||||
{
|
||||
|
||||
{
|
||||
if (!fifo.bFF_Breakpoint)
|
||||
{
|
||||
INFO_LOG(COMMANDPROCESSOR, "Hit breakpoint at %i", fifo.CPReadPointer);
|
||||
@ -562,13 +562,18 @@ void SetCpStatus()
|
||||
|
||||
bool interrupt = (bpInt || ovfInt || undfInt) && m_CPCtrlReg.GPReadEnable;
|
||||
|
||||
isHiWatermarkActive = ovfInt && m_CPCtrlReg.GPReadEnable;
|
||||
|
||||
if (interrupt != interruptSet && !interruptWaiting)
|
||||
{
|
||||
u64 userdata = interrupt?1:0;
|
||||
if (IsOnThread())
|
||||
{
|
||||
interruptWaiting = true;
|
||||
CommandProcessor::UpdateInterruptsFromVideoBackend(userdata);
|
||||
if(!interrupt || bpInt || undfInt)
|
||||
{
|
||||
interruptWaiting = true;
|
||||
CommandProcessor::UpdateInterruptsFromVideoBackend(userdata);
|
||||
}
|
||||
}
|
||||
else
|
||||
CommandProcessor::UpdateInterrupts(userdata);
|
||||
@ -591,7 +596,7 @@ void ProcessFifoAllDistance()
|
||||
if (IsOnThread())
|
||||
{
|
||||
while (!CommandProcessor::interruptWaiting && fifo.bFF_GPReadEnable &&
|
||||
fifo.CPReadWriteDistance && !AtBreakpoint())
|
||||
fifo.CPReadWriteDistance && !AtBreakpoint() && !PixelEngine::WaitingForPEInterrupt())
|
||||
Common::YieldCPU();
|
||||
}
|
||||
bProcessFifoAllDistance = false;
|
||||
@ -611,13 +616,16 @@ void Shutdown()
|
||||
void SetCpStatusRegister()
|
||||
{
|
||||
// Here always there is one fifo attached to the GPU
|
||||
|
||||
m_CPStatusReg.Breakpoint = fifo.bFF_Breakpoint;
|
||||
m_CPStatusReg.ReadIdle = (fifo.CPReadPointer == fifo.CPWritePointer) || (fifo.CPReadPointer == fifo.CPBreakpoint);
|
||||
m_CPStatusReg.ReadIdle = !fifo.CPReadWriteDistance || (fifo.CPReadPointer == fifo.CPWritePointer) || (fifo.CPReadPointer == fifo.CPBreakpoint) ;
|
||||
m_CPStatusReg.CommandIdle = !fifo.CPReadWriteDistance;
|
||||
m_CPStatusReg.UnderflowLoWatermark = fifo.bFF_LoWatermark;
|
||||
m_CPStatusReg.OverflowHiWatermark = fifo.bFF_HiWatermark;
|
||||
|
||||
// HACK to compensate for slow response to PE interrupts in Time Splitters: Future Perfect
|
||||
if (IsOnThread())
|
||||
PixelEngine::ResumeWaitingForPEInterrupt();
|
||||
|
||||
INFO_LOG(COMMANDPROCESSOR,"\t Read from STATUS_REGISTER : %04x", m_CPStatusReg.Hex);
|
||||
DEBUG_LOG(COMMANDPROCESSOR, "(r) status: iBP %s | fReadIdle %s | fCmdIdle %s | iOvF %s | iUndF %s"
|
||||
, m_CPStatusReg.Breakpoint ? "ON" : "OFF"
|
||||
@ -630,14 +638,14 @@ void SetCpStatusRegister()
|
||||
|
||||
void SetCpControlRegister()
|
||||
{
|
||||
|
||||
// If the new fifo is being attached We make sure there wont be SetFinish event pending.
|
||||
// This protection fix eternal darkness booting, because the second SetFinish event when it is booting
|
||||
// seems invalid or has a bug and hang the game.
|
||||
|
||||
if (!fifo.bFF_GPReadEnable && m_CPCtrlReg.GPReadEnable && !m_CPCtrlReg.BPEnable)
|
||||
{
|
||||
PixelEngine::ResetSetFinish();
|
||||
ProcessFifoEvents();
|
||||
PixelEngine::ResetSetFinish();
|
||||
}
|
||||
|
||||
fifo.bFF_BPInt = m_CPCtrlReg.BPInt;
|
||||
@ -652,9 +660,6 @@ void SetCpControlRegister()
|
||||
ProcessorInterface::Fifo_CPUBase = fifo.CPBase;
|
||||
ProcessorInterface::Fifo_CPUEnd = fifo.CPEnd;
|
||||
}
|
||||
// If overflown happens process the fifo to LoWatemark
|
||||
if (bProcessFifoToLoWatermark)
|
||||
ProcessFifoToLoWatermark();
|
||||
|
||||
if(fifo.bFF_GPReadEnable && !m_CPCtrlReg.GPReadEnable)
|
||||
{
|
||||
@ -666,7 +671,6 @@ void SetCpControlRegister()
|
||||
fifo.bFF_GPReadEnable = m_CPCtrlReg.GPReadEnable;
|
||||
}
|
||||
|
||||
|
||||
DEBUG_LOG(COMMANDPROCESSOR, "\t GPREAD %s | BP %s | Int %s | OvF %s | UndF %s | LINK %s"
|
||||
, fifo.bFF_GPReadEnable ? "ON" : "OFF"
|
||||
, fifo.bFF_BPEnable ? "ON" : "OFF"
|
||||
|
@ -25,18 +25,18 @@ class PointerWrap;
|
||||
|
||||
extern bool MT;
|
||||
|
||||
|
||||
namespace CommandProcessor
|
||||
{
|
||||
|
||||
extern SCPFifoStruct fifo; //This one is shared between gfx thread and emulator thread.
|
||||
extern volatile bool isPossibleWaitingSetDrawDone; //This one is used for sync gfx thread and emulator thread.
|
||||
extern volatile bool isHiWatermarkActive;
|
||||
extern volatile bool interruptSet;
|
||||
extern volatile bool interruptWaiting;
|
||||
extern volatile bool interruptTokenWaiting;
|
||||
extern volatile bool interruptFinishWaiting;
|
||||
extern volatile bool OnOverflow;
|
||||
|
||||
extern volatile bool waitingForPEInterruptDisable;
|
||||
|
||||
// internal hardware addresses
|
||||
enum
|
||||
{
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "Atomic.h"
|
||||
#include "OpcodeDecoding.h"
|
||||
#include "CommandProcessor.h"
|
||||
#include "PixelEngine.h"
|
||||
#include "ChunkFile.h"
|
||||
#include "Fifo.h"
|
||||
#include "HW/Memmap.h"
|
||||
@ -137,8 +138,7 @@ void RunGpuLoop()
|
||||
|
||||
CommandProcessor::SetCpStatus();
|
||||
// check if we are able to run this buffer
|
||||
while (!CommandProcessor::interruptWaiting && fifo.bFF_GPReadEnable &&
|
||||
fifo.CPReadWriteDistance && (!AtBreakpoint() || CommandProcessor::OnOverflow))
|
||||
while (GpuRunningState && !CommandProcessor::interruptWaiting && fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance && !AtBreakpoint() && !PixelEngine::WaitingForPEInterrupt())
|
||||
{
|
||||
if (!GpuRunningState) break;
|
||||
|
||||
|
@ -250,6 +250,11 @@ bool VideoBackendHardware::Video_IsPossibleWaitingSetDrawDone()
|
||||
return CommandProcessor::isPossibleWaitingSetDrawDone;
|
||||
}
|
||||
|
||||
bool VideoBackendHardware::Video_IsHiWatermarkActive()
|
||||
{
|
||||
return CommandProcessor::isHiWatermarkActive;
|
||||
}
|
||||
|
||||
void VideoBackendHardware::Video_AbortFrame()
|
||||
{
|
||||
CommandProcessor::AbortFrame();
|
||||
|
@ -180,7 +180,6 @@ void Init()
|
||||
void Read16(u16& _uReturnValue, const u32 _iAddress)
|
||||
{
|
||||
DEBUG_LOG(PIXELENGINE, "(r16) 0x%08x", _iAddress);
|
||||
CommandProcessor::ProcessFifoEvents();
|
||||
switch (_iAddress & 0xFFF)
|
||||
{
|
||||
// CPU Direct Access EFB Raster State Config
|
||||
@ -327,7 +326,6 @@ void Write16(const u16 _iValue, const u32 _iAddress)
|
||||
break;
|
||||
|
||||
case PE_TOKEN_REG:
|
||||
//LOG(PIXELENGINE,"WEIRD: program wrote token: %i",_iValue);
|
||||
PanicAlert("(w16) WTF? PowerPC program wrote token: %i", _iValue);
|
||||
//only the gx pipeline is supposed to be able to write here
|
||||
//g_token = _iValue;
|
||||
@ -338,7 +336,6 @@ void Write16(const u16 _iValue, const u32 _iAddress)
|
||||
break;
|
||||
}
|
||||
|
||||
CommandProcessor::ProcessFifoEvents();
|
||||
}
|
||||
|
||||
void Write32(const u32 _iValue, const u32 _iAddress)
|
||||
@ -362,22 +359,16 @@ void UpdateInterrupts()
|
||||
|
||||
void UpdateTokenInterrupt(bool active)
|
||||
{
|
||||
if(interruptSetToken != active)
|
||||
{
|
||||
ProcessorInterface::SetInterrupt(INT_CAUSE_PE_TOKEN, active);
|
||||
interruptSetToken = active;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateFinishInterrupt(bool active)
|
||||
{
|
||||
if(interruptSetFinish != active)
|
||||
{
|
||||
ProcessorInterface::SetInterrupt(INT_CAUSE_PE_FINISH, active);
|
||||
interruptSetFinish = active;
|
||||
if (active)
|
||||
State::ProcessRequestedStates(0);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(mb2): Refactor SetTokenINT_OnMainThread(u64 userdata, int cyclesLate).
|
||||
@ -396,8 +387,6 @@ void SetToken_OnMainThread(u64 userdata, int cyclesLate)
|
||||
CommandProcessor::interruptTokenWaiting = false;
|
||||
IncrementCheckContextId();
|
||||
//}
|
||||
//else
|
||||
// LOGV(PIXELENGINE, 1, "VIDEO Backend wrote token: %i", CommandProcessor::fifo.PEToken);
|
||||
}
|
||||
|
||||
void SetFinish_OnMainThread(u64 userdata, int cyclesLate)
|
||||
@ -474,4 +463,17 @@ void ResetSetToken()
|
||||
}
|
||||
CommandProcessor::interruptTokenWaiting = false;
|
||||
}
|
||||
|
||||
bool WaitingForPEInterrupt()
|
||||
{
|
||||
return !CommandProcessor::waitingForPEInterruptDisable && (CommandProcessor::interruptFinishWaiting || CommandProcessor::interruptTokenWaiting || interruptSetFinish || interruptSetToken);
|
||||
}
|
||||
|
||||
void ResumeWaitingForPEInterrupt()
|
||||
{
|
||||
interruptSetFinish = false;
|
||||
interruptSetToken = false;
|
||||
CommandProcessor::interruptFinishWaiting = false;
|
||||
CommandProcessor::interruptTokenWaiting = false;
|
||||
}
|
||||
} // end of namespace PixelEngine
|
||||
|
@ -80,7 +80,8 @@ void SetToken(const u16 _token, const int _bSetTokenAcknowledge);
|
||||
void SetFinish(void);
|
||||
void ResetSetFinish(void);
|
||||
void ResetSetToken(void);
|
||||
bool AllowIdleSkipping();
|
||||
bool WaitingForPEInterrupt();
|
||||
void ResumeWaitingForPEInterrupt();
|
||||
|
||||
// Bounding box functionality. Paper Mario (both) are a couple of the few games that use it.
|
||||
extern u16 bbox[4];
|
||||
|
@ -172,8 +172,10 @@ void TextureCache::ClearRenderTargets()
|
||||
TexCache::iterator
|
||||
iter = textures.begin(),
|
||||
tcend = textures.end();
|
||||
|
||||
for (; iter!=tcend; ++iter)
|
||||
iter->second->type = TCET_NORMAL;
|
||||
if (iter->second->type != TCET_EC_DYNAMIC)
|
||||
iter->second->type = TCET_NORMAL;
|
||||
}
|
||||
|
||||
TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int stage,
|
||||
@ -238,6 +240,9 @@ TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int stage,
|
||||
// 2. a) For EFB copies, only the hash and the texture address need to match
|
||||
if (entry->IsEfbCopy() && tex_hash == entry->hash && address == entry->addr)
|
||||
{
|
||||
if (entry->type != TCET_EC_VRAM)
|
||||
entry->type = TCET_NORMAL;
|
||||
|
||||
// TODO: Print a warning if the format changes! In this case, we could reinterpret the internal texture object data to the new pixel format (similiar to what is already being done in Renderer::ReinterpretPixelFormat())
|
||||
goto return_entry;
|
||||
}
|
||||
@ -318,8 +323,8 @@ TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int stage,
|
||||
entry->SetGeneralParameters(address, texture_size, full_format, entry->num_mipmaps);
|
||||
entry->SetDimensions(nativeW, nativeH, width, height);
|
||||
entry->hash = tex_hash;
|
||||
if (g_ActiveConfig.bCopyEFBToTexture) entry->type = TCET_NORMAL;
|
||||
else if (entry->IsEfbCopy()) entry->type = TCET_EC_DYNAMIC;
|
||||
if (entry->IsEfbCopy() && !g_ActiveConfig.bCopyEFBToTexture) entry->type = TCET_EC_DYNAMIC;
|
||||
else entry->type = TCET_NORMAL;
|
||||
|
||||
// load texture
|
||||
entry->Load(width, height, expandedWidth, 0, (texLevels == 0));
|
||||
@ -647,8 +652,11 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
|
||||
if ((entry->type == TCET_EC_VRAM && entry->virtual_width == scaled_tex_w && entry->virtual_height == scaled_tex_h)
|
||||
|| (entry->type == TCET_EC_DYNAMIC && entry->native_width == tex_w && entry->native_height == tex_h))
|
||||
{
|
||||
scaled_tex_w = tex_w;
|
||||
scaled_tex_h = tex_h;
|
||||
if (entry->type == TCET_EC_DYNAMIC)
|
||||
{
|
||||
scaled_tex_w = tex_w;
|
||||
scaled_tex_h = tex_h;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user