diff options
author | Brian Paul <brianp@vmware.com> | 2010-02-12 14:46:51 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-02-12 15:42:10 -0700 |
commit | b9b4e7724e5ae80121a053ca66cee73942cc16b7 (patch) | |
tree | 53fe4da22637088f75b015461e377d6a59f19152 /src/mesa | |
parent | cd0a32924d9795fc693d6145baa546ad03650cc3 (diff) |
st/mesa: rename state -> tgsi, updated comments
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_atom_shader.c | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_program.c | 12 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_debug.c | 4 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_draw_feedback.c | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 18 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_program.h | 8 |
6 files changed, 24 insertions, 22 deletions
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c index ea16719ba0..ad151edf3b 100644 --- a/src/mesa/state_tracker/st_atom_shader.c +++ b/src/mesa/state_tracker/st_atom_shader.c @@ -59,7 +59,7 @@ static void translate_fp(struct st_context *st, struct st_fragment_program *stfp) { - if (!stfp->state.tokens) { + if (!stfp->tgsi.tokens) { assert(stfp->Base.Base.NumInstructions > 0); st_translate_fragment_program(st, stfp); diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c index 82ef5572e1..2361b2eddf 100644 --- a/src/mesa/state_tracker/st_cb_program.c +++ b/src/mesa/state_tracker/st_cb_program.c @@ -148,9 +148,9 @@ st_delete_program(GLcontext *ctx, struct gl_program *prog) stfp->driver_shader = NULL; } - if (stfp->state.tokens) { - st_free_tokens(stfp->state.tokens); - stfp->state.tokens = NULL; + if (stfp->tgsi.tokens) { + st_free_tokens(stfp->tgsi.tokens); + stfp->tgsi.tokens = NULL; } if (stfp->bitmap_program) { @@ -193,9 +193,9 @@ static GLboolean st_program_string_notify( GLcontext *ctx, stfp->driver_shader = NULL; } - if (stfp->state.tokens) { - st_free_tokens(stfp->state.tokens); - stfp->state.tokens = NULL; + if (stfp->tgsi.tokens) { + st_free_tokens(stfp->tgsi.tokens); + stfp->tgsi.tokens = NULL; } if (st->fp == stfp) diff --git a/src/mesa/state_tracker/st_debug.c b/src/mesa/state_tracker/st_debug.c index 6e699ca552..5dbabfa5c2 100644 --- a/src/mesa/state_tracker/st_debug.c +++ b/src/mesa/state_tracker/st_debug.c @@ -87,11 +87,11 @@ st_print_current(void) #endif if (st->vp->varients) - tgsi_dump( st->vp->varients[0].state.tokens, 0 ); + tgsi_dump( st->vp->varients[0].tgsi.tokens, 0 ); if (st->vp->Base.Base.Parameters) _mesa_print_parameter_list(st->vp->Base.Base.Parameters); - tgsi_dump( st->fp->state.tokens, 0 ); + tgsi_dump( st->fp->tgsi.tokens, 0 ); if (st->fp->Base.Base.Parameters) _mesa_print_parameter_list(st->fp->Base.Base.Parameters); } diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c index 75ad1a97cf..087f2f22bb 100644 --- a/src/mesa/state_tracker/st_draw_feedback.c +++ b/src/mesa/state_tracker/st_draw_feedback.c @@ -119,7 +119,7 @@ st_feedback_draw_vbo(GLcontext *ctx, /* must get these after state validation! */ vp = ctx->st->vp; - vs = &st->vp_varient->state; + vs = &st->vp_varient->tgsi; if (!st->vp_varient->draw_shader) { st->vp_varient->draw_shader = draw_create_vertex_shader(draw, vs); diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 21ad6fef2b..6a86cf95cd 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -68,8 +68,8 @@ st_vp_release_varients( struct st_context *st, if (vpv->draw_shader) draw_delete_vertex_shader( st->draw, vpv->draw_shader ); - if (vpv->state.tokens) - st_free_tokens(vpv->state.tokens); + if (vpv->tgsi.tokens) + st_free_tokens(vpv->tgsi.tokens); FREE( vpv ); @@ -236,13 +236,13 @@ st_translate_vertex_program(struct st_context *st, if (error) goto fail; - vpv->state.tokens = ureg_get_tokens( ureg, NULL ); - if (!vpv->state.tokens) + vpv->tgsi.tokens = ureg_get_tokens( ureg, NULL ); + if (!vpv->tgsi.tokens) goto fail; ureg_destroy( ureg ); - vpv->driver_shader = pipe->create_vs_state(pipe, &vpv->state); + vpv->driver_shader = pipe->create_vs_state(pipe, &vpv->tgsi); if ((ST_DEBUG & DEBUG_TGSI) && (ST_DEBUG & DEBUG_MESA)) { _mesa_print_program(&stvp->Base.Base); @@ -250,7 +250,7 @@ st_translate_vertex_program(struct st_context *st, } if (ST_DEBUG & DEBUG_TGSI) { - tgsi_dump( vpv->state.tokens, 0 ); + tgsi_dump( vpv->tgsi.tokens, 0 ); debug_printf("\n"); } @@ -437,9 +437,9 @@ st_translate_fragment_program(struct st_context *st, fs_output_semantic_name, fs_output_semantic_index, FALSE ); - stfp->state.tokens = ureg_get_tokens( ureg, NULL ); + stfp->tgsi.tokens = ureg_get_tokens( ureg, NULL ); ureg_destroy( ureg ); - stfp->driver_shader = pipe->create_fs_state(pipe, &stfp->state); + stfp->driver_shader = pipe->create_fs_state(pipe, &stfp->tgsi); if ((ST_DEBUG & DEBUG_TGSI) && (ST_DEBUG & DEBUG_MESA)) { _mesa_print_program(&stfp->Base.Base); @@ -447,7 +447,7 @@ st_translate_fragment_program(struct st_context *st, } if (ST_DEBUG & DEBUG_TGSI) { - tgsi_dump( stfp->state.tokens, 0/*TGSI_DUMP_VERBOSE*/ ); + tgsi_dump( stfp->tgsi.tokens, 0/*TGSI_DUMP_VERBOSE*/ ); debug_printf("\n"); } } diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h index d9822e50f5..1fd25bc0e0 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_program.h @@ -55,7 +55,7 @@ struct st_fragment_program ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS]; ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS]; - struct pipe_shader_state state; + struct pipe_shader_state tgsi; void *driver_shader; /** Program prefixed with glBitmap prologue */ @@ -82,9 +82,11 @@ struct st_vp_varient */ struct st_vp_varient_key key; - /** TGSI tokens -- why? + /** + * TGSI tokens (to later generate a 'draw' module shader for + * selection/feedback/rasterpos) */ - struct pipe_shader_state state; + struct pipe_shader_state tgsi; /** Driver's compiled shader */ void *driver_shader; |