[Mesa-dev] [PATCH] radeonsi: Do not set both inreg and byval
Vincent Lejeune
vljn at ovi.com
Fri Oct 11 17:32:45 CEST 2013
---
src/gallium/drivers/radeonsi/radeonsi_shader.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c
index ab996cc..209b77e 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
+++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
@@ -1655,16 +1655,19 @@ static void create_function(struct si_shader_context *si_shader_ctx)
for (i = 0; i <= last_sgpr; ++i) {
LLVMValueRef P = LLVMGetParam(si_shader_ctx->radeon_bld.main_fn, i);
- LLVMAddAttribute(P, LLVMInRegAttribute);
+ switch (i) {
+ default:
+ LLVMAddAttribute(P, LLVMInRegAttribute);
+ break;
+#if HAVE_LLVM >= 0x0304
/* We tell llvm that array inputs are passed by value to allow Sinking pass
* to move load. Inputs are constant so this is fine. */
- switch (i) {
- default: break;
case SI_PARAM_CONST:
case SI_PARAM_SAMPLER:
case SI_PARAM_RESOURCE:
LLVMAddAttribute(P, LLVMByValAttribute);
break;
+#endif
}
}
--
1.8.3.1
More information about the mesa-dev
mailing list