From e97bc516e64f2a471df28f77cba0461007746cf0 Mon Sep 17 00:00:00 2001 From: hrydgard Date: Wed, 2 Sep 2009 18:55:36 +0000 Subject: [PATCH] Warning fixes/suppressions(aui), assorted code cleanup, d3d vertex shader cache expiration interval increased. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4165 8ced0084-cf51-0410-be5f-012b33b47a6e --- Externals/wxWidgets/build/msw/wx_aui.vcproj | 16 +++++++------- Source/Core/Core/Src/HW/BBA-TAP/TAP_Win32.cpp | 10 ++++----- .../Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp | 6 ++--- Source/Core/DolphinWX/Src/FrameAui.cpp | 22 ++++++++++--------- Source/Core/VideoCommon/Src/BPStructs.cpp | 4 ++-- .../Core/VideoCommon/Src/TextureDecoder.cpp | 7 +----- .../Plugin_DSP_HLE/Src/MailHandler.cpp | 2 +- .../Plugin_VideoDX9/Src/BPFunctions.cpp | 21 ++++++++---------- .../Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp | 13 +++++------ .../Plugin_VideoDX9/Src/PixelShaderCache.cpp | 3 +-- Source/Plugins/Plugin_VideoDX9/Src/Render.cpp | 20 ++++++----------- Source/Plugins/Plugin_VideoDX9/Src/Render.h | 2 -- .../Plugin_VideoDX9/Src/TextureCache.cpp | 15 +++++++------ .../Plugin_VideoDX9/Src/VertexShaderCache.cpp | 5 ++--- .../Plugin_VideoOGL/Src/BPFunctions.cpp | 4 ++++ 15 files changed, 68 insertions(+), 82 deletions(-) diff --git a/Externals/wxWidgets/build/msw/wx_aui.vcproj b/Externals/wxWidgets/build/msw/wx_aui.vcproj index 6f0155b2c8..ef43c32af8 100644 --- a/Externals/wxWidgets/build/msw/wx_aui.vcproj +++ b/Externals/wxWidgets/build/msw/wx_aui.vcproj @@ -58,7 +58,7 @@ AssemblerListingLocation="$(IntDir)\" ObjectFile="$(IntDir)\" ProgramDataBaseFileName="$(IntDir)\wxmsw28d_aui.pdb" - WarningLevel="4" + WarningLevel="1" SuppressStartupBanner="true" DebugInformationFormat="3" /> @@ -136,7 +136,7 @@ AssemblerListingLocation="$(IntDir)\" ObjectFile="$(IntDir)\" ProgramDataBaseFileName="$(IntDir)\wxmsw28d_aui.pdb" - WarningLevel="4" + WarningLevel="1" SuppressStartupBanner="true" DebugInformationFormat="3" /> @@ -215,7 +215,7 @@ AssemblerListingLocation="$(IntDir)\" ObjectFile="$(IntDir)\" ProgramDataBaseFileName="$(IntDir)\wxmsw28_aui.pdb" - WarningLevel="4" + WarningLevel="1" SuppressStartupBanner="true" /> + + @@ -473,10 +477,6 @@ /> - - sin_family = (u8)address.sin_family; addr->sin_addr.s_addr_ = address.sin_addr.s_addr; diff --git a/Source/Core/DolphinWX/Src/FrameAui.cpp b/Source/Core/DolphinWX/Src/FrameAui.cpp index 85dd97bd91..9c88e092ed 100644 --- a/Source/Core/DolphinWX/Src/FrameAui.cpp +++ b/Source/Core/DolphinWX/Src/FrameAui.cpp @@ -370,21 +370,23 @@ void CFrame::OnAllowNotebookDnD(wxAuiNotebookEvent& event) void CFrame::HidePane() { // Get the first notebook - wxAuiNotebook * NB; + wxAuiNotebook * NB = NULL; for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++) { if (m_Mgr->GetAllPanes().Item(i).window->IsKindOf(CLASSINFO(wxAuiNotebook))) NB = (wxAuiNotebook*)m_Mgr->GetAllPanes().Item(i).window; } - if (NB->GetPageCount() == 0) - m_Mgr->GetPane(wxT("Pane 1")).Hide(); - else - m_Mgr->GetPane(wxT("Pane 1")).Show(); - m_Mgr->Update(); - + if (NB) { + if (NB->GetPageCount() == 0) + m_Mgr->GetPane(wxT("Pane 1")).Hide(); + else + m_Mgr->GetPane(wxT("Pane 1")).Show(); + m_Mgr->Update(); + } SetSimplePaneSize(); } -void CFrame::DoRemovePageString(wxString Str, bool _hide, bool _destroy) + +void CFrame::DoRemovePageString(wxString Str, bool /*_hide*/, bool _destroy) { for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++) { @@ -673,7 +675,7 @@ void CFrame::OnDropDownToolbarSelect(wxCommandEvent& event) void CFrame::ResetToolbarStyle() { wxAuiPaneInfoArray& AllPanes = m_Mgr->GetAllPanes(); - for (int i = 0, Count = AllPanes.GetCount(); i < Count; ++i) + for (int i = 0, Count = (int)AllPanes.GetCount(); i < Count; ++i) { wxAuiPaneInfo& Pane = AllPanes.Item(i); if (Pane.window->IsKindOf(CLASSINFO(wxAuiToolBar))) @@ -726,7 +728,7 @@ void CFrame::TogglePaneStyle(bool On, int EventId) void CFrame::ToggleNotebookStyle(long Style) { wxAuiPaneInfoArray& AllPanes = m_Mgr->GetAllPanes(); - for (int i = 0, Count = AllPanes.GetCount(); i < Count; ++i) + for (int i = 0, Count = (int)AllPanes.GetCount(); i < Count; ++i) { wxAuiPaneInfo& Pane = AllPanes.Item(i); if (Pane.window->IsKindOf(CLASSINFO(wxAuiNotebook))) diff --git a/Source/Core/VideoCommon/Src/BPStructs.cpp b/Source/Core/VideoCommon/Src/BPStructs.cpp index 2e003a1b98..69a53799b7 100644 --- a/Source/Core/VideoCommon/Src/BPStructs.cpp +++ b/Source/Core/VideoCommon/Src/BPStructs.cpp @@ -224,7 +224,7 @@ void BPWritten(const BPCmd& bp) float xfbLines = ((bpmem.copyTexSrcWH.y + 1.0f) * yScale); if ((u32)xfbLines > MAX_XFB_HEIGHT) { - WARN_LOG(VIDEO, "Tried to scale EFB to too many XFB lines (%f)", xfbLines); + INFO_LOG(VIDEO, "Tried to scale EFB to too many XFB lines (%f)", xfbLines); xfbLines = MAX_XFB_HEIGHT; } @@ -460,6 +460,7 @@ void BPWritten(const BPCmd& bp) case BPMEM_TX_SETMODE0+1: case BPMEM_TX_SETMODE0+2: case BPMEM_TX_SETMODE0+3: + SetSamplerState(bp); case BPMEM_TX_SETMODE1: case BPMEM_TX_SETMODE1+1: case BPMEM_TX_SETMODE1+2: @@ -472,7 +473,6 @@ void BPWritten(const BPCmd& bp) case BPMEM_TX_SETMODE1_4+1: case BPMEM_TX_SETMODE1_4+2: case BPMEM_TX_SETMODE1_4+3: - SetSamplerState(bp); break; // -------------------------------------------- // BPMEM_TX_SETIMAGE0 - Texture width, height, format diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.cpp b/Source/Core/VideoCommon/Src/TextureDecoder.cpp index bb9e8f34d4..578846cda1 100644 --- a/Source/Core/VideoCommon/Src/TextureDecoder.cpp +++ b/Source/Core/VideoCommon/Src/TextureDecoder.cpp @@ -322,7 +322,7 @@ inline u32 makecol(int r, int g, int b, int a) void decodeDXTBlock(u32 *dst, const DXTBlock *src, int pitch) { - // S3TC Decoder (Note: GCN decodes differently from PC) + // S3TC Decoder (Note: GCN decodes differently from PC so we can't use native support) u16 c1 = Common::swap16(src->color1); u16 c2 = Common::swap16(src->color2); u8 blue1 = Convert5To8(c1 & 0x1F); @@ -331,9 +331,7 @@ void decodeDXTBlock(u32 *dst, const DXTBlock *src, int pitch) u8 green2 = Convert6To8((c2 >> 5) & 0x3F); u8 red1 = Convert5To8((c1 >> 11) & 0x1F); u8 red2 = Convert5To8((c2 >> 11) & 0x1F); - int colors[4]; - if (c1 > c2) { colors[0] = makecol(red1, green1, blue1, 255); @@ -457,10 +455,7 @@ PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int heigh for (int y = 0; y < height; y += 4) for (int x = 0; x < width; x += 8) for (int iy = 0; iy < 4; iy++, src += 8) - { - //decodebytesIA4((u32*)dst+(y+iy)*width+x, src, 8); decodebytesIA4((u16*)dst + (y + iy) * width + x, src); - } } return PC_TEX_FMT_IA4_AS_IA8; case GX_TF_IA8: diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.cpp index 8dbb416dcc..9d1185e100 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/MailHandler.cpp @@ -111,7 +111,7 @@ void CMailHandler::DoState(PointerWrap &p) else // WRITE and MEASURE { std::queue temp; - int sz = m_Mails.size(); + int sz = (int)m_Mails.size(); p.Do(sz); for (int i = 0; i < sz; i++) { diff --git a/Source/Plugins/Plugin_VideoDX9/Src/BPFunctions.cpp b/Source/Plugins/Plugin_VideoDX9/Src/BPFunctions.cpp index 0092d6ec00..5c066bbfaf 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/BPFunctions.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/BPFunctions.cpp @@ -127,30 +127,24 @@ void SetScissor(const BPCmd &bp) { Renderer::SetScissorRect(); } + void SetLineWidth(const BPCmd &bp) { // We can't change line width in D3D unless we use ID3DXLine float psize = float(bpmem.lineptwidth.pointsize) * 6.0f; Renderer::SetRenderState(D3DRS_POINTSIZE, *((DWORD*)&psize)); } + void SetDepthMode(const BPCmd &bp) { if (bpmem.zmode.testenable) { - // dev->SetRenderState(D3DRS_ZENABLE, TRUE); - // dev->SetRenderState(D3DRS_ZWRITEENABLE, bpmem.zmode.updateenable); - // dev->SetRenderState(D3DRS_ZFUNC,d3dCmpFuncs[bpmem.zmode.func]); - Renderer::SetRenderState(D3DRS_ZENABLE, TRUE); Renderer::SetRenderState(D3DRS_ZWRITEENABLE, bpmem.zmode.updateenable); Renderer::SetRenderState(D3DRS_ZFUNC, d3dCmpFuncs[bpmem.zmode.func]); } else { - // if the test is disabled write is disabled too - // dev->SetRenderState(D3DRS_ZENABLE, FALSE); - // dev->SetRenderState(D3DRS_ZWRITEENABLE, FALSE); - Renderer::SetRenderState(D3DRS_ZENABLE, FALSE); Renderer::SetRenderState(D3DRS_ZWRITEENABLE, FALSE); } @@ -193,7 +187,8 @@ void SetBlendMode(const BPCmd &bp) Renderer::SetRenderState(D3DRS_DESTBLEND, dst); } - Renderer::SetRenderState(D3DRS_BLENDOP, bpmem.blendmode.subtract ? D3DBLENDOP_SUBTRACT : D3DBLENDOP_ADD); + Renderer::SetRenderState(D3DRS_BLENDOP, + bpmem.blendmode.subtract ? D3DBLENDOP_SUBTRACT : D3DBLENDOP_ADD); } } void SetDitherMode(const BPCmd &bp) @@ -218,9 +213,8 @@ void SetColorMask(const BPCmd &bp) void CopyEFB(const BPCmd &bp, const EFBRectangle &rc, const u32 &address, const bool &fromZBuffer, const bool &isIntensityFmt, const u32 ©fmt, const bool &scaleByHalf) { // TODO: Scale EFBRectangle correctly - RECT rec = { rc.left, rc.top, rc.right, rc.bottom }; - TextureCache::CopyEFBToRenderTarget(bpmem.copyTexDest<<5, &rec); + TextureCache::CopyEFBToRenderTarget(bpmem.copyTexDest << 5, &rec); } void RenderToXFB(const BPCmd &bp, const EFBRectangle &rc, const float &yScale, const float &xfbLines, u32 xfbAddr, const u32 &dstWidth, const u32 &dstHeight) @@ -229,6 +223,7 @@ void RenderToXFB(const BPCmd &bp, const EFBRectangle &rc, const float &yScale, c PRIM_LOG("Renderer::SwapBuffers()"); g_VideoInitialize.pCopiedToXFB(false); } + void ClearScreen(const BPCmd &bp, const EFBRectangle &rc) { // TODO: Scale EFBRectangle correctly @@ -248,7 +243,7 @@ void ClearScreen(const BPCmd &bp, const EFBRectangle &rc) { if (bpmem.blendmode.colorupdate || bpmem.blendmode.alphaupdate) col = (bpmem.clearcolorAR << 16) | bpmem.clearcolorGB; - // clearflags |= D3DCLEAR_TARGET; set to break animal crossing :p + clearflags |= D3DCLEAR_TARGET; // set to break animal crossing :p ?? } // clear z-buffer @@ -283,10 +278,12 @@ bool GetConfig(const int &type) return false; } } + u8 *GetPointer(const u32 &address) { return g_VideoInitialize.pGetMemoryPointer(address); } + void SetSamplerState(const BPCmd &bp) { FourTexUnits &tex = bpmem.tex[(bp.address & 0xE0) == 0xA0]; diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp b/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp index 347624bd51..7b1099549e 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp @@ -197,7 +197,8 @@ namespace D3D void SaveRenderStates() { - for (int i = 0; i < 6; i++) { + for (int i = 0; i < 6; i++) + { dev->GetRenderState((_D3DRENDERSTATETYPE)RS[i][0], &(RS_old[i])); dev->GetTextureStageState(0, (_D3DTEXTURESTAGESTATETYPE)int(TS[i][0]), &(TS_old[i])); } @@ -215,10 +216,8 @@ namespace D3D dev->SetPixelShader(0); dev->SetVertexShader(0); - dev->SetVertexDeclaration(0); - // dev->SetFVF(D3DFVF_FONT2DVERTEX); - Renderer::SetFVF(D3DFVF_FONT2DVERTEX); + dev->SetFVF(D3DFVF_FONT2DVERTEX); for (int i = 0; i < 6; i++) { // dev->SetRenderState((_D3DRENDERSTATETYPE)RS[i][0],RS[i][1]); @@ -236,10 +235,8 @@ namespace D3D dev->SetPixelShader(ps_old); dev->SetVertexShader(vs_old); - dev->SetVertexDeclaration(decl_old); - // dev->SetFVF(FVF_old); - Renderer::SetFVF(FVF_old); + dev->SetFVF(FVF_old); for (int i = 0; i < 6; i++) { @@ -384,7 +381,7 @@ namespace D3D dev->SetVertexShader(0); dev->SetVertexDeclaration(0); - Renderer::SetFVF(D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1); + dev->SetFVF(D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1); dev->DrawPrimitiveUP(D3DPT_TRIANGLEFAN, 2, coords, sizeof(Q2DVertex)); RestoreRenderStates(); diff --git a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp index ef1cd98fcb..13e92c96bc 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp @@ -98,7 +98,6 @@ void PixelShaderCache::SetShader(bool dstAlpha) PixelShaders[uid] = newentry; last_entry = &PixelShaders[uid]; - Renderer::SetFVF(NULL); D3D::dev->SetPixelShader(shader); last_shader = shader; @@ -119,7 +118,7 @@ void PixelShaderCache::Cleanup() while (iter != PixelShaders.end()) { PSCacheEntry &entry = iter->second; - if (entry.frameCount < frameCount - 400) + if (entry.frameCount < frameCount - 1400) { entry.Destroy(); iter = PixelShaders.erase(iter); diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp index d06b26f2a6..03848cd387 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp @@ -56,7 +56,6 @@ std::vector Renderer::m_Textures; DWORD Renderer::m_RenderStates[MaxRenderStates+46]; DWORD Renderer::m_TextureStageStates[MaxTextureStages][MaxTextureTypes]; DWORD Renderer::m_SamplerStates[MaxSamplerSize][MaxSamplerTypes]; -DWORD Renderer::m_FVF; bool Renderer::m_LastFrameDumped; bool Renderer::m_AVIDumping; @@ -116,7 +115,6 @@ void Renderer::Shutdown() void Renderer::Initialize() { - m_FVF = 0; m_Textures.reserve(MaxTextureStages); for (int i = 0; i < MaxTextureStages; i++) m_Textures.push_back(NULL); @@ -360,12 +358,17 @@ void Renderer::SwapBuffers() D3D::dev->SetScissorRect(&rc); D3D::dev->SetRenderState(D3DRS_SCISSORTESTENABLE, false); - D3D::dev->Clear(0, 0, D3DCLEAR_TARGET, 0x101010, 0, 0); + // We probably shouldn't clear here. + D3D::dev->Clear(0, 0, D3DCLEAR_TARGET, 0x00000000, 0, 0); + u32 clearColor = (bpmem.clearcolorAR << 16) | bpmem.clearcolorGB; // clearColor |= 0x003F003F; // D3D::BeginFrame(true,clearColor,1.0f); D3D::BeginFrame(false, clearColor, 1.0f); - D3D::EnableAlphaToCoverage(); + + // This probably causes problems, and the visual difference is tiny anyway. + // So let's keep it commented out. + // D3D::EnableAlphaToCoverage(); Postprocess::BeginFrame(); VertexManager::BeginFrame(); @@ -502,15 +505,6 @@ void Renderer::SetTexture(DWORD Stage, LPDIRECT3DBASETEXTURE9 pTexture) } } -void Renderer::SetFVF(DWORD FVF) -{ - if (m_FVF != FVF) - { - m_FVF = FVF; - D3D::dev->SetFVF(FVF); - } -} - void Renderer::SetRenderState(D3DRENDERSTATETYPE State, DWORD Value) { if (m_RenderStates[State] != Value) diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Render.h b/Source/Plugins/Plugin_VideoDX9/Src/Render.h index f116d8f0a1..2ab7f6016f 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Render.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/Render.h @@ -51,7 +51,6 @@ class Renderer static DWORD m_RenderStates[MaxRenderStates+46]; static DWORD m_TextureStageStates[MaxTextureStages][MaxTextureTypes]; static DWORD m_SamplerStates[MaxSamplerSize][MaxSamplerTypes]; - static DWORD m_FVF; public: static void Init(SVideoInitialize &_VideoInitialize); @@ -79,7 +78,6 @@ public: // The following are "filtered" versions of the corresponding D3Ddev-> functions. static void SetTexture(DWORD Stage, IDirect3DBaseTexture9 *pTexture); - static void SetFVF(DWORD FVF); static void SetRenderState(D3DRENDERSTATETYPE State, DWORD Value); static void SetTextureStageState(DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value); static void SetSamplerState(DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value); diff --git a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp index c22878156b..7b5263d9a6 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp @@ -105,8 +105,8 @@ void TextureCache::Cleanup() TextureCache::TCacheEntry *TextureCache::Load(int stage, u32 address, int width, int height, int format, int tlutaddr, int tlutfmt) { - - if (address == 0) return NULL; + if (address == 0) + return NULL; TexCache::iterator iter = textures.find(address); @@ -185,7 +185,7 @@ TextureCache::TCacheEntry *TextureCache::Load(int stage, u32 address, int width, d3d_fmt = D3DFMT_R5G6B5; break; case PC_TEX_FMT_IA4_AS_IA8: - d3d_fmt = D3DFMT_A8L8; //D3DFMT_A4L4; + d3d_fmt = D3DFMT_A8L8; break; case PC_TEX_FMT_I8: case PC_TEX_FMT_I4_AS_I8: @@ -262,24 +262,25 @@ void TextureCache::CopyEFBToRenderTarget(u32 address, RECT *source) { if (!iter->second.isRenderTarget) { - g_VideoInitialize.pLog("Using non-rendertarget texture as render target!!! WTF?", FALSE); + ERROR_LOG(VIDEO, "Using non-rendertarget texture as render target!!! WTF?", FALSE); //TODO: remove it and recreate it as a render target } tex = iter->second.texture; - iter->second.frameCount=frameCount; + iter->second.frameCount = frameCount; } else { TCacheEntry entry; - entry.isRenderTarget=true; + entry.isRenderTarget = true; entry.hash = 0; entry.hashoffset = 0; entry.frameCount = frameCount; // TODO(ector): infer this size in some sensible way - D3D::dev->CreateTexture(512,512,1,D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &entry.texture, 0); + D3D::dev->CreateTexture(512, 512, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &entry.texture, 0); textures[address] = entry; tex = entry.texture; } + LPDIRECT3DSURFACE9 srcSurface,destSurface; tex->GetSurfaceLevel(0,&destSurface); srcSurface = D3D::GetBackBufferSurface(); diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp index 186cb757d3..d92907fe15 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp @@ -110,8 +110,7 @@ void VertexShaderCache::SetShader(u32 components) PanicAlert("Failed to compile Vertex Shader:\n\n%s", code); } - Renderer::SetFVF(NULL); - //D3D::dev->SetVertexShader(shader); + D3D::dev->SetFVF(NULL); } void VertexShaderCache::Cleanup() @@ -119,7 +118,7 @@ void VertexShaderCache::Cleanup() for (VSCache::iterator iter = vshaders.begin(); iter != vshaders.end();) { VSCacheEntry &entry = iter->second; - if (entry.frameCount < frameCount - 30) + if (entry.frameCount < frameCount - 1400) { entry.Destroy(); iter = vshaders.erase(iter); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/BPFunctions.cpp b/Source/Plugins/Plugin_VideoOGL/Src/BPFunctions.cpp index 14a6034530..2a4f7d1d19 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/BPFunctions.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/BPFunctions.cpp @@ -166,16 +166,20 @@ bool GetConfig(const int &type) return false; } } + u8 *GetPointer(const u32 &address) { return g_VideoInitialize.pGetMemoryPointer(address); } + void SetSamplerState(const BPCmd &bp) { // TODO } + void SetInterlacingMode(const BPCmd &bp) { // TODO } + };