From: Dave Airlie <airl...@redhat.com>

There was an off by one here.

Signed-off-by: Dave Airlie <airl...@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

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to