diff options
author | Roland Scheidegger <[email protected]> | 2015-03-27 16:49:54 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2015-03-28 02:59:42 +0100 |
commit | b2424fb0304cf4afd363b35c1dab49fb7edddb08 (patch) | |
tree | 3acdd6cdb1107fab78297567d0d22ca60572b85d /src/gallium/drivers/llvmpipe/lp_scene.h | |
parent | 764fc2be5ab61c86baaab746e7ea7702328c4f9f (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_scene.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_scene.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.h b/src/gallium/drivers/llvmpipe/lp_scene.h index 19a38115afe..ad23c2009ac 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene.h +++ b/src/gallium/drivers/llvmpipe/lp_scene.h @@ -142,6 +142,7 @@ struct lp_scene { uint8_t *map; unsigned stride; unsigned layer_stride; + unsigned format_bytes; } zsbuf, cbufs[PIPE_MAX_COLOR_BUFS]; /* The amount of layers in the fb (minimum of all attachments) */ |