From: Marek Olšák Date: Tue, 23 Jul 2019 23:22:57 +0000 (-0400) Subject: radeonsi/nir: set input_interpolate_loc for color inputs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=925161c84c2bb86032203245679ce3615c1e62b2;p=mesa.git radeonsi/nir: set input_interpolate_loc for color inputs Reviewed-by: Connor Abbott --- diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index df46bb4cada..20031ad3f60 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -552,6 +552,16 @@ void si_nir_scan_shader(const struct nir_shader *nir, if (semantic_name == TGSI_SEMANTIC_PRIMID) info->uses_primid = true; + if (semantic_name == TGSI_SEMANTIC_COLOR) { + /* We only need this for color inputs. */ + if (variable->data.sample) + info->input_interpolate_loc[i] = TGSI_INTERPOLATE_LOC_SAMPLE; + else if (variable->data.centroid) + info->input_interpolate_loc[i] = TGSI_INTERPOLATE_LOC_CENTROID; + else + info->input_interpolate_loc[i] = TGSI_INTERPOLATE_LOC_CENTER; + } + enum glsl_base_type base_type = glsl_get_base_type(glsl_without_array(variable->type));