diff options
author | Topi Pohjolainen <[email protected]> | 2017-06-22 21:28:15 +0300 |
---|---|---|
committer | Topi Pohjolainen <[email protected]> | 2017-07-20 11:32:21 +0300 |
commit | f1caa6194eb88ada096942bab99f7b331544e0e9 (patch) | |
tree | a50eb32f9f502e4f27ff0c79e3e2ee6ec22a5769 /src | |
parent | 7e5c8e593bdcec4b698d710740ddc5c8dd94f8dc (diff) |
i965: Prepare tex (sub)image for isl based
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Signed-off-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex_image.c | 20 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex_subimage.c | 8 |
2 files changed, 23 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c index e165cf60bb5..b042b23d9f3 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_image.c +++ b/src/mesa/drivers/dri/i965/intel_tex_image.c @@ -198,9 +198,16 @@ intel_set_texture_image_mt(struct brw_context *brw, struct intel_texture_object *intel_texobj = intel_texture_object(texobj); struct intel_texture_image *intel_image = intel_texture_image(image); - _mesa_init_teximage_fields(&brw->ctx, image, - mt->logical_width0, mt->logical_height0, 1, - 0, internal_format, mt->format); + if (mt->surf.size > 0) { + _mesa_init_teximage_fields(&brw->ctx, image, + mt->surf.logical_level0_px.width, + mt->surf.logical_level0_px.height, 1, + 0, internal_format, mt->format); + } else { + _mesa_init_teximage_fields(&brw->ctx, image, + mt->logical_width0, mt->logical_height0, 1, + 0, internal_format, mt->format); + } brw->ctx.Driver.FreeTextureImageBuffer(&brw->ctx, image); @@ -455,7 +462,12 @@ intel_gettexsubimage_tiled_memcpy(struct gl_context *ctx, /* Since we are going to write raw data to the miptree, we need to resolve * any pending fast color clears before we start. */ - assert(image->mt->logical_depth0 == 1); + if (image->mt->surf.size > 0) { + assert(image->mt->surf.logical_level0_px.depth == 1); + assert(image->mt->surf.logical_level0_px.array_len == 1); + } else { + assert(image->mt->logical_depth0 == 1); + } intel_miptree_access_raw(brw, image->mt, level, 0, true); bo = image->mt->bo; diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c index e686ba93d2a..88cfa814a36 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c +++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c @@ -150,7 +150,13 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx, /* Since we are going to write raw data to the miptree, we need to resolve * any pending fast color clears before we start. */ - assert(image->mt->logical_depth0 == 1); + if (image->mt->surf.size > 0) { + assert(image->mt->surf.logical_level0_px.depth == 1); + assert(image->mt->surf.logical_level0_px.array_len == 1); + } else { + assert(image->mt->logical_depth0 == 1); + } + intel_miptree_access_raw(brw, image->mt, level, 0, true); bo = image->mt->bo; |