diff options
author | Brian Paul <[email protected]> | 2016-02-16 10:22:31 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-02-16 10:22:31 -0700 |
commit | b63fe0552b5f983bc19ab45231687dc684c5a267 (patch) | |
tree | bf37d8d66a87796c8d58426bf3ded527c1d8a7fc /src/mesa/state_tracker/st_context.h | |
parent | 2b1535f82fc58a61e7837c28a0547a5cbe01e106 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_context.h')
-rw-r--r-- | src/mesa/state_tracker/st_context.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index 9ed5d1914f3..93da0e5d1d1 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -89,6 +89,15 @@ enum st_pipeline { }; +/** For drawing quads for glClear, glDraw/CopyPixels, glBitmap, etc. */ +struct st_util_vertex +{ + float x, y, z; + float r, g, b, a; + float s, t; +}; + + struct st_context { struct st_context_iface iface; @@ -230,8 +239,8 @@ struct st_context bool use_gs; } pbo_upload; - /** used for anything using util_draw_vertex_buffer */ - struct pipe_vertex_element velems_util_draw[3]; + /** for drawing with st_util_vertex */ + struct pipe_vertex_element util_velems[3]; void *passthrough_fs; /**< simple pass-through frag shader */ |