[Mesa-dev] [PATCH] radeonsi: Do not set both inreg and byval

Vincent Lejeune vljn at ovi.com
Thu Oct 10 00:34:28 CEST 2013


---
 src/gallium/drivers/radeonsi/radeonsi_shader.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c
index ab996cc..9d95997 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
+++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
@@ -1655,11 +1655,12 @@ 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;
 		/* 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:
-- 
1.8.3.1



More information about the mesa-dev mailing list