aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-09 16:58:33 +0100
committermarha <marha@users.sourceforge.net>2011-11-09 16:58:33 +0100
commita8e5f06fe01732fbd643bc435dd3b8eaa602defe (patch)
treeb18cd9881bc5a6d317edca6c38fa912bade00802 /mesalib/src/mesa/state_tracker/st_program.c
parent1ed503a856d9753a813951796bc6ba56c42ecd28 (diff)
downloadvcxsrv-a8e5f06fe01732fbd643bc435dd3b8eaa602defe.tar.gz
vcxsrv-a8e5f06fe01732fbd643bc435dd3b8eaa602defe.tar.bz2
vcxsrv-a8e5f06fe01732fbd643bc435dd3b8eaa602defe.zip
libX11 mesa pixman git update 9 nov 2011
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_program.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_program.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_program.c b/mesalib/src/mesa/state_tracker/st_program.c
index 146e77f9d..e03157940 100644
--- a/mesalib/src/mesa/state_tracker/st_program.c
+++ b/mesalib/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.
@@ -632,8 +636,10 @@ st_translate_fragment_program(struct st_context *st,
}
ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT );
- if (ureg == NULL)
+ if (ureg == NULL) {
+ FREE(variant);
return NULL;
+ }
if (ST_DEBUG & DEBUG_MESA) {
_mesa_print_program(&stfp->Base.Base);