diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index fd1c56f6f0..86902de7c3 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -1405,6 +1405,7 @@ void GSDeviceOGL::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVecto if(GLState::viewport != size) { GLState::viewport = size; + // FIXME ViewportIndexedf or ViewportIndexedfv (GL4.1) glViewport(0, 0, size.x, size.y); } @@ -1413,6 +1414,7 @@ void GSDeviceOGL::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVecto if(!GLState::scissor.eq(r)) { GLState::scissor = r; + // FIXME ScissorIndexedv (GL4.1) glScissor( r.x, r.y, r.width(), r.height() ); } } diff --git a/plugins/GSdx/GSTextureCache.cpp b/plugins/GSdx/GSTextureCache.cpp index 67c139c0d4..4ee47a2a99 100644 --- a/plugins/GSdx/GSTextureCache.cpp +++ b/plugins/GSdx/GSTextureCache.cpp @@ -94,6 +94,14 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, con continue; } + // Special check for palette texture (psm.pal > 0) + // + // if m_paltex is enabled + // 1/ s->m_palette must always be defined + // 2/ Clut is useless (will be uploaded again at the end of the function) + // + // if m_paltex is disabled + // 1/ Clut must match if m_palette is NULL if(s->m_palette == NULL && psm.pal > 0 && !GSVector4i::compare64(clut, s->m_clut, psm.pal * sizeof(clut[0]))) { continue; diff --git a/plugins/GSdx/GSTextureOGL.cpp b/plugins/GSdx/GSTextureOGL.cpp index 26807cfcad..a1f4023d01 100644 --- a/plugins/GSdx/GSTextureOGL.cpp +++ b/plugins/GSdx/GSTextureOGL.cpp @@ -350,6 +350,7 @@ bool GSTextureOGL::Update(const GSVector4i& r, const void* data, int pitch) g_real_texture_upload_byte += map_size; #endif + // PERF: slow path of the texture upload. Dunno if we could do better maybe check if TC can keep row_byte == pitch // Note: row_byte != pitch for (int h = 0; h < r.height(); h++) { memcpy(map, src, row_byte); diff --git a/plugins/GSdx/res/glsl/tfx_fs.glsl b/plugins/GSdx/res/glsl/tfx_fs.glsl index fadb52640d..6fba02473e 100644 --- a/plugins/GSdx/res/glsl/tfx_fs.glsl +++ b/plugins/GSdx/res/glsl/tfx_fs.glsl @@ -262,8 +262,8 @@ vec4 sample_color(vec2 st, float q) // PERF: see the impact of the exansion before/after the interpolation for (int i = 0; i < 4; i++) { - // PERF note: using dot produce reduces by 1 the number of instruction - // but I'm not it is equivalent neither faster. + // PERF note: using dot product reduces by 1 the number of instruction + // but I'm not sure it is equivalent neither faster. //float sum = dot(c[i].rgb, vec3(1.0f)); #if ((PS_FMT & ~FMT_PAL) == FMT_24) c[i].a = ( (PS_AEM == 0) || any(bvec3(c[i].rgb)) ) ? TA.x : 0.0f; diff --git a/plugins/GSdx/res/glsl_source.h b/plugins/GSdx/res/glsl_source.h index 77ab05a1df..f7a4d23153 100644 --- a/plugins/GSdx/res/glsl_source.h +++ b/plugins/GSdx/res/glsl_source.h @@ -1121,8 +1121,8 @@ static const char* tfx_fs_all_glsl = " // PERF: see the impact of the exansion before/after the interpolation\n" " for (int i = 0; i < 4; i++)\n" " {\n" - " // PERF note: using dot produce reduces by 1 the number of instruction\n" - " // but I'm not it is equivalent neither faster.\n" + " // PERF note: using dot product reduces by 1 the number of instruction\n" + " // but I'm not sure it is equivalent neither faster.\n" " //float sum = dot(c[i].rgb, vec3(1.0f));\n" "#if ((PS_FMT & ~FMT_PAL) == FMT_24)\n" " c[i].a = ( (PS_AEM == 0) || any(bvec3(c[i].rgb)) ) ? TA.x : 0.0f;\n"