[Mesa-dev] [PATCH 02/10] radv/gfx9: fix level count in color register setup.

Dave Airlie airlied at gmail.com
Mon Aug 21 07:34:49 UTC 2017


From: Dave Airlie <airlied at redhat.com>

There was an off by one here.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 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 9bdad6a..a32f76d 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.9.4



More information about the mesa-dev mailing list