mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 11:40:10 +01:00
radeonsi: add a workaround for a bug in LLVM <= 3.8
This is not directly applicable to stable and needs to be backported. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
7671687713
commit
51cf04cf0e
1 changed files with 7 additions and 0 deletions
|
|
@ -556,6 +556,13 @@ static LLVMValueRef get_bounded_indirect_index(struct si_shader_context *ctx,
|
|||
LLVMValueRef c_max = LLVMConstInt(ctx->i32, num - 1, 0);
|
||||
LLVMValueRef cc;
|
||||
|
||||
/* LLVM 3.8: If indirect resource indexing is used:
|
||||
* - SI & CIK hang
|
||||
* - VI crashes
|
||||
*/
|
||||
if (HAVE_LLVM <= 0x0308)
|
||||
return LLVMGetUndef(ctx->i32);
|
||||
|
||||
if (util_is_power_of_two(num)) {
|
||||
result = LLVMBuildAnd(builder, result, c_max, "");
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue