GLuint step_rate;
};
struct brw_vertex_element {
- const struct gl_client_array *glarray;
+ const struct gl_vertex_array *glarray;
int buffer;
/* brw_draw_upload.c */
unsigned brw_get_vertex_surface_type(struct brw_context *brw,
- const struct gl_client_array *glarray);
+ const struct gl_vertex_array *glarray);
static inline unsigned
brw_get_index_type(GLenum type)
static void
brw_merge_inputs(struct brw_context *brw,
- const struct gl_client_array *arrays[])
+ const struct gl_vertex_array *arrays[])
{
const struct gl_context *ctx = &brw->ctx;
GLuint i;
*/
static void
brw_try_draw_prims(struct gl_context *ctx,
- const struct gl_client_array *arrays[],
+ const struct gl_vertex_array *arrays[],
const struct _mesa_prim *prims,
GLuint nr_prims,
const struct _mesa_index_buffer *ib,
struct gl_buffer_object *indirect)
{
struct brw_context *brw = brw_context(ctx);
- const struct gl_client_array **arrays = ctx->Array._DrawArrays;
+ const struct gl_vertex_array **arrays = ctx->Array._DrawArrays;
struct brw_transform_feedback_object *xfb_obj =
(struct brw_transform_feedback_object *) gl_xfb_obj;
*/
unsigned
brw_get_vertex_surface_type(struct brw_context *brw,
- const struct gl_client_array *glarray)
+ const struct gl_vertex_array *glarray)
{
int size = glarray->Size;
const bool is_ivybridge_or_older =
for (i = j = 0; i < brw->vb.nr_enabled; i++) {
struct brw_vertex_element *input = brw->vb.enabled[i];
- const struct gl_client_array *glarray = input->glarray;
+ const struct gl_vertex_array *glarray = input->glarray;
if (_mesa_is_bufferobj(glarray->BufferObj)) {
struct intel_buffer_object *intel_buffer =
*/
unsigned k;
for (k = 0; k < i; k++) {
- const struct gl_client_array *other = brw->vb.enabled[k]->glarray;
+ const struct gl_vertex_array *other = brw->vb.enabled[k]->glarray;
if (glarray->BufferObj == other->BufferObj &&
glarray->StrideB == other->StrideB &&
glarray->InstanceDivisor == other->InstanceDivisor &&
* structures. */
static int
-get_array_stride(struct gl_context *ctx, const struct gl_client_array *a)
+get_array_stride(struct gl_context *ctx, const struct gl_vertex_array *a)
{
struct nouveau_render_state *render = to_render_state(ctx);
static void
vbo_init_arrays(struct gl_context *ctx, const struct _mesa_index_buffer *ib,
- const struct gl_client_array **arrays)
+ const struct gl_vertex_array **arrays)
{
struct nouveau_render_state *render = to_render_state(ctx);
GLboolean imm = (render->mode == IMM);
ib->obj, ib->ptr, GL_TRUE, ctx);
FOR_EACH_BOUND_ATTR(render, i, attr) {
- const struct gl_client_array *array = arrays[attr];
+ const struct gl_vertex_array *array = arrays[attr];
nouveau_init_array(&render->attrs[attr], attr,
get_array_stride(ctx, array),
static void
vbo_deinit_arrays(struct gl_context *ctx, const struct _mesa_index_buffer *ib,
- const struct gl_client_array **arrays)
+ const struct gl_vertex_array **arrays)
{
struct nouveau_render_state *render = to_render_state(ctx);
int i, attr;
/* Make some rendering decisions from the GL context. */
static void
-vbo_choose_render_mode(struct gl_context *ctx, const struct gl_client_array **arrays)
+vbo_choose_render_mode(struct gl_context *ctx, const struct gl_vertex_array **arrays)
{
struct nouveau_render_state *render = to_render_state(ctx);
int i;
}
static void
-vbo_emit_attr(struct gl_context *ctx, const struct gl_client_array **arrays,
+vbo_emit_attr(struct gl_context *ctx, const struct gl_vertex_array **arrays,
int attr)
{
struct nouveau_pushbuf *push = context_push(ctx);
struct nouveau_render_state *render = to_render_state(ctx);
- const struct gl_client_array *array = arrays[attr];
+ const struct gl_vertex_array *array = arrays[attr];
struct nouveau_array *a = &render->attrs[attr];
RENDER_LOCALS(ctx);
#define MAT(a) (VERT_ATTRIB_GENERIC0 + MAT_ATTRIB_##a)
static void
-vbo_choose_attrs(struct gl_context *ctx, const struct gl_client_array **arrays)
+vbo_choose_attrs(struct gl_context *ctx, const struct gl_vertex_array **arrays)
{
struct nouveau_render_state *render = to_render_state(ctx);
int i;
}
static int
-get_max_client_stride(struct gl_context *ctx, const struct gl_client_array **arrays)
+get_max_client_stride(struct gl_context *ctx, const struct gl_vertex_array **arrays)
{
struct nouveau_render_state *render = to_render_state(ctx);
int i, attr, s = 0;
FOR_EACH_BOUND_ATTR(render, i, attr) {
- const struct gl_client_array *a = arrays[attr];
+ const struct gl_vertex_array *a = arrays[attr];
if (!_mesa_is_bufferobj(a->BufferObj))
s = MAX2(s, get_array_stride(ctx, a));
struct gl_buffer_object *indirect);
static GLboolean
-vbo_maybe_split(struct gl_context *ctx, const struct gl_client_array **arrays,
+vbo_maybe_split(struct gl_context *ctx, const struct gl_vertex_array **arrays,
const struct _mesa_prim *prims, GLuint nr_prims,
const struct _mesa_index_buffer *ib,
GLuint min_index, GLuint max_index)
}
static void
-vbo_bind_vertices(struct gl_context *ctx, const struct gl_client_array **arrays,
+vbo_bind_vertices(struct gl_context *ctx, const struct gl_vertex_array **arrays,
int base, unsigned min_index, unsigned max_index, int *pdelta)
{
struct nouveau_render_state *render = to_render_state(ctx);
*pdelta = -1;
FOR_EACH_BOUND_ATTR(render, i, attr) {
- const struct gl_client_array *array = arrays[attr];
+ const struct gl_vertex_array *array = arrays[attr];
struct gl_buffer_object *obj = array->BufferObj;
struct nouveau_array *a = &render->attrs[attr];
unsigned delta = (base + min_index) * array->StrideB;
}
static void
-vbo_draw_vbo(struct gl_context *ctx, const struct gl_client_array **arrays,
+vbo_draw_vbo(struct gl_context *ctx, const struct gl_vertex_array **arrays,
const struct _mesa_prim *prims, GLuint nr_prims,
const struct _mesa_index_buffer *ib, GLuint min_index,
GLuint max_index)
}
static void
-vbo_draw_imm(struct gl_context *ctx, const struct gl_client_array **arrays,
+vbo_draw_imm(struct gl_context *ctx, const struct gl_vertex_array **arrays,
const struct _mesa_prim *prims, GLuint nr_prims,
const struct _mesa_index_buffer *ib, GLuint min_index,
GLuint max_index)
struct gl_buffer_object *indirect)
{
struct nouveau_render_state *render = to_render_state(ctx);
- const struct gl_client_array **arrays = ctx->Array._DrawArrays;
+ const struct gl_vertex_array **arrays = ctx->Array._DrawArrays;
if (!index_bounds_valid)
vbo_get_minmax_indices(ctx, prims, ib, &min_index, &max_index,
/**
- * Updates the derived gl_client_arrays when a gl_vertex_attrib_array
+ * Updates the derived gl_vertex_arrays when a gl_vertex_attrib_array
* or a gl_vertex_buffer_binding has changed.
*/
void
while (arrays) {
const int attrib = u_bit_scan64(&arrays);
- struct gl_client_array *client_array = &vao->_VertexAttrib[attrib];
+ struct gl_vertex_array *client_array = &vao->_VertexAttrib[attrib];
const struct gl_array_attributes *attrib_array =
&vao->VertexAttrib[attrib];
const struct gl_vertex_buffer_binding *buffer_binding =
/**
- * Client vertex array attributes
+ * Vertex array information which is derived from gl_array_attributes
+ * and gl_vertex_buffer_binding information. Used by the VBO module and
+ * device drivers.
*/
-struct gl_client_array
+struct gl_vertex_array
{
GLint Size; /**< components per element (1,2,3,4) */
GLenum Type; /**< datatype: GL_FLOAT, GL_INT, etc */
* This is a legacy data structure created from gl_vertex_attrib_array and
* gl_vertex_buffer_binding, for compatibility with existing driver code.
*/
- struct gl_client_array _VertexAttrib[VERT_ATTRIB_MAX];
+ struct gl_vertex_array _VertexAttrib[VERT_ATTRIB_MAX];
/** Vertex attribute arrays */
struct gl_array_attributes VertexAttrib[VERT_ATTRIB_MAX];
* Vertex arrays as consumed by a driver.
* The array pointer is set up only by the VBO module.
*/
- const struct gl_client_array **_DrawArrays; /**< 0..VERT_ATTRIB_MAX-1 */
+ const struct gl_vertex_array **_DrawArrays; /**< 0..VERT_ATTRIB_MAX-1 */
/** Legal array datatypes and the API for which they have been computed */
GLbitfield LegalTypesMask;
*/
void
_mesa_copy_client_array(struct gl_context *ctx,
- struct gl_client_array *dst,
- struct gl_client_array *src)
+ struct gl_vertex_array *dst,
+ struct gl_vertex_array *src)
{
dst->Size = src->Size;
dst->Type = src->Type;
#include "glheader.h"
#include "bufferobj.h"
-struct gl_client_array;
+struct gl_vertex_array;
struct gl_context;
/**
}
/**
- * Sets the fields in a gl_client_array to values derived from a
+ * Sets the fields in a gl_vertex_array to values derived from a
* gl_vertex_attrib_array and a gl_vertex_buffer_binding.
*/
static inline void
_mesa_update_client_array(struct gl_context *ctx,
- struct gl_client_array *dst,
+ struct gl_vertex_array *dst,
const struct gl_array_attributes *src,
const struct gl_vertex_buffer_binding *binding)
{
extern void
_mesa_copy_client_array(struct gl_context *ctx,
- struct gl_client_array *dst,
- struct gl_client_array *src);
+ struct gl_vertex_array *dst,
+ struct gl_vertex_array *src);
extern void
_mesa_copy_vertex_attrib_array(struct gl_context *ctx,
static void check_attrib_edgeflag(struct st_context *st)
{
- const struct gl_client_array **arrays = st->ctx->Array._DrawArrays;
+ const struct gl_vertex_array **arrays = st->ctx->Array._DrawArrays;
GLboolean vertdata_edgeflags, edgeflag_culls_prims, edgeflags_enabled;
struct gl_program *vp = st->ctx->VertexProgram._Current;
return PIPE_FORMAT_NONE; /* silence compiler warning */
}
-static const struct gl_client_array *
+static const struct gl_vertex_array *
get_client_array(const struct st_vertex_program *vp,
- const struct gl_client_array **arrays,
+ const struct gl_vertex_array **arrays,
int attr)
{
const GLuint mesaAttr = vp->index_to_input[attr];
static GLboolean
is_interleaved_arrays(const struct st_vertex_program *vp,
const struct st_vp_variant *vpv,
- const struct gl_client_array **arrays)
+ const struct gl_vertex_array **arrays)
{
GLuint attr;
const struct gl_buffer_object *firstBufObj = NULL;
GLboolean userSpaceBuffer = GL_FALSE;
for (attr = 0; attr < vpv->num_inputs; attr++) {
- const struct gl_client_array *array;
+ const struct gl_vertex_array *array;
const struct gl_buffer_object *bufObj;
GLsizei stride;
setup_interleaved_attribs(struct st_context *st,
const struct st_vertex_program *vp,
const struct st_vp_variant *vpv,
- const struct gl_client_array **arrays,
+ const struct gl_vertex_array **arrays,
struct pipe_vertex_buffer *vbuffer,
struct pipe_vertex_element velements[])
{
* Init bufobj and stride.
*/
if (vpv->num_inputs) {
- const struct gl_client_array *array;
+ const struct gl_vertex_array *array;
array = get_client_array(vp, arrays, 0);
assert(array);
usingVBO = _mesa_is_bufferobj(bufobj);
for (attr = 0; attr < vpv->num_inputs;) {
- const struct gl_client_array *array;
+ const struct gl_vertex_array *array;
unsigned src_offset;
unsigned src_format;
setup_non_interleaved_attribs(struct st_context *st,
const struct st_vertex_program *vp,
const struct st_vp_variant *vpv,
- const struct gl_client_array **arrays,
+ const struct gl_vertex_array **arrays,
struct pipe_vertex_buffer vbuffer[],
struct pipe_vertex_element velements[],
unsigned *num_vbuffers)
for (attr = 0; attr < vpv->num_inputs;) {
const GLuint mesaAttr = vp->index_to_input[attr];
- const struct gl_client_array *array;
+ const struct gl_vertex_array *array;
struct gl_buffer_object *bufobj;
GLsizei stride;
unsigned src_format;
if (_mesa_is_bufferobj(bufobj)) {
/* Attribute data is in a VBO.
- * Recall that for VBOs, the gl_client_array->Ptr field is
+ * Recall that for VBOs, the gl_vertex_array->Ptr field is
* really an offset from the start of the VBO, not a pointer.
*/
struct st_buffer_object *stobj = st_buffer_object(bufobj);
static void update_array(struct st_context *st)
{
struct gl_context *ctx = st->ctx;
- const struct gl_client_array **arrays = ctx->Array._DrawArrays;
+ const struct gl_vertex_array **arrays = ctx->Array._DrawArrays;
const struct st_vertex_program *vp;
const struct st_vp_variant *vpv;
struct pipe_vertex_buffer vbuffer[PIPE_MAX_SHADER_INPUTS];
struct gl_context *ctx; /**< Rendering context */
/* vertex attrib info we can setup once and re-use */
- struct gl_client_array array[VERT_ATTRIB_MAX];
- const struct gl_client_array *arrays[VERT_ATTRIB_MAX];
+ struct gl_vertex_array array[VERT_ATTRIB_MAX];
+ const struct gl_vertex_array *arrays[VERT_ATTRIB_MAX];
struct _mesa_prim prim;
};
struct st_context *st = st_context(ctx);
struct draw_context *draw = st_get_draw_context(st);
struct rastpos_stage *rs;
- const struct gl_client_array **saved_arrays = ctx->Array._DrawArrays;
+ const struct gl_vertex_array **saved_arrays = ctx->Array._DrawArrays;
if (!st->draw)
return;
* only interested in per-vertex data. See bug 38626.
*/
static GLboolean
-all_varyings_in_vbos(const struct gl_client_array *arrays[])
+all_varyings_in_vbos(const struct gl_vertex_array *arrays[])
{
GLuint i;
struct st_context *st = st_context(ctx);
struct pipe_index_buffer ibuffer = {0};
struct pipe_draw_info info;
- const struct gl_client_array **arrays = ctx->Array._DrawArrays;
+ const struct gl_vertex_array **arrays = ctx->Array._DrawArrays;
unsigned i;
/* Mesa core state should have been validated already */
struct _mesa_index_buffer;
struct _mesa_prim;
-struct gl_client_array;
+struct gl_vertex_array;
struct gl_context;
struct st_context;
struct pipe_index_buffer ibuffer;
struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS] = {NULL};
struct pipe_transfer *ib_transfer = NULL;
- const struct gl_client_array **arrays = ctx->Array._DrawArrays;
+ const struct gl_vertex_array **arrays = ctx->Array._DrawArrays;
GLuint attr, i;
const GLubyte *low_addr = NULL;
const void *mapped_indices = NULL;
if (bufobj && bufobj->Name) {
/* Attribute data is in a VBO.
- * Recall that for VBOs, the gl_client_array->Ptr field is
+ * Recall that for VBOs, the gl_vertex_array->Ptr field is
* really an offset from the start of the VBO, not a pointer.
*/
struct st_buffer_object *stobj = st_buffer_object(bufobj);
* \param fptr output/float array
*/
static void
-convert_bgra_to_float(const struct gl_client_array *input,
+convert_bgra_to_float(const struct gl_vertex_array *input,
const GLubyte *ptr, GLfloat *fptr,
GLuint count )
{
}
static void
-convert_half_to_float(const struct gl_client_array *input,
+convert_half_to_float(const struct gl_vertex_array *input,
const GLubyte *ptr, GLfloat *fptr,
GLuint count, GLuint sz)
{
* is used to map the fixed-point numbers into the range [-1, 1].
*/
static void
-convert_fixed_to_float(const struct gl_client_array *input,
+convert_fixed_to_float(const struct gl_vertex_array *input,
const GLubyte *ptr, GLfloat *fptr,
GLuint count)
{
static void _tnl_import_array( struct gl_context *ctx,
GLuint attrib,
GLuint count,
- const struct gl_client_array *input,
+ const struct gl_vertex_array *input,
const GLubyte *ptr )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
static void bind_inputs( struct gl_context *ctx,
- const struct gl_client_array *inputs[],
+ const struct gl_vertex_array *inputs[],
GLint count,
struct gl_buffer_object **bo,
GLuint *nr_bo )
struct gl_buffer_object *indirect)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
- const struct gl_client_array **arrays = ctx->Array._DrawArrays;
+ const struct gl_vertex_array **arrays = ctx->Array._DrawArrays;
const GLuint TEST_SPLIT = 0;
const GLint max = TEST_SPLIT ? 8 : tnl->vb.Size - MAX_CLIPPED_VERTICES;
GLint max_basevertex = prim->basevertex;
#include "main/glheader.h"
-struct gl_client_array;
+struct gl_vertex_array;
struct gl_context;
struct gl_program;
extern "C" {
#endif
-struct gl_client_array;
+struct gl_vertex_array;
struct gl_context;
struct gl_transform_feedback_object;
void vbo_split_prims( struct gl_context *ctx,
- const struct gl_client_array *arrays[],
+ const struct gl_vertex_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
const struct _mesa_index_buffer *ib,
/* Helpers for dealing translating away non-zero min_index.
*/
-GLboolean vbo_all_varyings_in_vbos( const struct gl_client_array *arrays[] );
-GLboolean vbo_any_varyings_in_vbos( const struct gl_client_array *arrays[] );
+GLboolean vbo_all_varyings_in_vbos( const struct gl_vertex_array *arrays[] );
+GLboolean vbo_any_varyings_in_vbos( const struct gl_vertex_array *arrays[] );
void vbo_rebase_prims( struct gl_context *ctx,
- const struct gl_client_array *arrays[],
+ const struct gl_vertex_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
const struct _mesa_index_buffer *ib,
* Helper for initializing a vertex array.
*/
static void
-init_array(struct gl_context *ctx, struct gl_client_array *cl,
+init_array(struct gl_context *ctx, struct gl_vertex_array *cl,
unsigned size, const void *pointer)
{
memset(cl, 0, sizeof(*cl));
* attribute:
*/
for (i = 0; i < VERT_ATTRIB_FF_MAX; i++) {
- struct gl_client_array *cl = &vbo->currval[VERT_ATTRIB_FF(i)];
+ struct gl_vertex_array *cl = &vbo->currval[VERT_ATTRIB_FF(i)];
init_array(ctx, cl,
check_size(ctx->Current.Attrib[i]),
GLuint i;
for (i = 0; i < VERT_ATTRIB_GENERIC_MAX; i++) {
- struct gl_client_array *cl = &vbo->currval[VBO_ATTRIB_GENERIC0 + i];
+ struct gl_vertex_array *cl = &vbo->currval[VBO_ATTRIB_GENERIC0 + i];
init_array(ctx, cl, 1, ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + i]);
}
* attribute:
*/
for (i = 0; i < MAT_ATTRIB_MAX; i++) {
- struct gl_client_array *cl =
+ struct gl_vertex_array *cl =
&vbo->currval[VBO_ATTRIB_MAT_FRONT_AMBIENT + i];
unsigned size;
#endif
struct vbo_context {
- struct gl_client_array currval[VBO_ATTRIB_MAX];
+ struct gl_vertex_array currval[VBO_ATTRIB_MAX];
/** Map VERT_ATTRIB_x to VBO_ATTRIB_y */
GLuint map_vp_none[VERT_ATTRIB_MAX];
/** pointers into the current 'vertex' array, declared above */
fi_type *attrptr[VBO_ATTRIB_MAX];
- struct gl_client_array arrays[VERT_ATTRIB_MAX];
+ struct gl_vertex_array arrays[VERT_ATTRIB_MAX];
/* According to program mode, the values above plus current
* values are squashed down to the 32 attributes passed to the
* vertex program below:
*/
- const struct gl_client_array *inputs[VERT_ATTRIB_MAX];
+ const struct gl_vertex_array *inputs[VERT_ATTRIB_MAX];
} vtx;
struct {
* mode, etc. These are the attributes as seen by vertex
* programs:
*/
- const struct gl_client_array *inputs[VERT_ATTRIB_MAX];
+ const struct gl_vertex_array *inputs[VERT_ATTRIB_MAX];
GLboolean recalculate_inputs;
} array;
}
{
- struct gl_client_array *arrays = exec->vtx.arrays;
+ struct gl_vertex_array *arrays = exec->vtx.arrays;
unsigned i;
memcpy(arrays, &vbo->currval[VBO_ATTRIB_POS],
VERT_ATTRIB_FF_MAX * sizeof(arrays[0]));
for (i = 0; i < VERT_ATTRIB_FF_MAX; ++i) {
- struct gl_client_array *array;
+ struct gl_vertex_array *array;
array = &arrays[VERT_ATTRIB_FF(i)];
array->BufferObj = NULL;
_mesa_reference_buffer_object(ctx, &array->BufferObj,
VERT_ATTRIB_GENERIC_MAX * sizeof(arrays[0]));
for (i = 0; i < VERT_ATTRIB_GENERIC_MAX; ++i) {
- struct gl_client_array *array;
+ struct gl_vertex_array *array;
array = &arrays[VERT_ATTRIB_GENERIC(i)];
array->BufferObj = NULL;
_mesa_reference_buffer_object(ctx, &array->BufferObj,
struct vbo_context *vbo = vbo_context(ctx);
struct vbo_exec_context *exec = &vbo->exec;
const struct gl_array_attributes *array = ctx->Array.VAO->VertexAttrib;
- struct gl_client_array *vertexAttrib = ctx->Array.VAO->_VertexAttrib;
- const struct gl_client_array **inputs = &exec->array.inputs[0];
+ struct gl_vertex_array *vertexAttrib = ctx->Array.VAO->_VertexAttrib;
+ const struct gl_vertex_array **inputs = &exec->array.inputs[0];
GLbitfield64 const_inputs = 0x0;
GLuint i;
{
struct vbo_context *vbo = vbo_context(ctx);
struct vbo_exec_context *exec = &vbo->exec;
- struct gl_client_array *arrays = exec->vtx.arrays;
+ struct gl_vertex_array *arrays = exec->vtx.arrays;
const GLuint *map;
GLuint attr;
GLbitfield64 varying_inputs = 0x0;
REBASE(GLushort)
REBASE(GLubyte)
-GLboolean vbo_all_varyings_in_vbos( const struct gl_client_array *arrays[] )
+GLboolean vbo_all_varyings_in_vbos( const struct gl_vertex_array *arrays[] )
{
GLuint i;
return GL_TRUE;
}
-GLboolean vbo_any_varyings_in_vbos( const struct gl_client_array *arrays[] )
+GLboolean vbo_any_varyings_in_vbos( const struct gl_vertex_array *arrays[] )
{
GLuint i;
* all or nothing.
*/
void vbo_rebase_prims( struct gl_context *ctx,
- const struct gl_client_array *arrays[],
+ const struct gl_vertex_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
const struct _mesa_index_buffer *ib,
GLuint max_index,
vbo_draw_func draw )
{
- struct gl_client_array tmp_arrays[VERT_ATTRIB_MAX];
- const struct gl_client_array *tmp_array_pointers[VERT_ATTRIB_MAX];
+ struct gl_vertex_array tmp_arrays[VERT_ATTRIB_MAX];
+ const struct gl_vertex_array *tmp_array_pointers[VERT_ATTRIB_MAX];
struct _mesa_index_buffer tmp_ib;
struct _mesa_prim *tmp_prims = NULL;
- const struct gl_client_array **saved_arrays = ctx->Array._DrawArrays;
+ const struct gl_vertex_array **saved_arrays = ctx->Array._DrawArrays;
void *tmp_indices = NULL;
GLuint i;
vbo_save_api_init( save );
{
- struct gl_client_array *arrays = save->arrays;
+ struct gl_vertex_array *arrays = save->arrays;
unsigned i;
memcpy(arrays, &vbo->currval[VBO_ATTRIB_POS],
VERT_ATTRIB_FF_MAX * sizeof(arrays[0]));
for (i = 0; i < VERT_ATTRIB_FF_MAX; ++i) {
- struct gl_client_array *array;
+ struct gl_vertex_array *array;
array = &arrays[VERT_ATTRIB_FF(i)];
array->BufferObj = NULL;
_mesa_reference_buffer_object(ctx, &arrays->BufferObj,
VERT_ATTRIB_GENERIC_MAX * sizeof(arrays[0]));
for (i = 0; i < VERT_ATTRIB_GENERIC_MAX; ++i) {
- struct gl_client_array *array;
+ struct gl_vertex_array *array;
array = &arrays[VERT_ATTRIB_GENERIC(i)];
array->BufferObj = NULL;
_mesa_reference_buffer_object(ctx, &array->BufferObj,
struct gl_context *ctx;
GLvertexformat vtxfmt;
GLvertexformat vtxfmt_noop; /**< Used if out_of_memory is true */
- struct gl_client_array arrays[VBO_ATTRIB_MAX];
- const struct gl_client_array *inputs[VBO_ATTRIB_MAX];
+ struct gl_vertex_array arrays[VBO_ATTRIB_MAX];
+ const struct gl_vertex_array *inputs[VBO_ATTRIB_MAX];
GLbitfield64 enabled; /**< mask of enabled vbo arrays. */
GLubyte attrsz[VBO_ATTRIB_MAX]; /**< 1, 2, 3 or 4 */
{
struct vbo_context *vbo = vbo_context(ctx);
struct vbo_save_context *save = &vbo->save;
- struct gl_client_array *arrays = save->arrays;
+ struct gl_vertex_array *arrays = save->arrays;
GLuint buffer_offset = node->buffer_offset;
const GLuint *map;
GLuint attr;
void vbo_split_prims( struct gl_context *ctx,
- const struct gl_client_array *arrays[],
+ const struct gl_vertex_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
const struct _mesa_index_buffer *ib,
GLboolean split_prim_inplace(GLenum mode, GLuint *first, GLuint *incr);
void vbo_split_inplace( struct gl_context *ctx,
- const struct gl_client_array *arrays[],
+ const struct gl_vertex_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
const struct _mesa_index_buffer *ib,
/* Requires ib != NULL:
*/
void vbo_split_copy( struct gl_context *ctx,
- const struct gl_client_array *arrays[],
+ const struct gl_vertex_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
const struct _mesa_index_buffer *ib,
struct copy_context {
struct gl_context *ctx;
- const struct gl_client_array **array;
+ const struct gl_vertex_array **array;
const struct _mesa_prim *prim;
GLuint nr_prims;
const struct _mesa_index_buffer *ib;
struct {
GLuint attr;
GLuint size;
- const struct gl_client_array *array;
+ const struct gl_vertex_array *array;
const GLubyte *src_ptr;
- struct gl_client_array dstarray;
+ struct gl_vertex_array dstarray;
} varying[VERT_ATTRIB_MAX];
GLuint nr_varying;
- const struct gl_client_array *dstarray_ptr[VERT_ATTRIB_MAX];
+ const struct gl_vertex_array *dstarray_ptr[VERT_ATTRIB_MAX];
struct _mesa_index_buffer dstib;
GLuint *translated_elt_buf;
};
-static GLuint attr_size( const struct gl_client_array *array )
+static GLuint attr_size( const struct gl_vertex_array *array )
{
return array->Size * _mesa_sizeof_type(array->Type);
}
*/
static void
dump_draw_info(struct gl_context *ctx,
- const struct gl_client_array **arrays,
+ const struct gl_vertex_array **arrays,
const struct _mesa_prim *prims,
GLuint nr_prims,
const struct _mesa_index_buffer *ib,
flush( struct copy_context *copy )
{
struct gl_context *ctx = copy->ctx;
- const struct gl_client_array **saved_arrays = ctx->Array._DrawArrays;
+ const struct gl_vertex_array **saved_arrays = ctx->Array._DrawArrays;
GLuint i;
/* Set some counters:
/* printf(" --> emit to dstelt %d\n", copy->dstbuf_nr); */
for (i = 0; i < copy->nr_varying; i++) {
- const struct gl_client_array *srcarray = copy->varying[i].array;
+ const struct gl_vertex_array *srcarray = copy->varying[i].array;
const GLubyte *srcptr = copy->varying[i].src_ptr + elt * srcarray->StrideB;
memcpy(csr, srcptr, copy->varying[i].size);
/* Setup new vertex arrays to point into the output buffer:
*/
for (offset = 0, i = 0; i < copy->nr_varying; i++) {
- const struct gl_client_array *src = copy->varying[i].array;
- struct gl_client_array *dst = ©->varying[i].dstarray;
+ const struct gl_vertex_array *src = copy->varying[i].array;
+ struct gl_vertex_array *dst = ©->varying[i].dstarray;
dst->Size = src->Size;
dst->Type = src->Type;
* Split VBO into smaller pieces, draw the pieces.
*/
void vbo_split_copy( struct gl_context *ctx,
- const struct gl_client_array *arrays[],
+ const struct gl_vertex_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
const struct _mesa_index_buffer *ib,
*/
struct split_context {
struct gl_context *ctx;
- const struct gl_client_array **array;
+ const struct gl_vertex_array **array;
const struct _mesa_prim *prim;
GLuint nr_prims;
const struct _mesa_index_buffer *ib;
static void flush_vertex( struct split_context *split )
{
struct gl_context *ctx = split->ctx;
- const struct gl_client_array **saved_arrays = ctx->Array._DrawArrays;
+ const struct gl_vertex_array **saved_arrays = ctx->Array._DrawArrays;
struct _mesa_index_buffer ib;
GLuint i;
void vbo_split_inplace( struct gl_context *ctx,
- const struct gl_client_array *arrays[],
+ const struct gl_vertex_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
const struct _mesa_index_buffer *ib,