mirror of https://github.com/PCSX2/pcsx2.git
gsdx (ogl):
* Don't try to allocate a "null" array when shader log is empty * glsl: hopefully implicit cast error on Nvidia driver git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5542 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
c78b6157cb
commit
580f7a2e3d
|
@ -1359,7 +1359,7 @@ void GSDeviceOGL::CompileShaderFromSource(const std::string& glsl_file, const st
|
|||
#endif
|
||||
|
||||
// Check the correctness of the (AMD) driver
|
||||
// Note: glGetFragDataLocation crash too!!! Catalyst 12.10 => HD 6XXX
|
||||
// Note: glGetFragDataLocation crash too!!! Catalyst 12.10 (and later) => HD 5XXX,6XXX !!!
|
||||
if (theApp.GetConfig("renderer", 0) == 12) {
|
||||
GLint slot = glGetFragDataLocation(*program, "SV_Target1");
|
||||
if (slot == 0) { // <=> SV_Target1 used same slot as SV_Target0
|
||||
|
@ -1378,16 +1378,19 @@ void GSDeviceOGL::CompileShaderFromSource(const std::string& glsl_file, const st
|
|||
|
||||
if (theApp.GetConfig("debug_ogl_shader", 1) == 1) {
|
||||
// Print a nice debug log
|
||||
GLint log_length = 0;
|
||||
glGetProgramiv(*program, GL_INFO_LOG_LENGTH, &log_length);
|
||||
|
||||
char* log = (char*)malloc(log_length);
|
||||
glGetProgramInfoLog(*program, log_length, NULL, log);
|
||||
|
||||
fprintf(stderr, "%s (entry %s, prog %d) :", glsl_file.c_str(), entry.c_str(), *program);
|
||||
fprintf(stderr, "\n%s", macro_sel.c_str());
|
||||
fprintf(stderr, "%s\n", log);
|
||||
|
||||
GLint log_length = 0;
|
||||
glGetProgramiv(*program, GL_INFO_LOG_LENGTH, &log_length);
|
||||
if (log_length > 0) {
|
||||
char* log = (char*)malloc(log_length);
|
||||
glGetProgramInfoLog(*program, log_length, NULL, log);
|
||||
fprintf(stderr, "%s", log);
|
||||
free(log);
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -443,7 +443,7 @@ vec4 sample_color(vec2 st, float q)
|
|||
}
|
||||
|
||||
// PERF: see the impact of the exansion before/after the interpolation
|
||||
for (uint i = 0; i < 4; i++)
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if((PS_FMT & ~FMT_PAL) == FMT_24)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue