-
Jose Fonseca authored
This change adds: - an alternative rasterizer, which rasterizes bins in a left->right & top->bottom linear fashion; - triangle -> rectangle detection; - 1:1 blit detection; - a special TGSI -> LLVM IR code generation that uses 8-bit SSE integers in AoS fashion (as opposed to 32bits floats.) Altogether these changes yield a 2x to 3x performance improvement for 2D workloads. It was designed to render Windows 7 Aero and other Windows built-in 3D applications (like Windows Media Player, Internet Explorer 11, UWP applications) with minimum CPU utilization, but it should be generally applicable to other 2D-on-3D applications, like desktop compositors, HTML browsers, 3D based UI toolkits, etc. This was mostly the brainchild of Keith Whitwell back in 2010. I wrote TGSI -> AoS translation. And many others added bug-fixes and enhancements over the years: Roland Scheidegger, Brian Paul, and James Benton. Known issues: - piglit spec@!opengl 1.1@quad-invariance will warn that "left and right half should match" due to rounding error difference - These optimized paths to kick in is that depth-buffer must not be used, so some applications which want to benefit from these improvements might need to be modified to ensure they use painter's algorithm instead of depth-buffers. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Acked-by: Keith Whitwell <keithw@vmware.com> v2: Incorporate Dave Airlie feedback: cleanup LP_DEBUG_xx; shrink 3+ empty lines. v3: silence unused var warning, adapt to new upstream code (point setup) Part-of: <mesa/mesa!11969>
5a1d3bcf