mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
ac/surface: fix is_linear for stencil-only surfaces
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23015>
This commit is contained in:
parent
4ce5f31877
commit
d715631623
1 changed files with 5 additions and 2 deletions
|
|
@ -1434,7 +1434,9 @@ static int gfx6_compute_surface(ADDR_HANDLE addrlib, const struct radeon_info *i
|
|||
surf->flags &= ~RADEON_SURF_TC_COMPATIBLE_HTILE;
|
||||
}
|
||||
|
||||
surf->is_linear = surf->u.legacy.level[0].mode == RADEON_SURF_MODE_LINEAR_ALIGNED;
|
||||
surf->is_linear = (only_stencil ? surf->u.legacy.zs.stencil_level[0].mode :
|
||||
surf->u.legacy.level[0].mode) == RADEON_SURF_MODE_LINEAR_ALIGNED;
|
||||
|
||||
surf->is_displayable = surf->is_linear || surf->micro_tile_mode == RADEON_MICRO_MODE_DISPLAY ||
|
||||
surf->micro_tile_mode == RADEON_MICRO_MODE_RENDER;
|
||||
|
||||
|
|
@ -2385,7 +2387,8 @@ static int gfx9_compute_surface(struct ac_addrlib *addrlib, const struct radeon_
|
|||
return r;
|
||||
}
|
||||
|
||||
surf->is_linear = surf->u.gfx9.swizzle_mode == ADDR_SW_LINEAR;
|
||||
surf->is_linear = (only_stencil ? surf->u.gfx9.zs.stencil_swizzle_mode :
|
||||
surf->u.gfx9.swizzle_mode) == ADDR_SW_LINEAR;
|
||||
|
||||
/* Query whether the surface is displayable. */
|
||||
/* This is only useful for surfaces that are allocated without SCANOUT. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue