mesa/src
Kenneth Graunke b0629e6894 i965: Implement rasterizer discard via SOL unless required for queries.
We currently use CL_INVOCATION_COUNT for the GL_PRIMITIVES_GENERATED
query, which involves passing all primitives to the clipper.  When
rasterizer discard is enabled, we program the clipper in REJECT_ALL
mode, rather than using the SOL stage's "Rendering Disable" feature.

See commit f09b91f782 for an explanation
of why we implement GL_PRIMITIVES_GENERATED this way.

Apparently the SOL stage's "Rendering Disable" feature is a lot faster
than having the clipper reject all primitives.  It's safe to use when
no GL_PRIMITIVES_GENERATED query is active, as we don't care about
CL_INVOCATION_COUNT incrementing.

This patch makes us use SO_RENDERING_DISABLE when no query is active,
but continues falling back to the clipper in REJECT_ALL mode when the
queries are enabled.  It brings back the perf_debug for the clipper
case (which I removed in commit 1f9445ff57, thinking it wasn't useful).

Improves performance in Gl32GSCloth by 84.8303% +/- 2.07132% (n = 10)
on my Broadwell GT2 laptop.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-06-23 11:58:50 -07:00
..
compiler glsl: Don't constant propagate arrays. 2016-06-23 11:58:50 -07:00
egl Added pbuffer hooks for surfaceless platform 2016-06-14 08:51:02 -07:00
gallium swr: [rasterizer core] fix dependency bug 2016-06-23 10:51:11 -05:00
gbm Android: move libdrm settings to top-level Android.common.mk 2016-06-13 15:31:29 +01:00
getopt
glx glx: fix crash with bad fbconfig 2016-06-09 17:55:44 +03:00
gtest
hgl
intel anv: Use different BOs for different scratch sizes and stages 2016-06-22 12:39:45 -07:00
loader Android: move libdrm settings to top-level Android.common.mk 2016-06-13 15:31:29 +01:00
mapi glapi: add GL_EXT_window_rectangles entrypoints 2016-06-18 12:51:55 -04:00
mesa i965: Implement rasterizer discard via SOL unless required for queries. 2016-06-23 11:58:50 -07:00
util mesa/gallium: Move u_bit_scan{,64} from gallium to util. 2016-06-14 05:19:10 +02:00
Makefile.am automake: get in-tree `make distclean' working again. 2016-06-13 15:24:44 +01:00
SConscript scons: put the generated git_sha1.h file in top-level src/ directory 2016-06-17 10:33:00 -06:00