/*
* Translate fragment program if needed.
*/
- if (!stfp->fs) {
+ if (!stfp->cso) {
GLuint inAttr, numIn = 0;
for (inAttr = 0; inAttr < FRAG_ATTRIB_MAX; inAttr++) {
stfp->input_to_slot,
stfp->tokens,
ST_MAX_SHADER_TOKENS);
- assert(stfp->fs);
+ assert(stfp->cso);
}
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++;
}
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;
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 */
}
/* 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);
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;
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);
/*
fs.tokens = tokensOut;
cso = st_cached_fs_state(st, &fs);
- stfp->fs = cso;
+ stfp->cso = cso;
if (0)
_mesa_print_program(&stfp->Base.Base);
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;