aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_clear.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2014-07-07 16:44:58 -0700
committerKristian Høgsberg <[email protected]>2014-08-15 11:25:47 -0700
commit2f28a0dc23165123cf1e8b5942acad37878edd8a (patch)
treefc2ea0cff3565c17b768fa499bdc4991082cf9b0 /src/mesa/drivers/dri/i965/brw_clear.c
parentf9dc7aabb3273d6d8a54c6778a5695a8527f4454 (diff)
i965: Implement fast color clears using meta operations
This patch uses the infrastructure put in place by previous patches to implement fast color clears and replicated color clears in terms of meta operations. This works all the way back to gen7 where fast clear was introduced and adds support for fast clear on gen8. It replaces the blorp path completely and improves on a few cases. Layered clears are now done using instanced rendering and multiple render-target clears use a MRT shader with rep16 writes. Signed-off-by: Kristian Høgsberg <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_clear.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_clear.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clear.c b/src/mesa/drivers/dri/i965/brw_clear.c
index a1c1d0131b2..0e5fef59e9f 100644
--- a/src/mesa/drivers/dri/i965/brw_clear.c
+++ b/src/mesa/drivers/dri/i965/brw_clear.c
@@ -241,13 +241,11 @@ brw_clear(struct gl_context *ctx, GLbitfield mask)
}
}
- /* BLORP is currently only supported on Gen6+. */
- if (brw->gen >= 6 && brw->gen < 8) {
- if (mask & BUFFER_BITS_COLOR) {
- if (brw_blorp_clear_color(brw, fb, mask, partial_clear)) {
- debug_mask("blorp color", mask & BUFFER_BITS_COLOR);
- mask &= ~BUFFER_BITS_COLOR;
- }
+ /* Clear color buffers with fast clear or at least rep16 writes. */
+ if (brw->gen >= 6 && mask & BUFFER_BITS_COLOR) {
+ if (brw_meta_fast_clear(brw, fb, mask, partial_clear)) {
+ debug_mask("blorp color", mask & BUFFER_BITS_COLOR);
+ mask &= ~BUFFER_BITS_COLOR;
}
}