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