gsdx-ogl: Fix a few glsl errors. Comment out line 218 of GSDevice.cpp. Mess with the fifo hack a bit.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5042 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2012-01-04 10:42:53 +00:00
parent 76542f89c9
commit 0116402620
4 changed files with 18 additions and 9 deletions

View File

@ -413,9 +413,9 @@ EXPORT_C GSreadFIFO2(uint8* mem, uint32 size)
// invalidate data for opengl
if (theApp.GetConfig("renderer", 0) == 12) {
#ifdef OGL_DEBUG
fprintf(stderr, "Disable FIFO2 on opengl\n");
fprintf(stderr, "Disable FIFO2(%d) on opengl\n", size);
#endif
return;
//return;
}
#endif
s_gs->ReadFIFO(mem, size);

View File

@ -215,7 +215,7 @@ bool GSDeviceOGL::Create(GSWnd* wnd)
}
if ( !glewIsSupported("GL_ARB_shading_language_420pack")) {
fprintf(stderr, "GL_ARB_shading_language_420pack is not supported\n");
return false;
//return false;
}

View File

@ -315,6 +315,11 @@ public:
void upload(const void* src, uint32 count)
{
GLint b_size = -1;
glGetBufferParameteriv(m_target, GL_BUFFER_SIZE, &b_size);
if (b_size <= 0) return;
m_count = count;
// Note: For an explanation of the map flag
@ -337,9 +342,13 @@ public:
// Tell the driver that it doesn't need to contain any valid buffer data, and that you promise to write the entire range you map
map_flags |= GL_MAP_INVALIDATE_RANGE_BIT;
}
// Upload the data to the buffer
uint8* dst = (uint8*) glMapBufferRange(m_target, m_stride*m_start, m_stride*m_count, map_flags);
if (dst == NULL) {
fprintf(stderr, "CRITICAL ERROR map failed for vb!!!\n");
return;
}
memcpy(dst, src, m_stride*m_count);
glUnmapBuffer(m_target);
}

View File

@ -74,9 +74,9 @@ void vs_main()
{
uint z;
if(VS_BPPZ == 1) // 24
z = i_z & 0xffffff;
z = i_z & uint(0xffffff);
else if(VS_BPPZ == 2) // 16
z = i_z & 0xffff;
z = i_z & uint(0xffff);
else
z = i_z;
@ -312,7 +312,7 @@ vec4 wrapuv(vec4 uv)
}
else if(PS_WMS == 3)
{
uv_out = vec4(((ivec4(uv * WH.xyxy) & MskFix.xyxy) | MskFix.zwzw) / WH.xyxy);
uv_out = vec4(((ivec4(uv * WH.xyxy) & ivec4(MskFix.xyxy)) | ivec4(MskFix.zwzw)) / WH.xyxy);
}
}
else
@ -323,7 +323,7 @@ vec4 wrapuv(vec4 uv)
}
else if(PS_WMS == 3)
{
uv_out.xz = vec2(((ivec2(uv.xz * WH.xx) & MskFix.xx) | MskFix.zz) / WH.xx);
uv_out.xz = vec2(((ivec2(uv.xz * WH.xx) & ivec2(MskFix.xx)) | ivec2(MskFix.zz)) / WH.xx);
}
if(PS_WMT == 2)
{
@ -331,7 +331,7 @@ vec4 wrapuv(vec4 uv)
}
else if(PS_WMT == 3)
{
uv_out.yw = vec2(((ivec2(uv.yw * WH.yy) & MskFix.yy) | MskFix.ww) / WH.yy);
uv_out.yw = vec2(((ivec2(uv.yw * WH.yy) & ivec2(MskFix.yy)) | ivec2(MskFix.ww)) / WH.yy);
}
}