diff options
author | Marek Olšák <[email protected]> | 2017-02-23 02:15:54 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-03-03 15:29:30 +0100 |
commit | 2b3ebe307c2250f3cc8ffea203e3a2196a70d496 (patch) | |
tree | 37ac8279c7cf6c47777e5f6aa80b1bd0a11bc8eb /src/gallium/drivers | |
parent | 369f4a87268547c7714ad8c16cb975e343bc8168 (diff) |
ac: replace SI.export with amdgcn.exp.*
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 055c8f7daed..7bc977b6ed7 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -6490,7 +6490,7 @@ static bool si_eliminate_const_output(struct si_shader_context *ctx, for (i = 0; i < 4; i++) { LLVMBool loses_info; - LLVMValueRef p = LLVMGetOperand(inst, 5 + i); + LLVMValueRef p = LLVMGetOperand(inst, (HAVE_LLVM >= 0x0500 ? 2 : 5) + i); /* It's a constant expression. Undef outputs are eliminated too. */ if (LLVMIsUndef(p)) { @@ -6574,10 +6574,12 @@ static void si_eliminate_const_vs_outputs(struct si_shader_context *ctx) unsigned num_args = LLVMCountParams(callee); /* Check if this is an export instruction. */ - if (num_args != 9 || strcmp(name, "llvm.SI.export")) + if ((num_args != 9 && num_args != 8) || + (strcmp(name, "llvm.SI.export") && + strcmp(name, "llvm.amdgcn.exp."))) continue; - LLVMValueRef arg = LLVMGetOperand(cur, 3); + LLVMValueRef arg = LLVMGetOperand(cur, HAVE_LLVM >= 0x0500 ? 0 : 3); unsigned target = LLVMConstIntGetZExtValue(arg); if (target < V_008DFC_SQ_EXP_PARAM) |