diff options
author | Jason Ekstrand <[email protected]> | 2018-08-16 10:16:41 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-08-29 14:04:02 -0500 |
commit | 42891438990ce170a2ce08f71a1360842d5897a1 (patch) | |
tree | 80629d8a7521b059fc7ee78e4983700c5ee843d2 /src/intel/isl | |
parent | b1c414ef2834cfe5f764f5af0ff2ad09d4584351 (diff) |
intel/compiler: Use two components for 1D array image sizes
Having the array length component stored in .z was a small convenience
for the ISL image param filling code and an annoyance in the NIR
lowering code. The only convenience of treating 1D arrays like 2D
arrays in the lowering code is in the address calculation code so let's
put all the complexity there as well.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/isl')
-rw-r--r-- | src/intel/isl/isl_storage_image.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/intel/isl/isl_storage_image.c b/src/intel/isl/isl_storage_image.c index 43398e8a020..c36985af127 100644 --- a/src/intel/isl/isl_storage_image.c +++ b/src/intel/isl/isl_storage_image.c @@ -233,12 +233,12 @@ isl_surf_fill_image_param(const struct isl_device *dev, surf->logical_level0_px.array_len); } param->size[0] = isl_minify(surf->logical_level0_px.w, view->base_level); - param->size[1] = isl_minify(surf->logical_level0_px.h, view->base_level); - if (surf->dim == ISL_SURF_DIM_3D) { - param->size[2] = isl_minify(surf->logical_level0_px.d, view->base_level); - } else { - param->size[2] = view->array_len; - } + param->size[1] = surf->dim == ISL_SURF_DIM_1D ? + view->array_len : + isl_minify(surf->logical_level0_px.h, view->base_level); + param->size[2] = surf->dim == ISL_SURF_DIM_2D ? + view->array_len : + isl_minify(surf->logical_level0_px.d, view->base_level); isl_surf_get_image_offset_el(surf, view->base_level, surf->dim == ISL_SURF_DIM_3D ? |