intel: Simplify renderbuffer-for-texture width setup.
authorEric Anholt <eric@anholt.net>
Mon, 22 Apr 2013 18:07:59 +0000 (11:07 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 6 May 2013 21:33:43 +0000 (14:33 -0700)
We're looking for the logical width of our level, which is what
image->Width2/Height2 is.  The previous code relied on MSAA textures being
only level 0.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/intel/intel_fbo.c

index caecd3f4b03c4ca400d95a02d9ecf7cb3b808490..241695f3db65119c64e07c16f99916b82496fc20 100644 (file)
@@ -493,17 +493,8 @@ intel_renderbuffer_update_wrapper(struct intel_context *intel,
    rb->InternalFormat = image->InternalFormat;
    rb->_BaseFormat = image->_BaseFormat;
    rb->NumSamples = mt->num_samples;
-
-   if (mt->msaa_layout != INTEL_MSAA_LAYOUT_NONE) {
-      assert(level == 0);
-      rb->Width = mt->logical_width0;
-      rb->Height = mt->logical_height0;
-   }
-   else {
-      rb->Width = mt->level[level].width;
-      rb->Height = mt->level[level].height;
-   }
-
+   rb->Width = image->Width2;
+   rb->Height = image->Height2;
    rb->Delete = intel_delete_renderbuffer;
    rb->AllocStorage = intel_nop_alloc_storage;