[Mesa-dev] [PATCH 4/4] r600g: Handle TGSI_FILE_TEMPORARY_ARRAY

Tom Stellard tom at stellard.net
Mon Nov 5 12:14:29 PST 2012


From: Tom Stellard <thomas.stellard at amd.com>

---
 src/gallium/drivers/r600/r600_pipe.c   | 3 +--
 src/gallium/drivers/r600/r600_shader.c | 6 +++++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index abe7ad7..c95d6df 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -549,6 +549,7 @@ static int r600_get_shader_param(struct pipe_screen* pscreen, unsigned shader, e
 	case PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR:
 	case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR:
 	case PIPE_SHADER_CAP_INDIRECT_CONST_ADDR:
+	case PIPE_SHADER_CAP_INDIRECT_TEMP_ARRAY_ADDR:
 		return 1;
 	case PIPE_SHADER_CAP_SUBROUTINES:
 		return 0;
@@ -563,8 +564,6 @@ static int r600_get_shader_param(struct pipe_screen* pscreen, unsigned shader, e
 			return PIPE_SHADER_IR_TGSI;
 		}
 	}
-	case PIPE_SHADER_CAP_INDIRECT_TEMP_ARRAY_ADDR:
-		return 0;
 	return 0;
 }
 
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 4634c30..f9f4c9d 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -884,6 +884,7 @@ static int tgsi_declaration(struct r600_shader_ctx *ctx)
 		break;
 	case TGSI_FILE_CONSTANT:
 	case TGSI_FILE_TEMPORARY:
+	case TGSI_FILE_TEMPORARY_ARRAY:
 	case TGSI_FILE_SAMPLER:
 	case TGSI_FILE_ADDRESS:
 		break;
@@ -1275,8 +1276,10 @@ static int r600_shader_from_tgsi(struct r600_screen *rscreen,
 			ctx.file_offset[TGSI_FILE_INPUT] +
 			ctx.info.file_max[TGSI_FILE_INPUT] + 1;
 	}
-	ctx.file_offset[TGSI_FILE_TEMPORARY] = ctx.file_offset[TGSI_FILE_OUTPUT] +
+	ctx.file_offset[TGSI_FILE_TEMPORARY_ARRAY] = ctx.file_offset[TGSI_FILE_OUTPUT] +
 						ctx.info.file_max[TGSI_FILE_OUTPUT] + 1;
+	ctx.file_offset[TGSI_FILE_TEMPORARY] = ctx.file_offset[TGSI_FILE_TEMPORARY_ARRAY] +
+						ctx.info.file_max[TGSI_FILE_TEMPORARY_ARRAY] + 1;
 
 	/* Outside the GPR range. This will be translated to one of the
 	 * kcache banks later. */
@@ -3808,6 +3811,7 @@ static inline boolean tgsi_tex_src_requires_loading(struct r600_shader_ctx *ctx,
 {
 	struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
 	return 	(inst->Src[index].Register.File != TGSI_FILE_TEMPORARY &&
+		inst->Src[index].Register.File != TGSI_FILE_TEMPORARY_ARRAY &&
 		inst->Src[index].Register.File != TGSI_FILE_INPUT &&
 		inst->Src[index].Register.File != TGSI_FILE_OUTPUT) ||
 		ctx->src[index].neg || ctx->src[index].abs;
-- 
1.7.11.4



More information about the mesa-dev mailing list