isl/gen9: Fix slice offset calculation for 1D array images.

The X component of the offset is set to the layer index times layer
height which is obviously bogus, return the vertical offset of the
slice as Y component instead.  Fixes a few image load/store tests that
use 1D arrays on SKL when forcing it to fall back to untyped reads and
writes.
This commit is contained in:
Francisco Jerez 2016-01-25 19:20:57 -08:00 committed by Jason Ekstrand
parent cc065e0ad7
commit d9e0b9a06a
1 changed files with 2 additions and 2 deletions

View File

@ -1260,7 +1260,7 @@ get_image_offset_sa_gen9_1d(const struct isl_surf *surf,
const struct isl_extent3d image_align_sa =
isl_surf_get_image_alignment_sa(surf);
uint32_t x = layer * isl_surf_get_array_pitch_sa_rows(surf);
uint32_t x = 0;
for (uint32_t l = 0; l < level; ++l) {
uint32_t W = isl_minify(W0, l);
@ -1270,7 +1270,7 @@ get_image_offset_sa_gen9_1d(const struct isl_surf *surf,
}
*x_offset_sa = x;
*y_offset_sa = 0;
*y_offset_sa = layer * isl_surf_get_array_pitch_sa_rows(surf);
}
void