gallium: rename st_fragment_program's fs field to cso to match st_vertex_program
authorBrian <brian.paul@tungstengraphics.com>
Tue, 12 Feb 2008 23:10:11 +0000 (16:10 -0700)
committerBen Skeggs <skeggsb@gmail.com>
Fri, 15 Feb 2008 02:51:11 +0000 (13:51 +1100)
src/mesa/state_tracker/st_atom_shader.c
src/mesa/state_tracker/st_cb_clear.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_cb_program.c
src/mesa/state_tracker/st_gen_mipmap.c
src/mesa/state_tracker/st_program.c
src/mesa/state_tracker/st_program.h

index 9196918..2c6ec84 100644 (file)
@@ -158,7 +158,7 @@ find_translated_vp(struct st_context *st,
    /*
     * Translate fragment program if needed.
     */
-   if (!stfp->fs) {
+   if (!stfp->cso) {
       GLuint inAttr, numIn = 0;
 
       for (inAttr = 0; inAttr < FRAG_ATTRIB_MAX; inAttr++) {
@@ -179,7 +179,7 @@ find_translated_vp(struct st_context *st,
                                            stfp->input_to_slot,
                                            stfp->tokens,
                                            ST_MAX_SHADER_TOKENS);
-      assert(stfp->fs);
+      assert(stfp->cso);
    }
 
 
@@ -227,7 +227,7 @@ find_translated_vp(struct st_context *st,
             if (fpInAttrib >= 0) {
                GLuint fpInSlot = stfp->input_to_slot[fpInAttrib];
                if (fpInSlot != ~0) {
-                  GLuint vpOutSlot = stfp->fs->state.input_map[fpInSlot];
+                  GLuint vpOutSlot = stfp->cso->state.input_map[fpInSlot];
                   xvp->output_to_slot[outAttr] = vpOutSlot;
                   numVpOuts++;
                }
@@ -300,7 +300,7 @@ update_linkage( struct st_context *st )
    st->pipe->bind_vs_state(st->pipe, st->state.vs->cso->data);
 
    st->fp = stfp;
-   st->state.fs = stfp->fs;
+   st->state.fs = stfp->cso;
    st->pipe->bind_fs_state(st->pipe, st->state.fs->data);
 
    st->vertex_result_to_slot = xvp->output_to_slot;
index ab98b54..410062e 100644 (file)
@@ -341,7 +341,7 @@ clear_with_quad(GLcontext *ctx,
       if (!stfp) {
          stfp = make_frag_shader(st);
       }
-      pipe->bind_fs_state(pipe, stfp->fs->data);
+      pipe->bind_fs_state(pipe, stfp->cso->data);
    }
 
    /* vertex shader state: color/position pass-through */
index 475e236..3245a74 100644 (file)
@@ -665,7 +665,7 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
    }
 
    /* fragment shader state: TEX lookup program */
-   pipe->bind_fs_state(pipe, stfp->fs->data);
+   pipe->bind_fs_state(pipe, stfp->cso->data);
 
    /* vertex shader state: position + texcoord pass-through */
    pipe->bind_vs_state(pipe, stvp->cso->data);
index f1f33fb..af3ee65 100644 (file)
@@ -168,10 +168,10 @@ static void st_program_string_notify( GLcontext *ctx,
 
       stfp->serialNo++;
 
-      if (stfp->fs) {
+      if (stfp->cso) {
          /* free the TGSI code */
          // cso_delete(stfp->vs);
-         stfp->fs = NULL;
+         stfp->cso = NULL;
       }
 
       stfp->param_state = stfp->Base.Base.Parameters->StateFlags;
index b4a21fd..459941c 100644 (file)
@@ -253,7 +253,7 @@ st_render_mipmap(struct st_context *st,
    pipe->bind_rasterizer_state(pipe, st->gen_mipmap.rasterizer_cso);
 
    /* bind shaders */
-   pipe->bind_fs_state(pipe, st->gen_mipmap.stfp->fs->data);
+   pipe->bind_fs_state(pipe, st->gen_mipmap.stfp->cso->data);
    pipe->bind_vs_state(pipe, st->gen_mipmap.stvp->cso->data);
 
    /*
index 84a9094..c8297ba 100644 (file)
@@ -420,7 +420,7 @@ st_translate_fragment_program(struct st_context *st,
    fs.tokens = tokensOut;
 
    cso = st_cached_fs_state(st, &fs);
-   stfp->fs = cso;
+   stfp->cso = cso;
 
    if (0)
       _mesa_print_program(&stfp->Base.Base);
index de02c31..ea1dde4 100644 (file)
@@ -62,7 +62,7 @@ struct st_fragment_program
    struct tgsi_token tokens[ST_MAX_SHADER_TOKENS];
 
    /** Pointer to the corresponding cached shader */
-   const struct cso_fragment_shader *fs;
+   const struct cso_fragment_shader *cso;
 
    GLuint param_state;