i965: Add debug to INTEL_DEBUG=blorp describing hiz/blit/clear ops.

I think we've all added instrumentation at one point or another to see
what's being called in blorp.  Now you can quickly get output like:

Testing glCopyPixels(depth).
intel_hiz_exec depth clear to mt 0x16d9160 level 0 layer 0
intel_hiz_exec depth resolve to mt 0x16d9160 level 0 layer 0
intel_hiz_exec hiz ambiguate to mt 0x16d9160 level 0 layer 0
intel_hiz_exec depth resolve to mt 0x16d9160 level 0 layer 0

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Eric Anholt 2013-05-30 14:53:55 -07:00
parent da00782ed8
commit a2ca98b211
3 changed files with 39 additions and 0 deletions

View file

@ -29,6 +29,8 @@
#include "gen6_blorp.h"
#include "gen7_blorp.h"
#define FILE_DEBUG_FLAG DEBUG_BLORP
brw_blorp_mip_info::brw_blorp_mip_info()
: mt(NULL),
level(0),
@ -160,6 +162,26 @@ void
intel_hiz_exec(struct intel_context *intel, struct intel_mipmap_tree *mt,
unsigned int level, unsigned int layer, gen6_hiz_op op)
{
const char *opname = NULL;
switch (op) {
case GEN6_HIZ_OP_DEPTH_RESOLVE:
opname = "depth resolve";
break;
case GEN6_HIZ_OP_HIZ_RESOLVE:
opname = "hiz ambiguate";
break;
case GEN6_HIZ_OP_DEPTH_CLEAR:
opname = "depth clear";
break;
case GEN6_HIZ_OP_NONE:
opname = "noop?";
break;
}
DBG("%s %s to mt %p level %d layer %d\n",
__FUNCTION__, opname, mt, level, layer);
brw_hiz_op_params params(mt, level, layer, op);
brw_blorp_exec(intel, &params);
}

View file

@ -34,6 +34,7 @@
#include "brw_eu.h"
#include "brw_state.h"
#define FILE_DEBUG_FLAG DEBUG_BLORP
/**
* Helper function for handling mirror image blits.
@ -144,6 +145,15 @@ brw_blorp_blit_miptrees(struct intel_context *intel,
intel_miptree_slice_resolve_depth(intel, src_mt, src_level, src_layer);
intel_miptree_slice_resolve_depth(intel, dst_mt, dst_level, dst_layer);
DBG("%s from %s mt %p %d %d (%f,%f) (%f,%f)"
"to %s mt %p %d %d (%f,%f) (%f,%f) (flip %d,%d)\n",
__FUNCTION__,
_mesa_get_format_name(src_mt->format), src_mt,
src_level, src_layer, src_x0, src_y0, src_x1, src_y1,
_mesa_get_format_name(dst_mt->format), dst_mt,
dst_level, dst_layer, dst_x0, dst_y0, dst_x1, dst_y1,
mirror_x, mirror_y);
brw_blorp_blit_params params(brw_context(&intel->ctx),
src_mt, src_level, src_layer,
dst_mt, dst_level, dst_layer,

View file

@ -37,6 +37,8 @@ extern "C" {
#include "brw_eu.h"
#include "brw_state.h"
#define FILE_DEBUG_FLAG DEBUG_BLORP
struct brw_blorp_const_color_prog_key
{
bool use_simd16_replicated_data;
@ -489,6 +491,9 @@ brw_blorp_clear_color(struct intel_context *intel, struct gl_framebuffer *fb,
}
}
DBG("%s to mt %p level %d layer %d\n", __FUNCTION__,
irb->mt, irb->mt_level, irb->mt_layer);
brw_blorp_exec(intel, &params);
if (is_fast_clear) {
@ -508,6 +513,8 @@ brw_blorp_resolve_color(struct intel_context *intel, struct intel_mipmap_tree *m
{
struct brw_context *brw = brw_context(&intel->ctx);
DBG("%s to mt %p\n", __FUNCTION__, mt);
brw_blorp_rt_resolve_params params(brw, mt);
brw_blorp_exec(intel, &params);
mt->mcs_state = INTEL_MCS_STATE_RESOLVED;