Commit b2f63c22 authored by Thomas Guillem's avatar Thomas Guillem

opengl: add a debug switch to display fragment shaders

parent f239c7cd
......@@ -56,6 +56,10 @@
# define GL_TEXTURE_LUMINANCE_SIZE 0x8060
#endif
#if 0
#define DUMP_SHADERS
#endif
static int GetTexFormatSize(opengl_tex_converter_t *tc, int target,
int tex_format, int tex_internal, int tex_type)
{
......@@ -699,6 +703,10 @@ opengl_fragment_shader_init_impl(opengl_tex_converter_t *tc, GLenum tex_target,
GLint length = ms.length;
tc->vt->ShaderSource(fragment_shader, 1, (const char **)&ms.ptr, &length);
tc->vt->CompileShader(fragment_shader);
#ifdef DUMP_SHADERS
fprintf(stderr, "\n=== Fragment shader for fourcc: %4.4s, colorspace: %d ===\n%s\n\n",
(const char *)&chroma, yuv_space, ms.ptr);
#endif
free(ms.ptr);
tc->tex_target = tex_target;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment