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

Author: Bas Nieuwenhuizen <[email protected]>
Date:   Sun Jan  8 01:36:30 2017 +0100

radv/ac: Implement Float64 UBO loads.

Signed-off-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>

---

 src/amd/common/ac_nir_to_llvm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 4367cd1..c50292e 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -2185,13 +2185,17 @@ static LLVMValueRef visit_load_buffer(struct 
nir_to_llvm_context *ctx,
 static LLVMValueRef visit_load_ubo_buffer(struct nir_to_llvm_context *ctx,
                                           nir_intrinsic_instr *instr)
 {
-       LLVMValueRef results[4], ret;
+       LLVMValueRef results[8], ret;
        LLVMValueRef rsrc = get_src(ctx, instr->src[0]);
        LLVMValueRef offset = get_src(ctx, instr->src[1]);
+       int num_components = instr->num_components;
 
        rsrc = LLVMBuildBitCast(ctx->builder, rsrc, LLVMVectorType(ctx->i8, 
16), "");
 
-       for (unsigned i = 0; i < instr->num_components; ++i) {
+       if (instr->dest.ssa.bit_size == 64)
+               num_components *= 2;
+
+       for (unsigned i = 0; i < num_components; ++i) {
                LLVMValueRef params[] = {
                        rsrc,
                        LLVMBuildAdd(ctx->builder, LLVMConstInt(ctx->i32, 4 * 
i, 0),

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to