radeonsi: don't call force_dcc_off for buffers
authorMarek Olšák <marek.olsak@amd.com>
Tue, 12 Dec 2017 21:21:13 +0000 (22:21 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 16 Dec 2017 00:22:01 +0000 (01:22 +0100)
This was undefined yet harmless behavior in LLVM.
Not anymore - it causes a hang now.

Cc: 17.3 <mesa-stable@lists.freedesktop.org>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c

index 099f86bd22232d269a50a51f07e70be05f1c73b2..fe0cfcef9974573c0e15f778673fa7df6e143904 100644 (file)
@@ -146,7 +146,7 @@ LLVMValueRef si_load_image_desc(struct si_shader_context *ctx,
        }
 
        rsrc = ac_build_load_to_sgpr(&ctx->ac, list, index);
-       if (dcc_off)
+       if (desc_type == AC_DESC_IMAGE && dcc_off)
                rsrc = force_dcc_off(ctx, rsrc);
        return rsrc;
 }