mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 08:00:12 +01:00
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.
This commit is contained in:
parent
07b4f17aaf
commit
96d1baa88d
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue