From 8269bc48d8fafaa432b58f4adf5e0dddd81d979d Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 14 Aug 2007 15:42:47 +0100 Subject: [PATCH] Add structs and set-functions for vertex buffer, element state. Not currently used. --- src/mesa/pipe/p_context.h | 10 +++++++++- src/mesa/pipe/p_state.h | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/mesa/pipe/p_context.h b/src/mesa/pipe/p_context.h index 76357559478..c0685fa8cba 100644 --- a/src/mesa/pipe/p_context.h +++ b/src/mesa/pipe/p_context.h @@ -136,7 +136,15 @@ struct pipe_context { void (*set_viewport_state)( struct pipe_context *, const struct pipe_viewport_state * ); - + void (*set_vertex_buffer)( struct pipe_context *, + unsigned index, + struct pipe_vertex_buffer * ); + + void (*set_vertex_element)( struct pipe_context *, + unsigned index, + struct pipe_vertex_element * ); + + /* * Surface functions * This might go away... diff --git a/src/mesa/pipe/p_state.h b/src/mesa/pipe/p_state.h index dc2b589e555..5051ebbfc05 100644 --- a/src/mesa/pipe/p_state.h +++ b/src/mesa/pipe/p_state.h @@ -320,4 +320,25 @@ struct pipe_mipmap_tree }; + +struct pipe_vertex_buffer +{ + unsigned pitch:11; + unsigned max_index; + struct pipe_buffer_handle *buffer; + unsigned buffer_offset; +}; + + + +struct pipe_vertex_element +{ + unsigned src_offset:11; + unsigned vertex_buffer_index:5; + unsigned dst_offset:8; + unsigned src_format:8; /* PIPE_FORMAT_* */ +}; + + + #endif -- 2.30.2