From 56e37374ddbc3b66bcfa4d0dadcb1fd53074c822 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 2 May 2020 09:19:18 -0400 Subject: amd: assume HTILE is always rb/pipe_aligned, remove ac_surface.u.gfx9.htile Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/common/ac_surface.c | 11 ++++++----- src/amd/common/ac_surface.h | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/amd/common') diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 1ad9bfbb5fb..6b00eea8221 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -1178,8 +1178,11 @@ static int gfx9_compute_miptree(ADDR_HANDLE addrlib, hin.size = sizeof(ADDR2_COMPUTE_HTILE_INFO_INPUT); hout.size = sizeof(ADDR2_COMPUTE_HTILE_INFO_OUTPUT); - hin.hTileFlags.pipeAligned = !in->flags.metaPipeUnaligned; - hin.hTileFlags.rbAligned = !in->flags.metaRbUnaligned; + assert(in->flags.metaPipeUnaligned == 0); + assert(in->flags.metaRbUnaligned == 0); + + hin.hTileFlags.pipeAligned = 1; + hin.hTileFlags.rbAligned = 1; hin.depthFlags = in->flags; hin.swizzleMode = in->swizzleMode; hin.unalignedWidth = in->width; @@ -1192,8 +1195,6 @@ static int gfx9_compute_miptree(ADDR_HANDLE addrlib, if (ret != ADDR_OK) return ret; - surf->u.gfx9.htile.rb_aligned = hin.hTileFlags.rbAligned; - surf->u.gfx9.htile.pipe_aligned = hin.hTileFlags.pipeAligned; surf->htile_size = hout.htileBytes; surf->htile_slice_size = hout.sliceSize; surf->htile_alignment = hout.baseAlign; @@ -1604,7 +1605,7 @@ static int gfx9_compute_surface(ADDR_HANDLE addrlib, else AddrSurfInfoIn.numSlices = config->info.array_size; - /* This is propagated to HTILE/DCC. */ + /* This is propagated to DCC. It must be 0 for HTILE and CMASK. */ AddrSurfInfoIn.flags.metaPipeUnaligned = 0; AddrSurfInfoIn.flags.metaRbUnaligned = 0; diff --git a/src/amd/common/ac_surface.h b/src/amd/common/ac_surface.h index 5a1381980f2..2f7b928f95f 100644 --- a/src/amd/common/ac_surface.h +++ b/src/amd/common/ac_surface.h @@ -150,7 +150,6 @@ struct gfx9_surf_layout { struct gfx9_surf_flags stencil; /* added to surf_size, use stencil_offset */ struct gfx9_surf_meta_flags dcc; /* metadata of color */ - struct gfx9_surf_meta_flags htile; /* metadata of depth and stencil */ enum gfx9_resource_type resource_type; /* 1D, 2D or 3D */ uint16_t surf_pitch; /* in blocks */ -- cgit v1.2.3