gallium: rename st_fragment_program's fs field to cso to match st_vertex_program
This commit is contained in:
@@ -158,7 +158,7 @@ find_translated_vp(struct st_context *st,
|
|||||||
/*
|
/*
|
||||||
* Translate fragment program if needed.
|
* Translate fragment program if needed.
|
||||||
*/
|
*/
|
||||||
if (!stfp->fs) {
|
if (!stfp->cso) {
|
||||||
GLuint inAttr, numIn = 0;
|
GLuint inAttr, numIn = 0;
|
||||||
|
|
||||||
for (inAttr = 0; inAttr < FRAG_ATTRIB_MAX; inAttr++) {
|
for (inAttr = 0; inAttr < FRAG_ATTRIB_MAX; inAttr++) {
|
||||||
@@ -179,7 +179,7 @@ find_translated_vp(struct st_context *st,
|
|||||||
stfp->input_to_slot,
|
stfp->input_to_slot,
|
||||||
stfp->tokens,
|
stfp->tokens,
|
||||||
ST_MAX_SHADER_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) {
|
if (fpInAttrib >= 0) {
|
||||||
GLuint fpInSlot = stfp->input_to_slot[fpInAttrib];
|
GLuint fpInSlot = stfp->input_to_slot[fpInAttrib];
|
||||||
if (fpInSlot != ~0) {
|
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;
|
xvp->output_to_slot[outAttr] = vpOutSlot;
|
||||||
numVpOuts++;
|
numVpOuts++;
|
||||||
}
|
}
|
||||||
@@ -300,7 +300,7 @@ update_linkage( struct st_context *st )
|
|||||||
st->pipe->bind_vs_state(st->pipe, st->state.vs->cso->data);
|
st->pipe->bind_vs_state(st->pipe, st->state.vs->cso->data);
|
||||||
|
|
||||||
st->fp = stfp;
|
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->pipe->bind_fs_state(st->pipe, st->state.fs->data);
|
||||||
|
|
||||||
st->vertex_result_to_slot = xvp->output_to_slot;
|
st->vertex_result_to_slot = xvp->output_to_slot;
|
||||||
|
@@ -341,7 +341,7 @@ clear_with_quad(GLcontext *ctx,
|
|||||||
if (!stfp) {
|
if (!stfp) {
|
||||||
stfp = make_frag_shader(st);
|
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 */
|
/* vertex shader state: color/position pass-through */
|
||||||
|
@@ -665,7 +665,7 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* fragment shader state: TEX lookup program */
|
/* 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 */
|
/* vertex shader state: position + texcoord pass-through */
|
||||||
pipe->bind_vs_state(pipe, stvp->cso->data);
|
pipe->bind_vs_state(pipe, stvp->cso->data);
|
||||||
|
@@ -168,10 +168,10 @@ static void st_program_string_notify( GLcontext *ctx,
|
|||||||
|
|
||||||
stfp->serialNo++;
|
stfp->serialNo++;
|
||||||
|
|
||||||
if (stfp->fs) {
|
if (stfp->cso) {
|
||||||
/* free the TGSI code */
|
/* free the TGSI code */
|
||||||
// cso_delete(stfp->vs);
|
// cso_delete(stfp->vs);
|
||||||
stfp->fs = NULL;
|
stfp->cso = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
stfp->param_state = stfp->Base.Base.Parameters->StateFlags;
|
stfp->param_state = stfp->Base.Base.Parameters->StateFlags;
|
||||||
|
@@ -253,7 +253,7 @@ st_render_mipmap(struct st_context *st,
|
|||||||
pipe->bind_rasterizer_state(pipe, st->gen_mipmap.rasterizer_cso);
|
pipe->bind_rasterizer_state(pipe, st->gen_mipmap.rasterizer_cso);
|
||||||
|
|
||||||
/* bind shaders */
|
/* 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);
|
pipe->bind_vs_state(pipe, st->gen_mipmap.stvp->cso->data);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -420,7 +420,7 @@ st_translate_fragment_program(struct st_context *st,
|
|||||||
fs.tokens = tokensOut;
|
fs.tokens = tokensOut;
|
||||||
|
|
||||||
cso = st_cached_fs_state(st, &fs);
|
cso = st_cached_fs_state(st, &fs);
|
||||||
stfp->fs = cso;
|
stfp->cso = cso;
|
||||||
|
|
||||||
if (0)
|
if (0)
|
||||||
_mesa_print_program(&stfp->Base.Base);
|
_mesa_print_program(&stfp->Base.Base);
|
||||||
|
@@ -62,7 +62,7 @@ struct st_fragment_program
|
|||||||
struct tgsi_token tokens[ST_MAX_SHADER_TOKENS];
|
struct tgsi_token tokens[ST_MAX_SHADER_TOKENS];
|
||||||
|
|
||||||
/** Pointer to the corresponding cached shader */
|
/** Pointer to the corresponding cached shader */
|
||||||
const struct cso_fragment_shader *fs;
|
const struct cso_fragment_shader *cso;
|
||||||
|
|
||||||
GLuint param_state;
|
GLuint param_state;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user