i965: Adjust renderbuffer wrapper to account for MinLevel/MinLayer
authorChris Forbes <chrisf@ijw.co.nz>
Tue, 21 Jan 2014 10:20:11 +0000 (23:20 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Thu, 10 Apr 2014 06:27:41 +0000 (18:27 +1200)
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/intel_fbo.c

index d0e13491cb39dea9b5cb70861facd514354c921d..98247f208b7725a926062b811c93508459e11045 100644 (file)
@@ -511,6 +511,10 @@ intel_renderbuffer_update_wrapper(struct brw_context *brw,
 
    rb->AllocStorage = intel_nop_alloc_storage;
 
+   /* adjust for texture view parameters */
+   layer += image->TexObject->MinLayer;
+   level += image->TexObject->MinLevel;
+
    intel_miptree_check_level_layer(mt, level, layer);
    irb->mt_level = level;