mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-24 07:50:26 +00:00
ac: fix buffer overflow bug in 64bit SSBO loads
Fixes: 441ee1e65b
"radv/ac: Implement Float64 SSBO loads"
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
409e15f26f
commit
e2b9296146
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user