mesa: Remove Array._DrawArrays.
Only tnl based drivers still use this array. So remove it from core mesa and use Array._DrawVAO instead. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
This commit is contained in:
parent
899476b6b1
commit
881d2fcafa
|
@ -550,9 +550,9 @@ TAG(vbo_draw)(struct gl_context *ctx,
|
||||||
struct gl_buffer_object *indirect)
|
struct gl_buffer_object *indirect)
|
||||||
{
|
{
|
||||||
/* Borrow and update the inputs list from the tnl context */
|
/* Borrow and update the inputs list from the tnl context */
|
||||||
_tnl_bind_inputs(ctx);
|
const struct gl_vertex_array* arrays = _tnl_bind_inputs(ctx);
|
||||||
|
|
||||||
TAG(vbo_check_render_prims)(ctx, ctx->Array._DrawArrays,
|
TAG(vbo_check_render_prims)(ctx, arrays,
|
||||||
prims, nr_prims, ib,
|
prims, nr_prims, ib,
|
||||||
index_bounds_valid, min_index, max_index,
|
index_bounds_valid, min_index, max_index,
|
||||||
tfb_vertcount, stream, indirect);
|
tfb_vertcount, stream, indirect);
|
||||||
|
|
|
@ -970,7 +970,6 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, bool no_error)
|
||||||
* or to prevent a crash if the VAO being unbound is going to be
|
* or to prevent a crash if the VAO being unbound is going to be
|
||||||
* deleted.
|
* deleted.
|
||||||
*/
|
*/
|
||||||
_mesa_set_drawing_arrays(ctx, NULL);
|
|
||||||
_mesa_set_draw_vao(ctx, ctx->Array._EmptyVAO, 0);
|
_mesa_set_draw_vao(ctx, ctx->Array._EmptyVAO, 0);
|
||||||
|
|
||||||
ctx->NewState |= _NEW_ARRAY;
|
ctx->NewState |= _NEW_ARRAY;
|
||||||
|
|
|
@ -1588,7 +1588,6 @@ copy_array_attrib(struct gl_context *ctx,
|
||||||
/* skip IndexBufferObj */
|
/* skip IndexBufferObj */
|
||||||
|
|
||||||
/* Invalidate array state. It will be updated during the next draw. */
|
/* Invalidate array state. It will be updated during the next draw. */
|
||||||
_mesa_set_drawing_arrays(ctx, NULL);
|
|
||||||
_mesa_set_draw_vao(ctx, ctx->Array._EmptyVAO, 0);
|
_mesa_set_draw_vao(ctx, ctx->Array._EmptyVAO, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1629,12 +1629,6 @@ struct gl_array_attrib
|
||||||
*/
|
*/
|
||||||
struct gl_vertex_array_object *_EmptyVAO;
|
struct gl_vertex_array_object *_EmptyVAO;
|
||||||
|
|
||||||
/**
|
|
||||||
* Vertex arrays as consumed by a driver.
|
|
||||||
* The array pointer is set up only by the VBO module.
|
|
||||||
*/
|
|
||||||
const struct gl_vertex_array *_DrawArrays; /**< 0..VERT_ATTRIB_MAX-1 */
|
|
||||||
|
|
||||||
/** Legal array datatypes and the API for which they have been computed */
|
/** Legal array datatypes and the API for which they have been computed */
|
||||||
GLbitfield LegalTypesMask;
|
GLbitfield LegalTypesMask;
|
||||||
gl_api LegalTypesMaskAPI;
|
gl_api LegalTypesMaskAPI;
|
||||||
|
|
|
@ -53,20 +53,6 @@ _mesa_attr_zero_aliases_vertex(const struct gl_context *ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This specifies the set of vertex arrays used by the driver for drawing.
|
|
||||||
*/
|
|
||||||
static inline void
|
|
||||||
_mesa_set_drawing_arrays(struct gl_context *ctx,
|
|
||||||
const struct gl_vertex_array *arrays)
|
|
||||||
{
|
|
||||||
if (ctx->Array._DrawArrays != arrays) {
|
|
||||||
ctx->Array._DrawArrays = arrays;
|
|
||||||
ctx->NewDriverState |= ctx->DriverFlags.NewArray;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
_mesa_update_array_format(struct gl_context *ctx,
|
_mesa_update_array_format(struct gl_context *ctx,
|
||||||
struct gl_vertex_array_object *vao,
|
struct gl_vertex_array_object *vao,
|
||||||
|
|
|
@ -537,12 +537,12 @@ void _tnl_draw_prims(struct gl_context *ctx,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
const struct gl_vertex_array*
|
||||||
_tnl_bind_inputs( struct gl_context *ctx )
|
_tnl_bind_inputs( struct gl_context *ctx )
|
||||||
{
|
{
|
||||||
TNLcontext *tnl = TNL_CONTEXT(ctx);
|
TNLcontext *tnl = TNL_CONTEXT(ctx);
|
||||||
_mesa_set_drawing_arrays(ctx, tnl->draw_arrays.inputs);
|
|
||||||
_vbo_update_inputs(ctx, &tnl->draw_arrays);
|
_vbo_update_inputs(ctx, &tnl->draw_arrays);
|
||||||
|
return tnl->draw_arrays.inputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -558,12 +558,11 @@ _tnl_draw(struct gl_context *ctx,
|
||||||
struct gl_transform_feedback_object *tfb_vertcount,
|
struct gl_transform_feedback_object *tfb_vertcount,
|
||||||
unsigned stream, struct gl_buffer_object *indirect)
|
unsigned stream, struct gl_buffer_object *indirect)
|
||||||
{
|
{
|
||||||
/* Update TNLcontext::draw_arrays and set that pointer
|
/* Update TNLcontext::draw_arrays and return that pointer.
|
||||||
* into Array._DrawArrays.
|
|
||||||
*/
|
*/
|
||||||
_tnl_bind_inputs(ctx);
|
const struct gl_vertex_array* arrays = _tnl_bind_inputs(ctx);
|
||||||
|
|
||||||
_tnl_draw_prims(ctx, ctx->Array._DrawArrays, prim, nr_prims, ib,
|
_tnl_draw_prims(ctx, arrays, prim, nr_prims, ib,
|
||||||
index_bounds_valid, min_index, max_index,
|
index_bounds_valid, min_index, max_index,
|
||||||
tfb_vertcount, stream, indirect);
|
tfb_vertcount, stream, indirect);
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ _tnl_wakeup( struct gl_context *ctx );
|
||||||
extern void
|
extern void
|
||||||
_tnl_need_projected_coords( struct gl_context *ctx, GLboolean flag );
|
_tnl_need_projected_coords( struct gl_context *ctx, GLboolean flag );
|
||||||
|
|
||||||
extern void
|
extern const struct gl_vertex_array*
|
||||||
_tnl_bind_inputs( struct gl_context *ctx );
|
_tnl_bind_inputs( struct gl_context *ctx );
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue