summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-07-01 20:54:01 -0400
committerIlia Mirkin <[email protected]>2014-07-09 19:26:32 -0400
commit4c97ed4411e3653a082875b79587fb308c284a99 (patch)
treebc6f1666166da83a51525f6460d49c7d6d473166 /src/gallium/drivers/radeonsi
parente3b16294cb56bc0f3ee4a68a525884db0ce6806d (diff)
gallium: switch dedicated centroid field to interpolation location
The new location field can be either center, centroid, or sample, which indicates the location that the shader should interpolate at. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index f0650f4fe9d..07d9833bd1c 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -172,7 +172,7 @@ 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.Centroid;
+ shader->input[i].centroid = d->Interp.Location == TGSI_INTERPOLATE_LOC_CENTROID;
return -1;
case TGSI_FILE_OUTPUT:
@@ -427,7 +427,7 @@ static void declare_input_fs(
case TGSI_INTERPOLATE_LINEAR:
if (si_shader_ctx->shader->key.ps.interp_at_sample)
interp_param = LLVMGetParam(main_fn, SI_PARAM_LINEAR_SAMPLE);
- else if (decl->Interp.Centroid)
+ else if (decl->Interp.Location == TGSI_INTERPOLATE_LOC_CENTROID)
interp_param = LLVMGetParam(main_fn, SI_PARAM_LINEAR_CENTROID);
else
interp_param = LLVMGetParam(main_fn, SI_PARAM_LINEAR_CENTER);
@@ -441,7 +441,7 @@ static void declare_input_fs(
case TGSI_INTERPOLATE_PERSPECTIVE:
if (si_shader_ctx->shader->key.ps.interp_at_sample)
interp_param = LLVMGetParam(main_fn, SI_PARAM_PERSP_SAMPLE);
- else if (decl->Interp.Centroid)
+ else if (decl->Interp.Location == TGSI_INTERPOLATE_LOC_CENTROID)
interp_param = LLVMGetParam(main_fn, SI_PARAM_PERSP_CENTROID);
else
interp_param = LLVMGetParam(main_fn, SI_PARAM_PERSP_CENTER);