mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: add some comments for the future
This commit is contained in:
parent
b17803bb34
commit
d822b6bd1a
|
@ -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() );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue