diff options
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_state_derived.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_state_derived.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_derived.c b/src/gallium/drivers/softpipe/sp_state_derived.c index 56859971d8e..7b2b04e84e9 100644 --- a/src/gallium/drivers/softpipe/sp_state_derived.c +++ b/src/gallium/drivers/softpipe/sp_state_derived.c @@ -100,6 +100,9 @@ softpipe_get_vertex_info(struct softpipe_context *softpipe) case TGSI_INTERPOLATE_PERSPECTIVE: interp = INTERP_PERSPECTIVE; break; + case TGSI_INTERPOLATE_COLOR: + assert(fsInfo->input_semantic_name[i] == TGSI_SEMANTIC_COLOR); + break; default: assert(0); interp = INTERP_LINEAR; @@ -111,8 +114,11 @@ softpipe_get_vertex_info(struct softpipe_context *softpipe) break; case TGSI_SEMANTIC_COLOR: - if (softpipe->rasterizer->flatshade) { - interp = INTERP_CONSTANT; + if (fsInfo->input_interpolate[i] == TGSI_INTERPOLATE_COLOR) { + if (softpipe->rasterizer->flatshade) + interp = INTERP_CONSTANT; + else + interp = INTERP_PERSPECTIVE; } break; } |