Mesa (master): i965/blorp: Don't fall back to swrast when miptrees absent.

Paul Berry stereotype441 at kemper.freedesktop.org
Tue Jul 24 22:22:54 UTC 2012


Module: Mesa
Branch: master
Commit: eac4f1a70772c1480778bae2563199c12634893e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=eac4f1a70772c1480778bae2563199c12634893e

Author: Paul Berry <stereotype441 at gmail.com>
Date:   Fri Jul 13 13:59:41 2012 -0700

i965/blorp: Don't fall back to swrast when miptrees absent.

Previously, the blorp engine would fall back to swrast if the source
or destination of a blit had no associated miptree.  This was
unnecessary, since _mesa_BlitFramebufferEXT() already takes care of
making the blit silently succeed if there are no buffers bound, so the
fallback paths could never actually happen in practice.

Removing these fallback paths will simplify the implementation of
correct DrawBuffers support in blorp.

Reviewed-by: Chad Versace <chad.versace at linux.intel.com>

---

 src/mesa/drivers/dri/i965/brw_blorp_blit.cpp |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
index 038489f..eb78fe1 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
@@ -147,19 +147,15 @@ try_blorp_blit(struct intel_context *intel,
       assert(false);
    }
 
-   /* Validate source */
-   if (!src_rb) return false;
+   /* Find source miptree */
    struct intel_renderbuffer *src_irb = intel_renderbuffer(src_rb);
    struct intel_mipmap_tree *src_mt = src_irb->mt;
-   if (!src_mt) return false;
    if (buffer_bit == GL_STENCIL_BUFFER_BIT && src_mt->stencil_mt)
       src_mt = src_mt->stencil_mt;
 
-   /* Validate destination */
-   if (!dst_rb) return false;
+   /* Find destination miptree */
    struct intel_renderbuffer *dst_irb = intel_renderbuffer(dst_rb);
    struct intel_mipmap_tree *dst_mt = dst_irb->mt;
-   if (!dst_mt) return false;
    if (buffer_bit == GL_STENCIL_BUFFER_BIT && dst_mt->stencil_mt)
       dst_mt = dst_mt->stencil_mt;
 




More information about the mesa-commit mailing list