radeonsi: fix 64-bit loads from LDS
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 18 Oct 2016 16:40:38 +0000 (18:40 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 20 Oct 2016 08:37:07 +0000 (10:37 +0200)
Fixes spec/arb_tessellation_shader/execution/dvec[23]-vs-tcs-tes, among
others.

Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_shader.c

index a810d9ae8fc1871062fbfa9852c15ae0a1d6e8a8..3a842532ec3b36dbe26f8f1e33b74711b1d1a9f1 100644 (file)
@@ -911,7 +911,7 @@ static LLVMValueRef lds_load(struct lp_build_tgsi_context *bld_base,
        if (tgsi_type_is_64bit(type)) {
                LLVMValueRef value2;
                dw_addr = lp_build_add(&bld_base->uint_bld, dw_addr,
-                                      lp_build_const_int32(gallivm, swizzle + 1));
+                                      lp_build_const_int32(gallivm, 1));
                value2 = build_indexed_load(ctx, ctx->lds, dw_addr, false);
                return si_llvm_emit_fetch_64bit(bld_base, type, value, value2);
        }