llvmpipe: simplify address calculation for 4x4 blocks
authorRoland Scheidegger <sroland@vmware.com>
Fri, 27 Mar 2015 15:49:54 +0000 (16:49 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Sat, 28 Mar 2015 01:59:42 +0000 (02:59 +0100)
commitb2424fb0304cf4afd363b35c1dab49fb7edddb08
tree3acdd6cdb1107fab78297567d0d22ca60572b85d
parent764fc2be5ab61c86baaab746e7ea7702328c4f9f
llvmpipe: simplify address calculation for 4x4 blocks

These functions looked quite complicated, even though what they actually did
was trivial (ever since we dropped swizzled rendering). Also drop lookup of
format block per bytes done for each block, and do it once per scene instead.
This improves everybody's favorite "benchmark" by 3% or so, though
lp_rast_shade_quads_all() which calls this shows up still quite high for a
function which does little more than call the jit function.
(This would most likely be much better handled by the jit function itself,
the strides are passed through anyway already, though for being able to
handle layers it would definitely add some complexity.)

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/drivers/llvmpipe/lp_rast.c
src/gallium/drivers/llvmpipe/lp_rast_priv.h
src/gallium/drivers/llvmpipe/lp_scene.c
src/gallium/drivers/llvmpipe/lp_scene.h