i965: Don't try to fall back when creating unrecognized program targets.
authorPaul Berry <stereotype441@gmail.com>
Fri, 23 Aug 2013 18:43:26 +0000 (11:43 -0700)
committerPaul Berry <stereotype441@gmail.com>
Mon, 26 Aug 2013 15:55:39 +0000 (08:55 -0700)
If brwNewProgram is asked to create a program for an unrecognized
target, don't bother falling back on _mesa_new_program().  That just
hides bugs.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
v2: Use assert() rather than _mesa_problem().

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i965/brw_program.c

index c40d506750ee6e58c938bdb4d650cf1abefa35bf..9a517be0b3443a544863cf89b933e5e80c14d57a 100644 (file)
@@ -114,7 +114,8 @@ static struct gl_program *brwNewProgram( struct gl_context *ctx,
    }
 
    default:
-      return _mesa_new_program(ctx, target, id);
+      assert(!"Unsupported target in brwNewProgram()");
+      return NULL;
    }
 }