return s;
}
+static struct gl_program *
+new_ati_fs(struct gl_context *ctx, struct ati_fragment_shader *curProg)
+{
+ struct gl_program *prog = rzalloc(NULL, struct gl_program);
+ if (!prog)
+ return NULL;
+
+ _mesa_init_gl_program(prog, MESA_SHADER_FRAGMENT, curProg->Id, true);
+ prog->ati_fs = curProg;
+ return prog;
+}
/**
* Delete the given ati fragment shader
}
#endif
- struct gl_program *prog = st_new_ati_fs(ctx,
- ctx->ATIFragmentShader.Current);
+ struct gl_program *prog = new_ati_fs(ctx,
+ ctx->ATIFragmentShader.Current);
_mesa_reference_program(ctx, &ctx->ATIFragmentShader.Current->Program,
NULL);
/* Don't use _mesa_reference_program(), just take ownership */
}
/**
- * Called in glEndFragmentShaderATI()
- */
-struct gl_program *
-st_new_ati_fs(struct gl_context *ctx, struct ati_fragment_shader *curProg)
-{
- struct gl_program *prog = st_new_program(ctx, MESA_SHADER_FRAGMENT,
- curProg->Id, true);
- prog->ati_fs = curProg;
- return prog;
-}
-
-/**
* Plug in the program and shader-related device driver functions.
*/
void
GLboolean st_program_string_notify(struct gl_context *ctx,
GLenum target,
struct gl_program *prog);
-struct gl_program *st_new_ati_fs(struct gl_context *ctx, struct ati_fragment_shader *curProg);
#ifdef __cplusplus
}