diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index 32a70e4264a..37111431947 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -23,6 +23,7 @@ */ #include "util/glheader.h" +#include "util/perf/cpu_trace.h" #include "blend.h" #include "bufferobj.h" @@ -1046,6 +1047,8 @@ read_pixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, struct gl_renderbuffer *rb; struct gl_pixelstore_attrib clippedPacking; + MESA_TRACE_FUNC(); + GET_CURRENT_CONTEXT(ctx); FLUSH_VERTICES(ctx, 0, 0); diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index d79fdbd211b..06c705d961a 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1225,6 +1225,8 @@ _mesa_compile_shader(struct gl_context *ctx, struct gl_shader *sh) _mesa_log_direct(sh->Source); } + MESA_TRACE_FUNC(); + ensure_builtin_types(ctx); /* this call will set the shader->CompileStatus field to indicate if diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 3ff51ca7611..419bdf8ec2b 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -31,6 +31,7 @@ #include #include "util/glheader.h" +#include "util/perf/cpu_trace.h" #include "bufferobj.h" #include "context.h" #include "enums.h" @@ -3164,6 +3165,8 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims, mesa_format texFormat; bool dimensionsOK = true, sizeOK = true; + MESA_TRACE_FUNC(); + FLUSH_VERTICES(ctx, 0, 0); if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) { @@ -3828,6 +3831,8 @@ texture_sub_image(struct gl_context *ctx, GLuint dims, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels) { + MESA_TRACE_FUNC(); + FLUSH_VERTICES(ctx, 0, 0); _mesa_update_pixel(ctx); @@ -4460,6 +4465,8 @@ copy_texture_sub_image(struct gl_context *ctx, GLuint dims, { struct gl_texture_image *texImage; + MESA_TRACE_FUNC(); + _mesa_lock_texture(ctx, texObj); texImage = _mesa_select_tex_image(texObj, target, level); @@ -4560,6 +4567,8 @@ copyteximage(struct gl_context *ctx, GLuint dims, struct gl_texture_object *texO struct gl_texture_image *texImage; mesa_format texFormat; + MESA_TRACE_FUNC(); + FLUSH_VERTICES(ctx, 0, 0); if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c index 55746c08fec..f0c1801320e 100644 --- a/src/mesa/main/texstorage.c +++ b/src/mesa/main/texstorage.c @@ -28,6 +28,7 @@ */ #include "util/glheader.h" +#include "util/perf/cpu_trace.h" #include "context.h" #include "enums.h" @@ -535,6 +536,8 @@ texture_storage(struct gl_context *ctx, GLuint dims, (memObj ? "Mem" : ""); const char* suffix2 = attribs ? "Attribs" : ""; + MESA_TRACE_FUNC(); + assert(texObj); if (!no_error) { diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 290d4c14bc1..6df165c3723 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -62,6 +62,7 @@ #include "util/u_draw.h" #include "util/u_upload_mgr.h" #include "util/u_threaded_context.h" +#include "util/perf/cpu_trace.h" #include "draw/draw_context.h" #include "cso_cache/cso_context.h" @@ -117,6 +118,8 @@ st_draw_gallium(struct gl_context *ctx, const struct pipe_draw_start_count_bias *draws, unsigned num_draws) { + MESA_TRACE_FUNC(); + struct st_context *st = st_context(ctx); cso_draw_vbo(st->cso_context, info, drawid_offset, indirect, draws, num_draws); diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c index db57f3081fd..c427e08e788 100644 --- a/src/util/format/u_format.c +++ b/src/util/format/u_format.c @@ -37,6 +37,7 @@ #include "util/format/u_format.h" #include "util/format/u_format_s3tc.h" #include "util/u_math.h" +#include "util/perf/cpu_trace.h" /** * Copy 2D rect from one place to another. @@ -56,6 +57,8 @@ util_copy_rect(void * dst_in, unsigned src_x, unsigned src_y) { + MESA_TRACE_SCOPE("%s width=%u height=%u", __func__, width, height); + uint8_t *dst = dst_in; const uint8_t *src = src_in; unsigned i;