mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2025-02-18 17:09:17 +00:00
iris: Use linear for exported resources if we can't convey tiling
If we have modifiers, we can use those to convey the tiling of exported resources. If we have the deprecated i915 GET/SET_TILING uAPI, we can use that to convey the tiling. If we have neither, then we have to fall back to linear. Fixes: e6588354360 ("iris/bufmgr: Do not use map_gtt or use set/get_tiling on DG1") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6938 Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18240> (cherry picked from commit 71ace23fa7ccb27eb4455e38f9254bac5c5b7f86)
This commit is contained in:
parent
c8ba293450
commit
f5ae4c35fe
@ -10561,7 +10561,7 @@
|
||||
"description": "iris: Use linear for exported resources if we can't convey tiling",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "e6588354360d102f3bfbfdfd484490a6ae296142"
|
||||
},
|
||||
|
@ -671,9 +671,11 @@ iris_resource_configure_main(const struct iris_screen *screen,
|
||||
} else if (templ->usage == PIPE_USAGE_STAGING ||
|
||||
templ->bind & (PIPE_BIND_LINEAR | PIPE_BIND_CURSOR)) {
|
||||
tiling_flags = ISL_TILING_LINEAR_BIT;
|
||||
} else if (!screen->devinfo.has_tiling_uapi &&
|
||||
(templ->bind & (PIPE_BIND_SCANOUT | PIPE_BIND_SHARED))) {
|
||||
tiling_flags = ISL_TILING_LINEAR_BIT;
|
||||
} else if (templ->bind & PIPE_BIND_SCANOUT) {
|
||||
tiling_flags = screen->devinfo.has_tiling_uapi ?
|
||||
ISL_TILING_X_BIT : ISL_TILING_LINEAR_BIT;
|
||||
tiling_flags = ISL_TILING_X_BIT;
|
||||
} else {
|
||||
tiling_flags = ISL_TILING_ANY_MASK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user