summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/radeonsi_shader.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2012-08-01 22:35:24 +0200
committerChristian König <[email protected]>2012-08-02 11:22:57 +0200
commit3508815d178a5b2d22b2249a68974b0cf8f67069 (patch)
tree92df6d32181d46d9ce8089559a91a1e3ed0973bf /src/gallium/drivers/radeonsi/radeonsi_shader.c
parent92b96a883f5ed53d88ec148c8212c5a8348e97ab (diff)
radeonsi: fix shader param and color count
Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/radeonsi_shader.c')
-rw-r--r--src/gallium/drivers/radeonsi/radeonsi_shader.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c
index 81b44a772ab..522016e411f 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
+++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
@@ -355,6 +355,8 @@ static void si_llvm_emit_epilogue(struct lp_build_tgsi_context * bld_base)
&si_shader_ctx->radeon_bld.soa.bld_base.uint_bld;
struct tgsi_parse_context *parse = &si_shader_ctx->parse;
LLVMValueRef last_args[9] = { 0 };
+ unsigned color_count = 0;
+ unsigned param_count = 0;
while (!tgsi_parse_end_of_tokens(parse)) {
/* XXX: component_bits controls which components of the output
@@ -369,8 +371,6 @@ static void si_llvm_emit_epilogue(struct lp_build_tgsi_context * bld_base)
LLVMValueRef args[9];
unsigned target;
unsigned index;
- unsigned color_count = 0;
- unsigned param_count = 0;
int i;
tgsi_parse_token(parse);
@@ -384,17 +384,18 @@ static void si_llvm_emit_epilogue(struct lp_build_tgsi_context * bld_base)
shader->input[i].sid = d->Semantic.Index;
shader->input[i].interpolate = d->Interp.Interpolate;
shader->input[i].centroid = d->Interp.Centroid;
- break;
+ continue;
+
case TGSI_FILE_OUTPUT:
i = shader->noutput++;
shader->output[i].name = d->Semantic.Name;
shader->output[i].sid = d->Semantic.Index;
shader->output[i].interpolate = d->Interp.Interpolate;
break;
- }
- if (d->Declaration.File != TGSI_FILE_OUTPUT)
+ default:
continue;
+ }
for (index = d->Range.First; index <= d->Range.Last; index++) {
for (chan = 0; chan < 4; chan++ ) {