Mesa (master): radv/gfx9: fix level count in color register setup.
Dave Airlie
airlied at kemper.freedesktop.org
Thu Aug 24 00:15:10 UTC 2017
Module: Mesa
Branch: master
Commit: 11834195e9c276e1f3756cf8f6161be14124261b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=11834195e9c276e1f3756cf8f6161be14124261b
Author: Dave Airlie <airlied at redhat.com>
Date: Mon Aug 21 08:28:27 2017 +0100
radv/gfx9: fix level count in color register setup.
There was an off by one here.
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Cc: "17.2" <mesa-stable at lists.freedesktop.org>
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 9bdad6ad6f..a32f76d648 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);
More information about the mesa-commit
mailing list