[Mesa-dev] [v3 2/5] i965/gen8: Set render state for lossless compressed
Topi Pohjolainen
topi.pohjolainen at intel.com
Thu Feb 25 09:58:23 UTC 2016
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/brw_draw.c | 7 ++++++-
src/mesa/drivers/dri/i965/brw_meta_fast_clear.c | 5 ++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 210b819..a30bc2d 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -411,8 +411,13 @@ brw_postdraw_set_buffers_need_resolve(struct brw_context *brw)
struct intel_renderbuffer *irb =
intel_renderbuffer(fb->_ColorDrawBuffers[i]);
- if (irb)
+ if (irb) {
brw_render_cache_set_add_bo(brw, irb->mt->bo);
+
+ if (intel_miptree_is_lossless_compressed(brw, irb->mt)) {
+ irb->mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_UNRESOLVED;
+ }
+ }
}
}
diff --git a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
index 4345f59..a2d49f4 100644
--- a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
+++ b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
@@ -187,8 +187,11 @@ set_render_buffers_state(struct brw_context *brw)
struct intel_renderbuffer *irb =
intel_renderbuffer(fb->_ColorDrawBuffers[i]);
- if (irb)
+ if (irb) {
brw_render_cache_set_add_bo(brw, irb->mt->bo);
+ if (intel_miptree_is_lossless_compressed(brw, irb->mt))
+ irb->mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_UNRESOLVED;
+ }
}
}
--
2.5.0
More information about the mesa-dev
mailing list