mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
iris: Avoid creating uncompressed view with unaligned tile offsets on BDW
Fixes: 60568d5d ("iris: Use isl_surf_get_uncompressed_surf")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7990
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21147>
This commit is contained in:
parent
7ebdddf319
commit
4229d9324f
1 changed files with 15 additions and 0 deletions
|
|
@ -2823,6 +2823,21 @@ iris_create_surface(struct pipe_context *ctx,
|
|||
&res->surf, view,
|
||||
&isl_surf, view, &offset_B,
|
||||
&tile_x_el, &tile_y_el);
|
||||
|
||||
/* On Broadwell, HALIGN and VALIGN are specified in pixels and are
|
||||
* hard-coded to align to exactly the block size of the compressed
|
||||
* texture. This means that, when reinterpreted as a non-compressed
|
||||
* texture, the tile offsets may be anything.
|
||||
*
|
||||
* We need them to be multiples of 4 to be usable in RENDER_SURFACE_STATE,
|
||||
* so force the state tracker to take fallback paths if they're not.
|
||||
*/
|
||||
#if GFX_VER == 8
|
||||
if (tile_x_el % 4 != 0 || tile_y_el % 4 != 0) {
|
||||
ok = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!ok) {
|
||||
free(surf);
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue