summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-07-23 19:22:57 -0400
committerMarek Olšák <[email protected]>2019-07-30 22:06:23 -0400
commit925161c84c2bb86032203245679ce3615c1e62b2 (patch)
treeb1db98591432f27f5b930eafd476d78e76f5cfbd /src/gallium
parent5787bbf90df61d6ec660a30490d9b973446cda0d (diff)
radeonsi/nir: set input_interpolate_loc for color inputs
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c10
1 files changed, 10 insertions, 0 deletions
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));