swr/rast: Implement Early Rasterization optimization
authorGeorge Kyriazis <george.kyriazis@intel.com>
Fri, 19 Jan 2018 21:47:14 +0000 (15:47 -0600)
committerGeorge Kyriazis <george.kyriazis@intel.com>
Fri, 19 Jan 2018 22:52:43 +0000 (16:52 -0600)
commitbacfbe5a32d3a0d0c7131020fb100905a89f84ce
treecdf65b1cd6224a02921088b13c1601eaa7cc54dd
parentbe3cd7add187ef9059baaf7f8c2ba05307c9c7dd
swr/rast: Implement Early Rasterization optimization

Early Rasterization is an optimization for small triangles.

Scientific workloads often contain very small triangles that has non-zero
area and cannot be trivially rejected as falling between pixel centers,
but does not cover any pixel center. Those triangles can be initially
rasterized as early as in binner and rejected if they cover no pixels The
optimization can be disabled in compilation using KNOB_ENABLE_EARLY_RAST
option in knobs.h

The Early Rast is disabled by default.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/core/binner.cpp
src/gallium/drivers/swr/rasterizer/core/knobs.h
src/gallium/drivers/swr/rasterizer/core/rdtsc_core.cpp
src/gallium/drivers/swr/rasterizer/core/rdtsc_core.h