diff options
author | marha <marha@users.sourceforge.net> | 2012-01-06 19:27:25 +0100 |
---|---|---|
committer | Marc Haesen <marc@hc-consult.be> | 2012-01-06 19:27:25 +0100 |
commit | 7e9f4ea970e8f7008c212d7d3918a974eb0066da (patch) | |
tree | 92cf7fcdf6e8093e743346af2397f3caa17cffe3 /mesalib/src/mesa/state_tracker/st_draw_feedback.c | |
parent | 9715b7fab0757c86e1bb151f3dce0b324bcff692 (diff) | |
download | vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.tar.gz vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.tar.bz2 vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.zip |
libX11 mesa pixman git update 6 jan 2012
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_draw_feedback.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_draw_feedback.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_draw_feedback.c b/mesalib/src/mesa/state_tracker/st_draw_feedback.c index 4c1e67495..fbf0349b4 100644 --- a/mesalib/src/mesa/state_tracker/st_draw_feedback.c +++ b/mesalib/src/mesa/state_tracker/st_draw_feedback.c @@ -196,7 +196,8 @@ st_feedback_draw_vbo(struct gl_context *ctx, st_pipe_vertex_format(arrays[mesaAttr]->Type, arrays[mesaAttr]->Size, arrays[mesaAttr]->Format, - arrays[mesaAttr]->Normalized); + arrays[mesaAttr]->Normalized, + arrays[mesaAttr]->Integer); assert(velements[attr].src_format); /* tell draw about this attribute */ @@ -218,20 +219,9 @@ st_feedback_draw_vbo(struct gl_context *ctx, if (ib) { struct gl_buffer_object *bufobj = ib->obj; - switch (ib->type) { - case GL_UNSIGNED_INT: - ibuffer.index_size = 4; - break; - case GL_UNSIGNED_SHORT: - ibuffer.index_size = 2; - break; - case GL_UNSIGNED_BYTE: - ibuffer.index_size = 1; - break; - default: - assert(0); - goto out_unref_vertex; - } + ibuffer.index_size = vbo_sizeof_ib_type(ib->type); + if (ibuffer.index_size == 0) + goto out_unref_vertex; if (bufobj && bufobj->Name) { struct st_buffer_object *stobj = st_buffer_object(bufobj); |