uint32_t offset,
uint32_t width,
uint32_t height,
+ uint32_t depth,
int pitch)
{
struct intel_mipmap_tree *mt;
uint32_t tiling, swizzle;
+ GLenum target;
drm_intel_bo_get_tiling(bo, &tiling, &swizzle);
*/
assert(pitch >= 0);
- mt = intel_miptree_create_layout(brw, GL_TEXTURE_2D, format,
+ target = depth > 1 ? GL_TEXTURE_2D_ARRAY : GL_TEXTURE_2D;
+
+ mt = intel_miptree_create_layout(brw, target, format,
0, 0,
- width, height, 1,
+ width, height, depth,
true, 0, false);
if (!mt) {
free(mt);
0,
width,
height,
+ 1,
pitch);
if (!singlesample_mt)
goto fail;
src_buffer,
intelImage->mt->format,
src_offset,
- image->Width, image->Height,
+ image->Width, image->Height, 1,
src_stride);
if (!pbo_mt)
return false;
ctx->Driver.FreeTextureImageBuffer(ctx, image);
intel_image->mt = intel_miptree_create_for_bo(brw, bo, image->TexFormat,
- 0, width, height, pitch);
+ 0, width, height, 1, pitch);
if (intel_image->mt == NULL)
return;
intel_image->mt->target = target;
dst_buffer,
intelImage->mt->format,
dst_offset,
- texImage->Width, texImage->Height,
+ texImage->Width, texImage->Height, 1,
dst_stride);
if (!pbo_mt)