disable ctx->Driver.NewProgram() call in _mesa_new_program()

This was causing infinite recursive calls w/ software drivers.
All vertex/fragment shaders should be allocated by calling
ctx->Driver.NewProgram(), not by calling _mesa_new_program().
This commit is contained in:
Brian
2007-10-29 10:01:15 -06:00
parent 162914675a
commit 40133487db

View File

@@ -285,8 +285,13 @@ _mesa_init_vertex_program( GLcontext *ctx, struct gl_vertex_program *prog,
struct gl_program * struct gl_program *
_mesa_new_program(GLcontext *ctx, GLenum target, GLuint id) _mesa_new_program(GLcontext *ctx, GLenum target, GLuint id)
{ {
#if 0
/* This was added by Nan hai Zou but disabled by BrianP since it
* causes infinite recursive calls.
*/
if (ctx->Driver.NewProgram) if (ctx->Driver.NewProgram)
return ctx->Driver.NewProgram(ctx, target, id); return ctx->Driver.NewProgram(ctx, target, id);
#endif
switch (target) { switch (target) {
case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */ case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */
return _mesa_init_vertex_program(ctx, CALLOC_STRUCT(gl_vertex_program), return _mesa_init_vertex_program(ctx, CALLOC_STRUCT(gl_vertex_program),