diff options
author | Kenneth Graunke <[email protected]> | 2014-05-01 23:33:53 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-05-02 23:05:37 -0700 |
commit | 829cb0423d18331b9ba0b6098e2b312ff2ce6053 (patch) | |
tree | 66eade39be01feac59b8aa7f2f1c2fa32e7739ad /src/mesa | |
parent | 64c4670dd6a0e2c0d7178ba9405db7c06eb94e90 (diff) |
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" <[email protected]>
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex_image.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c index fbb799bc62a..4eb024f6ce4 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; |