diff options
author | Brian <[email protected]> | 2007-11-21 16:00:57 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-11-21 16:00:57 -0700 |
commit | 9f0b5bba707d6c36896b4b8afad4e6b459da5e99 (patch) | |
tree | c2064cc02554f19f77bceefbcefd3bb8f8c24101 /src/mesa/state_tracker/st_draw.c | |
parent | fbe68bf6b286056bb03f44907a078918d04cbdfd (diff) |
Replace draw_set_vertex_attributes() with simpler draw_set_vertex_info().
Just pass in the vertex_info object and make a copy of it.
Diffstat (limited to 'src/mesa/state_tracker/st_draw.c')
-rw-r--r-- | src/mesa/state_tracker/st_draw.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 3b6d8291452..61ff034550d 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -324,27 +324,26 @@ static void set_feedback_vertex_format(GLcontext *ctx) { struct st_context *st = ctx->st; - uint attrs[PIPE_MAX_SHADER_OUTPUTS]; - enum interp_mode interp[PIPE_MAX_SHADER_OUTPUTS]; - GLuint n, i; + struct vertex_info vinfo; + GLuint i; if (ctx->RenderMode == GL_SELECT) { assert(ctx->RenderMode == GL_SELECT); - n = 1; - attrs[0] = FORMAT_4F; - interp[0] = INTERP_NONE; + vinfo.num_attribs = 1; + vinfo.format[0] = FORMAT_4F; + vinfo.interp_mode[0] = INTERP_NONE; } else { /* GL_FEEDBACK, or glRasterPos */ /* emit all attribs (pos, color, texcoord) as GLfloat[4] */ - n = st->state.vs->state.num_outputs; - for (i = 0; i < n; i++) { - attrs[i] = FORMAT_4F; - interp[i] = INTERP_NONE; + vinfo.num_attribs = st->state.vs->state.num_outputs; + for (i = 0; i < vinfo.num_attribs; i++) { + vinfo.format[i] = FORMAT_4F; + vinfo.interp_mode[i] = INTERP_LINEAR; } } - draw_set_vertex_attributes(st->draw, attrs, interp, n); + draw_set_vertex_info(st->draw, &vinfo); } |