Mesa (master): radv/gfx9: use total levels in texture descriptor

Dave Airlie airlied at kemper.freedesktop.org
Thu Aug 24 00:15:10 UTC 2017


Module: Mesa
Branch: master
Commit: df09f1f3cd5110874899ed0f4b4c33ba9b006c50
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=df09f1f3cd5110874899ed0f4b4c33ba9b006c50

Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Aug 21 08:27:25 2017 +0100

radv/gfx9: use total levels in texture descriptor

We need to use all the levels when filling out the gfx9
descriptor.

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_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 314964d64e..c0c120e216 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -414,7 +414,7 @@ si_make_texture_descriptor(struct radv_device *device,
 		state[4] |= S_008F20_BC_SWIZZLE(bc_swizzle);
 		state[5] |= S_008F24_MAX_MIP(image->info.samples > 1 ?
 					     util_logbase2(image->info.samples) :
-					     last_level);
+					     image->info.levels - 1);
 	} else {
 		state[3] |= S_008F1C_POW2_PAD(image->info.levels > 1);
 		state[4] |= S_008F20_DEPTH(depth - 1);




More information about the mesa-commit mailing list