summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp4
-rw-r--r--src/gallium/drivers/r300/r300_vs_draw.c3
-rw-r--r--src/gallium/drivers/r600/r600_shader.c6
-rw-r--r--src/gallium/drivers/radeonsi/radeonsi_shader.c8
4 files changed, 11 insertions, 10 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
index 334c584373a..6d0147bc53f 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
@@ -805,7 +805,7 @@ bool Source::scanDeclaration(const struct tgsi_full_declaration *decl)
info->in[i].si = si;
if (info->type == PIPE_SHADER_FRAGMENT) {
// translate interpolation mode
- switch (decl->Declaration.Interpolate) {
+ switch (decl->Interp.Interpolate) {
case TGSI_INTERPOLATE_CONSTANT:
info->in[i].flat = 1;
break;
@@ -818,7 +818,7 @@ bool Source::scanDeclaration(const struct tgsi_full_declaration *decl)
default:
break;
}
- if (decl->Declaration.Centroid)
+ if (decl->Interp.Centroid)
info->in[i].centroid = 1;
}
}
diff --git a/src/gallium/drivers/r300/r300_vs_draw.c b/src/gallium/drivers/r300/r300_vs_draw.c
index 69d67585d8b..b9e73dd514b 100644
--- a/src/gallium/drivers/r300/r300_vs_draw.c
+++ b/src/gallium/drivers/r300/r300_vs_draw.c
@@ -94,11 +94,12 @@ static void emit_output(struct tgsi_transform_context *ctx,
decl = tgsi_default_full_declaration();
decl.Declaration.File = TGSI_FILE_OUTPUT;
- decl.Declaration.Interpolate = interp;
+ decl.Declaration.Interpolate = 1;
decl.Declaration.Semantic = TRUE;
decl.Semantic.Name = name;
decl.Semantic.Index = index;
decl.Range.First = decl.Range.Last = reg;
+ decl.Interp.Interpolate = interp;
ctx->emit_declaration(ctx, &decl);
++vsctx->num_outputs;
}
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 9e9ff1d772a..cd78104a010 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -722,8 +722,8 @@ static int tgsi_declaration(struct r600_shader_ctx *ctx)
ctx->shader->input[i].name = d->Semantic.Name;
ctx->shader->input[i].sid = d->Semantic.Index;
ctx->shader->input[i].spi_sid = r600_spi_sid(&ctx->shader->input[i]);
- ctx->shader->input[i].interpolate = d->Declaration.Interpolate;
- ctx->shader->input[i].centroid = d->Declaration.Centroid;
+ ctx->shader->input[i].interpolate = d->Interp.Interpolate;
+ ctx->shader->input[i].centroid = d->Interp.Centroid;
ctx->shader->input[i].gpr = ctx->file_offset[TGSI_FILE_INPUT] + d->Range.First;
if (ctx->type == TGSI_PROCESSOR_FRAGMENT) {
switch (ctx->shader->input[i].name) {
@@ -749,7 +749,7 @@ static int tgsi_declaration(struct r600_shader_ctx *ctx)
ctx->shader->output[i].sid = d->Semantic.Index;
ctx->shader->output[i].spi_sid = r600_spi_sid(&ctx->shader->output[i]);
ctx->shader->output[i].gpr = ctx->file_offset[TGSI_FILE_OUTPUT] + d->Range.First;
- ctx->shader->output[i].interpolate = d->Declaration.Interpolate;
+ ctx->shader->output[i].interpolate = d->Interp.Interpolate;
ctx->shader->output[i].write_mask = d->Declaration.UsageMask;
if (ctx->type == TGSI_PROCESSOR_VERTEX) {
switch (d->Semantic.Name) {
diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c
index 6425c352d28..0e1a97bba3e 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
+++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
@@ -199,7 +199,7 @@ static void declare_input_fs(
LLVMValueRef attr_number = lp_build_const_int32(gallivm, input_index);
/* XXX: Handle all possible interpolation modes */
- switch (decl->Declaration.Interpolate) {
+ switch (decl->Interp.Interpolate) {
case TGSI_INTERPOLATE_COLOR:
if (si_shader_ctx->rctx->rasterizer->flatshade)
intr_name = "llvm.SI.fs.interp.constant";
@@ -331,14 +331,14 @@ static void si_llvm_emit_epilogue(struct lp_build_tgsi_context * bld_base)
i = shader->ninput++;
shader->input[i].name = d->Semantic.Name;
shader->input[i].sid = d->Semantic.Index;
- shader->input[i].interpolate = d->Declaration.Interpolate;
- shader->input[i].centroid = d->Declaration.Centroid;
+ shader->input[i].interpolate = d->Interp.Interpolate;
+ shader->input[i].centroid = d->Interp.Centroid;
break;
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->Declaration.Interpolate;
+ shader->output[i].interpolate = d->Interp.Interpolate;
break;
}