diff options
author | Matt Turner <[email protected]> | 2015-07-12 00:13:45 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-07-29 09:34:51 -0700 |
commit | c1da15709a0c0c2775bd9e534f67c60f7dc95ce8 (patch) | |
tree | 67fa5a5d7ad58315d8ca012239f5a83e74fd668d /src/mesa/drivers/dri/i965/gen6_sf_state.c | |
parent | c67ce2bd3b27a26d7f5665f296d307c0de39b720 (diff) |
i965: Use float calculations when double is unnecessary.
Literals without an f/F suffix are of type double, and implicit
conversion rules specify that the float in (float op double) be
converted to a double before the operation is performed. I believe float
execution was intended (in nearly all cases) or is sufficient (in the
case of gen7_urb.c).
Removes a lot of float <-> double conversion instructions and replaces
many double instructions with float instructions which are cheaper.
text data bss dec hex filename
4928659 195160 26192 5150011 4e953b i965_dri.so before
4928315 195152 26192 5149659 4e93db i965_dri.so after
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen6_sf_state.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_sf_state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c index b00517ed81e..4068f2844a2 100644 --- a/src/mesa/drivers/dri/i965/gen6_sf_state.c +++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c @@ -383,7 +383,7 @@ upload_sf_state(struct brw_context *brw) point_size = CLAMP(ctx->Point.Size, ctx->Point.MinSize, ctx->Point.MaxSize); /* Clamp to the hardware limits and convert to fixed point */ - dw4 |= U_FIXED(CLAMP(point_size, 0.125, 255.875), 3); + dw4 |= U_FIXED(CLAMP(point_size, 0.125f, 255.875f), 3); /* * Window coordinates in an FBO are inverted, which means point |