GPU: Rename match flags to avoid confusion.

This commit is contained in:
Unknown W. Brackets 2023-03-25 23:25:42 -07:00
parent 05c225655d
commit 2d13b40123
4 changed files with 10 additions and 10 deletions

View File

@ -734,7 +734,7 @@ static int Hook_godseaterburst_depthmask_5551() {
// This is added to read from the linearized mirror.
uint32_t depthMirror = depthBuffer + 0x00200000;
// Depth download required, or it won't work and will be transparent.
gpu->PerformMemoryCopy(depthMirror, depthMirror, size, GPUCopyFlag::FORCE_DST_MEM | GPUCopyFlag::DEPTH_REQUESTED);
gpu->PerformMemoryCopy(depthMirror, depthMirror, size, GPUCopyFlag::FORCE_DST_MATCH_MEM | GPUCopyFlag::DEPTH_REQUESTED);
NotifyMemInfo(MemBlockFlags::WRITE, depthMirror, size, "godseaterburst_depthmask_5551");
}
@ -769,7 +769,7 @@ static int Hook_starocean_write_stencil() {
static int Hook_topx_create_saveicon() {
const u32 fb_address = currentMIPS->r[MIPS_REG_V0];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryCopy(fb_address, fb_address, 0x00044000, GPUCopyFlag::FORCE_DST_MEM | GPUCopyFlag::DISALLOW_CREATE_VFB);
gpu->PerformMemoryCopy(fb_address, fb_address, 0x00044000, GPUCopyFlag::FORCE_DST_MATCH_MEM | GPUCopyFlag::DISALLOW_CREATE_VFB);
NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00044000, "topx_create_saveicon");
}
return 0;
@ -820,7 +820,7 @@ static int Hook_growlanser_create_saveicon() {
const u32 fmt = Memory::Read_U32(currentMIPS->r[MIPS_REG_SP]);
const u32 sz = fmt == GE_FORMAT_8888 ? 0x00088000 : 0x00044000;
if (Memory::IsVRAMAddress(fb_address) && fmt <= 3) {
gpu->PerformMemoryCopy(fb_address, fb_address, sz, GPUCopyFlag::FORCE_DST_MEM | GPUCopyFlag::DISALLOW_CREATE_VFB);
gpu->PerformMemoryCopy(fb_address, fb_address, sz, GPUCopyFlag::FORCE_DST_MATCH_MEM | GPUCopyFlag::DISALLOW_CREATE_VFB);
NotifyMemInfo(MemBlockFlags::WRITE, fb_address, sz, "growlanser_create_saveicon");
}
return 0;

View File

@ -1799,8 +1799,8 @@ bool FramebufferManagerCommon::NotifyFramebufferCopy(u32 src, u32 dst, int size,
VirtualFramebuffer *dstBuffer = nullptr;
VirtualFramebuffer *srcBuffer = nullptr;
bool ignoreDstBuffer = flags & GPUCopyFlag::FORCE_DST_MEM;
bool ignoreSrcBuffer = flags & (GPUCopyFlag::FORCE_SRC_MEM | GPUCopyFlag::MEMSET);
bool ignoreDstBuffer = flags & GPUCopyFlag::FORCE_DST_MATCH_MEM;
bool ignoreSrcBuffer = flags & (GPUCopyFlag::FORCE_SRC_MATCH_MEM | GPUCopyFlag::MEMSET);
RasterChannel channel = flags & GPUCopyFlag::DEPTH_REQUESTED ? RASTER_DEPTH : RASTER_COLOR;
u32 dstY = (u32)-1;

View File

@ -1977,7 +1977,7 @@ bool GPUCommon::PerformMemorySet(u32 dest, u8 v, int size) {
bool GPUCommon::PerformReadbackToMemory(u32 dest, int size) {
if (Memory::IsVRAMAddress(dest)) {
return PerformMemoryCopy(dest, dest, size, GPUCopyFlag::FORCE_DST_MEM);
return PerformMemoryCopy(dest, dest, size, GPUCopyFlag::FORCE_DST_MATCH_MEM);
}
return false;
}
@ -1985,7 +1985,7 @@ bool GPUCommon::PerformReadbackToMemory(u32 dest, int size) {
bool GPUCommon::PerformWriteColorFromMemory(u32 dest, int size) {
if (Memory::IsVRAMAddress(dest)) {
GPURecord::NotifyUpload(dest, size);
return PerformMemoryCopy(dest, dest, size, GPUCopyFlag::FORCE_SRC_MEM | GPUCopyFlag::DEBUG_NOTIFIED);
return PerformMemoryCopy(dest, dest, size, GPUCopyFlag::FORCE_SRC_MATCH_MEM | GPUCopyFlag::DEBUG_NOTIFIED);
}
return false;
}

View File

@ -116,9 +116,9 @@ ENUM_CLASS_BITOPS(WriteStencil);
enum class GPUCopyFlag {
NONE = 0,
FORCE_SRC_MEM = 1,
FORCE_DST_MEM = 2,
// Note: implies src == dst and FORCE_SRC_MEM.
FORCE_SRC_MATCH_MEM = 1,
FORCE_DST_MATCH_MEM = 2,
// Note: implies src == dst and FORCE_SRC_MATCH_MEM.
MEMSET = 4,
DEPTH_REQUESTED = 8,
DEBUG_NOTIFIED = 16,