radv/gfx9: fix buffer size on gfx9.
authorDave Airlie <airlied@redhat.com>
Fri, 25 Aug 2017 00:15:32 +0000 (01:15 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 6 Sep 2017 02:05:44 +0000 (03:05 +0100)
The VI sizing only applies to VI.

This fixes:
dEQP-VK.image.image_size.buffer.*

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/common/ac_nir_to_llvm.c

index 9c808ef68594c60ed66558e5cc597b4a05a3d72e..4bc4a225ee2430445cf347abcc049dafefffc2f1 100644 (file)
@@ -2012,7 +2012,7 @@ get_buffer_size(struct ac_nir_context *ctx, LLVMValueRef descriptor, bool in_ele
                                        LLVMConstInt(ctx->ac.i32, 2, false), "");
 
        /* VI only */
-       if (ctx->abi->chip_class >= VI && in_elements) {
+       if (ctx->abi->chip_class == VI && in_elements) {
                /* On VI, the descriptor contains the size in bytes,
                 * but TXQ must return the size in elements.
                 * The stride is always non-zero for resources using TXQ.