aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2007-12-17 11:11:18 -0800
committerEric Anholt <[email protected]>2007-12-17 13:02:16 -0800
commitb3169a9c35ae2d943d1e84dfa6cc99e94f782ca7 (patch)
tree199da0090613f33ce4ea0b7756d07dc258870773 /src
parent1e0413230648f5ed18bfbdfcb87bf63473ed91b2 (diff)
[965] Output the buffer type in INTEL_DEBUG=bat surface state decode.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_dump.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c
index 0bdccae0d69..9bcbbefd168 100644
--- a/src/mesa/drivers/dri/i965/brw_state_dump.c
+++ b/src/mesa/drivers/dri/i965/brw_state_dump.c
@@ -70,6 +70,20 @@ state_struct_out(const char *name, dri_bo *buffer, unsigned int state_size)
dri_bo_unmap(buffer);
}
+static const char *
+get_965_surfacetype(unsigned int surfacetype)
+{
+ switch (surfacetype) {
+ case 0: return "1D";
+ case 1: return "2D";
+ case 2: return "3D";
+ case 3: return "CUBE";
+ case 4: return "BUFFER";
+ case 7: return "NULL";
+ default: return "unknown";
+ }
+}
+
static void dump_wm_surface_state(struct brw_context *brw)
{
int i;
@@ -85,7 +99,8 @@ static void dump_wm_surface_state(struct brw_context *brw)
surf = (struct brw_surface_state *)(surf_bo->virtual);
sprintf(name, "WM SS%d", i);
- state_out(name, surf, surfoff, 0, "\n");
+ state_out(name, surf, surfoff, 0, "\n",
+ get_965_surfacetype(surf->ss0.surface_type));
state_out(name, surf, surfoff, 1, "offset\n");
state_out(name, surf, surfoff, 2, "%dx%d size, %d mips\n",
surf->ss2.width + 1, surf->ss2.height + 1, surf->ss2.mip_count);