Skip to content
Snippets Groups Projects
Commit 0a503451 authored by Kenneth Graunke's avatar Kenneth Graunke Committed by Ian Romanick
Browse files

i965: Set miptree target field when creating from a BO.


Prior to commit 8435b60a, 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@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
Reviewed-by: default avatarJordan Justen <jordan.l.justen@intel.com>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
(cherry picked from commit 829cb042)
parent e8f61503
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment