OSDN Git Service

i965: Allow fast depth clears if scissoring doesn't do anything.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 19 Sep 2012 20:27:55 +0000 (13:27 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 25 Sep 2012 14:03:59 +0000 (07:03 -0700)
commit097b4a3b28ecab81b356b86f04a939d24b94ae77
tree86a591821fd21b6f1f3bc017ca5cff5d25f3da89
parentab5ce2789fe9e5f2789ee22fdb02bcfed42a7125
i965: Allow fast depth clears if scissoring doesn't do anything.

A game we're working with leaves scissoring enabled, but frequently sets
the scissor rectangle to the size of the whole screen.  In that case,
scissoring has no effect, so it's safe to go ahead with a fast clear.

Chad believe this should help with Oliver McFadden's "Dante" as well.

v2/Chad: Use the drawbuffer dimensions rather than the miptree slice
dimensions.  The miptree slice may be slightly larger due to alignment
restrictions.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-and-tested-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
src/mesa/drivers/dri/i965/brw_clear.c