projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
409e15f
)
ac: fix buffer overflow bug in 64bit SSBO loads
author
Timothy Arceri
<tarceri@itsqueeze.com>
Tue, 16 Jan 2018 06:45:30 +0000
(17:45 +1100)
committer
Timothy Arceri
<tarceri@itsqueeze.com>
Wed, 17 Jan 2018 23:26:58 +0000
(10:26 +1100)
Fixes: 441ee1e65b04 "radv/ac: Implement Float64 SSBO loads"
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/common/ac_nir_to_llvm.c
patch
|
blob
|
history
diff --git
a/src/amd/common/ac_nir_to_llvm.c
b/src/amd/common/ac_nir_to_llvm.c
index 1dc64f87cc9be064299dc9b675af524171376968..e07330ca5c840d028bd20e57e5f2072a11dc9d3a 100644
(file)
--- a/
src/amd/common/ac_nir_to_llvm.c
+++ b/
src/amd/common/ac_nir_to_llvm.c
@@
-2588,8
+2588,11
@@
static LLVMValueRef visit_load_buffer(struct ac_nir_context *ctx,
ctx->ac.i1false,
};
- results[i] = ac_build_intrinsic(&ctx->ac, load_name, data_type, params, 5, 0);
+ int idx = i;
+ if (instr->dest.ssa.bit_size == 64)
+ idx = i > 1 ? 1 : 0;
+ results[idx] = ac_build_intrinsic(&ctx->ac, load_name, data_type, params, 5, 0);
}
assume(results[0]);