From: Nicolai Hähnle <nicolai.haeh...@amd.com> The condition !ctx->no_prolog is now always true. --- src/gallium/drivers/radeonsi/si_shader.c | 41 -------------------------------- 1 file changed, 41 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index b7678e1..8bd8c80 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -1176,59 +1176,20 @@ static int lookup_interp_param_index(unsigned interpolate, unsigned location) return SI_PARAM_PERSP_CENTROID; else return SI_PARAM_PERSP_CENTER; break; default: fprintf(stderr, "Warning: Unhandled interpolation mode.\n"); return -1; } } -/* This shouldn't be used by explicit INTERP opcodes. */ -static unsigned select_interp_param(struct si_shader_context *ctx, - unsigned param) -{ - if (!ctx->no_prolog) - return param; - - if (ctx->shader->key.ps.prolog.force_persp_sample_interp) { - switch (param) { - case SI_PARAM_PERSP_CENTROID: - case SI_PARAM_PERSP_CENTER: - return SI_PARAM_PERSP_SAMPLE; - } - } - if (ctx->shader->key.ps.prolog.force_linear_sample_interp) { - switch (param) { - case SI_PARAM_LINEAR_CENTROID: - case SI_PARAM_LINEAR_CENTER: - return SI_PARAM_LINEAR_SAMPLE; - } - } - if (ctx->shader->key.ps.prolog.force_persp_center_interp) { - switch (param) { - case SI_PARAM_PERSP_CENTROID: - case SI_PARAM_PERSP_SAMPLE: - return SI_PARAM_PERSP_CENTER; - } - } - if (ctx->shader->key.ps.prolog.force_linear_center_interp) { - switch (param) { - case SI_PARAM_LINEAR_CENTROID: - case SI_PARAM_LINEAR_SAMPLE: - return SI_PARAM_LINEAR_CENTER; - } - } - - return param; -} - /** * Interpolate a fragment shader input. * * @param ctx context * @param input_index index of the input in hardware * @param semantic_name TGSI_SEMANTIC_* * @param semantic_index semantic index * @param num_interp_inputs number of all interpolated inputs (= BCOLOR offset) * @param colors_read_mask color components read (4 bits for each color, 8 bits in total) * @param interp_param interpolation weights (i,j) @@ -1417,22 +1378,20 @@ static void declare_input_fs( out[2] = mask & 0x4 ? LLVMGetParam(main_fn, offset++) : base->undef; out[3] = mask & 0x8 ? LLVMGetParam(main_fn, offset++) : base->undef; return; } interp_param_idx = lookup_interp_param_index(decl->Interp.Interpolate, decl->Interp.Location); if (interp_param_idx == -1) return; else if (interp_param_idx) { - interp_param_idx = select_interp_param(ctx, - interp_param_idx); interp_param = get_interp_param(ctx, interp_param_idx); } if (decl->Semantic.Name == TGSI_SEMANTIC_COLOR && decl->Interp.Interpolate == TGSI_INTERPOLATE_COLOR && ctx->shader->key.ps.prolog.flatshade_colors) interp_param = NULL; /* load the constant color */ interp_fs_input(ctx, input_index, decl->Semantic.Name, decl->Semantic.Index, shader->selector->info.num_inputs, -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev