diff options
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_clip_state.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_clip_state.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_viewport_state.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_viewport_state.c | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip_state.c b/src/mesa/drivers/dri/i965/brw_clip_state.c index a0bdb43..021acc8 100644 --- a/src/mesa/drivers/dri/i965/brw_clip_state.c +++ b/src/mesa/drivers/dri/i965/brw_clip_state.c @@ -43,8 +43,8 @@ upload_clip_vp(struct brw_context *brw) sizeof(*vp), 32, &brw->clip.vp_offset); const float maximum_post_clamp_delta = 4096; - float gbx = maximum_post_clamp_delta / (float) ctx->Viewport.Width; - float gby = maximum_post_clamp_delta / (float) ctx->Viewport.Height; + float gbx = maximum_post_clamp_delta / ctx->Viewport.Width; + float gby = maximum_post_clamp_delta / ctx->Viewport.Height; vp->xmin = -gbx; vp->xmax = gbx; @@ -127,8 +127,8 @@ brw_upload_clip_unit(struct brw_context *brw) /* enable guardband clipping if we can */ if (ctx->Viewport.X == 0 && ctx->Viewport.Y == 0 && - ctx->Viewport.Width == fb->Width && - ctx->Viewport.Height == fb->Height) + ctx->Viewport.Width == (float) fb->Width && + ctx->Viewport.Height == (float) fb->Height) { clip->clip5.guard_band_enable = 1; clip->clip6.clipper_viewport_state_ptr = diff --git a/src/mesa/drivers/dri/i965/gen6_clip_state.c b/src/mesa/drivers/dri/i965/gen6_clip_state.c index 6cec0ff..8dcca84 100644 --- a/src/mesa/drivers/dri/i965/gen6_clip_state.c +++ b/src/mesa/drivers/dri/i965/gen6_clip_state.c @@ -98,8 +98,8 @@ upload_clip_state(struct brw_context *brw) if (ctx->Viewport.X == 0 && ctx->Viewport.Y == 0 && - ctx->Viewport.Width == fb->Width && - ctx->Viewport.Height == fb->Height) { + ctx->Viewport.Width == (float) fb->Width && + ctx->Viewport.Height == (float) fb->Height) { dw2 |= GEN6_CLIP_GB_TEST; } diff --git a/src/mesa/drivers/dri/i965/gen6_viewport_state.c b/src/mesa/drivers/dri/i965/gen6_viewport_state.c index 0335920..4c5135b 100644 --- a/src/mesa/drivers/dri/i965/gen6_viewport_state.c +++ b/src/mesa/drivers/dri/i965/gen6_viewport_state.c @@ -55,8 +55,8 @@ gen6_upload_clip_vp(struct brw_context *brw) * drawable. */ const float maximum_post_clamp_delta = 8192; - float gbx = maximum_post_clamp_delta / (float) ctx->Viewport.Width; - float gby = maximum_post_clamp_delta / (float) ctx->Viewport.Height; + float gbx = maximum_post_clamp_delta / ctx->Viewport.Width; + float gby = maximum_post_clamp_delta / ctx->Viewport.Height; vp->xmin = -gbx; vp->xmax = gbx; diff --git a/src/mesa/drivers/dri/i965/gen7_viewport_state.c b/src/mesa/drivers/dri/i965/gen7_viewport_state.c index 8c5fcac..66c1838 100644 --- a/src/mesa/drivers/dri/i965/gen7_viewport_state.c +++ b/src/mesa/drivers/dri/i965/gen7_viewport_state.c @@ -54,8 +54,8 @@ gen7_upload_sf_clip_viewport(struct brw_context *brw) * drawable. */ const float maximum_guardband_extent = 8192; - float gbx = maximum_guardband_extent / (float) ctx->Viewport.Width; - float gby = maximum_guardband_extent / (float) ctx->Viewport.Height; + float gbx = maximum_guardband_extent / ctx->Viewport.Width; + float gby = maximum_guardband_extent / ctx->Viewport.Height; vp->guardband.xmin = -gbx; vp->guardband.xmax = gbx; |