Mesa (master): meta: Drop blit src size fallback.

Eric Anholt anholt at kemper.freedesktop.org
Tue Apr 15 22:13:58 UTC 2014


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

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 12:19:09 2014 -0800

meta: Drop blit src size fallback.

I think we can assert that renderbuffer size is <= maximum 2D texture
size.  Our source coordinates should have already been clipped to the src
renderbuffer size, but haven't actually (so we could potentially have
trouble if there's scaling, and we're in the CopyTexImage path that tries
to use src size).  However, this texture size dependency was blocking the
next refactors, so I'm not sure if we want to go ahead with this series
before we get the clipping sorted out or not.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/common/meta_blit.c |   10 ----------
 1 file changed, 10 deletions(-)

diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c
index 31e494f..c201521 100644
--- a/src/mesa/drivers/common/meta_blit.c
+++ b/src/mesa/drivers/common/meta_blit.c
@@ -603,7 +603,6 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
    struct blit_state *blit = &ctx->Meta->Blit;
    struct temp_texture *tex = _mesa_meta_get_temp_texture(ctx);
    struct temp_texture *depthTex = _mesa_meta_get_temp_depth_texture(ctx);
-   const GLsizei maxTexSize = tex->MaxSize;
    const GLint srcX = MIN2(srcX0, srcX1);
    const GLint srcY = MIN2(srcY0, srcY1);
    const GLint srcW = abs(srcX1 - srcX0);
@@ -624,15 +623,6 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
    const GLboolean use_glsl_version = ctx->Extensions.ARB_vertex_shader &&
                                       ctx->Extensions.ARB_fragment_shader;
 
-   /* In addition to falling back if the blit size is larger than the maximum
-    * texture size, fallback if the source is multisampled.  This fallback can
-    * be removed once Mesa gets support ARB_texture_multisample.
-    */
-   if (srcW > maxTexSize || srcH > maxTexSize) {
-      /* XXX avoid this fallback */
-      goto fallback;
-   }
-
    /* Multisample texture blit support requires texture multisample. */
    if (ctx->ReadBuffer->Visual.samples > 0 &&
        !ctx->Extensions.ARB_texture_multisample) {




More information about the mesa-commit mailing list