diff options
author | Kenneth Graunke <[email protected]> | 2016-06-22 11:25:26 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-06-23 11:58:50 -0700 |
commit | b0629e6894513a2c49a018bc3342a4e55435a236 (patch) | |
tree | cb3057c0f185f8ec6e40b89b903566d51ffa3ddb /src/gallium/drivers/r600/r600_shader.c | |
parent | 4db98f8beb990676be0833dda6c37566d0283911 (diff) |
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 f09b91f78247409f54c975f56cb10d5f350fe64e 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 1f9445ff57b, thinking it wasn't useful).
Improves performance in Gl32GSCloth by 84.8303% +/- 2.07132% (n = 10)
on my Broadwell GT2 laptop.
Cc: [email protected]
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_shader.c')
0 files changed, 0 insertions, 0 deletions