Mesa (master): meta: Fix buffer object assignment to account for both pack and unpack bo's

Anuj Phogat aphogat at kemper.freedesktop.org
Wed Feb 25 22:25:44 UTC 2015


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

Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Tue Feb  3 16:56:04 2015 -0800

meta: Fix buffer object assignment to account for both pack and unpack bo's

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 at gmail.com>
Reviewed-by: Neil Roberts <neil at linux.intel.com>

---

 src/mesa/drivers/common/meta_tex_subimage.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common/meta_tex_subimage.c
index ca6fb6a..2aa3a4c 100644
--- a/src/mesa/drivers/common/meta_tex_subimage.c
+++ b/src/mesa/drivers/common/meta_tex_subimage.c
@@ -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);




More information about the mesa-commit mailing list