mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: LINUX-ONLY
* go back to opengl 4.1 (nvidia driver is buggy with 4.1). * fix the backbuffer allocation. bad order of parameter * fix remaining glsl error git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5006 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
a9927a6e33
commit
6f5ac7b788
|
@ -186,7 +186,10 @@ bool GSDeviceOGL::Create(GSWnd* wnd)
|
||||||
|
|
||||||
GLuint major = s[dot-1]-'0';
|
GLuint major = s[dot-1]-'0';
|
||||||
GLuint minor = s[dot+1]-'0';
|
GLuint minor = s[dot+1]-'0';
|
||||||
if ( (major < 4) || ( major == 4 && minor < 2 ) ) return false;
|
// Note: 4.2 crash on latest nvidia drivers!
|
||||||
|
// So only check 4.1
|
||||||
|
// if ( (major < 4) || ( major == 4 && minor < 2 ) ) return false;
|
||||||
|
if ( (major < 4) || ( major == 4 && minor < 1 ) ) return false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -479,7 +482,7 @@ bool GSDeviceOGL::Reset(int w, int h)
|
||||||
// Opengl allocate the backbuffer with the window. The render is done in the backbuffer when
|
// Opengl allocate the backbuffer with the window. The render is done in the backbuffer when
|
||||||
// there isn't any FBO. Only a dummy texture is created to easily detect when the rendering is done
|
// there isn't any FBO. Only a dummy texture is created to easily detect when the rendering is done
|
||||||
// in the backbuffer
|
// in the backbuffer
|
||||||
m_backbuffer = new GSTextureOGL(0, w, h, false, GSTextureOGL::Backbuffer);
|
m_backbuffer = new GSTextureOGL(GSTextureOGL::Backbuffer, w, h, false, 0);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -619,8 +622,11 @@ void GSDeviceOGL::CopyRect(GSTexture* st, GSTexture* dt, const GSVector4i& r)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This function is useless on opengl. The only call I found copy the whole texture data to another one
|
||||||
assert(0);
|
assert(0);
|
||||||
|
|
||||||
// GL_NV_copy_image seem like the good extension but not supported on AMD...
|
// GL_NV_copy_image seem like the good extension but not supported on AMD...
|
||||||
|
// Maybe opengl 4.3 !
|
||||||
|
|
||||||
// FIXME attach the texture to the FBO
|
// FIXME attach the texture to the FBO
|
||||||
GSTextureOGL* st_ogl = (GSTextureOGL*) st;
|
GSTextureOGL* st_ogl = (GSTextureOGL*) st;
|
||||||
|
|
|
@ -103,6 +103,9 @@ GSTextureOGL::GSTextureOGL(int type, int w, int h, bool msaa, int format)
|
||||||
// gvec texelFetch(gsampler sampler, ivec texCoord, int lod[, int sample]);
|
// gvec texelFetch(gsampler sampler, ivec texCoord, int lod[, int sample]);
|
||||||
// corollary we can maybe use it for multisample stuff
|
// corollary we can maybe use it for multisample stuff
|
||||||
break;
|
break;
|
||||||
|
case GSTexture::Backbuffer:
|
||||||
|
m_texture_target = 0;
|
||||||
|
m_texture_id = 0;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -370,10 +370,12 @@ bool GSWnd::Attach(void* handle, bool managed)
|
||||||
int context_attribs[] =
|
int context_attribs[] =
|
||||||
{
|
{
|
||||||
GLX_CONTEXT_MAJOR_VERSION_ARB, 4,
|
GLX_CONTEXT_MAJOR_VERSION_ARB, 4,
|
||||||
GLX_CONTEXT_MINOR_VERSION_ARB, 2,
|
// Note: 4.2 crash on latest nvidia drivers!
|
||||||
|
GLX_CONTEXT_MINOR_VERSION_ARB, 1,
|
||||||
// FIXME : Request a debug context to ease opengl development
|
// FIXME : Request a debug context to ease opengl development
|
||||||
// Note: don't support deprecated feature (pre openg 3.1)
|
// Note: don't support deprecated feature (pre openg 3.1)
|
||||||
GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_DEBUG_BIT_ARB | GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,
|
//GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_DEBUG_BIT_ARB | GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,
|
||||||
|
GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_DEBUG_BIT_ARB,
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
m_context = glXCreateContextAttribsARB(m_XDisplay, fbc[0], 0, true, context_attribs);
|
m_context = glXCreateContextAttribsARB(m_XDisplay, fbc[0], 0, true, context_attribs);
|
||||||
|
|
|
@ -74,13 +74,11 @@ void vs_main()
|
||||||
{
|
{
|
||||||
uint z;
|
uint z;
|
||||||
if(VS_BPPZ == 1) // 24
|
if(VS_BPPZ == 1) // 24
|
||||||
{
|
|
||||||
z = i_z & 0xffffff;
|
z = i_z & 0xffffff;
|
||||||
}
|
|
||||||
else if(VS_BPPZ == 2) // 16
|
else if(VS_BPPZ == 2) // 16
|
||||||
{
|
|
||||||
z = i_z & 0xffff;
|
z = i_z & 0xffff;
|
||||||
}
|
else
|
||||||
|
z = i_z;
|
||||||
|
|
||||||
// pos -= 0.05 (1/320 pixel) helps avoiding rounding problems (integral part of pos is usually 5 digits, 0.05 is about as low as we can go)
|
// pos -= 0.05 (1/320 pixel) helps avoiding rounding problems (integral part of pos is usually 5 digits, 0.05 is about as low as we can go)
|
||||||
// example: ceil(afterseveralvertextransformations(y = 133)) => 134 => line 133 stays empty
|
// example: ceil(afterseveralvertextransformations(y = 133)) => 134 => line 133 stays empty
|
||||||
|
@ -371,7 +369,7 @@ mat4 sample_4p(vec4 u)
|
||||||
|
|
||||||
vec4 sample_color(vec2 st, float q)
|
vec4 sample_color(vec2 st, float q)
|
||||||
{
|
{
|
||||||
if(!PS_FST)
|
if(PS_FST == 0)
|
||||||
{
|
{
|
||||||
st /= q;
|
st /= q;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue