From 96d43f2d087e23ab692d43fc48fe1be30e923ae0 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 4 May 2016 23:44:25 -0700 Subject: i965: Reimplement ARB_transform_feedback2 on Haswell and later. My old implementation accumulated pairs in a buffer, and eventually processed that data on the CPU. This meant flushing the batchbuffer and waiting for it to completely execute before we could map it, resulting in really long stalls. We could also run out of space in the buffer, and have to do this early. Instead, we can use Haswell's MI_MATH command to do the (end - start) subtraction, as well as the multiplication by 2 or 3 to convert from the number of primitives written to the number of vertices written. We still need to CS stall to read the counters, but otherwise everything is completely pipelined - there's no CPU<->GPU synchronization required. It also uses only 80 bytes in the buffer, no matter what. Improves performance in Manhattan on Skylake GT3e at 800x600 by 6.1086% +/- 0.954166% (n=9). At 1920x1080, improves performance by 2.82103% +/- 0.148596% (n=84). v2: Fix number of primitives -> number of vertices calculation for GL_TRIANGLES (I was multiplying by 4 instead of 3.) Caught by Jordan Justen. Signed-off-by: Kenneth Graunke Reviewed-by: Jordan Justen --- src/mesa/drivers/dri/i965/Makefile.sources | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa/drivers/dri/i965/Makefile.sources') diff --git a/src/mesa/drivers/dri/i965/Makefile.sources b/src/mesa/drivers/dri/i965/Makefile.sources index 8c60954..d35775e 100644 --- a/src/mesa/drivers/dri/i965/Makefile.sources +++ b/src/mesa/drivers/dri/i965/Makefile.sources @@ -228,6 +228,7 @@ i965_FILES = \ gen8_vs_state.c \ gen8_wm_depth_stencil.c \ hsw_queryobj.c \ + hsw_sol.c \ intel_batchbuffer.c \ intel_batchbuffer.h \ intel_blit.c \ -- cgit v1.1