mesa: Rename "struct gl_array_object" to gl_vertex_array_object.
I considered replacing it with "gl_vao", but spelling it out seemed to fit better with Mesa's traditional style. Mesa doesn't shy away from long type names - consider gl_transform_feedback_object, gl_fragment_program_state, gl_uniform_buffer_binding, and so on. Completely generated by: $ find . -type f -print0 | xargs -0 sed -i \ 's/gl_array_object/gl_vertex_array_object/g' v2: Rerun command to resolve conflicts with Ian's meta patches. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
@@ -164,7 +164,7 @@ struct save_state
|
|||||||
GLuint EnvMode; /* unit[0] only */
|
GLuint EnvMode; /* unit[0] only */
|
||||||
|
|
||||||
/** MESA_META_VERTEX */
|
/** MESA_META_VERTEX */
|
||||||
struct gl_array_object *VAO;
|
struct gl_vertex_array_object *VAO;
|
||||||
struct gl_buffer_object *ArrayBufferObj;
|
struct gl_buffer_object *ArrayBufferObj;
|
||||||
|
|
||||||
/** MESA_META_VIEWPORT */
|
/** MESA_META_VIEWPORT */
|
||||||
|
@@ -1472,7 +1472,7 @@ check_vbo(AEcontext *actx, struct gl_buffer_object *vbo)
|
|||||||
static inline void
|
static inline void
|
||||||
update_derived_client_arrays(struct gl_context *ctx)
|
update_derived_client_arrays(struct gl_context *ctx)
|
||||||
{
|
{
|
||||||
struct gl_array_object *vao = ctx->Array.VAO;
|
struct gl_vertex_array_object *vao = ctx->Array.VAO;
|
||||||
|
|
||||||
if (vao->NewArrays) {
|
if (vao->NewArrays) {
|
||||||
_mesa_update_array_object_client_arrays(ctx, vao);
|
_mesa_update_array_object_client_arrays(ctx, vao);
|
||||||
@@ -1494,7 +1494,7 @@ _ae_update_state(struct gl_context *ctx)
|
|||||||
AEarray *aa = actx->arrays; /* non-indexed arrays (ex: glNormal) */
|
AEarray *aa = actx->arrays; /* non-indexed arrays (ex: glNormal) */
|
||||||
AEattrib *at = actx->attribs; /* indexed arrays (ex: glMultiTexCoord) */
|
AEattrib *at = actx->attribs; /* indexed arrays (ex: glMultiTexCoord) */
|
||||||
GLuint i;
|
GLuint i;
|
||||||
struct gl_array_object *vao = ctx->Array.VAO;
|
struct gl_vertex_array_object *vao = ctx->Array.VAO;
|
||||||
|
|
||||||
actx->nr_vbos = 0;
|
actx->nr_vbos = 0;
|
||||||
|
|
||||||
|
@@ -60,13 +60,13 @@
|
|||||||
* non-existent.
|
* non-existent.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct gl_array_object *
|
struct gl_vertex_array_object *
|
||||||
_mesa_lookup_arrayobj(struct gl_context *ctx, GLuint id)
|
_mesa_lookup_arrayobj(struct gl_context *ctx, GLuint id)
|
||||||
{
|
{
|
||||||
if (id == 0)
|
if (id == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
else
|
else
|
||||||
return (struct gl_array_object *)
|
return (struct gl_vertex_array_object *)
|
||||||
_mesa_HashLookup(ctx->Array.Objects, id);
|
_mesa_HashLookup(ctx->Array.Objects, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ _mesa_lookup_arrayobj(struct gl_context *ctx, GLuint id)
|
|||||||
* This is done just prior to array object destruction.
|
* This is done just prior to array object destruction.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
unbind_array_object_vbos(struct gl_context *ctx, struct gl_array_object *obj)
|
unbind_array_object_vbos(struct gl_context *ctx, struct gl_vertex_array_object *obj)
|
||||||
{
|
{
|
||||||
GLuint i;
|
GLuint i;
|
||||||
|
|
||||||
@@ -95,10 +95,10 @@ unbind_array_object_vbos(struct gl_context *ctx, struct gl_array_object *obj)
|
|||||||
* This function is intended to be called via
|
* This function is intended to be called via
|
||||||
* \c dd_function_table::NewArrayObject.
|
* \c dd_function_table::NewArrayObject.
|
||||||
*/
|
*/
|
||||||
struct gl_array_object *
|
struct gl_vertex_array_object *
|
||||||
_mesa_new_array_object( struct gl_context *ctx, GLuint name )
|
_mesa_new_array_object( struct gl_context *ctx, GLuint name )
|
||||||
{
|
{
|
||||||
struct gl_array_object *obj = CALLOC_STRUCT(gl_array_object);
|
struct gl_vertex_array_object *obj = CALLOC_STRUCT(gl_vertex_array_object);
|
||||||
if (obj)
|
if (obj)
|
||||||
_mesa_initialize_array_object(ctx, obj, name);
|
_mesa_initialize_array_object(ctx, obj, name);
|
||||||
return obj;
|
return obj;
|
||||||
@@ -112,7 +112,7 @@ _mesa_new_array_object( struct gl_context *ctx, GLuint name )
|
|||||||
* \c dd_function_table::DeleteArrayObject.
|
* \c dd_function_table::DeleteArrayObject.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
_mesa_delete_array_object( struct gl_context *ctx, struct gl_array_object *obj )
|
_mesa_delete_array_object( struct gl_context *ctx, struct gl_vertex_array_object *obj )
|
||||||
{
|
{
|
||||||
(void) ctx;
|
(void) ctx;
|
||||||
unbind_array_object_vbos(ctx, obj);
|
unbind_array_object_vbos(ctx, obj);
|
||||||
@@ -130,15 +130,15 @@ _mesa_delete_array_object( struct gl_context *ctx, struct gl_array_object *obj )
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
_mesa_reference_array_object_(struct gl_context *ctx,
|
_mesa_reference_array_object_(struct gl_context *ctx,
|
||||||
struct gl_array_object **ptr,
|
struct gl_vertex_array_object **ptr,
|
||||||
struct gl_array_object *vao)
|
struct gl_vertex_array_object *vao)
|
||||||
{
|
{
|
||||||
assert(*ptr != vao);
|
assert(*ptr != vao);
|
||||||
|
|
||||||
if (*ptr) {
|
if (*ptr) {
|
||||||
/* Unreference the old array object */
|
/* Unreference the old array object */
|
||||||
GLboolean deleteFlag = GL_FALSE;
|
GLboolean deleteFlag = GL_FALSE;
|
||||||
struct gl_array_object *oldObj = *ptr;
|
struct gl_vertex_array_object *oldObj = *ptr;
|
||||||
|
|
||||||
_glthread_LOCK_MUTEX(oldObj->Mutex);
|
_glthread_LOCK_MUTEX(oldObj->Mutex);
|
||||||
ASSERT(oldObj->RefCount > 0);
|
ASSERT(oldObj->RefCount > 0);
|
||||||
@@ -184,7 +184,7 @@ _mesa_reference_array_object_(struct gl_context *ctx,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
init_array(struct gl_context *ctx,
|
init_array(struct gl_context *ctx,
|
||||||
struct gl_array_object *obj, GLuint index, GLint size, GLint type)
|
struct gl_vertex_array_object *obj, GLuint index, GLint size, GLint type)
|
||||||
{
|
{
|
||||||
struct gl_vertex_attrib_array *array = &obj->VertexAttrib[index];
|
struct gl_vertex_attrib_array *array = &obj->VertexAttrib[index];
|
||||||
struct gl_vertex_buffer_binding *binding = &obj->VertexBinding[index];
|
struct gl_vertex_buffer_binding *binding = &obj->VertexBinding[index];
|
||||||
@@ -213,11 +213,11 @@ init_array(struct gl_context *ctx,
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize a gl_array_object's arrays.
|
* Initialize a gl_vertex_array_object's arrays.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
_mesa_initialize_array_object( struct gl_context *ctx,
|
_mesa_initialize_array_object( struct gl_context *ctx,
|
||||||
struct gl_array_object *obj,
|
struct gl_vertex_array_object *obj,
|
||||||
GLuint name )
|
GLuint name )
|
||||||
{
|
{
|
||||||
GLuint i;
|
GLuint i;
|
||||||
@@ -266,7 +266,7 @@ _mesa_initialize_array_object( struct gl_context *ctx,
|
|||||||
* Add the given array object to the array object pool.
|
* Add the given array object to the array object pool.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
save_array_object( struct gl_context *ctx, struct gl_array_object *obj )
|
save_array_object( struct gl_context *ctx, struct gl_vertex_array_object *obj )
|
||||||
{
|
{
|
||||||
if (obj->Name > 0) {
|
if (obj->Name > 0) {
|
||||||
/* insert into hash table */
|
/* insert into hash table */
|
||||||
@@ -280,7 +280,7 @@ save_array_object( struct gl_context *ctx, struct gl_array_object *obj )
|
|||||||
* Do not deallocate the array object though.
|
* Do not deallocate the array object though.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
remove_array_object( struct gl_context *ctx, struct gl_array_object *obj )
|
remove_array_object( struct gl_context *ctx, struct gl_vertex_array_object *obj )
|
||||||
{
|
{
|
||||||
if (obj->Name > 0) {
|
if (obj->Name > 0) {
|
||||||
/* remove from hash table */
|
/* remove from hash table */
|
||||||
@@ -295,7 +295,7 @@ remove_array_object( struct gl_context *ctx, struct gl_array_object *obj )
|
|||||||
* \return min(vao->_VertexAttrib[*]._MaxElement).
|
* \return min(vao->_VertexAttrib[*]._MaxElement).
|
||||||
*/
|
*/
|
||||||
static GLuint
|
static GLuint
|
||||||
compute_max_element(struct gl_array_object *vao, GLbitfield64 enabled)
|
compute_max_element(struct gl_vertex_array_object *vao, GLbitfield64 enabled)
|
||||||
{
|
{
|
||||||
GLuint min = ~((GLuint)0);
|
GLuint min = ~((GLuint)0);
|
||||||
|
|
||||||
@@ -315,11 +315,11 @@ compute_max_element(struct gl_array_object *vao, GLbitfield64 enabled)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Examine vertex arrays to update the gl_array_object::_MaxElement field.
|
* Examine vertex arrays to update the gl_vertex_array_object::_MaxElement field.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
_mesa_update_array_object_max_element(struct gl_context *ctx,
|
_mesa_update_array_object_max_element(struct gl_context *ctx,
|
||||||
struct gl_array_object *vao)
|
struct gl_vertex_array_object *vao)
|
||||||
{
|
{
|
||||||
GLbitfield64 enabled;
|
GLbitfield64 enabled;
|
||||||
|
|
||||||
@@ -341,7 +341,7 @@ _mesa_update_array_object_max_element(struct gl_context *ctx,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
_mesa_update_array_object_client_arrays(struct gl_context *ctx,
|
_mesa_update_array_object_client_arrays(struct gl_context *ctx,
|
||||||
struct gl_array_object *vao)
|
struct gl_vertex_array_object *vao)
|
||||||
{
|
{
|
||||||
GLbitfield64 arrays = vao->NewArrays;
|
GLbitfield64 arrays = vao->NewArrays;
|
||||||
|
|
||||||
@@ -376,8 +376,8 @@ _mesa_update_array_object_client_arrays(struct gl_context *ctx,
|
|||||||
static void
|
static void
|
||||||
bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
|
bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
|
||||||
{
|
{
|
||||||
struct gl_array_object * const oldObj = ctx->Array.VAO;
|
struct gl_vertex_array_object * const oldObj = ctx->Array.VAO;
|
||||||
struct gl_array_object *newObj = NULL;
|
struct gl_vertex_array_object *newObj = NULL;
|
||||||
|
|
||||||
ASSERT(oldObj != NULL);
|
ASSERT(oldObj != NULL);
|
||||||
|
|
||||||
@@ -482,7 +482,7 @@ _mesa_DeleteVertexArrays(GLsizei n, const GLuint *ids)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
struct gl_array_object *obj = _mesa_lookup_arrayobj(ctx, ids[i]);
|
struct gl_vertex_array_object *obj = _mesa_lookup_arrayobj(ctx, ids[i]);
|
||||||
|
|
||||||
if ( obj != NULL ) {
|
if ( obj != NULL ) {
|
||||||
ASSERT( obj->Name == ids[i] );
|
ASSERT( obj->Name == ids[i] );
|
||||||
@@ -533,7 +533,7 @@ gen_vertex_arrays(struct gl_context *ctx, GLsizei n, GLuint *arrays)
|
|||||||
|
|
||||||
/* Allocate new, empty array objects and return identifiers */
|
/* Allocate new, empty array objects and return identifiers */
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
struct gl_array_object *obj;
|
struct gl_vertex_array_object *obj;
|
||||||
GLuint name = first + i;
|
GLuint name = first + i;
|
||||||
|
|
||||||
obj = (*ctx->Driver.NewArrayObject)( ctx, name );
|
obj = (*ctx->Driver.NewArrayObject)( ctx, name );
|
||||||
@@ -581,7 +581,7 @@ _mesa_GenVertexArraysAPPLE(GLsizei n, GLuint *arrays)
|
|||||||
GLboolean GLAPIENTRY
|
GLboolean GLAPIENTRY
|
||||||
_mesa_IsVertexArray( GLuint id )
|
_mesa_IsVertexArray( GLuint id )
|
||||||
{
|
{
|
||||||
struct gl_array_object * obj;
|
struct gl_vertex_array_object * obj;
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
|
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
|
||||||
|
|
||||||
|
@@ -45,24 +45,24 @@ struct gl_context;
|
|||||||
* Internal functions
|
* Internal functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern struct gl_array_object *
|
extern struct gl_vertex_array_object *
|
||||||
_mesa_lookup_arrayobj(struct gl_context *ctx, GLuint id);
|
_mesa_lookup_arrayobj(struct gl_context *ctx, GLuint id);
|
||||||
|
|
||||||
extern struct gl_array_object *
|
extern struct gl_vertex_array_object *
|
||||||
_mesa_new_array_object( struct gl_context *ctx, GLuint name );
|
_mesa_new_array_object( struct gl_context *ctx, GLuint name );
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
_mesa_delete_array_object( struct gl_context *ctx, struct gl_array_object *obj );
|
_mesa_delete_array_object( struct gl_context *ctx, struct gl_vertex_array_object *obj );
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
_mesa_reference_array_object_(struct gl_context *ctx,
|
_mesa_reference_array_object_(struct gl_context *ctx,
|
||||||
struct gl_array_object **ptr,
|
struct gl_vertex_array_object **ptr,
|
||||||
struct gl_array_object *vao);
|
struct gl_vertex_array_object *vao);
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
_mesa_reference_array_object(struct gl_context *ctx,
|
_mesa_reference_array_object(struct gl_context *ctx,
|
||||||
struct gl_array_object **ptr,
|
struct gl_vertex_array_object **ptr,
|
||||||
struct gl_array_object *vao)
|
struct gl_vertex_array_object *vao)
|
||||||
{
|
{
|
||||||
if (*ptr != vao)
|
if (*ptr != vao)
|
||||||
_mesa_reference_array_object_(ctx, ptr, vao);
|
_mesa_reference_array_object_(ctx, ptr, vao);
|
||||||
@@ -71,16 +71,16 @@ _mesa_reference_array_object(struct gl_context *ctx,
|
|||||||
|
|
||||||
extern void
|
extern void
|
||||||
_mesa_initialize_array_object( struct gl_context *ctx,
|
_mesa_initialize_array_object( struct gl_context *ctx,
|
||||||
struct gl_array_object *obj, GLuint name );
|
struct gl_vertex_array_object *obj, GLuint name );
|
||||||
|
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
_mesa_update_array_object_max_element(struct gl_context *ctx,
|
_mesa_update_array_object_max_element(struct gl_context *ctx,
|
||||||
struct gl_array_object *vao);
|
struct gl_vertex_array_object *vao);
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
_mesa_update_array_object_client_arrays(struct gl_context *ctx,
|
_mesa_update_array_object_client_arrays(struct gl_context *ctx,
|
||||||
struct gl_array_object *vao);
|
struct gl_vertex_array_object *vao);
|
||||||
|
|
||||||
|
|
||||||
/** Returns the bitmask of all enabled arrays in fixed function mode.
|
/** Returns the bitmask of all enabled arrays in fixed function mode.
|
||||||
@@ -89,7 +89,7 @@ _mesa_update_array_object_client_arrays(struct gl_context *ctx,
|
|||||||
* are available.
|
* are available.
|
||||||
*/
|
*/
|
||||||
static inline GLbitfield64
|
static inline GLbitfield64
|
||||||
_mesa_array_object_get_enabled_ff(const struct gl_array_object *vao)
|
_mesa_array_object_get_enabled_ff(const struct gl_vertex_array_object *vao)
|
||||||
{
|
{
|
||||||
return vao->_Enabled & VERT_BIT_FF_ALL;
|
return vao->_Enabled & VERT_BIT_FF_ALL;
|
||||||
}
|
}
|
||||||
@@ -101,7 +101,7 @@ _mesa_array_object_get_enabled_ff(const struct gl_array_object *vao)
|
|||||||
* precedence over the legacy position array.
|
* precedence over the legacy position array.
|
||||||
*/
|
*/
|
||||||
static inline GLbitfield64
|
static inline GLbitfield64
|
||||||
_mesa_array_object_get_enabled_arb(const struct gl_array_object *vao)
|
_mesa_array_object_get_enabled_arb(const struct gl_vertex_array_object *vao)
|
||||||
{
|
{
|
||||||
GLbitfield64 enabled = vao->_Enabled;
|
GLbitfield64 enabled = vao->_Enabled;
|
||||||
return enabled & ~(VERT_BIT_POS & (enabled >> VERT_ATTRIB_GENERIC0));
|
return enabled & ~(VERT_BIT_POS & (enabled >> VERT_ATTRIB_GENERIC0));
|
||||||
|
@@ -1433,13 +1433,13 @@ copy_pixelstore(struct gl_context *ctx,
|
|||||||
#define GL_CLIENT_UNPACK_BIT (1<<21)
|
#define GL_CLIENT_UNPACK_BIT (1<<21)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy gl_array_object from src to dest.
|
* Copy gl_vertex_array_object from src to dest.
|
||||||
* 'dest' must be in an initialized state.
|
* 'dest' must be in an initialized state.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
copy_array_object(struct gl_context *ctx,
|
copy_array_object(struct gl_context *ctx,
|
||||||
struct gl_array_object *dest,
|
struct gl_vertex_array_object *dest,
|
||||||
struct gl_array_object *src)
|
struct gl_vertex_array_object *src)
|
||||||
{
|
{
|
||||||
GLuint i;
|
GLuint i;
|
||||||
|
|
||||||
@@ -1566,8 +1566,8 @@ static bool
|
|||||||
init_array_attrib_data(struct gl_context *ctx,
|
init_array_attrib_data(struct gl_context *ctx,
|
||||||
struct gl_array_attrib *attrib)
|
struct gl_array_attrib *attrib)
|
||||||
{
|
{
|
||||||
/* Get a non driver gl_array_object. */
|
/* Get a non driver gl_vertex_array_object. */
|
||||||
attrib->VAO = CALLOC_STRUCT( gl_array_object );
|
attrib->VAO = CALLOC_STRUCT( gl_vertex_array_object );
|
||||||
|
|
||||||
if (attrib->VAO == NULL) {
|
if (attrib->VAO == NULL) {
|
||||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib");
|
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib");
|
||||||
|
@@ -1082,7 +1082,7 @@ _mesa_DeleteBuffers(GLsizei n, const GLuint *ids)
|
|||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, ids[i]);
|
struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, ids[i]);
|
||||||
if (bufObj) {
|
if (bufObj) {
|
||||||
struct gl_array_object *vao = ctx->Array.VAO;
|
struct gl_vertex_array_object *vao = ctx->Array.VAO;
|
||||||
GLuint j;
|
GLuint j;
|
||||||
|
|
||||||
ASSERT(bufObj->Name == ids[i] || bufObj == &DummyBufferObject);
|
ASSERT(bufObj->Name == ids[i] || bufObj == &DummyBufferObject);
|
||||||
|
@@ -709,9 +709,9 @@ struct dd_function_table {
|
|||||||
* \name Vertex Array objects
|
* \name Vertex Array objects
|
||||||
*/
|
*/
|
||||||
/*@{*/
|
/*@{*/
|
||||||
struct gl_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id);
|
struct gl_vertex_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id);
|
||||||
void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_array_object *);
|
void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_vertex_array_object *);
|
||||||
void (*BindArrayObject)(struct gl_context *ctx, struct gl_array_object *);
|
void (*BindArrayObject)(struct gl_context *ctx, struct gl_vertex_array_object *);
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -63,7 +63,7 @@ update_derived_primitive_restart_state(struct gl_context *ctx)
|
|||||||
static void
|
static void
|
||||||
client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
|
client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
|
||||||
{
|
{
|
||||||
struct gl_array_object *vao = ctx->Array.VAO;
|
struct gl_vertex_array_object *vao = ctx->Array.VAO;
|
||||||
GLbitfield64 flag;
|
GLbitfield64 flag;
|
||||||
GLboolean *var;
|
GLboolean *var;
|
||||||
|
|
||||||
|
@@ -182,7 +182,7 @@ union value {
|
|||||||
#define CONTEXT_FIELD(field, type) \
|
#define CONTEXT_FIELD(field, type) \
|
||||||
LOC_CONTEXT, type, offsetof(struct gl_context, field)
|
LOC_CONTEXT, type, offsetof(struct gl_context, field)
|
||||||
#define ARRAY_FIELD(field, type) \
|
#define ARRAY_FIELD(field, type) \
|
||||||
LOC_ARRAY, type, offsetof(struct gl_array_object, field)
|
LOC_ARRAY, type, offsetof(struct gl_vertex_array_object, field)
|
||||||
#undef CONST /* already defined through windows.h */
|
#undef CONST /* already defined through windows.h */
|
||||||
#define CONST(value) \
|
#define CONST(value) \
|
||||||
LOC_CONTEXT, TYPE_CONST, value
|
LOC_CONTEXT, TYPE_CONST, value
|
||||||
|
@@ -221,9 +221,9 @@ descriptor=[
|
|||||||
[ "SAMPLE_ALPHA_TO_ONE_ARB", "CONTEXT_BOOL(Multisample.SampleAlphaToOne), NO_EXTRA" ],
|
[ "SAMPLE_ALPHA_TO_ONE_ARB", "CONTEXT_BOOL(Multisample.SampleAlphaToOne), NO_EXTRA" ],
|
||||||
|
|
||||||
# GL_ARB_vertex_buffer_object
|
# GL_ARB_vertex_buffer_object
|
||||||
[ "VERTEX_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, VertexBinding[VERT_ATTRIB_POS].BufferObj), NO_EXTRA" ],
|
[ "VERTEX_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_vertex_array_object, VertexBinding[VERT_ATTRIB_POS].BufferObj), NO_EXTRA" ],
|
||||||
[ "NORMAL_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, VertexBinding[VERT_ATTRIB_NORMAL].BufferObj), NO_EXTRA" ],
|
[ "NORMAL_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_vertex_array_object, VertexBinding[VERT_ATTRIB_NORMAL].BufferObj), NO_EXTRA" ],
|
||||||
[ "COLOR_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, VertexBinding[VERT_ATTRIB_COLOR0].BufferObj), NO_EXTRA" ],
|
[ "COLOR_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_vertex_array_object, VertexBinding[VERT_ATTRIB_COLOR0].BufferObj), NO_EXTRA" ],
|
||||||
[ "TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA" ],
|
[ "TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA" ],
|
||||||
|
|
||||||
# GL_OES_point_sprite
|
# GL_OES_point_sprite
|
||||||
@@ -583,10 +583,10 @@ descriptor=[
|
|||||||
[ "PRIMITIVE_RESTART_INDEX_NV", "CONTEXT_INT(Array.RestartIndex), extra_NV_primitive_restart" ],
|
[ "PRIMITIVE_RESTART_INDEX_NV", "CONTEXT_INT(Array.RestartIndex), extra_NV_primitive_restart" ],
|
||||||
|
|
||||||
# GL_ARB_vertex_buffer_object
|
# GL_ARB_vertex_buffer_object
|
||||||
[ "INDEX_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, VertexBinding[VERT_ATTRIB_COLOR_INDEX].BufferObj), NO_EXTRA" ],
|
[ "INDEX_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_vertex_array_object, VertexBinding[VERT_ATTRIB_COLOR_INDEX].BufferObj), NO_EXTRA" ],
|
||||||
[ "EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, VertexBinding[VERT_ATTRIB_EDGEFLAG].BufferObj), NO_EXTRA" ],
|
[ "EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_vertex_array_object, VertexBinding[VERT_ATTRIB_EDGEFLAG].BufferObj), NO_EXTRA" ],
|
||||||
[ "SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, VertexBinding[VERT_ATTRIB_COLOR1].BufferObj), NO_EXTRA" ],
|
[ "SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_vertex_array_object, VertexBinding[VERT_ATTRIB_COLOR1].BufferObj), NO_EXTRA" ],
|
||||||
[ "FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, VertexBinding[VERT_ATTRIB_FOG].BufferObj), NO_EXTRA" ],
|
[ "FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_vertex_array_object, VertexBinding[VERT_ATTRIB_FOG].BufferObj), NO_EXTRA" ],
|
||||||
|
|
||||||
# GL_ARB_vertex_program
|
# GL_ARB_vertex_program
|
||||||
# == GL_VERTEX_PROGRAM_NV
|
# == GL_VERTEX_PROGRAM_NV
|
||||||
|
@@ -1554,7 +1554,7 @@ struct gl_vertex_buffer_binding
|
|||||||
* Collection of vertex arrays. Defined by the GL_APPLE_vertex_array_object
|
* Collection of vertex arrays. Defined by the GL_APPLE_vertex_array_object
|
||||||
* extension, but a nice encapsulation in any case.
|
* extension, but a nice encapsulation in any case.
|
||||||
*/
|
*/
|
||||||
struct gl_array_object
|
struct gl_vertex_array_object
|
||||||
{
|
{
|
||||||
/** Name of the array object as received from glGenVertexArrayAPPLE. */
|
/** Name of the array object as received from glGenVertexArrayAPPLE. */
|
||||||
GLuint Name;
|
GLuint Name;
|
||||||
@@ -1615,10 +1615,10 @@ struct gl_array_object
|
|||||||
struct gl_array_attrib
|
struct gl_array_attrib
|
||||||
{
|
{
|
||||||
/** Currently bound array object. See _mesa_BindVertexArrayAPPLE() */
|
/** Currently bound array object. See _mesa_BindVertexArrayAPPLE() */
|
||||||
struct gl_array_object *VAO;
|
struct gl_vertex_array_object *VAO;
|
||||||
|
|
||||||
/** The default vertex array object */
|
/** The default vertex array object */
|
||||||
struct gl_array_object *DefaultVAO;
|
struct gl_vertex_array_object *DefaultVAO;
|
||||||
|
|
||||||
/** Array objects (GL_ARB/APPLE_vertex_array_object) */
|
/** Array objects (GL_ARB/APPLE_vertex_array_object) */
|
||||||
struct _mesa_HashTable *Objects;
|
struct _mesa_HashTable *Objects;
|
||||||
|
@@ -158,7 +158,7 @@ get_label_pointer(struct gl_context *ctx, GLenum identifier, GLuint name,
|
|||||||
break;
|
break;
|
||||||
case GL_VERTEX_ARRAY:
|
case GL_VERTEX_ARRAY:
|
||||||
{
|
{
|
||||||
struct gl_array_object *obj = _mesa_lookup_arrayobj(ctx, name);
|
struct gl_vertex_array_object *obj = _mesa_lookup_arrayobj(ctx, name);
|
||||||
if (obj)
|
if (obj)
|
||||||
labelPtr = &obj->Label;
|
labelPtr = &obj->Label;
|
||||||
}
|
}
|
||||||
|
@@ -112,7 +112,7 @@ static void
|
|||||||
vertex_attrib_binding(struct gl_context *ctx, GLuint attribIndex,
|
vertex_attrib_binding(struct gl_context *ctx, GLuint attribIndex,
|
||||||
GLuint bindingIndex)
|
GLuint bindingIndex)
|
||||||
{
|
{
|
||||||
struct gl_array_object *vao = ctx->Array.VAO;
|
struct gl_vertex_array_object *vao = ctx->Array.VAO;
|
||||||
struct gl_vertex_attrib_array *array = &vao->VertexAttrib[attribIndex];
|
struct gl_vertex_attrib_array *array = &vao->VertexAttrib[attribIndex];
|
||||||
|
|
||||||
if (array->VertexBinding != bindingIndex) {
|
if (array->VertexBinding != bindingIndex) {
|
||||||
@@ -139,7 +139,7 @@ bind_vertex_buffer(struct gl_context *ctx, GLuint index,
|
|||||||
struct gl_buffer_object *vbo,
|
struct gl_buffer_object *vbo,
|
||||||
GLintptr offset, GLsizei stride)
|
GLintptr offset, GLsizei stride)
|
||||||
{
|
{
|
||||||
struct gl_array_object *vao = ctx->Array.VAO;
|
struct gl_vertex_array_object *vao = ctx->Array.VAO;
|
||||||
struct gl_vertex_buffer_binding *binding = &vao->VertexBinding[index];
|
struct gl_vertex_buffer_binding *binding = &vao->VertexBinding[index];
|
||||||
|
|
||||||
if (binding->BufferObj != vbo ||
|
if (binding->BufferObj != vbo ||
|
||||||
@@ -166,7 +166,7 @@ static void
|
|||||||
vertex_binding_divisor(struct gl_context *ctx, GLuint bindingIndex,
|
vertex_binding_divisor(struct gl_context *ctx, GLuint bindingIndex,
|
||||||
GLuint divisor)
|
GLuint divisor)
|
||||||
{
|
{
|
||||||
struct gl_array_object *vao = ctx->Array.VAO;
|
struct gl_vertex_array_object *vao = ctx->Array.VAO;
|
||||||
struct gl_vertex_buffer_binding *binding =
|
struct gl_vertex_buffer_binding *binding =
|
||||||
&vao->VertexBinding[bindingIndex];
|
&vao->VertexBinding[bindingIndex];
|
||||||
|
|
||||||
@@ -664,7 +664,7 @@ _mesa_VertexAttribIPointer(GLuint index, GLint size, GLenum type,
|
|||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
_mesa_EnableVertexAttribArray(GLuint index)
|
_mesa_EnableVertexAttribArray(GLuint index)
|
||||||
{
|
{
|
||||||
struct gl_array_object *vao;
|
struct gl_vertex_array_object *vao;
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
|
|
||||||
if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) {
|
if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) {
|
||||||
@@ -690,7 +690,7 @@ _mesa_EnableVertexAttribArray(GLuint index)
|
|||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
_mesa_DisableVertexAttribArray(GLuint index)
|
_mesa_DisableVertexAttribArray(GLuint index)
|
||||||
{
|
{
|
||||||
struct gl_array_object *vao;
|
struct gl_vertex_array_object *vao;
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
|
|
||||||
if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) {
|
if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) {
|
||||||
@@ -722,7 +722,7 @@ static GLuint
|
|||||||
get_vertex_array_attrib(struct gl_context *ctx, GLuint index, GLenum pname,
|
get_vertex_array_attrib(struct gl_context *ctx, GLuint index, GLenum pname,
|
||||||
const char *caller)
|
const char *caller)
|
||||||
{
|
{
|
||||||
const struct gl_array_object *vao = ctx->Array.VAO;
|
const struct gl_vertex_array_object *vao = ctx->Array.VAO;
|
||||||
const struct gl_vertex_attrib_array *array;
|
const struct gl_vertex_attrib_array *array;
|
||||||
|
|
||||||
if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) {
|
if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) {
|
||||||
@@ -1365,7 +1365,7 @@ _mesa_BindVertexBuffer(GLuint bindingIndex, GLuint buffer, GLintptr offset,
|
|||||||
GLsizei stride)
|
GLsizei stride)
|
||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
const struct gl_array_object *vao = ctx->Array.VAO;
|
const struct gl_vertex_array_object *vao = ctx->Array.VAO;
|
||||||
struct gl_buffer_object *vbo;
|
struct gl_buffer_object *vbo;
|
||||||
|
|
||||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||||
@@ -1758,7 +1758,7 @@ print_array(const char *name, GLint index, const struct gl_client_array *array)
|
|||||||
void
|
void
|
||||||
_mesa_print_arrays(struct gl_context *ctx)
|
_mesa_print_arrays(struct gl_context *ctx)
|
||||||
{
|
{
|
||||||
struct gl_array_object *vao = ctx->Array.VAO;
|
struct gl_vertex_array_object *vao = ctx->Array.VAO;
|
||||||
GLuint i;
|
GLuint i;
|
||||||
|
|
||||||
_mesa_update_array_object_max_element(ctx, vao);
|
_mesa_update_array_object_max_element(ctx, vao);
|
||||||
@@ -1801,7 +1801,7 @@ _mesa_init_varray(struct gl_context *ctx)
|
|||||||
static void
|
static void
|
||||||
delete_arrayobj_cb(GLuint id, void *data, void *userData)
|
delete_arrayobj_cb(GLuint id, void *data, void *userData)
|
||||||
{
|
{
|
||||||
struct gl_array_object *vao = (struct gl_array_object *) data;
|
struct gl_vertex_array_object *vao = (struct gl_vertex_array_object *) data;
|
||||||
struct gl_context *ctx = (struct gl_context *) userData;
|
struct gl_context *ctx = (struct gl_context *) userData;
|
||||||
_mesa_delete_array_object(ctx, vao);
|
_mesa_delete_array_object(ctx, vao);
|
||||||
}
|
}
|
||||||
|
@@ -287,7 +287,7 @@ static void
|
|||||||
check_draw_elements_data(struct gl_context *ctx, GLsizei count, GLenum elemType,
|
check_draw_elements_data(struct gl_context *ctx, GLsizei count, GLenum elemType,
|
||||||
const void *elements, GLint basevertex)
|
const void *elements, GLint basevertex)
|
||||||
{
|
{
|
||||||
struct gl_array_object *vao = ctx->Array.VAO;
|
struct gl_vertex_array_object *vao = ctx->Array.VAO;
|
||||||
const void *elemMap;
|
const void *elemMap;
|
||||||
GLint i, k;
|
GLint i, k;
|
||||||
|
|
||||||
@@ -352,7 +352,7 @@ print_draw_arrays(struct gl_context *ctx,
|
|||||||
{
|
{
|
||||||
struct vbo_context *vbo = vbo_context(ctx);
|
struct vbo_context *vbo = vbo_context(ctx);
|
||||||
struct vbo_exec_context *exec = &vbo->exec;
|
struct vbo_exec_context *exec = &vbo->exec;
|
||||||
struct gl_array_object *vao = ctx->Array.VAO;
|
struct gl_vertex_array_object *vao = ctx->Array.VAO;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
printf("vbo_exec_DrawArrays(mode 0x%x, start %d, count %d):\n",
|
printf("vbo_exec_DrawArrays(mode 0x%x, start %d, count %d):\n",
|
||||||
|
Reference in New Issue
Block a user