[Mesa-dev] [PATCH] meta: Call glObjectLabel before linking.

Jordan Justen jljusten at gmail.com
Tue Jul 1 00:55:15 PDT 2014


Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>

On Mon, Jun 30, 2014 at 5:55 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> i965 precompiles shaders at link time, and prints a disassembly if
> INTEL_DEBUG=vs,gs,fs, including the shader name.  However, blit shaders
> were showing up as "unnamed" since we hadn't set a name prior to
> linking.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/drivers/common/meta.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
> index 1a2e453..89d2d75 100644
> --- a/src/mesa/drivers/common/meta.c
> +++ b/src/mesa/drivers/common/meta.c
> @@ -217,6 +217,7 @@ _mesa_meta_compile_and_link_program(struct gl_context *ctx,
>                                                      fs_source);
>
>     *program = _mesa_CreateProgram();
> +   _mesa_ObjectLabel(GL_PROGRAM, *program, -1, name);
>     _mesa_AttachShader(*program, fs);
>     _mesa_DeleteShader(fs);
>     _mesa_AttachShader(*program, vs);
> @@ -224,7 +225,6 @@ _mesa_meta_compile_and_link_program(struct gl_context *ctx,
>     _mesa_BindAttribLocation(*program, 0, "position");
>     _mesa_BindAttribLocation(*program, 1, "texcoords");
>     _mesa_meta_link_program_with_debug(ctx, *program);
> -   _mesa_ObjectLabel(GL_PROGRAM, *program, -1, name);
>
>     _mesa_UseProgram(*program);
>  }
> --
> 2.0.0
>


More information about the mesa-dev mailing list