st/mesa: overhaul vertex setup for clearing, glDrawPixels, glBitmap
authorBrian Paul <brianp@vmware.com>
Tue, 16 Feb 2016 17:22:31 +0000 (10:22 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 16 Feb 2016 17:22:31 +0000 (10:22 -0700)
commitb63fe0552b5f983bc19ab45231687dc684c5a267
treebf37d8d66a87796c8d58426bf3ded527c1d8a7fc
parent2b1535f82fc58a61e7837c28a0547a5cbe01e106
st/mesa: overhaul vertex setup for clearing, glDrawPixels, glBitmap

Define a new st_util_vertex structure which is a bit smaller (9 floats
versus the previous 12 floats per vertex).  Clean up the glClear,
glDrawPixels and glBitmap code that sets up the vertex data and does the
drawing so it's all very similar.  This can lead to more consolidation.

v2: add assertion that vertex buffer slot == 0 to catch possible future
change in cso_get_aux_vertex_buffer_slot() behavior.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/mesa/state_tracker/st_cb_bitmap.c
src/mesa/state_tracker/st_cb_clear.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_context.c
src/mesa/state_tracker/st_context.h