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);
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) {
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)
#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);
}
/* 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);
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 );
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);
}
if (ST_DEBUG & DEBUG_TGSI) {
- tgsi_dump( vpv->state.tokens, 0 );
+ tgsi_dump( vpv->tgsi.tokens, 0 );
debug_printf("\n");
}
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);
}
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");
}
}
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 */
*/
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;