diff options
author | Iago Toral Quiroga <itoral@igalia.com> | 2015-01-30 09:03:57 +0100 |
---|---|---|
committer | Iago Toral Quiroga <itoral@igalia.com> | 2015-02-02 09:29:18 +0100 |
commit | 68155e5a3699271b27adbe52968a9d5f8c84b0e6 (patch) | |
tree | 7938d00e8a092ec9291db381f43b63c0204b9c4f | |
parent | 753c327151ed7d23218879149950f0028b0e7b4d (diff) | |
download | mesa-68155e5a3699271b27adbe52968a9d5f8c84b0e6.tar.gz mesa-68155e5a3699271b27adbe52968a9d5f8c84b0e6.tar.bz2 mesa-68155e5a3699271b27adbe52968a9d5f8c84b0e6.zip |
i965: Fix intel_miptree_copy_teximage for GL_TEXTURE_1D_ARRAY
For GL_TEXTURE_1D_ARRAY targets we store the depth of the array
in the Height field and leave Depth=1 in the underlying texture
object. When we call intel_miptree_copy_teximage in the process
of re-creating a miptree (possibily because the number of miplevels
has changed) we didn't account for this, so we where only copying
texture images for the first slice.
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 26e137d85a0..11f1876e94a 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -1249,7 +1249,12 @@ intel_miptree_copy_teximage(struct brw_context *brw, intel_texture_object(intelImage->base.Base.TexObject); int level = intelImage->base.Base.Level; int face = intelImage->base.Base.Face; - GLuint depth = intelImage->base.Base.Depth; + + GLuint depth; + if (intel_obj->base.Target == GL_TEXTURE_1D_ARRAY) + depth = intelImage->base.Base.Height; + else + depth = intelImage->base.Base.Depth; if (!invalidate) { for (int slice = 0; slice < depth; slice++) { |