mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
intel/isl: Relax some alignments in get_image_surf()
Aux-tt alignment only applies to the beginning of the resource. Drop it if we're pointing to an image that is not in the first tile of the image. Likewise for the alignment we add for sequential multi-engine access. We allow sparse on 1D images. When getting an image from such a surface, the alignment likely won't be aligned to 64KB. So, in this case, remove the flag to avoid the alignment expectation. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
This commit is contained in:
parent
8d82d06cbc
commit
b16b9b5591
1 changed files with 14 additions and 1 deletions
|
|
@ -4792,9 +4792,22 @@ isl_surf_get_image_surf(const struct isl_device *dev,
|
|||
/* Even for cube maps there will be only single face, therefore drop the
|
||||
* corresponding flag if present.
|
||||
*/
|
||||
const isl_surf_usage_flags_t usage =
|
||||
isl_surf_usage_flags_t usage =
|
||||
surf->usage & (~ISL_SURF_USAGE_CUBE_BIT);
|
||||
|
||||
if (!util_is_aligned(*offset_B, surf->alignment_B)) {
|
||||
/* Aux-tt alignment only applies to the beginning of the resource. */
|
||||
usage |= ISL_SURF_USAGE_NO_AUX_TT_ALIGNMENT_BIT;
|
||||
|
||||
/* The sparse flag can be dropped if only opaque binds are supported. */
|
||||
usage &= ~ISL_SURF_USAGE_SPARSE_BIT;
|
||||
|
||||
/* Sequential use by multiple engines comes with alignment requirements
|
||||
* that should be ignored.
|
||||
*/
|
||||
usage &= ~ISL_SURF_USAGE_MULTI_ENGINE_SEQ_BIT;
|
||||
}
|
||||
|
||||
bool ok UNUSED;
|
||||
ok = isl_surf_init(dev, image_surf,
|
||||
.dim = ISL_SURF_DIM_2D,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue