wined3d: Check the GLSL info log for all shaders.

This commit is contained in:
Henri Verbeet 2010-08-24 18:43:21 +02:00 committed by Alexandre Julliard
parent 87e12b8b6a
commit 2af746b96e

View File

@ -254,6 +254,17 @@ static void print_glsl_info_log(const struct wined3d_gl_info *gl_info, GLhandleA
} }
} }
/* GL locking is done by the caller. */
static void shader_glsl_compile(const struct wined3d_gl_info *gl_info, GLhandleARB shader, const char *src)
{
TRACE("Compiling shader object %u.\n", shader);
GL_EXTCALL(glShaderSourceARB(shader, 1, &src, NULL));
checkGLcall("glShaderSourceARB");
GL_EXTCALL(glCompileShaderARB(shader));
checkGLcall("glCompileShaderARB");
print_glsl_info_log(gl_info, shader);
}
/* GL locking is done by the caller. */ /* GL locking is done by the caller. */
static void shader_glsl_dump_program_source(const struct wined3d_gl_info *gl_info, GLhandleARB program) static void shader_glsl_dump_program_source(const struct wined3d_gl_info *gl_info, GLhandleARB program)
{ {
@ -3911,10 +3922,7 @@ static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer
ret = GL_EXTCALL(glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB)); ret = GL_EXTCALL(glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB));
checkGLcall("glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB)"); checkGLcall("glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB)");
GL_EXTCALL(glShaderSourceARB(ret, 1, (const char**)&buffer->buffer, NULL)); shader_glsl_compile(gl_info, ret, buffer->buffer);
checkGLcall("glShaderSourceARB(ret, 1, &buffer->buffer, NULL)");
GL_EXTCALL(glCompileShaderARB(ret));
checkGLcall("glCompileShaderARB(ret)");
return ret; return ret;
} }
@ -4035,9 +4043,7 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context
shader_addline(buffer, "}\n"); shader_addline(buffer, "}\n");
TRACE("Compiling shader object %u\n", shader_obj); TRACE("Compiling shader object %u\n", shader_obj);
GL_EXTCALL(glShaderSourceARB(shader_obj, 1, (const char**)&buffer->buffer, NULL)); shader_glsl_compile(gl_info, shader_obj, buffer->buffer);
GL_EXTCALL(glCompileShaderARB(shader_obj));
print_glsl_info_log(gl_info, shader_obj);
/* Store the shader object */ /* Store the shader object */
return shader_obj; return shader_obj;
@ -4110,9 +4116,7 @@ static GLuint shader_glsl_generate_vshader(const struct wined3d_context *context
shader_addline(buffer, "}\n"); shader_addline(buffer, "}\n");
TRACE("Compiling shader object %u\n", shader_obj); TRACE("Compiling shader object %u\n", shader_obj);
GL_EXTCALL(glShaderSourceARB(shader_obj, 1, (const char**)&buffer->buffer, NULL)); shader_glsl_compile(gl_info, shader_obj, buffer->buffer);
GL_EXTCALL(glCompileShaderARB(shader_obj));
print_glsl_info_log(gl_info, shader_obj);
return shader_obj; return shader_obj;
} }
@ -4546,12 +4550,10 @@ static GLhandleARB create_glsl_blt_shader(const struct wined3d_gl_info *gl_info,
} }
vshader_id = GL_EXTCALL(glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB)); vshader_id = GL_EXTCALL(glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB));
GL_EXTCALL(glShaderSourceARB(vshader_id, 1, &blt_vshader, NULL)); shader_glsl_compile(gl_info, vshader_id, blt_vshader);
GL_EXTCALL(glCompileShaderARB(vshader_id));
pshader_id = GL_EXTCALL(glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB)); pshader_id = GL_EXTCALL(glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB));
GL_EXTCALL(glShaderSourceARB(pshader_id, 1, &blt_pshader, NULL)); shader_glsl_compile(gl_info, pshader_id, blt_pshader);
GL_EXTCALL(glCompileShaderARB(pshader_id));
program_id = GL_EXTCALL(glCreateProgramObjectARB()); program_id = GL_EXTCALL(glCreateProgramObjectARB());
GL_EXTCALL(glAttachObjectARB(program_id, vshader_id)); GL_EXTCALL(glAttachObjectARB(program_id, vshader_id));