diff options
author | Brian Paul <[email protected]> | 2009-03-10 15:53:33 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-03-10 18:27:48 -0600 |
commit | 9c781de015f32b2caadd5a6d999cc6885188a4a4 (patch) | |
tree | be225b1d111e6c3e191e5a2477404658a9048553 /src/mesa/drivers/dri/i965/brw_program.c | |
parent | 294a473f7adfb34a64813e973113ffd6a7ef2583 (diff) |
i965: use new cast wrappers
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_program.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_program.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index 2894cce3d6b..d90bd820386 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/mesa/drivers/dri/i965/brw_program.c @@ -113,8 +113,10 @@ static void brwProgramStringNotify( GLcontext *ctx, struct brw_context *brw = brw_context(ctx); if (target == GL_FRAGMENT_PROGRAM_ARB) { struct gl_fragment_program *fprog = (struct gl_fragment_program *) prog; - struct brw_fragment_program *newFP = (struct brw_fragment_program *) prog; - struct brw_fragment_program *curFP = (struct brw_fragment_program *) brw->fragment_program; + struct brw_fragment_program *newFP = brw_fragment_program(fprog); + const struct brw_fragment_program *curFP = + brw_fragment_program_const(brw->fragment_program); + if (fprog->FogOption) { _mesa_append_fog_code(ctx, fprog); fprog->FogOption = GL_NONE; @@ -126,8 +128,11 @@ static void brwProgramStringNotify( GLcontext *ctx, newFP->isGLSL = brw_wm_is_glsl(fprog); } else if (target == GL_VERTEX_PROGRAM_ARB) { - struct brw_vertex_program *newVP = (struct brw_vertex_program *) prog; - struct brw_vertex_program *curVP = (struct brw_vertex_program *) brw->vertex_program; + struct gl_vertex_program *vprog = (struct gl_vertex_program *) prog; + struct brw_vertex_program *newVP = brw_vertex_program(vprog); + const struct brw_vertex_program *curVP = + brw_vertex_program_const(brw->vertex_program); + if (newVP == curVP) brw->state.dirty.brw |= BRW_NEW_VERTEX_PROGRAM; if (newVP->program.IsPositionInvariant) { |