summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-10-06 17:30:20 -0600
committerBrian Paul <[email protected]>2016-10-13 17:38:49 -0600
commit15fb88e912531110f1a31ede2100910fdda2823e (patch)
treec33ac86532e98ad20842d4922e5d3e28bbb0ff0e /src/mesa
parentc89802aeeaee35e06c98a41dd630a60e8e7e4123 (diff)
mesa: rename gl_vertex_attrib_array gl_array_attributes
The structure contains the attributes of a vertex array. The old name was kind of confusing. Reviewed-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/api_arrayelt.c8
-rw-r--r--src/mesa/main/arrayobj.c8
-rw-r--r--src/mesa/main/get.c2
-rw-r--r--src/mesa/main/get_hash_params.py8
-rw-r--r--src/mesa/main/mtypes.h6
-rw-r--r--src/mesa/main/varray.c14
-rw-r--r--src/mesa/main/varray.h8
-rw-r--r--src/mesa/vbo/vbo_exec_array.c8
8 files changed, 31 insertions, 31 deletions
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c
index cc7dee3b8da..54cdb509325 100644
--- a/src/mesa/main/api_arrayelt.c
+++ b/src/mesa/main/api_arrayelt.c
@@ -48,7 +48,7 @@
typedef void (GLAPIENTRY *array_func)( const void * );
typedef struct {
- const struct gl_vertex_attrib_array *array;
+ const struct gl_array_attributes *array;
const struct gl_vertex_buffer_binding *binding;
int offset;
} AEarray;
@@ -56,7 +56,7 @@ typedef struct {
typedef void (GLAPIENTRY *attrib_func)( GLuint indx, const void *data );
typedef struct {
- const struct gl_vertex_attrib_array *array;
+ const struct gl_array_attributes *array;
const struct gl_vertex_buffer_binding *binding;
attrib_func func;
GLuint index;
@@ -1613,7 +1613,7 @@ _ae_update_state(struct gl_context *ctx)
}
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
- struct gl_vertex_attrib_array *attribArray =
+ struct gl_array_attributes *attribArray =
&vao->VertexAttrib[VERT_ATTRIB_TEX(i)];
if (attribArray->Enabled) {
/* NOTE: we use generic glVertexAttribNV functions here.
@@ -1633,7 +1633,7 @@ _ae_update_state(struct gl_context *ctx)
/* generic vertex attribute arrays */
for (i = 1; i < VERT_ATTRIB_GENERIC_MAX; i++) { /* skip zero! */
- struct gl_vertex_attrib_array *attribArray =
+ struct gl_array_attributes *attribArray =
&vao->VertexAttrib[VERT_ATTRIB_GENERIC(i)];
if (attribArray->Enabled) {
GLint intOrNorm;
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index 82589645aa1..11e34826deb 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -235,7 +235,7 @@ init_array(struct gl_context *ctx,
struct gl_vertex_array_object *vao,
GLuint index, GLint size, GLint type)
{
- struct gl_vertex_attrib_array *array = &vao->VertexAttrib[index];
+ struct gl_array_attributes *array = &vao->VertexAttrib[index];
struct gl_vertex_buffer_binding *binding = &vao->VertexBinding[index];
array->Size = size;
@@ -353,7 +353,7 @@ _mesa_update_vao_client_arrays(struct gl_context *ctx,
const int attrib = u_bit_scan64(&arrays);
struct gl_client_array *client_array;
- struct gl_vertex_attrib_array *attrib_array;
+ struct gl_array_attributes *attrib_array;
struct gl_vertex_buffer_binding *buffer_binding;
attrib_array = &vao->VertexAttrib[attrib];
@@ -377,7 +377,7 @@ _mesa_all_varyings_in_vbos(const struct gl_vertex_array_object *vao)
* attrib arrays at once
*/
const int i = ffsll(mask) - 1;
- const struct gl_vertex_attrib_array *attrib_array =
+ const struct gl_array_attributes *attrib_array =
&vao->VertexAttrib[i];
const struct gl_vertex_buffer_binding *buffer_binding =
&vao->VertexBinding[attrib_array->BufferBindingIndex];
@@ -408,7 +408,7 @@ _mesa_all_buffers_are_unmapped(const struct gl_vertex_array_object *vao)
while (mask) {
const int i = ffsll(mask) - 1;
- const struct gl_vertex_attrib_array *attrib_array =
+ const struct gl_array_attributes *attrib_array =
&vao->VertexAttrib[i];
const struct gl_vertex_buffer_binding *buffer_binding =
&vao->VertexBinding[attrib_array->BufferBindingIndex];
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index c11bcde207a..6234f6ed6b7 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -607,7 +607,7 @@ static void
find_custom_value(struct gl_context *ctx, const struct value_desc *d, union value *v)
{
struct gl_buffer_object **buffer_obj;
- struct gl_vertex_attrib_array *array;
+ struct gl_array_attributes *array;
GLuint unit, *p;
switch (d->pname) {
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index 3c6b7129afb..52371805941 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -217,10 +217,10 @@ descriptor=[
[ "COLOR_ARRAY_SIZE", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
[ "COLOR_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_COLOR0].Type), NO_EXTRA" ],
[ "COLOR_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR0].Stride), NO_EXTRA" ],
- [ "TEXTURE_COORD_ARRAY", "LOC_CUSTOM, TYPE_BOOLEAN, offsetof(struct gl_vertex_attrib_array, Enabled), NO_EXTRA" ],
- [ "TEXTURE_COORD_ARRAY_SIZE", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_vertex_attrib_array, Size), NO_EXTRA" ],
- [ "TEXTURE_COORD_ARRAY_TYPE", "LOC_CUSTOM, TYPE_ENUM, offsetof(struct gl_vertex_attrib_array, Type), NO_EXTRA" ],
- [ "TEXTURE_COORD_ARRAY_STRIDE", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_vertex_attrib_array, Stride), NO_EXTRA" ],
+ [ "TEXTURE_COORD_ARRAY", "LOC_CUSTOM, TYPE_BOOLEAN, offsetof(struct gl_array_attributes, Enabled), NO_EXTRA" ],
+ [ "TEXTURE_COORD_ARRAY_SIZE", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_attributes, Size), NO_EXTRA" ],
+ [ "TEXTURE_COORD_ARRAY_TYPE", "LOC_CUSTOM, TYPE_ENUM, offsetof(struct gl_array_attributes, Type), NO_EXTRA" ],
+ [ "TEXTURE_COORD_ARRAY_STRIDE", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_attributes, Stride), NO_EXTRA" ],
# GL_ARB_multitexture
[ "MAX_TEXTURE_UNITS", "CONTEXT_INT(Const.MaxTextureUnits), NO_EXTRA" ],
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index a639fd24ac5..ff202260812 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1351,7 +1351,7 @@ struct gl_client_array
/**
- * Vertex attribute array as seen by the client.
+ * Attributes to describe a vertex array.
*
* Contains the size, type, format and normalization flag,
* along with the index of a vertex buffer binding point.
@@ -1363,7 +1363,7 @@ struct gl_client_array
* and VERTEX_BINDING_STRIDE to the same value, while
* glBindVertexBuffer() will only set VERTEX_BINDING_STRIDE.
*/
-struct gl_vertex_attrib_array
+struct gl_array_attributes
{
GLint Size; /**< Components per element (1,2,3,4) */
GLenum Type; /**< Datatype: GL_FLOAT, GL_INT, etc */
@@ -1441,7 +1441,7 @@ struct gl_vertex_array_object
struct gl_client_array _VertexAttrib[VERT_ATTRIB_MAX];
/** Vertex attribute arrays */
- struct gl_vertex_attrib_array VertexAttrib[VERT_ATTRIB_MAX];
+ struct gl_array_attributes VertexAttrib[VERT_ATTRIB_MAX];
/** Vertex buffer bindings */
struct gl_vertex_buffer_binding VertexBinding[VERT_ATTRIB_MAX];
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index a2f957a66d2..781d7633cff 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -133,7 +133,7 @@ vertex_attrib_binding(struct gl_context *ctx,
GLuint attribIndex,
GLuint bindingIndex)
{
- struct gl_vertex_attrib_array *array = &vao->VertexAttrib[attribIndex];
+ struct gl_array_attributes *array = &vao->VertexAttrib[attribIndex];
if (!_mesa_is_bufferobj(vao->VertexBinding[bindingIndex].BufferObj))
vao->VertexAttribBufferMask &= ~VERT_BIT(attribIndex);
@@ -278,7 +278,7 @@ _mesa_update_array_format(struct gl_context *ctx,
GLboolean integer, GLboolean doubles,
GLuint relativeOffset, bool flush_vertices)
{
- struct gl_vertex_attrib_array *const array = &vao->VertexAttrib[attrib];
+ struct gl_array_attributes *const array = &vao->VertexAttrib[attrib];
GLint elementSize;
assert(size <= 4);
@@ -465,7 +465,7 @@ update_array(struct gl_context *ctx,
GLboolean normalized, GLboolean integer, GLboolean doubles,
const GLvoid *ptr)
{
- struct gl_vertex_attrib_array *array;
+ struct gl_array_attributes *array;
GLsizei effectiveStride;
/* Page 407 (page 423 of the PDF) of the OpenGL 3.0 spec says:
@@ -905,7 +905,7 @@ get_vertex_array_attrib(struct gl_context *ctx,
GLuint index, GLenum pname,
const char *caller)
{
- const struct gl_vertex_attrib_array *array;
+ const struct gl_array_attributes *array;
if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s(index=%u)", caller, index);
@@ -2327,8 +2327,8 @@ _mesa_copy_client_array(struct gl_context *ctx,
void
_mesa_copy_vertex_attrib_array(struct gl_context *ctx,
- struct gl_vertex_attrib_array *dst,
- const struct gl_vertex_attrib_array *src)
+ struct gl_array_attributes *dst,
+ const struct gl_array_attributes *src)
{
dst->Size = src->Size;
dst->Type = src->Type;
@@ -2369,7 +2369,7 @@ _mesa_print_arrays(struct gl_context *ctx)
unsigned i;
for (i = 0; i < VERT_ATTRIB_MAX; ++i) {
- const struct gl_vertex_attrib_array *array = &vao->VertexAttrib[i];
+ const struct gl_array_attributes *array = &vao->VertexAttrib[i];
if (!array->Enabled)
continue;
diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h
index 54229ffcd8c..bc1c0c6f720 100644
--- a/src/mesa/main/varray.h
+++ b/src/mesa/main/varray.h
@@ -40,7 +40,7 @@ struct gl_context;
* a vertex buffer.
*/
static inline const GLubyte *
-_mesa_vertex_attrib_address(const struct gl_vertex_attrib_array *array,
+_mesa_vertex_attrib_address(const struct gl_array_attributes *array,
const struct gl_vertex_buffer_binding *binding)
{
if (_mesa_is_bufferobj(binding->BufferObj))
@@ -56,7 +56,7 @@ _mesa_vertex_attrib_address(const struct gl_vertex_attrib_array *array,
static inline void
_mesa_update_client_array(struct gl_context *ctx,
struct gl_client_array *dst,
- const struct gl_vertex_attrib_array *src,
+ const struct gl_array_attributes *src,
const struct gl_vertex_buffer_binding *binding)
{
dst->Size = src->Size;
@@ -378,8 +378,8 @@ _mesa_copy_client_array(struct gl_context *ctx,
extern void
_mesa_copy_vertex_attrib_array(struct gl_context *ctx,
- struct gl_vertex_attrib_array *dst,
- const struct gl_vertex_attrib_array *src);
+ struct gl_array_attributes *dst,
+ const struct gl_array_attributes *src);
extern void
_mesa_copy_vertex_buffer_binding(struct gl_context *ctx,
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index b5ed210f668..1425e0bf2cc 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -51,7 +51,7 @@ static void
check_array_data(struct gl_context *ctx, struct gl_vertex_array_object *vao,
GLuint attrib, GLuint j)
{
- const struct gl_vertex_attrib_array *array = &vao->VertexAttrib[attrib];
+ const struct gl_array_attributes *array = &vao->VertexAttrib[attrib];
if (array->Enabled) {
const struct gl_vertex_buffer_binding *binding =
&vao->VertexBinding[array->BufferBindingIndex];
@@ -103,7 +103,7 @@ static void
unmap_array_buffer(struct gl_context *ctx, struct gl_vertex_array_object *vao,
GLuint attrib)
{
- const struct gl_vertex_attrib_array *array = &vao->VertexAttrib[attrib];
+ const struct gl_array_attributes *array = &vao->VertexAttrib[attrib];
if (array->Enabled) {
const struct gl_vertex_buffer_binding *binding =
&vao->VertexBinding[array->BufferBindingIndex];
@@ -196,7 +196,7 @@ print_draw_arrays(struct gl_context *ctx,
unsigned i;
for (i = 0; i < VERT_ATTRIB_MAX; ++i) {
- const struct gl_vertex_attrib_array *array = &vao->VertexAttrib[i];
+ const struct gl_array_attributes *array = &vao->VertexAttrib[i];
if (!array->Enabled)
continue;
@@ -245,7 +245,7 @@ recalculate_input_bindings(struct gl_context *ctx)
{
struct vbo_context *vbo = vbo_context(ctx);
struct vbo_exec_context *exec = &vbo->exec;
- const struct gl_vertex_attrib_array *array = ctx->Array.VAO->VertexAttrib;
+ 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];
GLbitfield64 const_inputs = 0x0;