From: Dave Airlie Date: Mon, 21 Aug 2017 07:28:27 +0000 (+0100) Subject: radv/gfx9: fix level count in color register setup. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=11834195e9c276e1f3756cf8f6161be14124261b;p=mesa.git radv/gfx9: fix level count in color register setup. There was an off by one here. Reviewed-by: Bas Nieuwenhuizen Cc: "17.2" Signed-off-by: Dave Airlie --- diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 9bdad6ad6fd..a32f76d648e 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -3132,7 +3132,7 @@ radv_initialise_color_surface(struct radv_device *device, S_028C74_RESOURCE_TYPE(iview->image->surface.u.gfx9.resource_type); cb->cb_color_attrib2 = S_028C68_MIP0_WIDTH(iview->image->info.width - 1) | S_028C68_MIP0_HEIGHT(iview->image->info.height - 1) | - S_028C68_MAX_MIP(iview->image->info.levels); + S_028C68_MAX_MIP(iview->image->info.levels - 1); cb->gfx9_epitch = S_0287A0_EPITCH(iview->image->surface.u.gfx9.surf.epitch);