srcX0, srcY0, dstX0, dstY0, dstX1, dstY1,
mirror_x, mirror_y);
- /* Mark the dst buffer as needing a HiZ resolve if necessary. */
intel_renderbuffer_set_needs_hiz_resolve(intel_renderbuffer(dst_rb));
+ intel_renderbuffer_set_needs_downsample(intel_renderbuffer(dst_rb));
}
* If the depth buffer was written to and if it has an accompanying HiZ
* buffer, then mark that it needs a depth resolve.
*
- * (In the future, this will also mark needed MSAA resolves).
+ * If the color buffer is a multisample window system buffer, then
+ * mark that it needs a downsample.
*/
static void brw_postdraw_set_buffers_need_resolve(struct brw_context *brw)
{
+ struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &brw->intel.ctx;
struct gl_framebuffer *fb = ctx->DrawBuffer;
- struct intel_renderbuffer *depth_irb =
- intel_get_renderbuffer(fb, BUFFER_DEPTH);
- if (depth_irb && ctx->Depth.Mask) {
+ struct intel_renderbuffer *front_irb = NULL;
+ struct intel_renderbuffer *back_irb = intel_get_renderbuffer(fb, BUFFER_BACK_LEFT);
+ struct intel_renderbuffer *depth_irb = intel_get_renderbuffer(fb, BUFFER_DEPTH);
+
+ if (intel->is_front_buffer_rendering)
+ front_irb = intel_get_renderbuffer(fb, BUFFER_FRONT_LEFT);
+
+ if (front_irb)
+ intel_renderbuffer_set_needs_downsample(front_irb);
+ if (back_irb)
+ intel_renderbuffer_set_needs_downsample(back_irb);
+ if (depth_irb && ctx->Depth.Mask)
intel_renderbuffer_set_needs_depth_resolve(depth_irb);
- }
}
static int
mask, filter);
}
+/**
+ * This is a no-op except on multisample buffers shared with DRI2.
+ */
+void
+intel_renderbuffer_set_needs_downsample(struct intel_renderbuffer *irb)
+{
+ if (irb->mt && irb->mt->singlesample_mt)
+ irb->mt->need_downsample = true;
+}
+
void
intel_renderbuffer_set_needs_hiz_resolve(struct intel_renderbuffer *irb)
{