From fa933438a2fe19eab62a3f35b64d834b1176f8eb Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 4 Oct 2014 18:33:36 +0200 Subject: radeonsi: use tgsi_shader_info in si_shader_ps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Michel Dänzer --- src/gallium/drivers/radeonsi/si_shader.c | 1 - src/gallium/drivers/radeonsi/si_shader.h | 1 - src/gallium/drivers/radeonsi/si_state_draw.c | 8 +++++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gallium') diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 692d2a9967e..5ab9e55823f 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -246,7 +246,6 @@ static int si_store_shader_io_attribs(struct si_shader *shader, shader->input[i].sid = d->Semantic.Index; shader->input[i].index = d->Range.First; shader->input[i].interpolate = d->Interp.Interpolate; - shader->input[i].centroid = d->Interp.Location == TGSI_INTERPOLATE_LOC_CENTROID; return -1; case TGSI_FILE_OUTPUT: diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 8468e1a5eb9..80a3decebcd 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -102,7 +102,6 @@ struct si_shader_input { unsigned param_offset; unsigned index; unsigned interpolate; - bool centroid; }; struct si_shader_output { diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index c9e4353c3a4..76162e565f3 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -228,6 +228,7 @@ static void si_shader_vs(struct pipe_context *ctx, struct si_shader *shader) static void si_shader_ps(struct pipe_context *ctx, struct si_shader *shader) { struct si_context *sctx = (struct si_context *)ctx; + struct tgsi_shader_info *info = &shader->selector->info; struct si_pm4_state *pm4; unsigned i, spi_ps_in_control; unsigned num_sgprs, num_user_sgprs; @@ -240,10 +241,11 @@ static void si_shader_ps(struct pipe_context *ctx, struct si_shader *shader) if (pm4 == NULL) return; - for (i = 0; i < shader->ninput; i++) { - switch (shader->input[i].name) { + for (i = 0; i < info->num_inputs; i++) { + switch (info->input_semantic_name[i]) { case TGSI_SEMANTIC_POSITION: - if (shader->input[i].centroid) { + if (info->input_interpolate_loc[i] == + TGSI_INTERPOLATE_LOC_CENTROID) { /* SPI_BARYC_CNTL.POS_FLOAT_LOCATION * Possible vaules: * 0 -> Position = pixel center (default) -- cgit v1.2.3