diff options
author | Kenneth Graunke <[email protected]> | 2018-07-03 13:23:47 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:07 -0800 |
commit | 36301bbe4047bf848cf8d936f6a5838c625ee118 (patch) | |
tree | b348e19df35837b3f159832255e48cf43636e70e /src/gallium/drivers/iris/iris_resource.c | |
parent | 7f39f4843f071d0032192b94163a595df589e83f (diff) |
iris: fix zoffset asserts with 2DArray/Cube
Diffstat (limited to 'src/gallium/drivers/iris/iris_resource.c')
-rw-r--r-- | src/gallium/drivers/iris/iris_resource.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 924a6919989..b50fef9f5f3 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -423,7 +423,9 @@ tile_extents(struct isl_surf *surf, assert(box->y % fmtl->bh == 0); unsigned x0_el, y0_el; - isl_surf_get_image_offset_el(surf, level, box->z, box->z, &x0_el, &y0_el); + isl_surf_get_image_offset_el(surf, level, box->z, + surf->dim == ISL_SURF_DIM_3D ? box->z : 0, + &x0_el, &y0_el); *x1_B = (box->x / fmtl->bw + x0_el) * cpp; *y1_el = box->y / fmtl->bh + y0_el; |