summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_shader.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-05-06 19:10:52 +0200
committerMarek Olšák <[email protected]>2014-06-02 12:58:22 +0200
commit99df120e006dbbce7aaf4b1466db423aa2432e54 (patch)
tree9234406935731785c477c4ea7c9b302a79e0c636 /src/gallium/drivers/radeonsi/si_shader.c
parent99d9d7c0d69c076d84334892ee12f921fe243319 (diff)
radeonsi: interpolate varyings at sample when full sample shading is enabled
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 6818106ece7..5f9abe3face 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -421,27 +421,27 @@ static void declare_input_fs(
shader->input[input_index].param_offset);
switch (decl->Interp.Interpolate) {
- case TGSI_INTERPOLATE_COLOR:
- if (si_shader_ctx->shader->key.ps.flatshade) {
- interp_param = 0;
- } else {
- if (decl->Interp.Centroid)
- interp_param = LLVMGetParam(main_fn, SI_PARAM_PERSP_CENTROID);
- else
- interp_param = LLVMGetParam(main_fn, SI_PARAM_PERSP_CENTER);
- }
- break;
case TGSI_INTERPOLATE_CONSTANT:
interp_param = 0;
break;
case TGSI_INTERPOLATE_LINEAR:
- if (decl->Interp.Centroid)
+ if (si_shader_ctx->shader->key.ps.interp_at_sample)
+ interp_param = LLVMGetParam(main_fn, SI_PARAM_LINEAR_SAMPLE);
+ else if (decl->Interp.Centroid)
interp_param = LLVMGetParam(main_fn, SI_PARAM_LINEAR_CENTROID);
else
interp_param = LLVMGetParam(main_fn, SI_PARAM_LINEAR_CENTER);
break;
+ case TGSI_INTERPOLATE_COLOR:
+ if (si_shader_ctx->shader->key.ps.flatshade) {
+ interp_param = 0;
+ break;
+ }
+ /* fall through to perspective */
case TGSI_INTERPOLATE_PERSPECTIVE:
- if (decl->Interp.Centroid)
+ if (si_shader_ctx->shader->key.ps.interp_at_sample)
+ interp_param = LLVMGetParam(main_fn, SI_PARAM_PERSP_SAMPLE);
+ else if (decl->Interp.Centroid)
interp_param = LLVMGetParam(main_fn, SI_PARAM_PERSP_CENTROID);
else
interp_param = LLVMGetParam(main_fn, SI_PARAM_PERSP_CENTER);