diff --git a/gsk/gskdebug.c b/gsk/gskdebug.c index 4b315b0863..c52c019947 100644 --- a/gsk/gskdebug.c +++ b/gsk/gskdebug.c @@ -6,6 +6,7 @@ static const GDebugKey gsk_debug_keys[] = { { "renderer", GSK_DEBUG_RENDERER }, { "cairo", GSK_DEBUG_CAIRO }, { "opengl", GSK_DEBUG_OPENGL }, + { "shaders", GSK_DEBUG_SHADERS }, }; #endif diff --git a/gsk/gskdebugprivate.h b/gsk/gskdebugprivate.h index 48b2f92735..a62ce2d8a2 100644 --- a/gsk/gskdebugprivate.h +++ b/gsk/gskdebugprivate.h @@ -9,7 +9,8 @@ typedef enum { GSK_DEBUG_RENDER_NODE = 1 << 0, GSK_DEBUG_RENDERER = 1 << 1, GSK_DEBUG_CAIRO = 1 << 2, - GSK_DEBUG_OPENGL = 1 << 3 + GSK_DEBUG_OPENGL = 1 << 3, + GSK_DEBUG_SHADERS = 1 << 4 } GskDebugFlags; typedef enum { diff --git a/gsk/gskshaderbuilder.c b/gsk/gskshaderbuilder.c index 8e3729429f..c37a203349 100644 --- a/gsk/gskshaderbuilder.c +++ b/gsk/gskshaderbuilder.c @@ -260,11 +260,12 @@ gsk_shader_builder_compile_shader (GskShaderBuilder *builder, glCompileShader (shader_id); #ifdef G_ENABLE_DEBUG - if (GSK_DEBUG_CHECK (OPENGL)) + if (GSK_DEBUG_CHECK (SHADERS)) { - g_print ("*** Compiling %s shader ***\n" + g_print ("*** Compiling %s shader from '%s' + '%s' ***\n" "%s\n", shader_type == GL_VERTEX_SHADER ? "vertex" : "fragment", + shader_preamble, shader_source, source); } #endif @@ -395,7 +396,7 @@ gsk_shader_builder_create_program (GskShaderBuilder *builder, g_hash_table_insert (builder->programs, GINT_TO_POINTER (program_id), program); #ifdef G_ENABLE_DEBUG - if (GSK_DEBUG_CHECK (OPENGL)) + if (GSK_DEBUG_CHECK (SHADERS)) { GHashTableIter iter; gpointer name_p, location_p;