Mesa (10.2): i965: Set miptree target field when creating from a BO.
Ian Romanick
idr at kemper.freedesktop.org
Wed May 7 16:51:05 UTC 2014
Module: Mesa
Branch: 10.2
Commit: 0a5034517ac8c8951305fd88e94684d1c739901c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a5034517ac8c8951305fd88e94684d1c739901c
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Thu May 1 23:33:53 2014 -0700
i965: Set miptree target field when creating from a BO.
Prior to commit 8435b60a3577d2d905eae189cd7e770500177e99, the region
equivalent of this function called intel_miptree_create_layout, which
set mt->target to target. With that commit, it no longer copied target.
Piglit's ext_image_dma_buf_import-sample_[xa]rgb8888 tests would then
hit an assertion failure, where image->TexObject->Target was
GL_TEXTURE_EXTERNAL_OES, and mt->target was GL_TEXTURE_2D.
Copying the target fixes this assertion failure.
Cc: "10.2" <mesa-stable at lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
(cherry picked from commit 829cb0423d18331b9ba0b6098e2b312ff2ce6053)
---
src/mesa/drivers/dri/i965/intel_tex_image.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index fbb799b..4eb024f 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -234,6 +234,7 @@ intel_set_texture_image_bo(struct gl_context *ctx,
0, width, height, pitch);
if (intel_image->mt == NULL)
return;
+ intel_image->mt->target = target;
intel_image->mt->total_width = width;
intel_image->mt->total_height = height;
intel_image->mt->level[0].slice[0].x_offset = tile_x;
More information about the mesa-commit
mailing list