From 7b89fcec416ed7e6ddadec2438aab63609d825f8 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Tue, 22 May 2018 02:12:38 +0200 Subject: llvmpipe: improve rasterization discard logic This unifies the explicit rasterization discard as well as the implicit rasterization disabled logic (which we need for another state tracker), which really should do the exact same thing. We'll now toss out the prims early on in setup with (implicit or explicit) discard, rather than do setup and binning with them, which was entirely pointless. (We should eventually get rid of implicit discard, which should also enable us to discard stuff already in draw, hence draw would be able to skip the pointless clip and fallback stages in this case.) We still need separate logic for only null ps - this is not the same as rasterization discard. But simplify the logic there and don't count primitives simply when there's an empty fs, regardless of depth/stencil tests, which seems perfectly acceptable by d3d10. While here, also fix statistics for primitives if face culling is enabled. No piglit changes. Reviewed-by: Brian Paul Reviewed-by: Jose Fonseca --- src/gallium/drivers/llvmpipe/lp_scene.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers/llvmpipe/lp_scene.c') diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c index dfad9fabb20..ef0136c4fd2 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene.c +++ b/src/gallium/drivers/llvmpipe/lp_scene.c @@ -507,15 +507,14 @@ end: } -void lp_scene_begin_binning( struct lp_scene *scene, - struct pipe_framebuffer_state *fb, boolean discard ) +void lp_scene_begin_binning(struct lp_scene *scene, + struct pipe_framebuffer_state *fb) { int i; unsigned max_layer = ~0; assert(lp_scene_is_empty(scene)); - scene->discard = discard; util_copy_framebuffer_state(&scene->fb, fb); scene->tiles_x = align(fb->width, TILE_SIZE) / TILE_SIZE; -- cgit v1.2.3