i965: Use float calculations when double is unnecessary.
authorMatt Turner <mattst88@gmail.com>
Sun, 12 Jul 2015 07:13:45 +0000 (00:13 -0700)
committerMatt Turner <mattst88@gmail.com>
Wed, 29 Jul 2015 16:34:51 +0000 (09:34 -0700)
commitc1da15709a0c0c2775bd9e534f67c60f7dc95ce8
tree67fa5a5d7ad58315d8ca012239f5a83e74fd668d
parentc67ce2bd3b27a26d7f5665f296d307c0de39b720
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 <itoral@igalia.com>
14 files changed:
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c
src/mesa/drivers/dri/i965/brw_misc_state.c
src/mesa/drivers/dri/i965/brw_sampler_state.c
src/mesa/drivers/dri/i965/brw_sf_state.c
src/mesa/drivers/dri/i965/brw_state_cache.c
src/mesa/drivers/dri/i965/brw_util.h
src/mesa/drivers/dri/i965/gen6_multisample_state.c
src/mesa/drivers/dri/i965/gen6_sf_state.c
src/mesa/drivers/dri/i965/gen7_sf_state.c
src/mesa/drivers/dri/i965/gen7_urb.c
src/mesa/drivers/dri/i965/gen8_sf_state.c