projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mesa: Allow GL_TEXTURE_CUBE_MAP target with compressed internal formats
[mesa.git]
/
src
/
mesa
/
main
/
attrib.c
diff --git
a/src/mesa/main/attrib.c
b/src/mesa/main/attrib.c
index 5b5c48dbdab532bf10ffb70d9c4b0099b5415596..c656845dff9ca4e298b3646a0146d9260173d3f0 100644
(file)
--- a/
src/mesa/main/attrib.c
+++ b/
src/mesa/main/attrib.c
@@
-217,7
+217,7
@@
push_attrib(struct gl_context *ctx, struct gl_attrib_node **head,
{
void *attribute;
{
void *attribute;
- attribute =
MALLOC
(attr_size);
+ attribute =
malloc
(attr_size);
if (attribute == NULL) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib");
return false;
if (attribute == NULL) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib");
return false;
@@
-227,7
+227,7
@@
push_attrib(struct gl_context *ctx, struct gl_attrib_node **head,
memcpy(attribute, attr_data, attr_size);
}
else {
memcpy(attribute, attr_data, attr_size);
}
else {
-
FREE
(attribute);
+
free
(attribute);
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib");
return false;
}
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib");
return false;
}
@@
-277,7
+277,7
@@
_mesa_PushAttrib(GLbitfield mask)
attr->DrawBuffer[i] = ctx->DrawBuffer->ColorDrawBuffer[i];
}
else {
attr->DrawBuffer[i] = ctx->DrawBuffer->ColorDrawBuffer[i];
}
else {
-
FREE
(attr);
+
free
(attr);
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib");
goto end;
}
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib");
goto end;
}
@@
-374,7
+374,7
@@
_mesa_PushAttrib(GLbitfield mask)
attr->FragmentProgram = ctx->FragmentProgram.Enabled;
if (!save_attrib_data(&head, GL_ENABLE_BIT, attr)) {
attr->FragmentProgram = ctx->FragmentProgram.Enabled;
if (!save_attrib_data(&head, GL_ENABLE_BIT, attr)) {
-
FREE
(attr);
+
free
(attr);
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib");
goto end;
}
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib");
goto end;
}
@@
-440,7
+440,7
@@
_mesa_PushAttrib(GLbitfield mask)
attr->ReadBuffer = ctx->ReadBuffer->ColorReadBuffer;
}
else {
attr->ReadBuffer = ctx->ReadBuffer->ColorReadBuffer;
}
else {
-
FREE
(attr);
+
free
(attr);
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib");
goto end;
}
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib");
goto end;
}
@@
-491,7
+491,7
@@
_mesa_PushAttrib(GLbitfield mask)
}
if (!save_attrib_data(&head, GL_TEXTURE_BIT, texstate)) {
}
if (!save_attrib_data(&head, GL_TEXTURE_BIT, texstate)) {
-
FREE
(texstate);
+
free
(texstate);
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib(GL_TEXTURE_BIT)");
goto end;
}
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib(GL_TEXTURE_BIT)");
goto end;
}
@@
-1457,6
+1457,7
@@
copy_array_object(struct gl_context *ctx,
/* _Enabled must be the same than on push */
dest->_Enabled = src->_Enabled;
/* _Enabled must be the same than on push */
dest->_Enabled = src->_Enabled;
+ dest->NewArrays = src->NewArrays;
dest->_MaxElement = src->_MaxElement;
}
dest->_MaxElement = src->_MaxElement;
}
@@
-1486,7
+1487,7
@@
copy_array_attrib(struct gl_context *ctx,
copy_array_object(ctx, dest->VAO, src->VAO);
/* skip ArrayBufferObj */
copy_array_object(ctx, dest->VAO, src->VAO);
/* skip ArrayBufferObj */
- /* skip
ElementArray
BufferObj */
+ /* skip
Index
BufferObj */
}
/**
}
/**
@@
-1506,8
+1507,8
@@
save_array_attrib(struct gl_context *ctx,
/* Just reference them here */
_mesa_reference_buffer_object(ctx, &dest->ArrayBufferObj,
src->ArrayBufferObj);
/* Just reference them here */
_mesa_reference_buffer_object(ctx, &dest->ArrayBufferObj,
src->ArrayBufferObj);
- _mesa_reference_buffer_object(ctx, &dest->VAO->
ElementArray
BufferObj,
- src->VAO->
ElementArray
BufferObj);
+ _mesa_reference_buffer_object(ctx, &dest->VAO->
Index
BufferObj,
+ src->VAO->
Index
BufferObj);
}
/**
}
/**
@@
-1552,10
+1553,10
@@
restore_array_attrib(struct gl_context *ctx,
}
if (!arb_vao
}
if (!arb_vao
- || src->VAO->
ElementArray
BufferObj->Name == 0
- || _mesa_IsBuffer(src->VAO->
ElementArray
BufferObj->Name))
+ || src->VAO->
Index
BufferObj->Name == 0
+ || _mesa_IsBuffer(src->VAO->
Index
BufferObj->Name))
_mesa_BindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB,
_mesa_BindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB,
- src->VAO->
ElementArray
BufferObj->Name);
+ src->VAO->
Index
BufferObj->Name);
}
/**
}
/**
@@
-1625,7
+1626,7
@@
_mesa_PushClientAttrib(GLbitfield mask)
}
else {
_mesa_error( ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib" );
}
else {
_mesa_error( ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib" );
-
FREE
(attr);
+
free
(attr);
goto end;
}
goto end;
}
@@
-1641,7
+1642,7
@@
_mesa_PushClientAttrib(GLbitfield mask)
}
else {
_mesa_error( ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib" );
}
else {
_mesa_error( ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib" );
-
FREE
(attr);
+
free
(attr);
goto end;
}
}
goto end;
}
}
@@
-1655,7
+1656,7
@@
_mesa_PushClientAttrib(GLbitfield mask)
}
if (!init_array_attrib_data(ctx, attr)) {
}
if (!init_array_attrib_data(ctx, attr)) {
-
FREE
(attr);
+
free
(attr);
goto end;
}
goto end;
}
@@
-1665,7
+1666,7
@@
_mesa_PushClientAttrib(GLbitfield mask)
else {
free_array_attrib_data(ctx, attr);
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib");
else {
free_array_attrib_data(ctx, attr);
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib");
-
FREE
(attr);
+
free
(attr);
/* goto to keep safe from possible later changes */
goto end;
}
/* goto to keep safe from possible later changes */
goto end;
}