From f05f8793c83c05a42eb74fc086b51e01a6b631b7 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 28 Jun 2013 19:36:04 -0700 Subject: [PATCH] i965: Move debug_batch hook out of the vtable. brw_debug_batch() is the only implementation of this function, so it makes sense to just call it directly. Signed-off-by: Kenneth Graunke Reviewed-by: Chad Versace --- src/mesa/drivers/dri/i965/brw_vtbl.c | 1 - src/mesa/drivers/dri/i965/intel_batchbuffer.c | 4 ++-- src/mesa/drivers/dri/i965/intel_context.h | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c index e6f8456ba7f..fbf38f29b9e 100644 --- a/src/mesa/drivers/dri/i965/brw_vtbl.c +++ b/src/mesa/drivers/dri/i965/brw_vtbl.c @@ -159,7 +159,6 @@ void brwInitVtbl( struct brw_context *brw ) brw->intel.vtbl.new_batch = brw_new_batch; brw->intel.vtbl.finish_batch = brw_finish_batch; brw->intel.vtbl.destroy = brw_destroy_context; - brw->intel.vtbl.debug_batch = brw_debug_batch; brw->intel.vtbl.annotate_aub = brw_annotate_aub; assert(brw->intel.gen >= 4); diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c index a5386910e22..b782966ac2d 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c @@ -31,6 +31,7 @@ #include "intel_reg.h" #include "intel_bufmgr.h" #include "intel_buffers.h" +#include "brw_context.h" static void intel_batchbuffer_reset(struct intel_context *intel); @@ -165,8 +166,7 @@ do_batch_dump(struct intel_context *intel) if (ret == 0) { drm_intel_bo_unmap(batch->bo); - if (intel->vtbl.debug_batch != NULL) - intel->vtbl.debug_batch(intel); + brw_debug_batch(intel); } } diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h index 97fdc9776ef..d3e09b73adc 100644 --- a/src/mesa/drivers/dri/i965/intel_context.h +++ b/src/mesa/drivers/dri/i965/intel_context.h @@ -119,7 +119,6 @@ struct intel_context void (*finish_batch) (struct intel_context * intel); void (*new_batch) (struct intel_context * intel); - void (*debug_batch)(struct intel_context *intel); void (*annotate_aub)(struct intel_context *intel); void (*update_texture_surface)(struct gl_context *ctx, -- 2.30.2