diff options
author | Bas Nieuwenhuizen <[email protected]> | 2018-05-19 01:03:57 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2018-05-20 11:57:59 +0200 |
commit | a1c87235a9d077b32094725ad7ea3b9919743c9f (patch) | |
tree | d7b321abff7a689bb3aec27966b066094d20774b /src | |
parent | 62e0e089d710835d9f79138377bcc37147f75ebd (diff) |
ac/surface: Only align linear power of two fmt textures.
We're not sharing 32_32_32 formats between different GPUs, so we
do not have to align for vega on pre-vega cards.
Fixes: e361970ed73 "radv: Add support for IMG_DATA_FORMAT_32_32_32."
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/common/ac_surface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 9e742dc8a45..d7da9950256 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -301,10 +301,10 @@ static int gfx6_compute_level(ADDR_HANDLE addrlib, */ if (config->info.levels == 1 && AddrSurfInfoIn->tileMode == ADDR_TM_LINEAR_ALIGNED && - AddrSurfInfoIn->bpp) { + AddrSurfInfoIn->bpp && + util_is_power_of_two_or_zero(AddrSurfInfoIn->bpp)) { unsigned alignment = 256 / (AddrSurfInfoIn->bpp / 8); - assert(util_is_power_of_two_or_zero(AddrSurfInfoIn->bpp)); AddrSurfInfoIn->width = align(AddrSurfInfoIn->width, alignment); } |