Merge pull request #8219 from unknownbrackets/gpu-logicop

Make logic ops flush on GLES
This commit is contained in:
Henrik Rydgård 2015-11-16 01:21:43 +01:00
commit 563ad0fa10
4 changed files with 6 additions and 9 deletions

View file

@ -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 {

View file

@ -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},

View file

@ -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 {

View file

@ -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);