meta: do the full FBO completeness check in decompress_texture_image
authorMarek Olšák <marek.olsak@amd.com>
Tue, 20 Jun 2017 11:44:31 +0000 (13:44 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 21 Jun 2017 23:48:30 +0000 (01:48 +0200)
_mesa_update_state will no longer recompute Width/Height if the framebuffer
is complete. We now rely on the FBO completeness check to do it.

The only code that needs to be fixed seems to be this one.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/common/meta.c

index 39499c736bbdb414c23b83a221d007cdbd71effb..87f656062bd2d0f3d1d0ecdeedc3e3685921d99e 100644 (file)
@@ -3064,6 +3064,11 @@ decompress_texture_image(struct gl_context *ctx,
    if (width > decompress_fbo->Width || height > decompress_fbo->Height) {
       _mesa_renderbuffer_storage(ctx, decompress_fbo->rb, rbFormat,
                                  width, height, 0);
+
+      /* Do the full completeness check to recompute
+       * ctx->DrawBuffer->Width/Height.
+       */
+      ctx->DrawBuffer->_Status = GL_FRAMEBUFFER_UNDEFINED;
       status = _mesa_check_framebuffer_status(ctx, ctx->DrawBuffer);
       if (status != GL_FRAMEBUFFER_COMPLETE) {
          /* If the framebuffer isn't complete then we'll leave