From af734468fee1e1fc0714557ddd199e2f91940afc Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 3 Nov 2011 19:56:51 -0600 Subject: [PATCH] st/mesa: clean-up st_translate_interp() --- src/mesa/state_tracker/st_program.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 146e77f9dbb..6c1568dcfa9 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -416,7 +416,9 @@ st_get_vp_variant(struct st_context *st, return vpv; } -static int st_translate_interp(enum glsl_interp_qualifier glsl_qual) + +static unsigned +st_translate_interp(enum glsl_interp_qualifier glsl_qual) { switch (glsl_qual) { case INTERP_QUALIFIER_NONE: @@ -426,11 +428,13 @@ static int st_translate_interp(enum glsl_interp_qualifier glsl_qual) return TGSI_INTERPOLATE_CONSTANT; case INTERP_QUALIFIER_NOPERSPECTIVE: return TGSI_INTERPOLATE_LINEAR; + default: + assert(0 && "unexpected interp mode in st_translate_interp()"); + return TGSI_INTERPOLATE_PERSPECTIVE; } - assert(0); - return TGSI_INTERPOLATE_PERSPECTIVE; } + /** * Translate a Mesa fragment shader into a TGSI shader using extra info in * the key. -- 2.30.2