i965/urb: fixes division by zero
[mesa.git] / src / mesa / drivers / dri / i965 / gen6_viewport_state.c
index 7c8d8849f4e1d354c8cb39c34a23f9eaef65da17..eacffb9ba0f459e20712355372210b9e948d291b 100644 (file)
@@ -73,7 +73,8 @@ gen6_upload_clip_vp(struct brw_context *brw)
 const struct brw_tracked_state gen6_clip_vp = {
    .dirty = {
       .mesa = _NEW_VIEWPORT,
-      .brw = BRW_NEW_BATCH,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_BLORP,
    },
    .emit = gen6_upload_clip_vp,
 };
@@ -101,7 +102,7 @@ gen6_upload_sf_vp(struct brw_context *brw)
    }
 
    for (unsigned i = 0; i < ctx->Const.MaxViewports; i++) {
-      double scale[3], translate[3];
+      float scale[3], translate[3];
 
       /* _NEW_VIEWPORT */
       _mesa_get_viewport_xform(ctx, i, scale, translate);
@@ -121,7 +122,8 @@ const struct brw_tracked_state gen6_sf_vp = {
    .dirty = {
       .mesa = _NEW_BUFFERS |
               _NEW_VIEWPORT,
-      .brw = BRW_NEW_BATCH,
+      .brw = BRW_NEW_BATCH |
+             BRW_NEW_BLORP,
    },
    .emit = gen6_upload_sf_vp,
 };
@@ -143,6 +145,7 @@ const struct brw_tracked_state gen6_viewport_state = {
    .dirty = {
       .mesa = 0,
       .brw = BRW_NEW_BATCH |
+             BRW_NEW_BLORP |
              BRW_NEW_CC_VP |
              BRW_NEW_CLIP_VP |
              BRW_NEW_SF_VP |