diff options
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_blorp.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c index ad747e0766e..ad3a47ef035 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.c +++ b/src/mesa/drivers/dri/i965/brw_blorp.c @@ -1224,12 +1224,12 @@ do_single_blorp_clear(struct brw_context *brw, struct gl_framebuffer *fb, x0 = fb->_Xmin; x1 = fb->_Xmax; - if (rb->Name != 0) { - y0 = fb->_Ymin; - y1 = fb->_Ymax; - } else { + if (fb->FlipY) { y0 = rb->Height - fb->_Ymax; y1 = rb->Height - fb->_Ymin; + } else { + y0 = fb->_Ymin; + y1 = fb->_Ymax; } /* If the clear region is empty, just return. */ @@ -1415,9 +1415,8 @@ brw_blorp_clear_depth_stencil(struct brw_context *brw, if (!(mask & (BUFFER_BITS_DEPTH_STENCIL))) return; - uint32_t x0, x1, y0, y1, rb_name, rb_height; + uint32_t x0, x1, y0, y1, rb_height; if (depth_rb) { - rb_name = depth_rb->Name; rb_height = depth_rb->Height; if (stencil_rb) { assert(depth_rb->Width == stencil_rb->Width); @@ -1425,18 +1424,17 @@ brw_blorp_clear_depth_stencil(struct brw_context *brw, } } else { assert(stencil_rb); - rb_name = stencil_rb->Name; rb_height = stencil_rb->Height; } x0 = fb->_Xmin; x1 = fb->_Xmax; - if (rb_name != 0) { - y0 = fb->_Ymin; - y1 = fb->_Ymax; - } else { + if (fb->FlipY) { y0 = rb_height - fb->_Ymax; y1 = rb_height - fb->_Ymin; + } else { + y0 = fb->_Ymin; + y1 = fb->_Ymax; } /* If the clear region is empty, just return. */ |