Run code through the advanced tool 'sed' to remove trailing whitespace.
This commit is contained in:
1 parent
965b32be9c
commit
c579637eaf
568 files changed
+8650
-8654
No files matched your search
@@ -4,7 +4,7 @@
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
#define __STDC_CONSTANT_MACROS 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "AVIDump.h"
|
||||
#include "HW/VideoInterface.h" //for TargetRefreshRate
|
||||
@@ -71,9 +71,9 @@ bool AVIDump::CreateFile()
|
||||
HRESULT hr = AVIFileOpenA(&m_file, movie_file_name, OF_WRITE | OF_CREATE, NULL);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
if (hr == AVIERR_BADFORMAT) NOTICE_LOG(VIDEO, "The file couldn't be read, indicating a corrupt file or an unrecognized format.");
|
||||
if (hr == AVIERR_MEMORY) NOTICE_LOG(VIDEO, "The file could not be opened because of insufficient memory.");
|
||||
if (hr == AVIERR_FILEREAD) NOTICE_LOG(VIDEO, "A disk error occurred while reading the file.");
|
||||
if (hr == AVIERR_BADFORMAT) NOTICE_LOG(VIDEO, "The file couldn't be read, indicating a corrupt file or an unrecognized format.");
|
||||
if (hr == AVIERR_MEMORY) NOTICE_LOG(VIDEO, "The file could not be opened because of insufficient memory.");
|
||||
if (hr == AVIERR_FILEREAD) NOTICE_LOG(VIDEO, "A disk error occurred while reading the file.");
|
||||
if (hr == AVIERR_FILEOPEN) NOTICE_LOG(VIDEO, "A disk error occurred while opening the file.");
|
||||
if (hr == REGDB_E_CLASSNOTREG) NOTICE_LOG(VIDEO, "AVI class not registered");
|
||||
Stop();
|
||||
|
||||
@@ -29,7 +29,7 @@ class AVIDump
|
||||
static bool Start(int w, int h);
|
||||
#endif
|
||||
static void AddFrame(const u8* data, int width, int height);
|
||||
|
||||
|
||||
static void Stop();
|
||||
};
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#define BPMEM_LINEPTWIDTH 0x22
|
||||
#define BPMEM_PERF0_TRI 0x23
|
||||
#define BPMEM_PERF0_QUAD 0x24
|
||||
#define BPMEM_RAS1_SS0 0x25
|
||||
#define BPMEM_RAS1_SS0 0x25
|
||||
#define BPMEM_RAS1_SS1 0x26
|
||||
#define BPMEM_IREF 0x27
|
||||
#define BPMEM_TREF 0x28 // 0x28 + 8
|
||||
@@ -47,7 +47,7 @@
|
||||
#define BPMEM_TRIGGER_EFB_COPY 0x52
|
||||
#define BPMEM_COPYFILTER0 0x53
|
||||
#define BPMEM_COPYFILTER1 0x54
|
||||
#define BPMEM_CLEARBBOX1 0x55
|
||||
#define BPMEM_CLEARBBOX1 0x55
|
||||
#define BPMEM_CLEARBBOX2 0x56
|
||||
#define BPMEM_CLEAR_PIXEL_PERF 0x57
|
||||
#define BPMEM_REVBITS 0x58
|
||||
@@ -181,7 +181,7 @@ enum Compare
|
||||
|
||||
enum AlphaOp
|
||||
{
|
||||
ALPHAOP_AND = 0,
|
||||
ALPHAOP_AND = 0,
|
||||
ALPHAOP_OR,
|
||||
ALPHAOP_XOR,
|
||||
ALPHAOP_XNOR,
|
||||
@@ -289,7 +289,7 @@ struct TevStageCombiner
|
||||
};
|
||||
union AlphaCombiner
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 rswap : 2;
|
||||
u32 tswap : 2;
|
||||
@@ -367,7 +367,7 @@ struct TevStageCombiner
|
||||
};
|
||||
struct
|
||||
{
|
||||
u32 hex : 21;
|
||||
u32 hex : 21;
|
||||
u32 unused : 11;
|
||||
};
|
||||
|
||||
@@ -442,7 +442,7 @@ union RAS1_IREF
|
||||
|
||||
union TexMode0
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 wrap_s : 2;
|
||||
u32 wrap_t : 2;
|
||||
@@ -458,7 +458,7 @@ union TexMode0
|
||||
};
|
||||
union TexMode1
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 min_lod : 8;
|
||||
u32 max_lod : 8;
|
||||
@@ -467,7 +467,7 @@ union TexMode1
|
||||
};
|
||||
union TexImage0
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 width : 10; //actually w-1
|
||||
u32 height : 10; //actually h-1
|
||||
@@ -477,7 +477,7 @@ union TexImage0
|
||||
};
|
||||
union TexImage1
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 tmem_even : 15; // tmem line index for even LODs
|
||||
u32 cache_width : 3;
|
||||
@@ -489,10 +489,10 @@ union TexImage1
|
||||
|
||||
union TexImage2
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 tmem_odd : 15; // tmem line index for odd LODs
|
||||
u32 cache_width : 3;
|
||||
u32 cache_width : 3;
|
||||
u32 cache_height : 3;
|
||||
};
|
||||
u32 hex;
|
||||
@@ -500,7 +500,7 @@ union TexImage2
|
||||
|
||||
union TexImage3
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 image_base: 24; //address in memory >> 5 (was 20 for GC)
|
||||
};
|
||||
@@ -508,7 +508,7 @@ union TexImage3
|
||||
};
|
||||
union TexTLUT
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 tmem_offset : 10;
|
||||
u32 tlut_format : 2;
|
||||
@@ -518,7 +518,7 @@ union TexTLUT
|
||||
|
||||
union ZTex1
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 bias : 24;
|
||||
};
|
||||
@@ -527,7 +527,7 @@ union ZTex1
|
||||
|
||||
union ZTex2
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 type : 2; // TEV_Z_TYPE_X
|
||||
u32 op : 2; // GXZTexOp
|
||||
@@ -563,7 +563,7 @@ struct FourTexUnits
|
||||
|
||||
union GenMode
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 numtexgens : 4; // 0xF
|
||||
u32 numcolchans : 5; // 0x1E0
|
||||
@@ -578,7 +578,7 @@ union GenMode
|
||||
|
||||
union LPSize
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 linesize : 8; // in 1/6th pixels
|
||||
u32 pointsize : 8; // in 1/6th pixels
|
||||
@@ -593,7 +593,7 @@ union LPSize
|
||||
|
||||
union X12Y12
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 y : 12;
|
||||
u32 x : 12;
|
||||
@@ -602,7 +602,7 @@ union X12Y12
|
||||
};
|
||||
union X10Y10
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 x : 10;
|
||||
u32 y : 10;
|
||||
@@ -626,7 +626,7 @@ union X10Y10
|
||||
|
||||
union BlendMode
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 blendenable : 1;
|
||||
u32 logicopenable : 1;
|
||||
@@ -644,7 +644,7 @@ union BlendMode
|
||||
|
||||
union FogParam0
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 mantissa : 11;
|
||||
u32 exponent : 8;
|
||||
@@ -674,7 +674,7 @@ union FogParam3
|
||||
|
||||
// amount to subtract from eyespacez after range adjustment
|
||||
float GetC()
|
||||
{
|
||||
{
|
||||
union { u32 i; float f; } dummy;
|
||||
dummy.i = ((u32)c_sign << 31) | ((u32)c_exp << 23) | ((u32)c_mant << 12); // scale mantissa from 11 to 23 bits
|
||||
return dummy.f;
|
||||
@@ -814,7 +814,7 @@ union PE_CONTROL
|
||||
|
||||
union TCInfo
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 scale_minus_1 : 16;
|
||||
u32 range_bias : 1;
|
||||
@@ -924,7 +924,7 @@ union AlphaTest
|
||||
union UPE_Copy
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 clamp0 : 1; // if set clamp top
|
||||
u32 clamp1 : 1; // if set clamp bottom
|
||||
@@ -939,7 +939,7 @@ union UPE_Copy
|
||||
u32 intensity_fmt : 1; // if set, is an intensity format (I4,I8,IA4,IA8)
|
||||
u32 auto_conv : 1; // if 0 automatic color conversion by texture format and pixel type
|
||||
};
|
||||
u32 tp_realFormat() {
|
||||
u32 tp_realFormat() {
|
||||
return target_pixel_format / 2 + (target_pixel_format & 1) * 8;
|
||||
}
|
||||
};
|
||||
@@ -983,7 +983,7 @@ struct BPMemory
|
||||
// indirect matrices (set by GXSetIndTexMtx, selected by TevStageIndirect::mid)
|
||||
// abc form a 2x3 offset matrix, there's 3 such matrices
|
||||
// the 3 offset matrices can either be indirect type, S-type, or T-type
|
||||
// 6bit scale factor s is distributed across IND_MTXA/B/C.
|
||||
// 6bit scale factor s is distributed across IND_MTXA/B/C.
|
||||
// before using matrices scale by 2^-(s-17)
|
||||
IND_MTX indmtx[3];//06-0e GXSetIndTexMtx, 2x3 matrices
|
||||
IND_IMASK imask;//0f
|
||||
|
||||
@@ -27,7 +27,7 @@ static int numWrites;
|
||||
|
||||
extern volatile bool g_bSkipCurrentFrame;
|
||||
|
||||
static const float s_gammaLUT[] =
|
||||
static const float s_gammaLUT[] =
|
||||
{
|
||||
1.0f,
|
||||
1.7f,
|
||||
@@ -67,7 +67,7 @@ void BPWritten(const BPCmd& bp)
|
||||
just stuff geometry in them and don't put state changes there
|
||||
----------------------------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
// check for invalid state, else unneeded configuration are built
|
||||
g_video_backend->CheckInvalidState();
|
||||
|
||||
@@ -104,7 +104,7 @@ void BPWritten(const BPCmd& bp)
|
||||
{
|
||||
numWrites = 0;
|
||||
}
|
||||
else if (++numWrites >= 100) // seem that if 100 consecutive BP writes are called to either of these addresses in ZTP,
|
||||
else if (++numWrites >= 100) // seem that if 100 consecutive BP writes are called to either of these addresses in ZTP,
|
||||
{ // then it is safe to assume the map texture address is currently loaded into the BP memory
|
||||
mapTexAddress = bpmem.tex[0].texImage3[0].hex << 5;
|
||||
mapTexFound = true;
|
||||
@@ -119,7 +119,7 @@ void BPWritten(const BPCmd& bp)
|
||||
FlushPipeline();
|
||||
}
|
||||
} // END ZTP SPEEDUP HACK
|
||||
else
|
||||
else
|
||||
{
|
||||
if (((s32*)&bpmem)[bp.address] == bp.newvalue)
|
||||
{
|
||||
@@ -143,7 +143,7 @@ void BPWritten(const BPCmd& bp)
|
||||
}
|
||||
|
||||
((u32*)&bpmem)[bp.address] = bp.newvalue;
|
||||
|
||||
|
||||
switch (bp.address)
|
||||
{
|
||||
case BPMEM_GENMODE: // Set the Generation Mode
|
||||
@@ -199,7 +199,7 @@ void BPWritten(const BPCmd& bp)
|
||||
{
|
||||
if (bp.changes & 0xFFFF)
|
||||
{
|
||||
PRIM_LOG("blendmode: en=%d, open=%d, colupd=%d, alphaupd=%d, dst=%d, src=%d, sub=%d, mode=%d",
|
||||
PRIM_LOG("blendmode: en=%d, open=%d, colupd=%d, alphaupd=%d, dst=%d, src=%d, sub=%d, mode=%d",
|
||||
bpmem.blendmode.blendenable, bpmem.blendmode.logicopenable, bpmem.blendmode.colorupdate, bpmem.blendmode.alphaupdate,
|
||||
bpmem.blendmode.dstfactor, bpmem.blendmode.srcfactor, bpmem.blendmode.subtract, bpmem.blendmode.logicmode);
|
||||
|
||||
@@ -265,7 +265,7 @@ void BPWritten(const BPCmd& bp)
|
||||
EFBRectangle rc;
|
||||
rc.left = (int)bpmem.copyTexSrcXY.x;
|
||||
rc.top = (int)bpmem.copyTexSrcXY.y;
|
||||
|
||||
|
||||
// Here Width+1 like Height, otherwise some textures are corrupted already since the native resolution.
|
||||
rc.right = (int)(bpmem.copyTexSrcXY.x + bpmem.copyTexSrcWH.x + 1);
|
||||
rc.bottom = (int)(bpmem.copyTexSrcXY.y + bpmem.copyTexSrcWH.y + 1);
|
||||
@@ -287,7 +287,7 @@ void BPWritten(const BPCmd& bp)
|
||||
// We should be able to get away with deactivating the current bbox tracking
|
||||
// here. Not sure if there's a better spot to put this.
|
||||
// the number of lines copied is determined by the y scale * source efb height
|
||||
|
||||
|
||||
PixelEngine::bbox_active = false;
|
||||
|
||||
float yScale;
|
||||
@@ -303,8 +303,8 @@ void BPWritten(const BPCmd& bp)
|
||||
xfbLines = MAX_XFB_HEIGHT;
|
||||
}
|
||||
|
||||
RenderToXFB(bp, rc, yScale, xfbLines,
|
||||
bpmem.copyTexDest << 5,
|
||||
RenderToXFB(bp, rc, yScale, xfbLines,
|
||||
bpmem.copyTexDest << 5,
|
||||
bpmem.copyMipMapStrideChannels << 4,
|
||||
(u32)xfbLines,
|
||||
s_gammaLUT[PE_copy.gamma]);
|
||||
@@ -377,7 +377,7 @@ void BPWritten(const BPCmd& bp)
|
||||
{
|
||||
if (bp.changes & 3)
|
||||
PixelShaderManager::SetZTextureTypeChanged();
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
const char* pzop[] = {"DISABLE", "ADD", "REPLACE", "?"};
|
||||
const char* pztype[] = {"Z8", "Z16", "Z24", "?"};
|
||||
PRIM_LOG("ztex op=%s, type=%s", pzop[bpmem.ztex2.op], pztype[bpmem.ztex2.type]);
|
||||
@@ -442,7 +442,7 @@ void BPWritten(const BPCmd& bp)
|
||||
{
|
||||
int right = bp.newvalue >> 10;
|
||||
int left = bp.newvalue & 0x3ff;
|
||||
|
||||
|
||||
// We should only set these if bbox is calculated properly.
|
||||
PixelEngine::bbox[0] = left;
|
||||
PixelEngine::bbox[1] = right;
|
||||
@@ -498,7 +498,7 @@ void BPWritten(const BPCmd& bp)
|
||||
case BPMEM_IND_IMASK: // Index Mask ?
|
||||
case BPMEM_REVBITS: // Always set to 0x0F when GX_InitRevBits() is called.
|
||||
break;
|
||||
|
||||
|
||||
case BPMEM_CLEAR_PIXEL_PERF:
|
||||
// GXClearPixMetric writes 0xAAA here, Sunshine alternates this register between values 0x000 and 0xAAA
|
||||
g_perf_query->ResetQuery();
|
||||
|
||||
@@ -38,7 +38,7 @@ enum
|
||||
enum
|
||||
{
|
||||
FORMAT_16B_565 = 0, // NA
|
||||
FORMAT_24B_888 = 1,
|
||||
FORMAT_24B_888 = 1,
|
||||
FORMAT_32B_888x = 2,
|
||||
FORMAT_16B_4444 = 3,
|
||||
FORMAT_24B_6666 = 4,
|
||||
@@ -56,7 +56,7 @@ enum
|
||||
union TVtxDesc
|
||||
{
|
||||
u64 Hex;
|
||||
struct
|
||||
struct
|
||||
{
|
||||
// 0: not present
|
||||
// 1: present
|
||||
@@ -70,9 +70,9 @@ union TVtxDesc
|
||||
u32 Tex6MatIdx : 1;
|
||||
u32 Tex7MatIdx : 1;
|
||||
|
||||
// 00: not present
|
||||
// 01: direct
|
||||
// 10: 8 bit index
|
||||
// 00: not present
|
||||
// 01: direct
|
||||
// 10: 8 bit index
|
||||
// 11: 16 bit index
|
||||
u32 Position : 2;
|
||||
u32 Normal : 2;
|
||||
@@ -98,21 +98,21 @@ union TVtxDesc
|
||||
union UVAT_group0
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
struct
|
||||
{
|
||||
// 0:8
|
||||
u32 PosElements : 1;
|
||||
u32 PosFormat : 3;
|
||||
u32 PosFrac : 5;
|
||||
u32 PosFormat : 3;
|
||||
u32 PosFrac : 5;
|
||||
// 9:12
|
||||
u32 NormalElements : 1;
|
||||
u32 NormalFormat : 3;
|
||||
u32 NormalElements : 1;
|
||||
u32 NormalFormat : 3;
|
||||
// 13:16
|
||||
u32 Color0Elements : 1;
|
||||
u32 Color0Comp : 3;
|
||||
u32 Color0Comp : 3;
|
||||
// 17:20
|
||||
u32 Color1Elements : 1;
|
||||
u32 Color1Comp : 3;
|
||||
u32 Color1Comp : 3;
|
||||
// 21:29
|
||||
u32 Tex0CoordElements : 1;
|
||||
u32 Tex0CoordFormat : 3;
|
||||
@@ -126,7 +126,7 @@ union UVAT_group0
|
||||
union UVAT_group1
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
struct
|
||||
{
|
||||
// 0:8
|
||||
u32 Tex1CoordElements : 1;
|
||||
@@ -143,7 +143,7 @@ union UVAT_group1
|
||||
// 27:30
|
||||
u32 Tex4CoordElements : 1;
|
||||
u32 Tex4CoordFormat : 3;
|
||||
//
|
||||
//
|
||||
u32 : 1;
|
||||
};
|
||||
};
|
||||
@@ -151,7 +151,7 @@ union UVAT_group1
|
||||
union UVAT_group2
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
struct
|
||||
{
|
||||
// 0:4
|
||||
u32 Tex4Frac : 5;
|
||||
@@ -186,10 +186,10 @@ struct TexAttr
|
||||
struct TVtxAttr
|
||||
{
|
||||
u8 PosElements;
|
||||
u8 PosFormat;
|
||||
u8 PosFrac;
|
||||
u8 PosFormat;
|
||||
u8 PosFrac;
|
||||
u8 NormalElements;
|
||||
u8 NormalFormat;
|
||||
u8 NormalFormat;
|
||||
ColorAttr color[2];
|
||||
TexAttr texCoord[8];
|
||||
u8 ByteDequant;
|
||||
|
||||
@@ -108,7 +108,7 @@ void Init()
|
||||
m_bboxbottom = 480;
|
||||
|
||||
m_tokenReg = 0;
|
||||
|
||||
|
||||
memset(&fifo,0,sizeof(fifo));
|
||||
fifo.CPCmdIdle = 1;
|
||||
fifo.CPReadIdle = 1;
|
||||
@@ -613,7 +613,7 @@ void ProcessFifoEvents()
|
||||
|
||||
void Shutdown()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
void SetCpStatusRegister()
|
||||
@@ -656,7 +656,7 @@ void SetCpControlRegister()
|
||||
ProcessorInterface::Fifo_CPUBase = fifo.CPBase;
|
||||
ProcessorInterface::Fifo_CPUEnd = fifo.CPEnd;
|
||||
}
|
||||
|
||||
|
||||
if(fifo.bFF_GPReadEnable && !m_CPCtrlReg.GPReadEnable)
|
||||
{
|
||||
fifo.bFF_GPReadEnable = m_CPCtrlReg.GPReadEnable;
|
||||
|
||||
@@ -23,7 +23,7 @@ extern volatile bool interruptSet;
|
||||
extern volatile bool interruptWaiting;
|
||||
extern volatile bool interruptTokenWaiting;
|
||||
extern volatile bool interruptFinishWaiting;
|
||||
|
||||
|
||||
// internal hardware addresses
|
||||
enum
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ __forceinline u16 DataPeek16(int _uOffset)
|
||||
return DataPeek<u16>(_uOffset);
|
||||
}
|
||||
|
||||
__forceinline u32 DataPeek32(int _uOffset)
|
||||
__forceinline u32 DataPeek32(int _uOffset)
|
||||
{
|
||||
return DataPeek<u32>(_uOffset);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace DriverDetails
|
||||
m_vendor = vendor;
|
||||
m_driver = driver;
|
||||
m_version = version;
|
||||
|
||||
|
||||
if (driver == DRIVER_UNKNOWN)
|
||||
switch(vendor)
|
||||
{
|
||||
@@ -74,7 +74,7 @@ namespace DriverDetails
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
for(auto& bug : m_known_bugs)
|
||||
{
|
||||
if(
|
||||
@@ -91,7 +91,7 @@ namespace DriverDetails
|
||||
{
|
||||
auto it = m_bugs.find(bug);
|
||||
if (it == m_bugs.end())
|
||||
return false;
|
||||
return false;
|
||||
return it->second.m_hasbug;
|
||||
}
|
||||
}
|
||||
@@ -69,7 +69,7 @@ namespace DriverDetails
|
||||
// Affected devices: Qualcomm/Adreno
|
||||
// Started Version: ? (Noticed on v14)
|
||||
// Ended Version: -1
|
||||
// When compiling a shader, it is important that when it fails,
|
||||
// When compiling a shader, it is important that when it fails,
|
||||
// you first get the length of the information log prior to grabbing it.
|
||||
// This allows you to allocate an array to store all of the log
|
||||
// Adreno devices /always/ return 0 when querying GL_INFO_LOG_LENGTH
|
||||
@@ -129,7 +129,7 @@ namespace DriverDetails
|
||||
// PowerVR 5 hardware limitations don't allow it to support OpenGL ES 3
|
||||
// This is fixed in PowerVR6
|
||||
BUG_ISPOWERVR,
|
||||
// Bug: glBufferSubData/glMapBufferRange stalls + OOM
|
||||
// Bug: glBufferSubData/glMapBufferRange stalls + OOM
|
||||
// Affected devices: Adreno a3xx/Mali-t6xx
|
||||
// Started Version: -1
|
||||
// Ended Version: -1
|
||||
@@ -138,10 +138,10 @@ namespace DriverDetails
|
||||
// Apparently Mali and Adreno share code in this regard since it was wrote by the same person.
|
||||
BUG_BROKENBUFFERSTREAM,
|
||||
};
|
||||
|
||||
// Initializes our internal vendor, device family, and driver version
|
||||
|
||||
// Initializes our internal vendor, device family, and driver version
|
||||
void Init(Vendor vendor, Driver driver, const double version);
|
||||
|
||||
|
||||
// Once Vendor and driver version is set, this will return if it has the applicable bug passed to it.
|
||||
bool HasBug(Bug bug);
|
||||
}
|
||||
@@ -145,8 +145,8 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
||||
|
||||
// Called when a screensaver wants to show up while this window is active
|
||||
case WM_SYSCOMMAND:
|
||||
|
||||
switch (wParam)
|
||||
|
||||
switch (wParam)
|
||||
{
|
||||
case SC_SCREENSAVE:
|
||||
case SC_MONITORPOWER:
|
||||
|
||||
@@ -28,7 +28,7 @@ static u8 *videoBuffer;
|
||||
static int size = 0;
|
||||
} // namespace
|
||||
|
||||
void Fifo_DoState(PointerWrap &p)
|
||||
void Fifo_DoState(PointerWrap &p)
|
||||
{
|
||||
p.DoArray(videoBuffer, FIFO_SIZE);
|
||||
p.Do(size);
|
||||
@@ -148,7 +148,7 @@ void RunGpuLoop()
|
||||
|
||||
Common::AtomicStore(CommandProcessor::VITicks, CommandProcessor::m_cpClockOrigin);
|
||||
|
||||
// check if we are able to run this buffer
|
||||
// check if we are able to run this buffer
|
||||
while (GpuRunningState && !CommandProcessor::interruptWaiting && fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance && !AtBreakpoint())
|
||||
{
|
||||
fifo.isGpuReadingData = true;
|
||||
@@ -181,11 +181,11 @@ void RunGpuLoop()
|
||||
}
|
||||
|
||||
CommandProcessor::SetCpStatus();
|
||||
|
||||
|
||||
// This call is pretty important in DualCore mode and must be called in the FIFO Loop.
|
||||
// If we don't, s_swapRequested or s_efbAccessRequested won't be set to false
|
||||
// leading the CPU thread to wait in Video_BeginField or Video_AccessEFB thus slowing things down.
|
||||
VideoFifo_CheckAsyncRequest();
|
||||
VideoFifo_CheckAsyncRequest();
|
||||
CommandProcessor::isPossibleWaitingSetDrawDone = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ void Shutdown()
|
||||
{
|
||||
}
|
||||
|
||||
void Clear()
|
||||
void Clear()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -27,7 +27,7 @@ void Init(const char *gameCode)
|
||||
char szDir[MAX_PATH];
|
||||
sprintf(szDir, "%s%s", File::GetUserPath(D_HIRESTEXTURES_IDX).c_str(), gameCode);
|
||||
Directories.push_back(std::string(szDir));
|
||||
|
||||
|
||||
|
||||
for (u32 i = 0; i < Directories.size(); i++)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ struct TGA_HEADER
|
||||
s16 height; // image height in pixels
|
||||
u8 bits; // image bits per pixel 8,16,24,32
|
||||
u8 descriptor; // image descriptor bits (vh flip bits)
|
||||
|
||||
|
||||
// pixel data follows header
|
||||
};
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ template <bool pr> __forceinline void IndexGenerator::WriteTriangle(u32 index1,
|
||||
*Tptr++ = index3;
|
||||
if(pr)
|
||||
*Tptr++ = s_primitive_restart;
|
||||
|
||||
|
||||
++numT;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ template <bool pr> void IndexGenerator::AddStrip(u32 const numVerts)
|
||||
}
|
||||
*Tptr++ = s_primitive_restart;
|
||||
numT += numVerts - 2;
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -115,27 +115,27 @@ template <bool pr> void IndexGenerator::AddStrip(u32 const numVerts)
|
||||
|
||||
/**
|
||||
* FAN simulator:
|
||||
*
|
||||
*
|
||||
* 2---3
|
||||
* / \ / \
|
||||
* 1---0---4
|
||||
*
|
||||
*
|
||||
* would generate this triangles:
|
||||
* 012, 023, 034
|
||||
*
|
||||
*
|
||||
* rotated (for better striping):
|
||||
* 120, 302, 034
|
||||
*
|
||||
*
|
||||
* as odd ones have to winded, following strip is fine:
|
||||
* 12034
|
||||
*
|
||||
*
|
||||
* so we use 6 indices for 3 triangles
|
||||
*/
|
||||
|
||||
template <bool pr> void IndexGenerator::AddFan(u32 numVerts)
|
||||
{
|
||||
u32 i = 2;
|
||||
|
||||
|
||||
if(pr)
|
||||
{
|
||||
for(; i+3<=numVerts; i+=3)
|
||||
@@ -148,7 +148,7 @@ template <bool pr> void IndexGenerator::AddFan(u32 numVerts)
|
||||
*Tptr++ = s_primitive_restart;
|
||||
numT += 3;
|
||||
}
|
||||
|
||||
|
||||
for(; i+2<=numVerts; i+=2)
|
||||
{
|
||||
*Tptr++ = index + i - 1;
|
||||
@@ -159,7 +159,7 @@ template <bool pr> void IndexGenerator::AddFan(u32 numVerts)
|
||||
numT += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (; i < numVerts; ++i)
|
||||
{
|
||||
WriteTriangle<pr>(index, index + i - 1, index + i);
|
||||
@@ -168,18 +168,18 @@ template <bool pr> void IndexGenerator::AddFan(u32 numVerts)
|
||||
|
||||
/*
|
||||
* QUAD simulator
|
||||
*
|
||||
*
|
||||
* 0---1 4---5
|
||||
* |\ | |\ |
|
||||
* | \ | | \ |
|
||||
* | \| | \|
|
||||
* 3---2 7---6
|
||||
*
|
||||
*
|
||||
* 012,023, 456,467 ...
|
||||
* or 120,302, 564,746
|
||||
* or as strip: 1203, 5647
|
||||
*
|
||||
* Warning:
|
||||
*
|
||||
* Warning:
|
||||
* A simple triangle has to be rendered for three vertices.
|
||||
* ZWW do this for sun rays
|
||||
*/
|
||||
@@ -220,7 +220,7 @@ void IndexGenerator::AddLineList(u32 numVerts)
|
||||
*Lptr++ = index + i;
|
||||
++numL;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// shouldn't be used as strips as LineLists are much more common
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
static u32 GetTriangleindexLen() {return (u32)(Tptr - BASETptr);}
|
||||
static u32 GetLineindexLen() {return (u32)(Lptr - BASELptr);}
|
||||
static u32 GetPointindexLen() {return (u32)(Pptr - BASEPptr);}
|
||||
|
||||
|
||||
static u32 GetRemainingIndices();
|
||||
/*
|
||||
enum IndexPrimitiveType
|
||||
|
||||
@@ -181,12 +181,12 @@ void VideoFifo_CheckPerfQueryRequest()
|
||||
if (s_perf_query_requested)
|
||||
{
|
||||
g_perf_query->FlushResults();
|
||||
|
||||
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(s_perf_query_lock);
|
||||
s_perf_query_requested = false;
|
||||
}
|
||||
|
||||
|
||||
s_perf_query_cond.notify_one();
|
||||
}
|
||||
}
|
||||
@@ -262,7 +262,7 @@ void VideoBackendHardware::CheckInvalidState()
|
||||
if (m_invalid)
|
||||
{
|
||||
m_invalid = false;
|
||||
|
||||
|
||||
BPReload();
|
||||
TextureCache::Invalidate();
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ struct PortableVertexDeclaration
|
||||
// The implementation of this class is specific for GL/DX, so NativeVertexFormat.cpp
|
||||
// is in the respective backend, not here in VideoCommon.
|
||||
|
||||
// Note that this class can't just invent arbitrary vertex formats out of its input -
|
||||
// Note that this class can't just invent arbitrary vertex formats out of its input -
|
||||
// all the data loading code must always be made compatible.
|
||||
class NativeVertexFormat : NonCopyable
|
||||
{
|
||||
|
||||
@@ -130,7 +130,7 @@ u32 FifoCommandRunnable(u32 &command_size)
|
||||
if (buffer_size == 0)
|
||||
return 0; // can't peek
|
||||
|
||||
u8 cmd_byte = DataPeek8(0);
|
||||
u8 cmd_byte = DataPeek8(0);
|
||||
|
||||
switch (cmd_byte)
|
||||
{
|
||||
@@ -340,14 +340,14 @@ static void Decode()
|
||||
u32 address = DataReadU32();
|
||||
u32 count = DataReadU32();
|
||||
ExecuteDisplayList(address, count);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case GX_CMD_UNKNOWN_METRICS: // zelda 4 swords calls it and checks the metrics registers after that
|
||||
DEBUG_LOG(VIDEO, "GX 0x44: %08x", cmd_byte);
|
||||
break;
|
||||
|
||||
case GX_CMD_INVL_VC: // Invalidate Vertex Cache
|
||||
case GX_CMD_INVL_VC: // Invalidate Vertex Cache
|
||||
DEBUG_LOG(VIDEO, "Invalidate (vertex cache?)");
|
||||
break;
|
||||
|
||||
@@ -359,7 +359,7 @@ static void Decode()
|
||||
}
|
||||
break;
|
||||
|
||||
// draw primitives
|
||||
// draw primitives
|
||||
default:
|
||||
if (cmd_byte & 0x80)
|
||||
{
|
||||
@@ -392,7 +392,7 @@ static void DecodeSemiNop()
|
||||
switch (cmd_byte)
|
||||
{
|
||||
case GX_CMD_UNKNOWN_METRICS: // zelda 4 swords calls it and checks the metrics registers after that
|
||||
case GX_CMD_INVL_VC: // Invalidate Vertex Cache
|
||||
case GX_CMD_INVL_VC: // Invalidate Vertex Cache
|
||||
case GX_NOP:
|
||||
break;
|
||||
|
||||
@@ -432,7 +432,7 @@ static void DecodeSemiNop()
|
||||
break;
|
||||
|
||||
case GX_CMD_CALL_DL:
|
||||
// Hm, wonder if any games put tokens in display lists - in that case,
|
||||
// Hm, wonder if any games put tokens in display lists - in that case,
|
||||
// we'll have to parse them too.
|
||||
DataSkip(8);
|
||||
break;
|
||||
@@ -447,7 +447,7 @@ static void DecodeSemiNop()
|
||||
}
|
||||
break;
|
||||
|
||||
// draw primitives
|
||||
// draw primitives
|
||||
default:
|
||||
if (cmd_byte & 0x80)
|
||||
{
|
||||
|
||||
@@ -144,7 +144,7 @@ cl_program CompileProgram(const char *Kernel)
|
||||
buildlog = new char[buildlog_size + 1];
|
||||
err = clGetProgramBuildInfo(program, OpenCL::device_id, CL_PROGRAM_BUILD_LOG, buildlog_size, buildlog, NULL);
|
||||
buildlog[buildlog_size] = 0;
|
||||
|
||||
|
||||
if(err != CL_SUCCESS)
|
||||
{
|
||||
HandleCLError(err, "Error: can't get build log");
|
||||
@@ -192,7 +192,7 @@ void Destroy()
|
||||
{
|
||||
clReleaseContext(g_context);
|
||||
g_context = NULL;
|
||||
}
|
||||
}
|
||||
g_bInitialized = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace PixelEngine
|
||||
union UPEZConfReg
|
||||
{
|
||||
u16 Hex;
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u16 ZCompEnable : 1; // Z Comparator Enable
|
||||
u16 Function : 3;
|
||||
@@ -38,7 +38,7 @@ union UPEZConfReg
|
||||
union UPEAlphaConfReg
|
||||
{
|
||||
u16 Hex;
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u16 BMMath : 1; // GX_BM_BLEND || GX_BM_SUBSTRACT
|
||||
u16 BMLogic : 1; // GX_BM_LOGIC
|
||||
@@ -55,7 +55,7 @@ union UPEAlphaConfReg
|
||||
union UPEDstAlphaConfReg
|
||||
{
|
||||
u16 Hex;
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u16 DstAlpha : 8;
|
||||
u16 Enable : 1;
|
||||
@@ -66,7 +66,7 @@ union UPEDstAlphaConfReg
|
||||
union UPEAlphaModeConfReg
|
||||
{
|
||||
u16 Hex;
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u16 Threshold : 8;
|
||||
u16 CompareMode : 8;
|
||||
@@ -76,7 +76,7 @@ union UPEAlphaModeConfReg
|
||||
// fifo Control Register
|
||||
union UPECtrlReg
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u16 PETokenEnable : 1;
|
||||
u16 PEFinishEnable : 1;
|
||||
@@ -129,7 +129,7 @@ void DoState(PointerWrap &p)
|
||||
p.Do(g_bSignalFinishInterrupt);
|
||||
p.Do(interruptSetToken);
|
||||
p.Do(interruptSetFinish);
|
||||
|
||||
|
||||
p.Do(bbox);
|
||||
p.Do(bbox_active);
|
||||
}
|
||||
@@ -187,7 +187,7 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
|
||||
case PE_ALPHAMODE:
|
||||
_uReturnValue = m_AlphaModeConf.Hex;
|
||||
INFO_LOG(PIXELENGINE, "(r16) ALPHAMODE");
|
||||
break;
|
||||
break;
|
||||
case PE_ALPHAREAD:
|
||||
_uReturnValue = m_AlphaRead.Hex;
|
||||
WARN_LOG(PIXELENGINE, "(r16) ALPHAREAD");
|
||||
@@ -303,7 +303,7 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
|
||||
_uReturnValue = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Write16(const u16 _iValue, const u32 _iAddress)
|
||||
@@ -332,7 +332,7 @@ void Write16(const u16 _iValue, const u32 _iAddress)
|
||||
INFO_LOG(PIXELENGINE, "(w16) ALPHAREAD: %02x", _iValue);
|
||||
break;
|
||||
|
||||
case PE_CTRL_REGISTER:
|
||||
case PE_CTRL_REGISTER:
|
||||
{
|
||||
UPECtrlReg tmpCtrl(_iValue);
|
||||
|
||||
@@ -376,7 +376,7 @@ void UpdateInterrupts()
|
||||
{
|
||||
// check if there is a token-interrupt
|
||||
UpdateTokenInterrupt((g_bSignalTokenInterrupt & m_Control.PETokenEnable));
|
||||
|
||||
|
||||
// check if there is a finish-interrupt
|
||||
UpdateFinishInterrupt((g_bSignalFinishInterrupt & m_Control.PEFinishEnable));
|
||||
}
|
||||
|
||||
@@ -25,18 +25,18 @@ enum
|
||||
|
||||
// NOTE: Order not verified
|
||||
// These indicate the number of quads that are being used as input/output for each particular stage
|
||||
PE_PERF_ZCOMP_INPUT_ZCOMPLOC_L = 0x18,
|
||||
PE_PERF_ZCOMP_INPUT_ZCOMPLOC_L = 0x18,
|
||||
PE_PERF_ZCOMP_INPUT_ZCOMPLOC_H = 0x1a,
|
||||
PE_PERF_ZCOMP_OUTPUT_ZCOMPLOC_L = 0x1c,
|
||||
PE_PERF_ZCOMP_OUTPUT_ZCOMPLOC_H = 0x1e,
|
||||
PE_PERF_ZCOMP_INPUT_L = 0x20,
|
||||
PE_PERF_ZCOMP_OUTPUT_ZCOMPLOC_L = 0x1c,
|
||||
PE_PERF_ZCOMP_OUTPUT_ZCOMPLOC_H = 0x1e,
|
||||
PE_PERF_ZCOMP_INPUT_L = 0x20,
|
||||
PE_PERF_ZCOMP_INPUT_H = 0x22,
|
||||
PE_PERF_ZCOMP_OUTPUT_L = 0x24,
|
||||
PE_PERF_ZCOMP_OUTPUT_H = 0x26,
|
||||
PE_PERF_BLEND_INPUT_L = 0x28,
|
||||
PE_PERF_BLEND_INPUT_H = 0x2a,
|
||||
PE_PERF_EFB_COPY_CLOCKS_L = 0x2c,
|
||||
PE_PERF_EFB_COPY_CLOCKS_H = 0x2e,
|
||||
PE_PERF_ZCOMP_OUTPUT_L = 0x24,
|
||||
PE_PERF_ZCOMP_OUTPUT_H = 0x26,
|
||||
PE_PERF_BLEND_INPUT_L = 0x28,
|
||||
PE_PERF_BLEND_INPUT_H = 0x2a,
|
||||
PE_PERF_EFB_COPY_CLOCKS_L = 0x2c,
|
||||
PE_PERF_EFB_COPY_CLOCKS_H = 0x2e,
|
||||
};
|
||||
|
||||
namespace PixelEngine
|
||||
|
||||
@@ -529,7 +529,7 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
|
||||
AlphaTest::TEST_RESULT Pretest = bpmem.alpha_test.TestResult();
|
||||
uid_data.Pretest = Pretest;
|
||||
|
||||
// NOTE: Fragment may not be discarded if alpha test always fails and early depth test is enabled
|
||||
// NOTE: Fragment may not be discarded if alpha test always fails and early depth test is enabled
|
||||
// (in this case we need to write a depth value if depth test passes regardless of the alpha testing result)
|
||||
if (Pretest == AlphaTest::UNDETERMINED || (Pretest == AlphaTest::FAIL && bpmem.UseLateDepthTest()))
|
||||
WriteAlphaTest<T>(out, uid_data, ApiType, dstAlphaMode, per_pixel_depth);
|
||||
|
||||
@@ -29,7 +29,7 @@ void PixelShaderManager::Dirty()
|
||||
s_bFogRangeAdjustChanged = true;
|
||||
s_bViewPortChanged = true;
|
||||
nLightsChanged[0] = 0; nLightsChanged[1] = 0x80;
|
||||
|
||||
|
||||
SetColorChanged(0, 0);
|
||||
SetColorChanged(0, 1);
|
||||
SetColorChanged(0, 2);
|
||||
@@ -135,7 +135,7 @@ void PixelShaderManager::SetConstants(u32 components)
|
||||
nLightsChanged[0] = nLightsChanged[1] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(s_bViewPortChanged)
|
||||
{
|
||||
constants.zbias[1][0] = xfregs.viewport.farZ / 16777216.0f;
|
||||
@@ -156,7 +156,7 @@ void PixelShaderManager::SetColorChanged(int type, int num)
|
||||
c[num][2] = bpmem.tevregs[num].high.a / 255.0f;
|
||||
c[num][1] = bpmem.tevregs[num].high.b / 255.0f;
|
||||
dirty = true;
|
||||
|
||||
|
||||
PRIM_LOG("pixel %scolor%d: %f %f %f %f\n", type?"k":"", num, c[num][0], c[num][1], c[num][2], c[num][3]);
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ void PixelShaderManager::SetTexDims(int texmapid, u32 width, u32 height, u32 wra
|
||||
// or better, use textureSize() in glsl
|
||||
if(constants.texdims[texmapid][0] != 1.0f/width || constants.texdims[texmapid][1] != 1.0f/height)
|
||||
dirty = true;
|
||||
|
||||
|
||||
constants.texdims[texmapid][0] = 1.0f/width;
|
||||
constants.texdims[texmapid][1] = 1.0f/height;
|
||||
}
|
||||
@@ -336,7 +336,7 @@ void PixelShaderManager::DoState(PointerWrap &p)
|
||||
{
|
||||
p.Do(constants);
|
||||
p.Do(dirty);
|
||||
|
||||
|
||||
if (p.GetMode() == PointerWrap::MODE_READ)
|
||||
{
|
||||
Dirty();
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
static void SetFogRangeAdjustChanged();
|
||||
static void InvalidateXFRange(int start, int end);
|
||||
static void SetMaterialColorChanged(int index, u32 color);
|
||||
|
||||
|
||||
static PixelShaderConstants constants;
|
||||
static bool dirty;
|
||||
};
|
||||
|
||||
@@ -253,7 +253,7 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
std::map<UidT,std::string> m_shaders;
|
||||
std::vector<UidT> m_uids;
|
||||
|
||||
@@ -21,7 +21,7 @@ struct Statistics
|
||||
|
||||
int numRenderTargetsCreated;
|
||||
int numRenderTargetsAlive;
|
||||
|
||||
|
||||
int numDListsCalled;
|
||||
int numDListsCreated;
|
||||
int numDListsAlive;
|
||||
@@ -44,11 +44,11 @@ struct Statistics
|
||||
int numBPLoads;
|
||||
int numCPLoads;
|
||||
int numXFLoads;
|
||||
|
||||
|
||||
int numBPLoadsInDL;
|
||||
int numCPLoadsInDL;
|
||||
int numXFLoadsInDL;
|
||||
|
||||
|
||||
int numDLs;
|
||||
int numPrims;
|
||||
int numDLPrims;
|
||||
@@ -60,7 +60,7 @@ struct Statistics
|
||||
int numBufferSplits;
|
||||
|
||||
int numDListsCalled;
|
||||
|
||||
|
||||
int bytesVertexStreamed;
|
||||
int bytesIndexStreamed;
|
||||
int bytesUniformStreamed;
|
||||
|
||||
@@ -112,7 +112,7 @@ void TextureCache::OnConfigChanged(VideoConfig& config)
|
||||
g_texture_cache->ClearRenderTargets();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
backup_config.s_colorsamples = config.iSafeTextureCache_ColorSamples;
|
||||
backup_config.s_copy_efb_to_texture = config.bCopyEFBToTexture;
|
||||
backup_config.s_copy_efb_scaled = config.bCopyEFBScaled;
|
||||
@@ -131,7 +131,7 @@ void TextureCache::Cleanup()
|
||||
while (iter != tcend)
|
||||
{
|
||||
if ( frameCount > TEXTURE_KILL_THRESHOLD + iter->second->frameCount
|
||||
|
||||
|
||||
// EFB copies living on the host GPU are unrecoverable and thus shouldn't be deleted
|
||||
&& ! iter->second->IsEfbCopy() )
|
||||
{
|
||||
@@ -499,7 +499,7 @@ TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int const stage,
|
||||
entry->SetGeneralParameters(address, texture_size, full_format, entry->num_mipmaps);
|
||||
entry->SetDimensions(nativeW, nativeH, width, height);
|
||||
entry->hash = tex_hash;
|
||||
|
||||
|
||||
if (entry->IsEfbCopy() && !g_ActiveConfig.bCopyEFBToTexture)
|
||||
entry->type = TCET_EC_DYNAMIC;
|
||||
else
|
||||
@@ -515,7 +515,7 @@ TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int const stage,
|
||||
if (use_native_mips)
|
||||
{
|
||||
src_data += texture_size;
|
||||
|
||||
|
||||
const u8* ptr_even = NULL;
|
||||
const u8* ptr_odd = NULL;
|
||||
if (from_tmem)
|
||||
@@ -530,13 +530,13 @@ TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int const stage,
|
||||
const u32 mip_height = CalculateLevelSize(height, level);
|
||||
const u32 expanded_mip_width = (mip_width + bsw) & (~bsw);
|
||||
const u32 expanded_mip_height = (mip_height + bsh) & (~bsh);
|
||||
|
||||
|
||||
const u8*& mip_src_data = from_tmem
|
||||
? ((level % 2) ? ptr_odd : ptr_even)
|
||||
: src_data;
|
||||
TexDecoder_Decode(temp, mip_src_data, expanded_mip_width, expanded_mip_height, texformat, tlutaddr, tlutfmt, g_ActiveConfig.backend_info.bUseRGBATextures);
|
||||
mip_src_data += TexDecoder_GetTextureSizeInBytes(expanded_mip_width, expanded_mip_height, texformat);
|
||||
|
||||
|
||||
entry->Load(mip_width, mip_height, expanded_mip_width, level);
|
||||
|
||||
if (g_ActiveConfig.bDumpTextures)
|
||||
@@ -566,19 +566,19 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
|
||||
const EFBRectangle& srcRect, bool isIntensity, bool scaleByHalf)
|
||||
{
|
||||
// Emulation methods:
|
||||
//
|
||||
//
|
||||
// - EFB to RAM:
|
||||
// Encodes the requested EFB data at its native resolution to the emulated RAM using shaders.
|
||||
// Load() decodes the data from there again (using TextureDecoder) if the EFB copy is being used as a texture again.
|
||||
// Advantage: CPU can read data from the EFB copy and we don't lose any important updates to the texture
|
||||
// Disadvantage: Encoding+decoding steps often are redundant because only some games read or modify EFB copies before using them as textures.
|
||||
//
|
||||
//
|
||||
// - EFB to texture:
|
||||
// Copies the requested EFB data to a texture object in VRAM, performing any color conversion using shaders.
|
||||
// Advantage: Works for many games, since in most cases EFB copies aren't read or modified at all before being used as a texture again.
|
||||
// Since we don't do any further encoding or decoding here, this method is much faster.
|
||||
// It also allows enhancing the visual quality by doing scaled EFB copies.
|
||||
//
|
||||
//
|
||||
// - Hybrid EFB copies:
|
||||
// 1a) Whenever this function gets called, encode the requested EFB data to RAM (like EFB to RAM)
|
||||
// 1b) Set type to TCET_EC_DYNAMIC for all texture cache entries in the destination address range.
|
||||
@@ -667,10 +667,10 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (isIntensity)
|
||||
else if (isIntensity)
|
||||
{
|
||||
fConstAdd[0] = fConstAdd[1] = fConstAdd[2] = 16.0f/255.0f;
|
||||
switch (dstFormat)
|
||||
switch (dstFormat)
|
||||
{
|
||||
case 0: // I4
|
||||
case 1: // I8
|
||||
@@ -682,7 +682,7 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
|
||||
colmat[4] = 0.257f; colmat[5] = 0.504f; colmat[6] = 0.098f;
|
||||
colmat[8] = 0.257f; colmat[9] = 0.504f; colmat[10] = 0.098f;
|
||||
|
||||
if (dstFormat < 2 || dstFormat == 8)
|
||||
if (dstFormat < 2 || dstFormat == 8)
|
||||
{
|
||||
colmat[12] = 0.257f; colmat[13] = 0.504f; colmat[14] = 0.098f;
|
||||
fConstAdd[3] = 16.0f/255.0f;
|
||||
@@ -710,7 +710,7 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
|
||||
{
|
||||
cbufid = 11;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -723,7 +723,7 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (dstFormat)
|
||||
switch (dstFormat)
|
||||
{
|
||||
case 0: // R4
|
||||
colmat[0] = colmat[4] = colmat[8] = colmat[12] = 1;
|
||||
|
||||
@@ -66,7 +66,7 @@ const char* WriteRegister(API_TYPE ApiType, const char *prefix, const u32 num)
|
||||
return result;
|
||||
}
|
||||
|
||||
// block dimensions : widthStride, heightStride
|
||||
// block dimensions : widthStride, heightStride
|
||||
// texture dims : width, height, x offset, y offset
|
||||
void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType)
|
||||
{
|
||||
@@ -176,7 +176,7 @@ void Write32BitSwizzler(char*& p, u32 format, API_TYPE ApiType)
|
||||
WRITE(p, " float xoff = xel - (xb * %f);\n", blkH);
|
||||
|
||||
WRITE(p, " float x2 = uv1.x * 2.0;\n");
|
||||
WRITE(p, " float xl = floor(x2 / %f);\n", blkW);
|
||||
WRITE(p, " float xl = floor(x2 / %f);\n", blkW);
|
||||
WRITE(p, " float xib = x2 - (xl * %f);\n", blkW);
|
||||
WRITE(p, " float halfxb = floor(xb / 2.0);\n");
|
||||
|
||||
@@ -334,12 +334,12 @@ void WriteI4Encoder(char* p, API_TYPE ApiType)
|
||||
void WriteIA8Encoder(char* p,API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_TF_IA8, ApiType);
|
||||
WRITE(p, " float4 texSample;\n");
|
||||
WRITE(p, " float4 texSample;\n");
|
||||
|
||||
WriteSampleColor(p, "rgba", "texSample", ApiType);
|
||||
WRITE(p, " ocol0.b = texSample.a;\n");
|
||||
WriteColorToIntensity(p, "texSample", "ocol0.g");
|
||||
WriteIncrementSampleX(p, ApiType);
|
||||
WriteIncrementSampleX(p, ApiType);
|
||||
|
||||
WriteSampleColor(p, "rgba", "texSample", ApiType);
|
||||
WRITE(p, " ocol0.r = texSample.a;\n");
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef _TEXTUREDECODER_H
|
||||
#define _TEXTUREDECODER_H
|
||||
#include "Hash.h"
|
||||
enum
|
||||
enum
|
||||
{
|
||||
TMEM_SIZE = 1024*1024,
|
||||
TMEM_LINE_SIZE = 32,
|
||||
|
||||
@@ -91,18 +91,18 @@ void LOADERDECL PosMtx_Write()
|
||||
DataWrite<u8>(0);
|
||||
}
|
||||
|
||||
void LOADERDECL UpdateBoundingBoxPrepare()
|
||||
void LOADERDECL UpdateBoundingBoxPrepare()
|
||||
{
|
||||
if (!PixelEngine::bbox_active)
|
||||
return;
|
||||
|
||||
|
||||
// set our buffer as videodata buffer, so we will get a copy of the vertex positions
|
||||
// this is a big hack, but so we can use the same converting function then without bbox
|
||||
s_bbox_pCurBufferPointer_orig = VertexManager::s_pCurBufferPointer;
|
||||
VertexManager::s_pCurBufferPointer = (u8*)s_bbox_vertex_buffer;
|
||||
}
|
||||
|
||||
void LOADERDECL UpdateBoundingBox()
|
||||
void LOADERDECL UpdateBoundingBox()
|
||||
{
|
||||
if (!PixelEngine::bbox_active)
|
||||
return;
|
||||
@@ -140,7 +140,7 @@ void LOADERDECL UpdateBoundingBox()
|
||||
o[1] = (1.0f - o[1]) * 242.0f;
|
||||
|
||||
if (o[0] < PixelEngine::bbox[0]) PixelEngine::bbox[0] = (u16) std::max(0.0f, o[0]);
|
||||
if (o[0] > PixelEngine::bbox[1]) PixelEngine::bbox[1] = (u16) o[0];
|
||||
if (o[0] > PixelEngine::bbox[1]) PixelEngine::bbox[1] = (u16) o[0];
|
||||
if (o[1] < PixelEngine::bbox[2]) PixelEngine::bbox[2] = (u16) std::max(0.0f, o[1]);
|
||||
if (o[1] > PixelEngine::bbox[3]) PixelEngine::bbox[3] = (u16) o[1];
|
||||
}
|
||||
@@ -172,7 +172,7 @@ void LOADERDECL TexMtx_Write_Float4()
|
||||
DataWrite(0.f);
|
||||
}
|
||||
|
||||
VertexLoader::VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr)
|
||||
VertexLoader::VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr)
|
||||
{
|
||||
m_compiledCode = NULL;
|
||||
m_numLoadedVertices = 0;
|
||||
@@ -197,7 +197,7 @@ VertexLoader::VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr)
|
||||
|
||||
}
|
||||
|
||||
VertexLoader::~VertexLoader()
|
||||
VertexLoader::~VertexLoader()
|
||||
{
|
||||
#ifdef USE_JIT
|
||||
FreeCodeSpace();
|
||||
@@ -248,7 +248,7 @@ void VertexLoader::CompileVertexTranslator()
|
||||
m_VtxDesc.Tex0Coord, m_VtxDesc.Tex1Coord, m_VtxDesc.Tex2Coord, m_VtxDesc.Tex3Coord,
|
||||
m_VtxDesc.Tex4Coord, m_VtxDesc.Tex5Coord, m_VtxDesc.Tex6Coord, (const u32)((m_VtxDesc.Hex >> 31) & 3)
|
||||
};
|
||||
|
||||
|
||||
// Reset pipeline
|
||||
m_numPipelineStages = 0;
|
||||
|
||||
@@ -265,7 +265,7 @@ void VertexLoader::CompileVertexTranslator()
|
||||
}
|
||||
|
||||
// m_VBVertexStride for texmtx and posmtx is computed later when writing.
|
||||
|
||||
|
||||
// Position Matrix Index
|
||||
if (m_VtxDesc.PosMatIdx)
|
||||
{
|
||||
@@ -303,7 +303,7 @@ void VertexLoader::CompileVertexTranslator()
|
||||
{
|
||||
m_VertexSize += VertexLoader_Normal::GetSize(m_VtxDesc.Normal,
|
||||
m_VtxAttr.NormalFormat, m_VtxAttr.NormalElements, m_VtxAttr.NormalIndex3);
|
||||
|
||||
|
||||
TPipelineFunction pFunc = VertexLoader_Normal::GetFunction(m_VtxDesc.Normal,
|
||||
m_VtxAttr.NormalFormat, m_VtxAttr.NormalElements, m_VtxAttr.NormalIndex3);
|
||||
|
||||
@@ -347,7 +347,7 @@ void VertexLoader::CompileVertexTranslator()
|
||||
m_NativeFmt->m_components |= VB_HAS_COL0 << i;
|
||||
switch (col[i])
|
||||
{
|
||||
case NOT_PRESENT:
|
||||
case NOT_PRESENT:
|
||||
m_NativeFmt->m_components &= ~(VB_HAS_COL0 << i);
|
||||
vtx_decl.color_offset[i] = -1;
|
||||
break;
|
||||
@@ -454,7 +454,7 @@ void VertexLoader::CompileVertexTranslator()
|
||||
|
||||
if (tc[i] == NOT_PRESENT)
|
||||
{
|
||||
// if there's more tex coords later, have to write a dummy call
|
||||
// if there's more tex coords later, have to write a dummy call
|
||||
int j = i + 1;
|
||||
for (; j < 8; ++j)
|
||||
{
|
||||
@@ -551,8 +551,8 @@ int VertexLoader::SetupRunVertices(int vtx_attr_group, int primitive, int const
|
||||
if (g_nativeVertexFmt != NULL && g_nativeVertexFmt != m_NativeFmt)
|
||||
{
|
||||
// We really must flush here. It's possible that the native representations
|
||||
// of the two vtx formats are the same, but we have no way to easily check that
|
||||
// now.
|
||||
// of the two vtx formats are the same, but we have no way to easily check that
|
||||
// now.
|
||||
VertexManager::Flush();
|
||||
// Also move the Set() here?
|
||||
}
|
||||
@@ -587,7 +587,7 @@ int VertexLoader::SetupRunVertices(int vtx_attr_group, int primitive, int const
|
||||
colElements[i] = m_VtxAttr.color[i].Elements;
|
||||
|
||||
VertexManager::PrepareForAdditionalData(primitive, count, native_stride);
|
||||
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -627,10 +627,10 @@ void VertexLoader::RunCompiledVertices(int vtx_attr_group, int primitive, int co
|
||||
VertexManager::s_pCurBufferPointer += native_stride * new_count;
|
||||
DataSkip(new_count * m_VertexSize);
|
||||
|
||||
VertexManager::AddVertices(primitive, new_count);
|
||||
VertexManager::AddVertices(primitive, new_count);
|
||||
}
|
||||
|
||||
void VertexLoader::SetVAT(u32 _group0, u32 _group1, u32 _group2)
|
||||
void VertexLoader::SetVAT(u32 _group0, u32 _group1, u32 _group2)
|
||||
{
|
||||
VAT vat;
|
||||
vat.g0.Hex = _group0;
|
||||
@@ -674,7 +674,7 @@ void VertexLoader::SetVAT(u32 _group0, u32 _group1, u32 _group2)
|
||||
m_VtxAttr.texCoord[7].Elements = vat.g2.Tex7CoordElements;
|
||||
m_VtxAttr.texCoord[7].Format = vat.g2.Tex7CoordFormat;
|
||||
m_VtxAttr.texCoord[7].Frac = vat.g2.Tex7Frac;
|
||||
|
||||
|
||||
if(!m_VtxAttr.ByteDequant) {
|
||||
ERROR_LOG(VIDEO, "ByteDequant is set to zero");
|
||||
}
|
||||
@@ -722,7 +722,7 @@ void VertexLoader::AppendToString(std::string *dest) const
|
||||
}
|
||||
}
|
||||
u32 tex_mode[8] = {
|
||||
m_VtxDesc.Tex0Coord, m_VtxDesc.Tex1Coord, m_VtxDesc.Tex2Coord, m_VtxDesc.Tex3Coord,
|
||||
m_VtxDesc.Tex0Coord, m_VtxDesc.Tex1Coord, m_VtxDesc.Tex2Coord, m_VtxDesc.Tex3Coord,
|
||||
m_VtxDesc.Tex4Coord, m_VtxDesc.Tex5Coord, m_VtxDesc.Tex6Coord, m_VtxDesc.Tex7Coord
|
||||
};
|
||||
for (int i = 0; i < 8; i++)
|
||||
|
||||
@@ -24,7 +24,7 @@ class VertexLoaderUID
|
||||
u32 vid[5];
|
||||
size_t hash;
|
||||
public:
|
||||
VertexLoaderUID()
|
||||
VertexLoaderUID()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
~VertexLoader();
|
||||
|
||||
int GetVertexSize() const {return m_VertexSize;}
|
||||
|
||||
|
||||
int SetupRunVertices(int vtx_attr_group, int primitive, int const count);
|
||||
void RunVertices(int vtx_attr_group, int primitive, int count);
|
||||
void RunCompiledVertices(int vtx_attr_group, int primitive, int count, u8* Data);
|
||||
|
||||
@@ -100,7 +100,7 @@ void LOADERDECL Color_ReadDirect_24b_6666()
|
||||
// F|RES: i am not 100 percent sure, but the colElements seems to be important for rendering only
|
||||
// at least it fixes mario party 4
|
||||
//
|
||||
// if (colElements[colIndex])
|
||||
// if (colElements[colIndex])
|
||||
// else
|
||||
// col |= 0xFF<<ASHIFT;
|
||||
//
|
||||
@@ -110,7 +110,7 @@ void LOADERDECL Color_ReadDirect_32b_8888()
|
||||
u32 col = DataReadU32Unswapped();
|
||||
|
||||
// "kill" the alpha
|
||||
if (!colElements[colIndex])
|
||||
if (!colElements[colIndex])
|
||||
col |= 0xFF << ASHIFT;
|
||||
|
||||
_SetCol(col);
|
||||
|
||||
@@ -74,7 +74,7 @@ template <typename I, typename T, int N, int Offset>
|
||||
__forceinline void Normal_Index_Offset()
|
||||
{
|
||||
static_assert(!std::numeric_limits<I>::is_signed, "Only unsigned I is sane!");
|
||||
|
||||
|
||||
auto const index = DataRead<I>();
|
||||
auto const data = reinterpret_cast<const T*>(cached_arraybases[ARRAY_NORMAL]
|
||||
+ (index * arraystrides[ARRAY_NORMAL]) + sizeof(T) * 3 * Offset);
|
||||
|
||||
@@ -65,7 +65,7 @@ private:
|
||||
gc_size = T::size;
|
||||
function = T::function;
|
||||
}
|
||||
|
||||
|
||||
int gc_size;
|
||||
TPipelineFunction function;
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ MOVZX(32, R(EBX), MOffset(ESI, 1));
|
||||
MOVZX(32, R(ECX), MOffset(ESI, 2));
|
||||
MOVD(XMM0, R(EAX));
|
||||
MOVD(XMM1, R(EBX));
|
||||
MOVD(XMM2, R(ECX));
|
||||
MOVD(XMM2, R(ECX));
|
||||
CVTDQ2PS(XMM0, XMM0);
|
||||
CVTDQ2PS(XMM1, XMM1);
|
||||
CVTDQ2PS(XMM2, XMM2);
|
||||
|
||||
@@ -67,7 +67,7 @@ template <typename I, typename T, int N>
|
||||
void LOADERDECL TexCoord_ReadIndex()
|
||||
{
|
||||
static_assert(!std::numeric_limits<I>::is_signed, "Only unsigned I is sane!");
|
||||
|
||||
|
||||
auto const index = DataRead<I>();
|
||||
auto const data = reinterpret_cast<const T*>(cached_arraybases[ARRAY_TEXCOORD0 + tcIndex]
|
||||
+ (index * arraystrides[ARRAY_TEXCOORD0 + tcIndex]));
|
||||
|
||||
@@ -50,13 +50,13 @@ u32 VertexManager::GetRemainingSize()
|
||||
}
|
||||
|
||||
void VertexManager::PrepareForAdditionalData(int primitive, u32 count, u32 stride)
|
||||
{
|
||||
{
|
||||
u32 const needed_vertex_bytes = count * stride;
|
||||
|
||||
|
||||
if (count > IndexGenerator::GetRemainingIndices() || count > GetRemainingIndices(primitive) || needed_vertex_bytes > GetRemainingSize())
|
||||
{
|
||||
Flush();
|
||||
|
||||
|
||||
if(count > IndexGenerator::GetRemainingIndices())
|
||||
ERROR_LOG(VIDEO, "Too little remaining index values. Use 32-bit or reset them on flush.");
|
||||
if (count > GetRemainingIndices(primitive))
|
||||
@@ -75,7 +75,7 @@ bool VertexManager::IsFlushed() const
|
||||
|
||||
u32 VertexManager::GetRemainingIndices(int primitive)
|
||||
{
|
||||
|
||||
|
||||
if(g_Config.backend_info.bSupportsPrimitiveRestart)
|
||||
{
|
||||
switch (primitive)
|
||||
@@ -125,7 +125,7 @@ u32 VertexManager::GetRemainingIndices(int primitive)
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void VertexManager::AddVertices(int primitive, u32 numVertices)
|
||||
@@ -158,12 +158,12 @@ void VertexManager::Flush()
|
||||
#if (0)
|
||||
void VertexManager::Flush()
|
||||
{
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
PRIM_LOG("frame%d:\n texgen=%d, numchan=%d, dualtex=%d, ztex=%d, cole=%d, alpe=%d, ze=%d", g_ActiveConfig.iSaveTargetId, xfregs.numTexGens,
|
||||
xfregs.nNumChans, (int)xfregs.bEnableDualTexTransform, bpmem.ztex2.op,
|
||||
bpmem.blendmode.colorupdate, bpmem.blendmode.alphaupdate, bpmem.zmode.updateenable);
|
||||
|
||||
for (int i = 0; i < xfregs.nNumChans; ++i)
|
||||
for (int i = 0; i < xfregs.nNumChans; ++i)
|
||||
{
|
||||
LitChannel* ch = &xfregs.colChans[i].color;
|
||||
PRIM_LOG("colchan%d: matsrc=%d, light=0x%x, ambsrc=%d, diffunc=%d, attfunc=%d", i, ch->matsource, ch->GetFullLightMask(), ch->ambsource, ch->diffusefunc, ch->attnfunc);
|
||||
@@ -171,7 +171,7 @@ void VertexManager::Flush()
|
||||
PRIM_LOG("alpchan%d: matsrc=%d, light=0x%x, ambsrc=%d, diffunc=%d, attfunc=%d", i, ch->matsource, ch->GetFullLightMask(), ch->ambsource, ch->diffusefunc, ch->attnfunc);
|
||||
}
|
||||
|
||||
for (int i = 0; i < xfregs.numTexGens; ++i)
|
||||
for (int i = 0; i < xfregs.numTexGens; ++i)
|
||||
{
|
||||
TexMtxInfo tinfo = xfregs.texcoords[i].texmtxinfo;
|
||||
if (tinfo.texgentype != XF_TEXGEN_EMBOSS_MAP) tinfo.hex &= 0x7ff;
|
||||
@@ -206,10 +206,10 @@ void VertexManager::Flush()
|
||||
Renderer::SetSamplerState(i & 3, i >> 2);
|
||||
FourTexUnits &tex = bpmem.tex[i >> 2];
|
||||
|
||||
TCacheEntry::TCacheEntryBase* tentry = TextureCache::Load(i,
|
||||
TCacheEntry::TCacheEntryBase* tentry = TextureCache::Load(i,
|
||||
(tex.texImage3[i&3].image_base/* & 0x1FFFFF*/) << 5,
|
||||
tex.texImage0[i&3].width + 1, tex.texImage0[i&3].height + 1,
|
||||
tex.texImage0[i&3].format, tex.texTlut[i&3].tmem_offset<<9,
|
||||
tex.texImage0[i&3].format, tex.texTlut[i&3].tmem_offset<<9,
|
||||
tex.texTlut[i&3].tlut_format,
|
||||
(tex.texMode0[i&3].min_filter & 3) && (tex.texMode0[i&3].min_filter != 8),
|
||||
(tex.texMode1[i&3].max_lod >> 4));
|
||||
@@ -257,7 +257,7 @@ void VertexManager::Flush()
|
||||
//IndexGenerator::Start(TIBuffer, LIBuffer, PIBuffer);
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
if (g_ActiveConfig.iLog & CONF_SAVESHADERS)
|
||||
if (g_ActiveConfig.iLog & CONF_SAVESHADERS)
|
||||
{
|
||||
// save the shaders
|
||||
char strfile[255];
|
||||
@@ -271,7 +271,7 @@ void VertexManager::Flush()
|
||||
fvs << vs->strprog.c_str();
|
||||
}
|
||||
|
||||
if (g_ActiveConfig.iLog & CONF_SAVETARGETS)
|
||||
if (g_ActiveConfig.iLog & CONF_SAVETARGETS)
|
||||
{
|
||||
char str[128];
|
||||
sprintf(str, "%starg%.3d.tga", File::GetUserPath(D_DUMPFRAMES_IDX).c_str(), g_ActiveConfig.iSaveTargetId);
|
||||
@@ -297,12 +297,12 @@ void VertexManager::DoStateShared(PointerWrap& p)
|
||||
// It seems we half-assume to be flushed here
|
||||
// We update s_pCurBufferPointer yet don't worry about IndexGenerator's outdated pointers
|
||||
// and maybe other things are overlooked
|
||||
|
||||
|
||||
p.Do(LocalVBuffer);
|
||||
p.Do(TIBuffer);
|
||||
p.Do(LIBuffer);
|
||||
p.Do(PIBuffer);
|
||||
|
||||
|
||||
s_pBaseBufferPointer = &LocalVBuffer[0];
|
||||
s_pEndBufferPointer = s_pBaseBufferPointer + LocalVBuffer.size();
|
||||
p.DoPointer(s_pCurBufferPointer, s_pBaseBufferPointer);
|
||||
|
||||
@@ -12,13 +12,13 @@ class VertexManager
|
||||
{
|
||||
private:
|
||||
static const u32 SMALLEST_POSSIBLE_VERTEX = sizeof(float)*3; // 3 pos
|
||||
static const u32 LARGEST_POSSIBLE_VERTEX = sizeof(float)*45 + sizeof(u32)*2; // 3 pos, 3*3 normal, 2*u32 color, 8*4 tex, 1 posMat
|
||||
|
||||
static const u32 LARGEST_POSSIBLE_VERTEX = sizeof(float)*45 + sizeof(u32)*2; // 3 pos, 3*3 normal, 2*u32 color, 8*4 tex, 1 posMat
|
||||
|
||||
static const u32 MAX_PRIMITIVES_PER_COMMAND = (u16)-1;
|
||||
|
||||
|
||||
public:
|
||||
static const u32 MAXVBUFFERSIZE = ROUND_UP_POW2 (MAX_PRIMITIVES_PER_COMMAND * LARGEST_POSSIBLE_VERTEX);
|
||||
|
||||
|
||||
// We may convert triangle-fans to triangle-lists, almost 3x as many indices.
|
||||
static const u32 MAXIBUFFERSIZE = ROUND_UP_POW2 (MAX_PRIMITIVES_PER_COMMAND * 3);
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
static void DoState(PointerWrap& p);
|
||||
virtual void CreateDeviceObjects(){};
|
||||
virtual void DestroyDeviceObjects(){};
|
||||
|
||||
|
||||
protected:
|
||||
u16* GetTriangleIndexBuffer() { return &TIBuffer[0]; }
|
||||
u16* GetLineIndexBuffer() { return &LIBuffer[0]; }
|
||||
@@ -55,13 +55,13 @@ protected:
|
||||
|
||||
private:
|
||||
bool IsFlushed() const;
|
||||
|
||||
|
||||
void ResetBuffer();
|
||||
|
||||
|
||||
//virtual void Draw(u32 stride, bool alphapass) = 0;
|
||||
// temp
|
||||
virtual void vFlush() = 0;
|
||||
|
||||
|
||||
std::vector<u8> LocalVBuffer;
|
||||
std::vector<u16> TIBuffer;
|
||||
std::vector<u16> LIBuffer;
|
||||
|
||||
@@ -136,7 +136,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
|
||||
out.Write("VARYOUT float4 clipPos_2;\n");
|
||||
if (g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
|
||||
out.Write("VARYOUT float4 Normal_2;\n");
|
||||
|
||||
|
||||
out.Write("VARYOUT float4 colors_02;\n");
|
||||
out.Write("VARYOUT float4 colors_12;\n");
|
||||
|
||||
|
||||
@@ -197,16 +197,16 @@ void VertexShaderManager::Shutdown()
|
||||
|
||||
void VertexShaderManager::Dirty()
|
||||
{
|
||||
nTransformMatricesChanged[0] = 0;
|
||||
nTransformMatricesChanged[0] = 0;
|
||||
nTransformMatricesChanged[1] = 256;
|
||||
|
||||
nNormalMatricesChanged[0] = 0;
|
||||
nNormalMatricesChanged[1] = 96;
|
||||
|
||||
nPostTransformMatricesChanged[0] = 0;
|
||||
nPostTransformMatricesChanged[0] = 0;
|
||||
nPostTransformMatricesChanged[1] = 256;
|
||||
|
||||
nLightsChanged[0] = 0;
|
||||
nLightsChanged[0] = 0;
|
||||
nLightsChanged[1] = 0x80;
|
||||
|
||||
bPosNormalMatrixChanged = true;
|
||||
@@ -216,7 +216,7 @@ void VertexShaderManager::Dirty()
|
||||
bProjectionChanged = true;
|
||||
|
||||
nMaterialsChanged = 15;
|
||||
|
||||
|
||||
dirty = true;
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ void VertexShaderManager::SetConstants()
|
||||
constants.materials[i][3] = ( data & 0xFF) / 255.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
if (nMaterialsChanged & (1 << (i + 2)))
|
||||
@@ -338,7 +338,7 @@ void VertexShaderManager::SetConstants()
|
||||
if (bTexMatricesChanged[0])
|
||||
{
|
||||
bTexMatricesChanged[0] = false;
|
||||
const float *fptrs[] =
|
||||
const float *fptrs[] =
|
||||
{
|
||||
(const float *)xfmem + MatrixIndexA.Tex0MtxIdx * 4, (const float *)xfmem + MatrixIndexA.Tex1MtxIdx * 4,
|
||||
(const float *)xfmem + MatrixIndexA.Tex2MtxIdx * 4, (const float *)xfmem + MatrixIndexA.Tex3MtxIdx * 4
|
||||
@@ -386,7 +386,7 @@ void VertexShaderManager::SetConstants()
|
||||
if (bProjectionChanged)
|
||||
{
|
||||
bProjectionChanged = false;
|
||||
|
||||
|
||||
float *rawProjection = xfregs.projection.rawProjection;
|
||||
|
||||
switch(xfregs.projection.type)
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
static void TranslateView(float x, float y, float z = 0.0f);
|
||||
static void RotateView(float x, float y);
|
||||
static void ResetView();
|
||||
|
||||
|
||||
static VertexShaderConstants constants;
|
||||
static bool dirty;
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@ static VideoBackend* s_default_backend = NULL;
|
||||
#include <windows.h>
|
||||
|
||||
// http://msdn.microsoft.com/en-us/library/ms725491.aspx
|
||||
static bool IsGteVista()
|
||||
static bool IsGteVista()
|
||||
{
|
||||
OSVERSIONINFOEX osvi;
|
||||
DWORDLONG dwlConditionMask = 0;
|
||||
|
||||
@@ -55,7 +55,7 @@ struct SCPFifoStruct
|
||||
volatile u32 bFF_Breakpoint;
|
||||
|
||||
volatile u32 CPCmdIdle;
|
||||
volatile u32 CPReadIdle;
|
||||
volatile u32 CPReadIdle;
|
||||
|
||||
volatile u32 bFF_LoWatermarkInt;
|
||||
volatile u32 bFF_HiWatermarkInt;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// IMPORTANT: UI etc should modify g_Config. Graphics code should read g_ActiveConfig.
|
||||
// The reason for this is to get rid of race conditions etc when the configuration
|
||||
// changes in the middle of a frame. This is done by copying g_Config to g_ActiveConfig
|
||||
// at the start of every frame. Noone should ever change members of g_ActiveConfig
|
||||
// at the start of every frame. Noone should ever change members of g_ActiveConfig
|
||||
// directly.
|
||||
|
||||
#ifndef _VIDEO_CONFIG_H_
|
||||
@@ -112,7 +112,7 @@ struct VideoConfig
|
||||
bool bEFBCopyEnable;
|
||||
bool bEFBCopyCacheEnable;
|
||||
bool bEFBEmulateFormatChanges;
|
||||
bool bCopyEFBToTexture;
|
||||
bool bCopyEFBToTexture;
|
||||
bool bCopyEFBScaled;
|
||||
int iSafeTextureCache_ColorSamples;
|
||||
int iPhackvalue[4];
|
||||
|
||||
@@ -38,7 +38,7 @@ static void DoState(PointerWrap &p)
|
||||
// Texture decoder
|
||||
p.DoArray(texMem, TMEM_SIZE);
|
||||
p.DoMarker("texMem");
|
||||
|
||||
|
||||
// FIFO
|
||||
Fifo_DoState(p);
|
||||
p.DoMarker("Fifo");
|
||||
|
||||
@@ -139,7 +139,7 @@ union INVTXSPEC
|
||||
|
||||
union TexMtxInfo
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 unknown : 1;
|
||||
u32 projection : 1; // XF_TEXPROJ_X
|
||||
@@ -154,7 +154,7 @@ union TexMtxInfo
|
||||
|
||||
union PostMtxInfo
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
u32 index : 6; // base row of dual transform matrix
|
||||
u32 unused : 2;
|
||||
@@ -194,14 +194,14 @@ union DualTexInfo
|
||||
|
||||
struct Light
|
||||
{
|
||||
u32 useless[3];
|
||||
u32 useless[3];
|
||||
u32 color; // rgba
|
||||
float a0; // attenuation
|
||||
float a1;
|
||||
float a2;
|
||||
float a1;
|
||||
float a2;
|
||||
float k0; // k stuff
|
||||
float k1;
|
||||
float k2;
|
||||
float k1;
|
||||
float k2;
|
||||
|
||||
union
|
||||
{
|
||||
|
||||
@@ -57,7 +57,7 @@ void XFRegWritten(int transferSize, u32 baseAddress, u32 *pData)
|
||||
case XFMEM_SETCHAN1_AMBCOLOR:
|
||||
{
|
||||
u8 chan = address - XFMEM_SETCHAN0_AMBCOLOR;
|
||||
if (xfregs.ambColor[chan] != newValue)
|
||||
if (xfregs.ambColor[chan] != newValue)
|
||||
{
|
||||
VertexManager::Flush();
|
||||
VertexShaderManager::SetMaterialColorChanged(chan, newValue);
|
||||
@@ -226,7 +226,7 @@ void LoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData)
|
||||
{
|
||||
transferSize = 0;
|
||||
}
|
||||
|
||||
|
||||
XFMemWritten(xfMemTransferSize, xfMemBase);
|
||||
memcpy_gc(&xfmem[xfMemBase], pData, xfMemTransferSize * 4);
|
||||
|
||||
@@ -235,9 +235,9 @@ void LoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData)
|
||||
|
||||
// write to XF regs
|
||||
if (transferSize > 0)
|
||||
{
|
||||
{
|
||||
XFRegWritten(transferSize, baseAddress, pData);
|
||||
memcpy_gc((u32*)(&xfregs) + (baseAddress - 0x1000), pData, transferSize * 4);
|
||||
memcpy_gc((u32*)(&xfregs) + (baseAddress - 0x1000), pData, transferSize * 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ MEMCPY_AMD.CPP
|
||||
// uses the software prefetch instruction to pre-read the data.
|
||||
// USE 64 * 1024 FOR THIS VALUE IF YOU'RE ALWAYS FILLING A "CLEAN CACHE"
|
||||
|
||||
#define BLOCK_PREFETCH_COPY infinity // no limit for movq/movntq w/block prefetch
|
||||
#define BLOCK_PREFETCH_COPY infinity // no limit for movq/movntq w/block prefetch
|
||||
#define CACHEBLOCK 80h // number of 64-byte blocks (cache lines) for block prefetch
|
||||
// For the largest size blocks, a special technique called Block Prefetch
|
||||
// can be used to accelerate the read operations. Block Prefetch reads
|
||||
@@ -233,7 +233,7 @@ $memcpy_bp_3:
|
||||
add esi, 64 ; update source pointer
|
||||
movntq [edi ], mm0 ; write 64 bits, bypassing cache
|
||||
movntq [edi+ 8], mm1 ; note: movntq also prevents the CPU
|
||||
movntq [edi+16], mm2 ; from READING the destination address
|
||||
movntq [edi+16], mm2 ; from READING the destination address
|
||||
movntq [edi+24], mm3 ; into the cache, only to be over-written,
|
||||
movntq [edi+32], mm4 ; so that also helps performance
|
||||
movntq [edi+40], mm5
|
||||
@@ -273,7 +273,7 @@ $memcpy_last_few: ; dword aligned from before movsd''s
|
||||
jz $memcpy_final ; no more, lets leave
|
||||
rep movsb ; the last 1, 2, or 3 bytes
|
||||
|
||||
$memcpy_final:
|
||||
$memcpy_final:
|
||||
emms ; clean up the MMX state
|
||||
sfence ; flush the write buffer
|
||||
mov eax, [dest] ; ret value = destination pointer
|
||||
@@ -294,7 +294,7 @@ unsigned char memcmp_mmx(const void* src1, const void* src2, int cmpsize)
|
||||
mov ecx, cmpsize
|
||||
mov edx, src1
|
||||
mov esi, src2
|
||||
|
||||
|
||||
cmp ecx, 32
|
||||
jl Done4
|
||||
|
||||
@@ -358,7 +358,7 @@ Cmp8:
|
||||
pand mm0, mm6
|
||||
pand mm0, mm7
|
||||
pmovmskb eax, mm0
|
||||
|
||||
|
||||
// check if eq
|
||||
cmp eax, 0xff
|
||||
je Continue
|
||||
|
||||
@@ -58,7 +58,7 @@ struct ReferencedDataRegion
|
||||
ReferencedDataRegion* NextRegion;
|
||||
u32 size;
|
||||
u32 MustClean;
|
||||
|
||||
|
||||
|
||||
int IntersectsMemoryRange(u8* range_address, u32 range_size)
|
||||
{
|
||||
@@ -78,7 +78,7 @@ struct CachedDisplayList
|
||||
uncachable(false),
|
||||
num_xf_reg(0),
|
||||
num_cp_reg(0),
|
||||
num_bp_reg(0),
|
||||
num_bp_reg(0),
|
||||
num_index_xf(0),
|
||||
num_draw_call(0),
|
||||
pass(DLPASS_ANALYZE),
|
||||
@@ -96,7 +96,7 @@ struct CachedDisplayList
|
||||
// Analytic data
|
||||
u32 num_xf_reg;
|
||||
u32 num_cp_reg;
|
||||
u32 num_bp_reg;
|
||||
u32 num_bp_reg;
|
||||
u32 num_index_xf;
|
||||
u32 num_draw_call;
|
||||
u32 pass;
|
||||
@@ -142,7 +142,7 @@ struct CachedDisplayList
|
||||
NewRegion = new ReferencedDataRegion;
|
||||
NewRegion->MustClean = false;
|
||||
NewRegion->size = Size;
|
||||
NewRegion->start_address = RegionStartAddress;
|
||||
NewRegion->start_address = RegionStartAddress;
|
||||
NewRegion->hash = GetHash64(RegionStartAddress, Size, DL_HASH_STEPS);
|
||||
InsertRegion(NewRegion);
|
||||
}
|
||||
@@ -241,11 +241,11 @@ u32 AnalyzeAndRunDisplayList(u32 address, u32 size, CachedDisplayList *dl)
|
||||
u8* startAddress = Memory::GetPointer(address);
|
||||
u32 num_xf_reg = 0;
|
||||
u32 num_cp_reg = 0;
|
||||
u32 num_bp_reg = 0;
|
||||
u32 num_bp_reg = 0;
|
||||
u32 num_index_xf = 0;
|
||||
u32 num_draw_call = 0;
|
||||
u32 result = 0;
|
||||
|
||||
|
||||
|
||||
// Avoid the crash if Memory::GetPointer failed ..
|
||||
if (startAddress != 0)
|
||||
@@ -322,7 +322,7 @@ u32 AnalyzeAndRunDisplayList(u32 address, u32 size, CachedDisplayList *dl)
|
||||
case GX_CMD_UNKNOWN_METRICS: // zelda 4 swords calls it and checks the metrics registers after that
|
||||
DEBUG_LOG(VIDEO, "GX 0x44: %08x", cmd_byte);
|
||||
break;
|
||||
case GX_CMD_INVL_VC: // Invalidate Vertex Cache
|
||||
case GX_CMD_INVL_VC: // Invalidate Vertex Cache
|
||||
DEBUG_LOG(VIDEO, "Invalidate (vertex cache?)");
|
||||
break;
|
||||
case GX_LOAD_BP_REG: //0x61
|
||||
@@ -334,7 +334,7 @@ u32 AnalyzeAndRunDisplayList(u32 address, u32 size, CachedDisplayList *dl)
|
||||
}
|
||||
break;
|
||||
|
||||
// draw primitives
|
||||
// draw primitives
|
||||
default:
|
||||
if (cmd_byte & 0x80)
|
||||
{
|
||||
@@ -349,7 +349,7 @@ u32 AnalyzeAndRunDisplayList(u32 address, u32 size, CachedDisplayList *dl)
|
||||
numVertices);
|
||||
num_draw_call++;
|
||||
const u32 tc[12] = {
|
||||
g_VtxDesc.Position, g_VtxDesc.Normal, g_VtxDesc.Color0, g_VtxDesc.Color1, g_VtxDesc.Tex0Coord, g_VtxDesc.Tex1Coord,
|
||||
g_VtxDesc.Position, g_VtxDesc.Normal, g_VtxDesc.Color0, g_VtxDesc.Color1, g_VtxDesc.Tex0Coord, g_VtxDesc.Tex1Coord,
|
||||
g_VtxDesc.Tex2Coord, g_VtxDesc.Tex3Coord, g_VtxDesc.Tex4Coord, g_VtxDesc.Tex5Coord, g_VtxDesc.Tex6Coord, (const u32)((g_VtxDesc.Hex >> 31) & 3)
|
||||
};
|
||||
for(int i = 0; i < 12; i++)
|
||||
@@ -380,11 +380,11 @@ u32 AnalyzeAndRunDisplayList(u32 address, u32 size, CachedDisplayList *dl)
|
||||
dl->num_index_xf = num_index_xf;
|
||||
dl->num_xf_reg = num_xf_reg;
|
||||
// reset to the old pointer
|
||||
g_pVideoData = old_pVideoData;
|
||||
g_pVideoData = old_pVideoData;
|
||||
return result;
|
||||
}
|
||||
|
||||
// The only sensible way to detect changes to vertex data is to convert several times
|
||||
// The only sensible way to detect changes to vertex data is to convert several times
|
||||
// and hash the output.
|
||||
|
||||
// Second pass - compile
|
||||
@@ -506,7 +506,7 @@ void CompileAndRunDisplayList(u32 address, u32 size, CachedDisplayList *dl)
|
||||
// zelda 4 swords calls it and checks the metrics registers after that
|
||||
break;
|
||||
|
||||
case GX_CMD_INVL_VC:// Invalidate (vertex cache?)
|
||||
case GX_CMD_INVL_VC:// Invalidate (vertex cache?)
|
||||
DEBUG_LOG(VIDEO, "Invalidate (vertex cache?)");
|
||||
break;
|
||||
|
||||
@@ -521,7 +521,7 @@ void CompileAndRunDisplayList(u32 address, u32 size, CachedDisplayList *dl)
|
||||
}
|
||||
break;
|
||||
|
||||
// draw primitives
|
||||
// draw primitives
|
||||
default:
|
||||
if (cmd_byte & 0x80)
|
||||
{
|
||||
@@ -543,13 +543,13 @@ void CompileAndRunDisplayList(u32 address, u32 size, CachedDisplayList *dl)
|
||||
ReferencedDataRegion* NewRegion = new ReferencedDataRegion;
|
||||
NewRegion->MustClean = true;
|
||||
NewRegion->size = Vdatasize;
|
||||
NewRegion->start_address = (u8*)new u8[Vdatasize];
|
||||
NewRegion->start_address = (u8*)new u8[Vdatasize];
|
||||
NewRegion->hash = 0;
|
||||
dl->InsertRegion(NewRegion);
|
||||
memcpy(NewRegion->start_address, StartAddress, Vdatasize);
|
||||
emitter.ABI_CallFunctionCCCP((void *)&VertexLoaderManager::RunCompiledVertices, cmd_byte & GX_VAT_MASK, (cmd_byte & GX_PRIMITIVE_MASK) >> GX_PRIMITIVE_SHIFT, numVertices, NewRegion->start_address);
|
||||
const u32 tc[12] = {
|
||||
g_VtxDesc.Position, g_VtxDesc.Normal, g_VtxDesc.Color0, g_VtxDesc.Color1, g_VtxDesc.Tex0Coord, g_VtxDesc.Tex1Coord,
|
||||
g_VtxDesc.Position, g_VtxDesc.Normal, g_VtxDesc.Color0, g_VtxDesc.Color1, g_VtxDesc.Tex0Coord, g_VtxDesc.Tex1Coord,
|
||||
g_VtxDesc.Tex2Coord, g_VtxDesc.Tex3Coord, g_VtxDesc.Tex4Coord, g_VtxDesc.Tex5Coord, g_VtxDesc.Tex6Coord, (const u32)((g_VtxDesc.Hex >> 31) & 3)
|
||||
};
|
||||
for(int i = 0; i < 12; i++)
|
||||
@@ -592,11 +592,11 @@ void Init()
|
||||
void Shutdown()
|
||||
{
|
||||
Clear();
|
||||
FreeMemoryPages(dlcode_cache, DL_CODE_CACHE_SIZE);
|
||||
FreeMemoryPages(dlcode_cache, DL_CODE_CACHE_SIZE);
|
||||
dlcode_cache = NULL;
|
||||
}
|
||||
|
||||
void Clear()
|
||||
void Clear()
|
||||
{
|
||||
VDLMap::iterator iter = dl_map.begin();
|
||||
while (iter != dl_map.end())
|
||||
@@ -625,7 +625,7 @@ void ProgressiveCleanup()
|
||||
{
|
||||
VDlist &ParentEntry = iter->second;
|
||||
DLMap::iterator childiter = ParentEntry.dl_map.begin();
|
||||
while (childiter != ParentEntry.dl_map.end())
|
||||
while (childiter != ParentEntry.dl_map.end())
|
||||
{
|
||||
CachedDisplayList &entry = childiter->second;
|
||||
int limit = 3600;
|
||||
@@ -712,9 +712,9 @@ bool HandleDisplayList(u32 address, u32 size)
|
||||
if (dl.check != CheckContextId)
|
||||
{
|
||||
dl.check = CheckContextId;
|
||||
DlistChanged = !dl.CheckRegions() || dl.dl_hash != GetHash64(Memory::GetPointer(address), size, 0);
|
||||
DlistChanged = !dl.CheckRegions() || dl.dl_hash != GetHash64(Memory::GetPointer(address), size, 0);
|
||||
}
|
||||
if (DlistChanged)
|
||||
if (DlistChanged)
|
||||
{
|
||||
dl.uncachable = true;
|
||||
dl.ClearRegions();
|
||||
@@ -734,7 +734,7 @@ bool HandleDisplayList(u32 address, u32 size)
|
||||
|
||||
INCSTAT(stats.numDListsCalled);
|
||||
INCSTAT(stats.thisFrame.numDListsCalled);
|
||||
|
||||
|
||||
Statistics::SwapDL();
|
||||
g_pVideoData = old_datareader;
|
||||
break;
|
||||
@@ -744,7 +744,7 @@ bool HandleDisplayList(u32 address, u32 size)
|
||||
}
|
||||
|
||||
DLCache::CachedDisplayList dl;
|
||||
|
||||
|
||||
u32 dlvatused = DLCache::AnalyzeAndRunDisplayList(address, size, &dl);
|
||||
dl.dl_hash = GetHash64(Memory::GetPointer(address), size,0);
|
||||
dl.pass = DLCache::DLPASS_COMPILE;
|
||||
@@ -754,14 +754,14 @@ bool HandleDisplayList(u32 address, u32 size)
|
||||
{
|
||||
DLCache::VDlist &vdl = Parentiter->second;
|
||||
vdl.dl_map[vhash] = dl;
|
||||
vdl.VATUsed = dlvatused;
|
||||
vdl.VATUsed = dlvatused;
|
||||
vdl.count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
DLCache::VDlist vdl;
|
||||
vdl.dl_map[vhash] = dl;
|
||||
vdl.VATUsed = dlvatused;
|
||||
vdl.VATUsed = dlvatused;
|
||||
vdl.count = 1;
|
||||
DLCache::dl_map[dl_id] = vdl;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user