summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo.h37
-rw-r--r--src/mesa/vbo/vbo_exec.c86
2 files changed, 0 insertions, 123 deletions
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h
index ca46f9baa79..4e3f15999c0 100644
--- a/src/mesa/vbo/vbo.h
+++ b/src/mesa/vbo/vbo.h
@@ -38,9 +38,7 @@
extern "C" {
#endif
-struct gl_vertex_array;
struct gl_context;
-struct gl_transform_feedback_object;
struct _mesa_prim
{
@@ -151,41 +149,6 @@ vbo_sw_primitive_restart(struct gl_context *ctx,
struct gl_buffer_object *indirect);
-/**
- * Utility that tracks and updates the current array entries.
- */
-struct vbo_inputs
-{
- /**
- * Array of inputs to be set to the _DrawArrays pointer.
- * The array contains pointers into the _DrawVAO and to the vbo modules
- * current values. The array of pointers is updated incrementally
- * based on the current and vertex_processing_mode values below.
- */
- struct gl_vertex_array inputs[VERT_ATTRIB_MAX];
- /** Those VERT_BIT_'s where the inputs array point to current values. */
- GLbitfield current;
- /** Store which aliasing current values - generics or materials - are set. */
- gl_vertex_processing_mode vertex_processing_mode;
-};
-
-
-/**
- * Initialize inputs.
- */
-void
-_vbo_init_inputs(struct vbo_inputs *inputs);
-
-
-/**
- * Update the gl_vertex_array array inside the vbo_inputs structure
- * provided the current _VPMode, the provided vao and
- * the vao's enabled arrays filtered by the filter bitmask.
- */
-void
-_vbo_update_inputs(struct gl_context *ctx, struct vbo_inputs *inputs);
-
-
const struct gl_array_attributes*
_vbo_current_attrib(const struct gl_context *ctx, gl_vert_attrib attr);
diff --git a/src/mesa/vbo/vbo_exec.c b/src/mesa/vbo/vbo_exec.c
index 357ec1da767..34dbc001c92 100644
--- a/src/mesa/vbo/vbo_exec.c
+++ b/src/mesa/vbo/vbo_exec.c
@@ -239,89 +239,3 @@ vbo_merge_prims(struct _mesa_prim *p0, const struct _mesa_prim *p1)
p0->count += p1->count;
p0->end = p1->end;
}
-
-
-void
-_vbo_init_inputs(struct vbo_inputs *inputs)
-{
- inputs->current = 0;
- inputs->vertex_processing_mode = VP_MODE_FF;
-}
-
-
-/**
- * Update the vbo_inputs's arrays to point to the vao->_VertexArray arrays
- * according to the 'enable' bitmask.
- * \param enable bitfield of VERT_BIT_x flags.
- */
-static inline void
-update_vao_inputs(struct gl_context *ctx,
- struct vbo_inputs *inputs, GLbitfield enable)
-{
- const struct gl_vertex_array_object *vao = ctx->Array._DrawVAO;
-
- /* Make sure we process only arrays enabled in the VAO */
- assert((enable & ~_mesa_get_vao_vp_inputs(vao)) == 0);
-
- /* Fill in the client arrays from the VAO */
- const GLubyte *const map = _mesa_vao_attribute_map[vao->_AttributeMapMode];
- const struct gl_array_attributes *attribs = &vao->VertexAttrib[0];
- const struct gl_vertex_buffer_binding *bindings = &vao->BufferBinding[0];
- while (enable) {
- const int attr = u_bit_scan(&enable);
- struct gl_vertex_array *input = &inputs->inputs[attr];
- const struct gl_array_attributes *attrib = &attribs[map[attr]];
- input->VertexAttrib = attrib;
- input->BufferBinding = &bindings[attrib->BufferBindingIndex];
- }
-}
-
-
-/**
- * Update the vbo_inputs's arrays to point to the vbo->currval arrays
- * according to the 'current' bitmask.
- * \param current bitfield of VERT_BIT_x flags.
- */
-static inline void
-update_current_inputs(struct gl_context *ctx,
- struct vbo_inputs *inputs, GLbitfield current)
-{
- gl_vertex_processing_mode mode = ctx->VertexProgram._VPMode;
-
- /* All previously non current array pointers need update. */
- GLbitfield mask = current & ~inputs->current;
- /* On mode change, the slots aliasing with materials need update too */
- if (mode != inputs->vertex_processing_mode)
- mask |= current & VERT_BIT_MAT_ALL;
-
- struct vbo_context *vbo = vbo_context(ctx);
- const struct gl_array_attributes *const currval = &vbo->current[0];
- const GLubyte *const map = _vbo_attribute_alias_map[mode];
- while (mask) {
- const int attr = u_bit_scan(&mask);
- struct gl_vertex_array *input = &inputs->inputs[attr];
- input->VertexAttrib = &currval[map[attr]];
- input->BufferBinding = &vbo->binding;
- }
-
- inputs->current = current;
- inputs->vertex_processing_mode = mode;
-}
-
-
-/**
- * Update the vbo_inputs's arrays to point to the vao->_VertexArray and
- * vbo->currval arrays according to Array._DrawVAO and
- * Array._DrawVAOEnableAttribs.
- */
-void
-_vbo_update_inputs(struct gl_context *ctx, struct vbo_inputs *inputs)
-{
- const GLbitfield enable = ctx->Array._DrawVAOEnabledAttribs;
-
- /* Update array input pointers */
- update_vao_inputs(ctx, inputs, enable);
-
- /* The rest must be current inputs. */
- update_current_inputs(ctx, inputs, ~enable & VERT_BIT_ALL);
-}