diff options
author | Roland Scheidegger <[email protected]> | 2013-05-30 02:05:01 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2013-05-31 20:21:05 +0200 |
commit | 869c5d438f137b2c6b9aec1dddc00bfa64f36621 (patch) | |
tree | 893e668a17c701d88ef2af0afa6cbfceb1beacb1 /src/gallium/drivers/freedreno/freedreno_screen.c | |
parent | e881c9a5dc5457f0b096a3c583c5b1450beb89e9 (diff) |
llvmpipe: reduce alignment requirement for resources from 64x64 to 4x4
The overallocation was very bad especially for things like 1d array
textures which got blown up by a factor of 64. (Even ordinary smallish
2d textures benefit a lot from this, a mipmapped 64x64 rgba8 texture
previously used 7*16kB = 112kB instead of now ~22kB.)
4x4 is chosen because this is the size the jit functions run on, so
making it smaller is going to be a bit more complicated.
It is actually not strictly 4x4 pixel, since we'd want to avoid situations
where different threads are rendering to the same cacheline so we keep
cacheline size alignment in x direction (often 64bytes).
To make this work introduce new task width/height parameters and make
sure clears don't clear the whole tile if it's a partial tile. Likewise,
the rasterizer may produce fragments outside the 4x4 blocks present in a
tile, so don't call the jit function for them.
This does not yet fix rendering to buffers (which cannot have any y
alignment at all), and 1d/1d array textures are still overallocated by a
factor of 4.
v2: replace magic number 4 with LP_RASTER_BLOCK_SIZE, fix size of buffers
allocated (needed in case we render to them).
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_screen.c')
0 files changed, 0 insertions, 0 deletions