aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/nvprogram.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-31 10:17:14 +0200
committermarha <marha@users.sourceforge.net>2012-07-31 10:17:14 +0200
commit83da3ad0287bc51cd16ee6911fe73dc98ebe000b (patch)
tree48d48590a0b0a3770006aeda8ec2b2a45054d1f1 /mesalib/src/mesa/main/nvprogram.c
parent00e30605ffc7ac3cf1a091ff2c1f46cfefb780d7 (diff)
parentbd27b3d008b0abf9ae2edcb127302728808533e4 (diff)
downloadvcxsrv-83da3ad0287bc51cd16ee6911fe73dc98ebe000b.tar.gz
vcxsrv-83da3ad0287bc51cd16ee6911fe73dc98ebe000b.tar.bz2
vcxsrv-83da3ad0287bc51cd16ee6911fe73dc98ebe000b.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/nvprogram.c')
-rw-r--r--mesalib/src/mesa/main/nvprogram.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/mesalib/src/mesa/main/nvprogram.c b/mesalib/src/mesa/main/nvprogram.c
index dae11566e..fc5749afc 100644
--- a/mesalib/src/mesa/main/nvprogram.c
+++ b/mesalib/src/mesa/main/nvprogram.c
@@ -71,7 +71,7 @@ _mesa_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params)
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
- vprog = (struct gl_vertex_program *) _mesa_lookup_program(ctx, id);
+ vprog = gl_vertex_program(_mesa_lookup_program(ctx, id));
if (!vprog || vprog->Base.Target != GL_VERTEX_STATE_PROGRAM_NV) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glExecuteProgramNV");
@@ -627,10 +627,9 @@ _mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
if ((target == GL_VERTEX_PROGRAM_NV ||
target == GL_VERTEX_STATE_PROGRAM_NV)
&& ctx->Extensions.NV_vertex_program) {
- struct gl_vertex_program *vprog = (struct gl_vertex_program *) prog;
+ struct gl_vertex_program *vprog = gl_vertex_program(prog);
if (!vprog || prog == &_mesa_DummyProgram) {
- vprog = (struct gl_vertex_program *)
- ctx->Driver.NewProgram(ctx, target, id);
+ vprog = gl_vertex_program(ctx->Driver.NewProgram(ctx, target, id));
if (!vprog) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV");
return;
@@ -647,10 +646,9 @@ _mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
}
else if (target == GL_FRAGMENT_PROGRAM_NV
&& ctx->Extensions.NV_fragment_program) {
- struct gl_fragment_program *fprog = (struct gl_fragment_program *) prog;
+ struct gl_fragment_program *fprog = gl_fragment_program(prog);
if (!fprog || prog == &_mesa_DummyProgram) {
- fprog = (struct gl_fragment_program *)
- ctx->Driver.NewProgram(ctx, target, id);
+ fprog = gl_fragment_program(ctx->Driver.NewProgram(ctx, target, id));
if (!fprog) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV");
return;
@@ -661,10 +659,9 @@ _mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
}
else if (target == GL_FRAGMENT_PROGRAM_ARB
&& ctx->Extensions.ARB_fragment_program) {
- struct gl_fragment_program *fprog = (struct gl_fragment_program *) prog;
+ struct gl_fragment_program *fprog = gl_fragment_program(prog);
if (!fprog || prog == &_mesa_DummyProgram) {
- fprog = (struct gl_fragment_program *)
- ctx->Driver.NewProgram(ctx, target, id);
+ fprog = gl_fragment_program(ctx->Driver.NewProgram(ctx, target, id));
if (!fprog) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV");
return;
@@ -830,7 +827,7 @@ _mesa_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte *name,
return;
}
- fragProg = (struct gl_fragment_program *) prog;
+ fragProg = gl_fragment_program(prog);
v = _mesa_lookup_parameter_value(fragProg->Base.Parameters, len,
(char *) name);
if (v) {
@@ -895,7 +892,7 @@ _mesa_GetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte *name,
return;
}
- fragProg = (struct gl_fragment_program *) prog;
+ fragProg = gl_fragment_program(prog);
v = _mesa_lookup_parameter_value(fragProg->Base.Parameters,
len, (char *) name);
if (v) {