diff options
author | Rob Clark <[email protected]> | 2015-02-27 09:02:48 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-03-03 10:41:00 -0500 |
commit | 4abb789bca95e9c23b2339ea7732833203c94639 (patch) | |
tree | 5f04fee444c07aa5de316569dfe10f90b6947411 /src/gallium/auxiliary/tgsi/tgsi_lowering.c | |
parent | 583a8a8f65c3086d21de864c602c6aa6283bcd45 (diff) |
tgsi/lowering: don't forget interp for BCOLOR inputs
To lower two sided color, tgsi_lowering creates additional BCOLOR inputs
(matching up to the BCOLOR outputs on the vert shader). These inputs
should copy the interpolation state of their matching COLOR input.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_lowering.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_lowering.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_lowering.c b/src/gallium/auxiliary/tgsi/tgsi_lowering.c index dee6c419d11..4954c1178e5 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_lowering.c +++ b/src/gallium/auxiliary/tgsi/tgsi_lowering.c @@ -1152,7 +1152,7 @@ transform_samp(struct tgsi_transform_context *tctx, */ #define TWOSIDE_GROW(n) ( \ 2 + /* FACE */ \ - ((n) * 2) + /* IN[] BCOLOR[n] */ \ + ((n) * 3) + /* IN[], BCOLOR[n], <intrp> */\ ((n) * 1) + /* TEMP[] */ \ ((n) * NINST(3)) /* CMP instr */ \ ) @@ -1172,13 +1172,17 @@ emit_twoside(struct tgsi_transform_context *tctx) /* additional inputs for BCOLOR's */ for (i = 0; i < ctx->two_side_colors; i++) { + unsigned in_idx = ctx->two_side_idx[i]; decl = tgsi_default_full_declaration(); decl.Declaration.File = TGSI_FILE_INPUT; decl.Declaration.Semantic = true; decl.Range.First = decl.Range.Last = inbase + i; decl.Semantic.Name = TGSI_SEMANTIC_BCOLOR; - decl.Semantic.Index = - info->input_semantic_index[ctx->two_side_idx[i]]; + decl.Semantic.Index = info->input_semantic_index[in_idx]; + decl.Declaration.Interpolate = true; + decl.Interp.Interpolate = info->input_interpolate[in_idx]; + decl.Interp.Location = info->input_interpolate_loc[in_idx]; + decl.Interp.CylindricalWrap = info->input_cylindrical_wrap[in_idx]; tctx->emit_declaration(tctx, &decl); } |