meta: Fix buffer object assignment to account for both pack and unpack bo's
authorAnuj Phogat <anuj.phogat@gmail.com>
Wed, 4 Feb 2015 00:56:04 +0000 (16:56 -0800)
committerAnuj Phogat <anuj.phogat@gmail.com>
Wed, 25 Feb 2015 22:11:23 +0000 (14:11 -0800)
create_texture_for_pbo() is shared by _mesa_meta_pbo_GetTexSubImage()
and _mesa_meta_pbo_TexSubImage() functions. So, we need to account
for both pack and unpack buffer objects.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Neil Roberts <neil@linux.intel.com>
src/mesa/drivers/common/meta_tex_subimage.c

index ca6fb6a5f21b4ca71720704a82546510e515c4ea..2aa3a4ce281006516ebd9385122143810fb343a2 100644 (file)
@@ -96,7 +96,7 @@ create_texture_for_pbo(struct gl_context *ctx, bool create_pbo,
          _mesa_BufferData(pbo_target, row_stride * height, pixels,
                           GL_STREAM_DRAW);
 
-      buffer_obj = ctx->Unpack.BufferObj;
+      buffer_obj = packing->BufferObj;
       pixels = NULL;
 
       _mesa_BindBuffer(pbo_target, 0);