diff options
author | Roland Scheidegger <[email protected]> | 2013-06-05 00:17:22 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2013-06-05 00:29:47 +0200 |
commit | ffe2a1ca3c097661dd3f6e3ca5cfd72be184426c (patch) | |
tree | 8cd2bcebb61a96090c2996e745a01e983f602d8d /src/gallium/drivers/llvmpipe/lp_scene.h | |
parent | ef3e887084fbb36b9041faafc18fb75f6cfa7501 (diff) |
llvmpipe: reduce alignment requirement for 1d resources from 4x4 to 4x1
For rendering to buffers, we cannot have any y alignment.
So make sure that tile clear commands only clear up to the fb width/height,
not more (do this for all resources actually as clearing more seems
pointless for other resources too). For the jit fs function, skip execution
of the lower half of the fragment shader for the 4x4 stamp completely,
for depth/stencil only load/store the values from the first row
(replace other row with undef).
For the blend function, also only load half the values from fs output,
replace the rest with undefs so that everything still operates on the
full 4x4 block to keep code the same between 4x1 and 4x4 (except for
load/store of course which also needs to skip (store) or replace these
values with undefs (load))., at the cost of slightly less optimal code
being produced in some cases.
Also reduce 1d and 1d array alignment too, because they can be handled the
same as buffers so don't need to waste memory.
v2: don't try to run special blend code for 4x1, (very) slightly less
complexity if we just use the same code as for 4x4 which may or may not
make it easier to optimize in the future (as we care a lot more about 4x4
performance than 1d).
v2: don't use undef values for unused fs src outputs with llvm 3.1 as it
apparently can trigger a bug in llvm.
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 | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.h b/src/gallium/drivers/llvmpipe/lp_scene.h index bc6c448bc7f..fa5bbcaf013 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene.h +++ b/src/gallium/drivers/llvmpipe/lp_scene.h @@ -144,10 +144,6 @@ struct lp_scene { /** list of resources referenced by the scene commands */ struct resource_ref *resources; - /** aligned scene width, height */ - unsigned width_aligned; - unsigned height_aligned; - /** Total memory used by the scene (in bytes). This sums all the * data blocks and counts all bins, state, resource references and * other random allocations within the scene. |