From 01e9111ac5e4b301de9c815cd517648625eb3f01 Mon Sep 17 00:00:00 2001 From: The Dax Date: Fri, 9 Aug 2013 05:12:26 -0400 Subject: [PATCH] Remove Stream VBO option. --- Core/Config.cpp | 2 -- Core/Config.h | 1 - GPU/GLES/TransformPipeline.cpp | 49 +++------------------------------ UI/GameSettingsScreen.cpp | 1 - UI/MenuScreens.cpp | 4 +-- UI/NativeApp.cpp | 1 - Windows/WndMainWindow.cpp | 5 ---- Windows/ppsspp.rc | Bin 38708 -> 38594 bytes Windows/resource.h | Bin 21770 -> 21674 bytes 9 files changed, 5 insertions(+), 58 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index c2b22638b..8607d1f51 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -103,7 +103,6 @@ void Config::Load(const char *iniFileName) graphics->Get("HardwareTransform", &bHardwareTransform, true); graphics->Get("TextureFiltering", &iTexFiltering, 1); graphics->Get("SSAA", &bAntiAliasing, 0); - graphics->Get("VBO", &bUseVBO, false); graphics->Get("FrameSkip", &iFrameSkip, 0); graphics->Get("FrameRate", &iFpsLimit, 0); graphics->Get("ForceMaxEmulatedFPS", &iForceMaxEmulatedFPS, 0); @@ -237,7 +236,6 @@ void Config::Save() graphics->Set("HardwareTransform", bHardwareTransform); graphics->Set("TextureFiltering", iTexFiltering); graphics->Set("SSAA", bAntiAliasing); - graphics->Set("VBO", bUseVBO); graphics->Set("FrameSkip", iFrameSkip); graphics->Set("FrameRate", iFpsLimit); graphics->Set("ForceMaxEmulatedFPS", iForceMaxEmulatedFPS); diff --git a/Core/Config.h b/Core/Config.h index 91c883dfa..8c6d50990 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -66,7 +66,6 @@ public: bool bHardwareTransform; int iRenderingMode; // 0 = non-buffered rendering 1 = buffered rendering 2 = Read Framebuffer to memory (CPU) 3 = Read Framebuffer to memory (GPU) int iTexFiltering; // 1 = off , 2 = nearest , 3 = linear , 4 = linear(CG) - bool bUseVBO; #ifdef BLACKBERRY bool bPartialStretch; #endif diff --git a/GPU/GLES/TransformPipeline.cpp b/GPU/GLES/TransformPipeline.cpp index 2273c0180..c087af9f7 100644 --- a/GPU/GLES/TransformPipeline.cpp +++ b/GPU/GLES/TransformPipeline.cpp @@ -855,16 +855,7 @@ void TransformDrawEngine::SoftwareTransformAndDraw( // these spam the gDebugger log. const int vertexSize = sizeof(transformed[0]); - - bool useVBO = g_Config.bUseVBO; - if (useVBO) { - //char title[64]; - //sprintf(title, "upload %i verts for sw", indexGen.VertexCount()); - //LoggingDeadline deadline(title, 5); - glBindBuffer(GL_ARRAY_BUFFER, vbo_[curVbo_]); - glBufferData(GL_ARRAY_BUFFER, vertexSize * numTrans, drawBuffer, GL_STREAM_DRAW); - drawBuffer = 0; // so that the calls use offsets instead. - } + bool doTextureProjection = gstate.getUVGenMode() == 1; glBindBuffer(GL_ARRAY_BUFFER, 0); glVertexAttribPointer(program->a_position, 4, GL_FLOAT, GL_FALSE, vertexSize, drawBuffer); @@ -872,28 +863,10 @@ void TransformDrawEngine::SoftwareTransformAndDraw( if (program->a_color0 != -1) glVertexAttribPointer(program->a_color0, 4, GL_UNSIGNED_BYTE, GL_TRUE, vertexSize, ((uint8_t*)drawBuffer) + 7 * 4); if (program->a_color1 != -1) glVertexAttribPointer(program->a_color1, 3, GL_UNSIGNED_BYTE, GL_TRUE, vertexSize, ((uint8_t*)drawBuffer) + 8 * 4); if (drawIndexed) { - if (useVBO) { - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ebo_[curVbo_]); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(short) * numTrans, inds, GL_STREAM_DRAW); - inds = 0; - } glDrawElements(glprim[prim], numTrans, GL_UNSIGNED_SHORT, inds); - if (useVBO) { - // Attempt to orphan the buffer we used so the GPU can alloc a new one. - // glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(short) * numTrans, 0, GL_DYNAMIC_DRAW); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - } } else { glDrawArrays(glprim[prim], 0, numTrans); } - if (useVBO) { - // Attempt to orphan the buffer we used so the GPU can alloc a new one. - // glBufferData(GL_ARRAY_BUFFER, vertexSize * numTrans, 0, GL_DYNAMIC_DRAW); - glBindBuffer(GL_ARRAY_BUFFER, 0); - curVbo_++; - if (curVbo_ == NUM_VBOS) - curVbo_ = 0; - } } VertexDecoder *TransformDrawEngine::GetVertexDecoder(u32 vtype) { @@ -1299,23 +1272,9 @@ rotateVBO: if (!useElements && indexGen.PureCount()) { vertexCount = indexGen.PureCount(); } - if (g_Config.bUseVBO) { - // Just rotate VBO. - vbo = vbo_[curVbo_]; - ebo = ebo_[curVbo_]; - curVbo_++; - if (curVbo_ == NUM_VBOS) - curVbo_ = 0; - glBindBuffer(GL_ARRAY_BUFFER, vbo); - glBufferData(GL_ARRAY_BUFFER, dec_->GetDecVtxFmt().stride * indexGen.MaxIndex(), decoded, GL_STREAM_DRAW); - if (useElements) { - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ebo); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(short) * vertexCount, (GLvoid *)decIndex, GL_STREAM_DRAW); - } - } else { - glBindBuffer(GL_ARRAY_BUFFER, 0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - } + glBindBuffer(GL_ARRAY_BUFFER, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + prim = indexGen.Prim(); } diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 011f93218..37425f204 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -214,7 +214,6 @@ void GameSettingsScreen::CreateViews() { graphicsSettings->Add(new ItemHeader(gs->T("Features"))); graphicsSettings->Add(new CheckBox(&g_Config.bHardwareTransform, gs->T("Hardware Transform"))); graphicsSettings->Add(new CheckBox(&g_Config.bVertexCache, gs->T("Vertex Cache"))); - graphicsSettings->Add(new CheckBox(&g_Config.bUseVBO, gs->T("Stream VBO"))); graphicsSettings->Add(new CheckBox(&g_Config.bStretchToDisplay, gs->T("Stretch to Display"))); graphicsSettings->Add(new CheckBox(&g_Config.bMipMap, gs->T("Mipmapping"))); graphicsSettings->Add(new CheckBox(&g_Config.bTrueColor, gs->T("True Color"))); diff --git a/UI/MenuScreens.cpp b/UI/MenuScreens.cpp index 182fa5490..186229779 100644 --- a/UI/MenuScreens.cpp +++ b/UI/MenuScreens.cpp @@ -952,9 +952,7 @@ void GraphicsScreenP1::render() { UICheckBox(GEN_ID, x, y += stride, gs->T("Hardware Transform"), ALIGN_TOPLEFT, &g_Config.bHardwareTransform); #endif UICheckBox(GEN_ID, x, y += stride, gs->T("Vertex Cache"), ALIGN_TOPLEFT, &g_Config.bVertexCache); -#ifndef __SYMBIAN32__ - UICheckBox(GEN_ID, x, y += stride, gs->T("Stream VBO"), ALIGN_TOPLEFT, &g_Config.bUseVBO); -#endif + UICheckBox(GEN_ID, x, y += stride, gs->T("Mipmapping"), ALIGN_TOPLEFT, &g_Config.bMipMap); UICheckBox(GEN_ID, x, y += stride, gs->T("AA", "Anti-Aliasing"), ALIGN_TOPLEFT, &g_Config.bAntiAliasing); diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 377ae4a73..a84a1f8f8 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -354,7 +354,6 @@ void NativeInit(int argc, const char *argv[], } #ifdef __SYMBIAN32__ g_Config.bHardwareTransform = true; - g_Config.bUseVBO = false; #endif // Special hack for G3D as it's very spammy. Need to make a flag for this. if (!gfxLog) diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index 467fac9f4..21825e56e 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -981,10 +981,6 @@ namespace MainWindow g_Config.bFastMemory = !g_Config.bFastMemory; break; - case ID_OPTIONS_USEVBO: - g_Config.bUseVBO = !g_Config.bUseVBO; - break; - case ID_OPTIONS_TEXTUREFILTERING_AUTO: setTexFiltering(AUTO); break; @@ -1191,7 +1187,6 @@ namespace MainWindow CHECKITEM(ID_OPTIONS_ANTIALIASING, g_Config.bAntiAliasing); CHECKITEM(ID_OPTIONS_STRETCHDISPLAY, g_Config.bStretchToDisplay); CHECKITEM(ID_EMULATION_RUNONLOAD, g_Config.bAutoRun); - CHECKITEM(ID_OPTIONS_USEVBO, g_Config.bUseVBO); CHECKITEM(ID_OPTIONS_VERTEXCACHE, g_Config.bVertexCache); CHECKITEM(ID_OPTIONS_SHOWFPS, g_Config.iShowFPSCounter); CHECKITEM(ID_OPTIONS_FRAMESKIP, g_Config.iFrameSkip != 0); diff --git a/Windows/ppsspp.rc b/Windows/ppsspp.rc index 579a3bade10e716b52f4a69dca184e97ab4bb187..8caf6bdf463cf799f2f14a6eb4789606954d427d 100644 GIT binary patch delta 14 Wcmdn8j_J@^rVSodn|D=J$p8Q~HwMK3 delta 50 zcmX@KmTAj6rVSodlQ*Psa3?b4GAJ;FF*q^!PYx{7<_={DW^je_55{Y5_Nc0o0RWrH B4KM6%2Av;ls@hB;u)R~&*wQC*T$E%>(Smf&!O70`5-!8i(7Al z(z7vrhi6Y`>BS=7mtS)1?=tjt^4A&L|686OgMEwUzRQ(Zh;?OAi62Erxy-~;>C_{|FJ=6{=W`S?jC5vE zhiPQ6-cd9=a)VfibFmWhuEOaWT#IE_I`yQJ%%6ISVb9=4FC?s+oGfX0{VkgPH7>-W zzk?R9QuQSxmW)_3;(#)aagzq~*ycEKNRxkmYVeq>Fi8T^)I>`ICh0PVX^3`UawqeV zXdeXJiRYp{FnJQs#dHwxBu>OMll{zNoW12Jvl(q`{LXZ4GwGOzH1Zas+@Z+V_>*td L-ra1zzhC$ZNHeTm delta 478 zcmW;IziSg=9LMoX6hRH892r75LMn179HoY%N@(vc*C#*ja=i;0oz=OBNG2y|2~vD# za*(c;P>N<2XDQ;4E)L=>MI7=6_`%`f_5JejdH8;x;}50R$EDMw-Rlpn2Ugd5WW`p& zMtOs?U7sTzKiH%kw3r1Rj{~1oQ0LV(n=h)zVV(8zWj;5qPz!fhgf1_`Hr2@CduW)* zt;n#Hhtlt~S?k>7ZD)sP9ha5*Z*m;B*^FHl@{O$SwfQ3_GT(Dq$`k1u<&DeC)X7bc zl{_(q`(5Y%9CkNmq565(Q0-|3IgwjE%^(k@-*@;cXMOF{*FNe``-bsAZww4(P5D8L zop}5lY%@vjktMfSCdwzur^?HZR~<%a#6_xi(gr_Ln{4P&8~V(L5z}FlN~U{xAhWE& z*DPk9HSzW%D*H{Q@<3k5GnwTPUfyIbr?OH6{LXLiwD9!bHfd2~QD~044)2OO)se@q ZqQwgtjJ8X6c(Q(*_o`Z-&PV5${sAX{uigLv