From ec79dacc3590f395c323e66b2f804ea2929ed429 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 15 Nov 2015 15:02:36 -0800 Subject: [PATCH 1/3] Correct weight count display for no weights. This was causing it to always say unknown weights since the +1 on weightCount. --- GPU/GeDisasm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/GeDisasm.cpp b/GPU/GeDisasm.cpp index 2e33d664a3..28dfd3864f 100644 --- a/GPU/GeDisasm.cpp +++ b/GPU/GeDisasm.cpp @@ -68,7 +68,7 @@ void GeDescribeVertexType(u32 op, char *buffer, int len) { w += snprintf(w, end - w, "%s positions, ", typeNamesS[pos]); if (typeNames[weight] && w < end) w += snprintf(w, end - w, "%s weights (%d), ", typeNames[weight], weightCount); - else if (weightCount > 0 && w < end) + else if (weightCount > 1 && w < end) w += snprintf(w, end - w, "unknown weights (%d), ", weightCount); if (morphCount > 0 && w < end) w += snprintf(w, end - w, "%d morphs, ", morphCount); From 2ed8aab2d7ac8154ad9d4f4da8859f45799e4375 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 15 Nov 2015 15:06:09 -0800 Subject: [PATCH 2/3] Avoid direct refs to OES_texture_npot. So that we can control it centrally in GLES_GPU. --- GPU/GLES/Framebuffer.cpp | 3 ++- GPU/GLES/TextureCache.cpp | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index d18ca3935d..37c2b9a466 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -1302,7 +1302,8 @@ void FramebufferManager::ReadFramebufferToMemory(VirtualFramebuffer *vfb, bool s #ifdef USING_GLES2 PackFramebufferSync_(nvfb, x, y, w, h); #else - if (gl_extensions.ARB_pixel_buffer_object && gl_extensions.OES_texture_npot) { + // TODO: Can we fall back to sync without these? + if (gl_extensions.ARB_pixel_buffer_object && gstate_c.Supports(GPU_SUPPORTS_OES_TEXTURE_NPOT)) { if (!sync) { PackFramebufferAsync_(nvfb); } else { diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index e848ba9061..d8c6555c0c 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -1498,8 +1498,9 @@ void TextureCache::SetTexture(bool force) { // Mobile devices don't get the higher scale factors, too expensive. Very rough way to decide though... if (!gstate_c.Supports(GPU_IS_MOBILE)) { - scaleFactor = std::min(gstate_c.Supports(GPU_SUPPORTS_OES_TEXTURE_NPOT) ? 5 : 4, scaleFactor); - if (!gl_extensions.OES_texture_npot && scaleFactor == 3) { + bool supportNpot = gstate_c.Supports(GPU_SUPPORTS_OES_TEXTURE_NPOT); + scaleFactor = std::min(supportNpot ? 5 : 4, scaleFactor); + if (!supportNpot && scaleFactor == 3) { scaleFactor = 2; } } else { From 7e71bd653fc86c64c9d73eea564301afd1190273 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 15 Nov 2015 15:06:37 -0800 Subject: [PATCH 3/3] Allow logic ops in GLES. We have a backup plan for them now, so they need to flush. Fixes #2917. --- GPU/GLES/GLES_GPU.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/GPU/GLES/GLES_GPU.cpp b/GPU/GLES/GLES_GPU.cpp index d5b42eb66a..a5f798ecf5 100644 --- a/GPU/GLES/GLES_GPU.cpp +++ b/GPU/GLES/GLES_GPU.cpp @@ -180,13 +180,8 @@ static const CommandTableEntry commandTable[] = { {GE_CMD_ZTEST, FLAG_FLUSHBEFOREONCHANGE}, {GE_CMD_ZTESTENABLE, FLAG_FLUSHBEFOREONCHANGE}, {GE_CMD_ZWRITEDISABLE, FLAG_FLUSHBEFOREONCHANGE}, -#ifndef USING_GLES2 {GE_CMD_LOGICOP, FLAG_FLUSHBEFOREONCHANGE}, {GE_CMD_LOGICOPENABLE, FLAG_FLUSHBEFOREONCHANGE}, -#else - {GE_CMD_LOGICOP, 0}, - {GE_CMD_LOGICOPENABLE, 0}, -#endif // Can probably ignore this one as we don't support AA lines. {GE_CMD_ANTIALIASENABLE, FLAG_FLUSHBEFOREONCHANGE},