}
-static void dump_sf_viewport_state(struct brw_context *brw)
+static void dump_sf_viewport_state(struct brw_context *brw,
+ uint32_t offset)
{
struct intel_context *intel = &brw->intel;
const char *name = "SF VP";
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;
+ vp = intel->batch.bo->virtual + offset;
+ vp_off = intel->batch.bo->offset + 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);
drm_intel_bo_unmap(intel->batch.bo);
}
-static void dump_sf_clip_viewport_state(struct brw_context *brw)
+static void dump_sf_clip_viewport_state(struct brw_context *brw,
+ uint32_t offset)
{
struct intel_context *intel = &brw->intel;
const char *name = "SF_CLIP VP";
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;
+ vp = intel->batch.bo->virtual + offset;
+ vp_off = intel->batch.bo->offset + 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);
static void
dump_state_batch(struct brw_context *brw)
{
+ struct intel_context *intel = &brw->intel;
int i;
for (i = 0; i < brw->state_batch_count; i++) {
+ uint32_t offset = brw->state_batch_list[i].offset;
+
switch (brw->state_batch_list[i].type) {
case AUB_TRACE_CLIP_VP_STATE:
- dump_clip_viewport_state(brw, brw->state_batch_list[i].offset);
+ dump_clip_viewport_state(brw, offset);
+ break;
+ case AUB_TRACE_SF_VP_STATE:
+ if (intel->gen >= 7) {
+ dump_sf_clip_viewport_state(brw, offset);
+ } else {
+ dump_sf_viewport_state(brw, offset);
+ }
break;
default:
break;
sizeof(struct brw_sf_unit_state));
brw_debug_prog(brw, "SF prog", brw->sf.prog_offset);
}
- if (intel->gen >= 7)
- dump_sf_clip_viewport_state(brw);
- else
- dump_sf_viewport_state(brw);
if (intel->gen < 6)
state_struct_out("WM", intel->batch.bo, brw->wm.state_offset,