Fix problems with vertex shaders and the private draw module.

The CSO returned by pipe->create_vs_state() can't be passed to the
private draw module.  That was causing glRasterPos to blow up.
Add a 'draw_shader' field to st_vertex_program for use with the private
draw module.
Change st_context->state.vs type from cso_vertex_shader to st_vertex_program.
This commit is contained in:
Brian
2008-01-14 19:12:46 -07:00
parent b4e4fafb41
commit ac95fee4ff
9 changed files with 43 additions and 32 deletions

View File

@@ -90,7 +90,10 @@ struct st_vertex_program
struct tgsi_token tokens[ST_MAX_SHADER_TOKENS];
/** Pointer to the corresponding cached shader */
const struct cso_vertex_shader *vs;
const struct cso_vertex_shader *cso;
/** For using our private draw module (glRasterPos) */
struct draw_vertex_shader *draw_shader;
GLuint param_state;
};
@@ -122,7 +125,7 @@ st_translate_fragment_program(struct st_context *st,
GLuint maxTokens);
extern const struct cso_vertex_shader *
extern void
st_translate_vertex_program(struct st_context *st,
struct st_vertex_program *vp,
const GLuint vert_output_to_slot[],