diff options
author | Marek Olšák <[email protected]> | 2016-05-17 23:10:24 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-05-19 12:35:50 +0200 |
commit | 51cf04cf0e4b348de7e920deff1dad3fb4e62407 (patch) | |
tree | f23fcfb7421cfe2a4e600bf2d4b9e0604ed678fe /src/gallium/drivers/radeonsi | |
parent | 767168771376a3ee95d5b1f5b2f5fd577b76391e (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 6166403f549..3df78200ff3 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -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 { |