summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/common/meta.c6
-rw-r--r--src/mesa/drivers/common/meta_blit.c8
2 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 2dec2c34eda..d415e610f9a 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -52,6 +52,7 @@
#include "main/matrix.h"
#include "main/mipmap.h"
#include "main/multisample.h"
+#include "main/objectlabel.h"
#include "main/pixel.h"
#include "main/pbo.h"
#include "main/polygon.h"
@@ -178,6 +179,7 @@ _mesa_meta_setup_blit_shader(struct gl_context *ctx,
GLuint vs, fs;
void *const mem_ctx = ralloc_context(NULL);
struct blit_shader *shader = choose_blit_shader(target, table);
+ char *name;
assert(shader != NULL);
@@ -253,6 +255,8 @@ _mesa_meta_setup_blit_shader(struct gl_context *ctx,
_mesa_BindAttribLocation(shader->shader_prog, 0, "position");
_mesa_BindAttribLocation(shader->shader_prog, 1, "texcoords");
_mesa_meta_link_program_with_debug(ctx, shader->shader_prog);
+ name = ralloc_asprintf(mem_ctx, "%s blit", shader->type);
+ _mesa_ObjectLabel(GL_PROGRAM, shader->shader_prog, -1, name);
ralloc_free(mem_ctx);
_mesa_UseProgram(shader->shader_prog);
@@ -1605,6 +1609,8 @@ meta_glsl_clear_init(struct gl_context *ctx, struct clear_state *clear)
* BindFragDataLocation to 0.
*/
+ _mesa_ObjectLabel(GL_PROGRAM, clear->IntegerShaderProg, -1,
+ "integer clear");
_mesa_meta_link_program_with_debug(ctx, clear->IntegerShaderProg);
clear->IntegerColorLocation =
diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c
index 112fbb15a9e..1bc5d94726c 100644
--- a/src/mesa/drivers/common/meta_blit.c
+++ b/src/mesa/drivers/common/meta_blit.c
@@ -36,6 +36,7 @@
#include "main/macros.h"
#include "main/matrix.h"
#include "main/multisample.h"
+#include "main/objectlabel.h"
#include "main/readpix.h"
#include "main/shaderapi.h"
#include "main/texobj.h"
@@ -96,6 +97,7 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx,
bool dst_is_msaa = false;
GLenum src_datatype;
const char *vec4_prefix;
+ char *name;
if (src_rb) {
src_datatype = _mesa_get_format_datatype(src_rb->Format);
@@ -172,6 +174,7 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx,
if (dst_is_msaa) {
arb_sample_shading_extension_string = "#extension GL_ARB_sample_shading : enable";
sample_index = "gl_SampleID";
+ name = "depth MSAA copy";
} else {
/* Don't need that extension, since we're drawing to a single-sampled
* destination.
@@ -188,6 +191,7 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx,
* We're slacking and instead of choosing centermost, we've got 0.
*/
sample_index = "0";
+ name = "depth MSAA resolve";
}
vs_source = ralloc_asprintf(mem_ctx,
@@ -222,6 +226,9 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx,
char *sample_resolve;
const char *arb_sample_shading_extension_string;
const char *merge_function;
+ name = ralloc_asprintf(mem_ctx, "%svec4 MSAA %s",
+ vec4_prefix,
+ dst_is_msaa ? "copy" : "resolve");
samples = MAX2(src_rb->NumSamples, 1);
@@ -329,6 +336,7 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx,
_mesa_BindAttribLocation(blit->msaa_shaders[shader_index], 0, "position");
_mesa_BindAttribLocation(blit->msaa_shaders[shader_index], 1, "texcoords");
_mesa_meta_link_program_with_debug(ctx, blit->msaa_shaders[shader_index]);
+ _mesa_ObjectLabel(GL_PROGRAM, blit->msaa_shaders[shader_index], -1, name);
ralloc_free(mem_ctx);
_mesa_UseProgram(blit->msaa_shaders[shader_index]);