Reviewed-by: Neil Roberts <neil@linux.intel.com>tags/10.5-branchpoint
@@ -389,6 +389,7 @@ intel_image_target_renderbuffer_storage(struct gl_context *ctx, | |||
image->offset, | |||
image->width, | |||
image->height, | |||
1, | |||
image->pitch); | |||
if (!irb->mt) | |||
return; |
@@ -671,10 +671,12 @@ intel_miptree_create_for_bo(struct brw_context *brw, | |||
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); | |||
@@ -689,9 +691,11 @@ intel_miptree_create_for_bo(struct brw_context *brw, | |||
*/ | |||
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); | |||
@@ -742,6 +746,7 @@ intel_update_winsys_renderbuffer_miptree(struct brw_context *intel, | |||
0, | |||
width, | |||
height, | |||
1, | |||
pitch); | |||
if (!singlesample_mt) | |||
goto fail; |
@@ -526,6 +526,7 @@ intel_miptree_create_for_bo(struct brw_context *brw, | |||
uint32_t offset, | |||
uint32_t width, | |||
uint32_t height, | |||
uint32_t depth, | |||
int pitch); | |||
void |
@@ -110,7 +110,7 @@ do_blit_drawpixels(struct gl_context * ctx, | |||
src_buffer, | |||
irb->mt->format, | |||
src_offset, | |||
width, height, | |||
width, height, 1, | |||
src_stride); | |||
if (!pbo_mt) | |||
return false; |
@@ -142,7 +142,7 @@ do_blit_readpixels(struct gl_context * ctx, | |||
dst_buffer, | |||
irb->mt->format, | |||
dst_offset, | |||
width, height, | |||
width, height, 1, | |||
dst_stride); | |||
if (!intel_miptree_blit(brw, |
@@ -143,7 +143,7 @@ try_pbo_upload(struct gl_context *ctx, | |||
src_buffer, | |||
intelImage->mt->format, | |||
src_offset, | |||
image->Width, image->Height, | |||
image->Width, image->Height, 1, | |||
src_stride); | |||
if (!pbo_mt) | |||
return false; | |||
@@ -236,7 +236,7 @@ intel_set_texture_image_bo(struct gl_context *ctx, | |||
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; | |||
@@ -489,7 +489,7 @@ blit_texture_to_pbo(struct gl_context *ctx, | |||
dst_buffer, | |||
intelImage->mt->format, | |||
dst_offset, | |||
texImage->Width, texImage->Height, | |||
texImage->Width, texImage->Height, 1, | |||
dst_stride); | |||
if (!pbo_mt) |