mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-24 06:00:22 +01:00
ac/surface,radv: Avoid pitch weirdness if image not used for rendertarget.
Literally no point to it. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21869>
This commit is contained in:
parent
102445d2c3
commit
71a50bdaad
4 changed files with 16 additions and 3 deletions
|
|
@ -1132,7 +1132,9 @@ static int gfx6_compute_surface(ADDR_HANDLE addrlib, const struct radeon_info *i
|
|||
!compressed &&
|
||||
((config->info.array_size == 1 && config->info.depth == 1) || config->info.levels == 1);
|
||||
|
||||
AddrSurfInfoIn.flags.noStencil = (surf->flags & RADEON_SURF_SBUFFER) == 0;
|
||||
AddrSurfInfoIn.flags.noStencil =
|
||||
!(surf->flags & RADEON_SURF_SBUFFER) || (surf->flags & RADEON_SURF_NO_RENDER_TARGET);
|
||||
|
||||
AddrSurfInfoIn.flags.compressZ = !!(surf->flags & RADEON_SURF_Z_OR_SBUFFER);
|
||||
|
||||
/* On GFX7-GFX8, the DB uses the same pitch and tile mode (except tilesplit)
|
||||
|
|
|
|||
|
|
@ -624,8 +624,14 @@ radv_get_surface_flags(struct radv_device *device, struct radv_image *image, uns
|
|||
if (is_depth) {
|
||||
flags |= RADEON_SURF_ZBUFFER;
|
||||
|
||||
if (is_depth && is_stencil &&
|
||||
!(pCreateInfo->usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) &&
|
||||
device->physical_device->rad_info.gfx_level <= GFX8)
|
||||
flags |= RADEON_SURF_NO_RENDER_TARGET;
|
||||
|
||||
if (radv_use_htile_for_image(device, image) &&
|
||||
!(device->instance->debug_flags & RADV_DEBUG_NO_HIZ)) {
|
||||
!(device->instance->debug_flags & RADV_DEBUG_NO_HIZ) &&
|
||||
!(flags & RADEON_SURF_NO_RENDER_TARGET)) {
|
||||
if (radv_use_tc_compat_htile_for_image(device, pCreateInfo, image_format))
|
||||
flags |= RADEON_SURF_TC_COMPATIBLE_HTILE;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -81,6 +81,10 @@ radv_image_is_renderable(struct radv_device *device, struct radv_image *image)
|
|||
vk_format_get_blocksizebits(image->vk.format) == 128 &&
|
||||
vk_format_is_compressed(image->vk.format))
|
||||
return false;
|
||||
|
||||
if (image->planes[0].surface.flags & RADEON_SURF_NO_RENDER_TARGET)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -304,7 +304,8 @@ radv_pick_resolve_method_images(struct radv_device *device, struct radv_image *s
|
|||
else if (src_image->info.array_size > 1 || dest_image->info.array_size > 1)
|
||||
*method = RESOLVE_COMPUTE;
|
||||
} else {
|
||||
if (src_image->info.array_size > 1 || dest_image->info.array_size > 1)
|
||||
if (src_image->info.array_size > 1 || dest_image->info.array_size > 1 ||
|
||||
(dest_image->planes[0].surface.flags & RADEON_SURF_NO_RENDER_TARGET))
|
||||
*method = RESOLVE_COMPUTE;
|
||||
else
|
||||
*method = RESOLVE_FRAGMENT;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue