summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2011-05-17 14:28:20 -0700
committerKenneth Graunke <[email protected]>2011-06-06 11:06:04 -0700
commitf9a3200adb1bc70f789c829661a92e3d24023dcf (patch)
tree3136148ebad05714b623c38ea11fd0ee0df89ebc
parente5d241ddb231758e0a0f41eee28435d170d583c0 (diff)
i965: Update SF_CLIP_VIEWPORT state dumping for Ivybridge.
Signed-off-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_dump.c40
1 files changed, 38 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c
index ef58619702d..b520e648878 100644
--- a/src/mesa/drivers/dri/i965/brw_state_dump.c
+++ b/src/mesa/drivers/dri/i965/brw_state_dump.c
@@ -210,6 +210,8 @@ static void dump_sf_viewport_state(struct brw_context *brw)
struct brw_sf_viewport *vp;
uint32_t vp_off;
+ assert(intel->gen < 7);
+
drm_intel_bo_map(intel->batch.bo, GL_FALSE);
vp = intel->batch.bo->virtual + brw->sf.vp_offset;
@@ -237,6 +239,8 @@ static void dump_clip_viewport_state(struct brw_context *brw)
struct brw_clipper_viewport *vp;
uint32_t vp_off;
+ assert(intel->gen < 7);
+
drm_intel_bo_map(intel->batch.bo, GL_FALSE);
vp = intel->batch.bo->virtual + brw->clip.vp_offset;
@@ -249,6 +253,34 @@ static void dump_clip_viewport_state(struct brw_context *brw)
drm_intel_bo_unmap(intel->batch.bo);
}
+static void dump_sf_clip_viewport_state(struct brw_context *brw)
+{
+ struct intel_context *intel = &brw->intel;
+ const char *name = "SF_CLIP VP";
+ struct gen7_sf_clip_viewport *vp;
+ uint32_t vp_off;
+
+ assert(intel->gen >= 7);
+
+ drm_intel_bo_map(intel->batch.bo, GL_FALSE);
+
+ vp = intel->batch.bo->virtual + brw->sf.vp_offset;
+ vp_off = intel->batch.bo->offset + brw->sf.vp_offset;
+
+ state_out(name, vp, vp_off, 0, "m00 = %f\n", vp->viewport.m00);
+ state_out(name, vp, vp_off, 1, "m11 = %f\n", vp->viewport.m11);
+ state_out(name, vp, vp_off, 2, "m22 = %f\n", vp->viewport.m22);
+ state_out(name, vp, vp_off, 3, "m30 = %f\n", vp->viewport.m30);
+ state_out(name, vp, vp_off, 4, "m31 = %f\n", vp->viewport.m31);
+ state_out(name, vp, vp_off, 5, "m32 = %f\n", vp->viewport.m32);
+ state_out(name, vp, vp_off, 6, "guardband xmin = %f\n", vp->guardband.xmin);
+ state_out(name, vp, vp_off, 7, "guardband xmax = %f\n", vp->guardband.xmax);
+ state_out(name, vp, vp_off, 8, "guardband ymin = %f\n", vp->guardband.ymin);
+ state_out(name, vp, vp_off, 9, "guardband ymax = %f\n", vp->guardband.ymax);
+ drm_intel_bo_unmap(intel->batch.bo);
+}
+
+
static void dump_cc_viewport_state(struct brw_context *brw)
{
struct intel_context *intel = &brw->intel;
@@ -406,7 +438,12 @@ void brw_debug_batch(struct intel_context *intel)
sizeof(struct brw_sf_unit_state));
brw_debug_prog("SF prog", brw->sf.prog_bo);
}
- dump_sf_viewport_state(brw);
+ if (intel->gen >= 7)
+ dump_sf_clip_viewport_state(brw);
+ else
+ dump_sf_viewport_state(brw);
+ if (intel->gen == 6)
+ dump_clip_viewport_state(brw);
if (intel->gen < 6)
state_struct_out("WM", intel->batch.bo, brw->wm.state_offset,
@@ -415,7 +452,6 @@ void brw_debug_batch(struct intel_context *intel)
if (intel->gen >= 6) {
dump_cc_viewport_state(brw);
- dump_clip_viewport_state(brw);
dump_depth_stencil_state(brw);
dump_cc_state(brw);
dump_blend_state(brw);