mesa: Update _ElementSize.
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
|
||||
#include "glheader.h"
|
||||
#include "hash.h"
|
||||
#include "image.h"
|
||||
#include "imports.h"
|
||||
#include "context.h"
|
||||
#include "mfeatures.h"
|
||||
@@ -207,6 +208,7 @@ init_array(struct gl_context *ctx,
|
||||
array->Ptr = NULL;
|
||||
array->Enabled = GL_FALSE;
|
||||
array->Normalized = GL_FALSE;
|
||||
array->_ElementSize = size * _mesa_sizeof_type(type);
|
||||
#if FEATURE_ARB_vertex_buffer_object
|
||||
/* Vertex array buffers */
|
||||
_mesa_reference_buffer_object(ctx, &array->BufferObj,
|
||||
|
@@ -72,6 +72,7 @@ static void init_legacy_currval(struct gl_context *ctx)
|
||||
cl->Type = GL_FLOAT;
|
||||
cl->Format = GL_RGBA;
|
||||
cl->Ptr = (const void *)ctx->Current.Attrib[i];
|
||||
cl->_ElementSize = cl->Size * sizeof(GLfloat);
|
||||
_mesa_reference_buffer_object(ctx, &cl->BufferObj,
|
||||
ctx->Shared->NullBufferObj);
|
||||
}
|
||||
@@ -98,6 +99,7 @@ static void init_generic_currval(struct gl_context *ctx)
|
||||
cl->Stride = 0;
|
||||
cl->StrideB = 0;
|
||||
cl->Enabled = 1;
|
||||
cl->_ElementSize = cl->Size * sizeof(GLfloat);
|
||||
_mesa_reference_buffer_object(ctx, &cl->BufferObj,
|
||||
ctx->Shared->NullBufferObj);
|
||||
}
|
||||
|
@@ -239,6 +239,7 @@ vbo_exec_bind_arrays( struct gl_context *ctx )
|
||||
arrays[attr].Type = GL_FLOAT;
|
||||
arrays[attr].Format = GL_RGBA;
|
||||
arrays[attr].Enabled = 1;
|
||||
arrays[attr]._ElementSize = arrays[attr].Size * sizeof(GLfloat);
|
||||
_mesa_reference_buffer_object(ctx,
|
||||
&arrays[attr].BufferObj,
|
||||
exec->vtx.bufferobj);
|
||||
|
@@ -193,6 +193,7 @@ static void vbo_bind_vertex_list(struct gl_context *ctx,
|
||||
arrays[attr].Type = GL_FLOAT;
|
||||
arrays[attr].Format = GL_RGBA;
|
||||
arrays[attr].Enabled = 1;
|
||||
arrays[attr]._ElementSize = arrays[attr].Size * sizeof(GLfloat);
|
||||
_mesa_reference_buffer_object(ctx,
|
||||
&arrays[attr].BufferObj,
|
||||
node->vertex_store->bufferobj);
|
||||
|
@@ -519,6 +519,7 @@ replay_init( struct copy_context *copy )
|
||||
dst->Enabled = GL_TRUE;
|
||||
dst->Normalized = src->Normalized;
|
||||
dst->BufferObj = ctx->Shared->NullBufferObj;
|
||||
dst->_ElementSize = src->_ElementSize;
|
||||
dst->_MaxElement = copy->dstbuf_size; /* may be less! */
|
||||
|
||||
offset += copy->varying[i].size;
|
||||
|
Reference in New Issue
Block a user