summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/arbprogram.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2004-02-14 15:00:42 +0000
committerKeith Whitwell <[email protected]>2004-02-14 15:00:42 +0000
commit964e5325bdcca702cfb2f210e0b89809e42847ef (patch)
tree1d65322fce17d62024ad7f900c30a48e7bbb321c /src/mesa/main/arbprogram.c
parent70dacabfe503e89d8c4a8df9fa6568aa5613a25b (diff)
Make it easier for drivers to create "subclasses" of the existing
program struct hierarchy. Add driver callbacks to enable the above and make it possible to track more changes to program objects.
Diffstat (limited to 'src/mesa/main/arbprogram.c')
-rw-r--r--src/mesa/main/arbprogram.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mesa/main/arbprogram.c b/src/mesa/main/arbprogram.c
index ab27e086770..f6d16b5547f 100644
--- a/src/mesa/main/arbprogram.c
+++ b/src/mesa/main/arbprogram.c
@@ -202,6 +202,9 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
}
_mesa_parse_arb_vertex_program(ctx, target, (const GLubyte *) string,
len, prog);
+
+ if (ctx->Driver.ProgramStringNotify)
+ ctx->Driver.ProgramStringNotify( ctx, target, &prog->Base );
}
else if (target == GL_FRAGMENT_PROGRAM_ARB
&& ctx->Extensions.ARB_fragment_program) {
@@ -212,9 +215,13 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
}
_mesa_parse_arb_fragment_program(ctx, target, (const GLubyte *) string,
len, prog);
+
+ if (ctx->Driver.ProgramStringNotify)
+ ctx->Driver.ProgramStringNotify( ctx, target, &prog->Base );
}
else {
_mesa_error(ctx, GL_INVALID_ENUM, "glProgramStringARB(target)");
+ return;
}
}
@@ -618,8 +625,10 @@ _mesa_GetProgramivARB(GLenum target, GLenum pname, GLint *params)
*params = ctx->Const.MaxFragmentProgramEnvParams;
break;
case GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB:
- /* XXX ok? */
- *params = GL_TRUE;
+ if (ctx->Driver.IsProgramNative)
+ *params = ctx->Driver.IsProgramNative( ctx, target, prog );
+ else
+ *params = GL_TRUE;
break;
/*