From 11834195e9c276e1f3756cf8f6161be14124261b Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 21 Aug 2017 08:28:27 +0100 Subject: [PATCH] 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 --- src/amd/vulkan/radv_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.11.0