diff options
author | Chad Versace <[email protected]> | 2015-12-30 16:26:10 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2015-12-30 16:28:19 -0800 |
commit | 96d1baa88d37c51c94579f650cfd9465d28634f4 (patch) | |
tree | 28a7f19aca462e6bfd36d58d97b72f20eb10990e /src/isl | |
parent | 07b4f17aaffdf59d9e2e6e8e7c45be09c17ea417 (diff) |
isl: Fix assertion failure for npot pixel formats
When aligning to isl_format_layout::bs (which is the number of bytes in
the pixel), use isl_align_npot() instead of isl_align(), because
isl_align() works only for power-of-2 alignment.
Fixes assertion in
dEQP-VK.pipeline.image.view_type.1d.format.r16g16b16_sfloat.size.512x1.
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 75f65001a1e..2bf15017e2f 100644 --- a/src/isl/isl.c +++ b/src/isl/isl.c @@ -813,9 +813,9 @@ isl_calc_row_pitch(const struct isl_device *dev, */ if (info->usage & ISL_SURF_USAGE_RENDER_TARGET_BIT) { if (isl_format_is_yuv(info->format)) { - row_pitch = isl_align(row_pitch, fmtl->bs); + row_pitch = isl_align_npot(row_pitch, fmtl->bs); } else { - row_pitch = isl_align(row_pitch, 2 * fmtl->bs); + row_pitch = isl_align_npot(row_pitch, 2 * fmtl->bs); } } break; |