radv/gfx9: use total levels in texture descriptor
authorDave Airlie <airlied@redhat.com>
Mon, 21 Aug 2017 07:27:25 +0000 (08:27 +0100)
committerDave Airlie <airlied@redhat.com>
Thu, 24 Aug 2017 00:14:13 +0000 (01:14 +0100)
We need to use all the levels when filling out the gfx9
descriptor.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_image.c

index 314964d64e5df88fcf4cb2a2cf61070f8e80441b..c0c120e216e36fae463120a5912675a054501c0c 100644 (file)
@@ -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);