i965: Convert brw->*_program into a brw->programs[i] array.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_wm.c
index 92354e464ca672189387e201dcac44f72ce774d7..3ab8e3930aedf4eedb5c86709f428e73b7ed9c2a 100644 (file)
@@ -460,8 +460,8 @@ brw_wm_populate_key(struct brw_context *brw, struct brw_wm_prog_key *key)
    const struct gen_device_info *devinfo = &brw->screen->devinfo;
    struct gl_context *ctx = &brw->ctx;
    /* BRW_NEW_FRAGMENT_PROGRAM */
-   const struct brw_program *fp = brw_program_const(brw->fragment_program);
-   const struct gl_program *prog = (struct gl_program *) brw->fragment_program;
+   const struct gl_program *prog = brw->programs[MESA_SHADER_FRAGMENT];
+   const struct brw_program *fp = brw_program_const(prog);
    GLuint lookup = 0;
    GLuint line_aa;
 
@@ -595,7 +595,8 @@ void
 brw_upload_wm_prog(struct brw_context *brw)
 {
    struct brw_wm_prog_key key;
-   struct brw_program *fp = (struct brw_program *) brw->fragment_program;
+   struct brw_program *fp =
+      (struct brw_program *) brw->programs[MESA_SHADER_FRAGMENT];
 
    if (!brw_wm_state_dirty(brw))
       return;