diff options
author | Francisco Jerez <[email protected]> | 2016-01-25 19:20:57 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-01-26 15:14:50 -0800 |
commit | d9e0b9a06a478a21f21f93a3d66a198e42e84c30 (patch) | |
tree | c155ae2dd2a38c812d76237f0552edea4694d890 /src/isl | |
parent | cc065e0ad739cc0219a95c0cb6684451fe2d9f9f (diff) |
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.
Diffstat (limited to 'src/isl')
-rw-r--r-- | src/isl/isl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/isl/isl.c b/src/isl/isl.c index acc80eae59c..6015c5c305c 100644 --- a/src/isl/isl.c +++ b/src/isl/isl.c @@ -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 |