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

Author: Nicolai Hähnle <nicolai.haeh...@amd.com>
Date:   Thu Oct 13 11:19:50 2016 +0200

radeonsi: fix indirect loads of 64 bit constants

This fixes GL45-CTS.compute_shader.fp64-case3.

Cc: mesa-sta...@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.ol...@amd.com>

---

 src/gallium/drivers/radeonsi/si_shader.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c 
b/src/gallium/drivers/radeonsi/si_shader.c
index e6edd90..1ae111a 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -1914,11 +1914,11 @@ static LLVMValueRef fetch_constant(
                result = bitcast(bld_base, type, result);
        else {
                LLVMValueRef addr2, result2;
-               addr2 = ctx->radeon_bld.soa.addr[ireg->Index][ireg->Swizzle + 
1];
+               addr2 = ctx->radeon_bld.soa.addr[ireg->Index][ireg->Swizzle];
                addr2 = LLVMBuildLoad(base->gallivm->builder, addr2, "load addr 
reg2");
                addr2 = lp_build_mul_imm(&bld_base->uint_bld, addr2, 16);
                addr2 = lp_build_add(&bld_base->uint_bld, addr2,
-                                    lp_build_const_int32(base->gallivm, idx * 
4));
+                                    lp_build_const_int32(base->gallivm, (idx + 
1) * 4));
 
                result2 = buffer_load_const(ctx, bufp, addr2);
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to