Assorted casts to silence g++ warnings.
This commit is contained in:
@@ -48,7 +48,7 @@ static void _ac_fallbacks_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_FLOAT;
|
cl->Type = GL_FLOAT;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = 0;
|
cl->StrideB = 0;
|
||||||
cl->Ptr = (void *) ctx->Current.Attrib[VERT_ATTRIB_NORMAL];
|
cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_NORMAL];
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = CA_CLIENT_DATA; /* hack */
|
cl->Flags = CA_CLIENT_DATA; /* hack */
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
@@ -60,7 +60,7 @@ static void _ac_fallbacks_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_FLOAT;
|
cl->Type = GL_FLOAT;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = 0;
|
cl->StrideB = 0;
|
||||||
cl->Ptr = (void *) ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
|
cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = CA_CLIENT_DATA; /* hack */
|
cl->Flags = CA_CLIENT_DATA; /* hack */
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
@@ -72,7 +72,7 @@ static void _ac_fallbacks_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_FLOAT;
|
cl->Type = GL_FLOAT;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = 0;
|
cl->StrideB = 0;
|
||||||
cl->Ptr = (void *) ctx->Current.Attrib[VERT_ATTRIB_COLOR1];
|
cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_COLOR1];
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = CA_CLIENT_DATA; /* hack */
|
cl->Flags = CA_CLIENT_DATA; /* hack */
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
@@ -84,7 +84,7 @@ static void _ac_fallbacks_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_FLOAT;
|
cl->Type = GL_FLOAT;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = 0;
|
cl->StrideB = 0;
|
||||||
cl->Ptr = (void *) &ctx->Current.Attrib[VERT_ATTRIB_FOG];
|
cl->Ptr = (GLubyte *) &ctx->Current.Attrib[VERT_ATTRIB_FOG];
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = CA_CLIENT_DATA; /* hack */
|
cl->Flags = CA_CLIENT_DATA; /* hack */
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
@@ -96,7 +96,7 @@ static void _ac_fallbacks_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_UNSIGNED_INT;
|
cl->Type = GL_UNSIGNED_INT;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = 0;
|
cl->StrideB = 0;
|
||||||
cl->Ptr = (void *) &ctx->Current.Index;
|
cl->Ptr = (GLubyte *) &ctx->Current.Index;
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = CA_CLIENT_DATA; /* hack */
|
cl->Flags = CA_CLIENT_DATA; /* hack */
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
@@ -109,7 +109,7 @@ static void _ac_fallbacks_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_FLOAT;
|
cl->Type = GL_FLOAT;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = 0;
|
cl->StrideB = 0;
|
||||||
cl->Ptr = (void *) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + i];
|
cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + i];
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = CA_CLIENT_DATA; /* hack */
|
cl->Flags = CA_CLIENT_DATA; /* hack */
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
@@ -122,7 +122,7 @@ static void _ac_fallbacks_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_UNSIGNED_BYTE;
|
cl->Type = GL_UNSIGNED_BYTE;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = 0;
|
cl->StrideB = 0;
|
||||||
cl->Ptr = (void *) &ctx->Current.EdgeFlag;
|
cl->Ptr = (GLubyte *) &ctx->Current.EdgeFlag;
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = CA_CLIENT_DATA; /* hack */
|
cl->Flags = CA_CLIENT_DATA; /* hack */
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
@@ -135,7 +135,7 @@ static void _ac_fallbacks_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_FLOAT;
|
cl->Type = GL_FLOAT;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = 0;
|
cl->StrideB = 0;
|
||||||
cl->Ptr = (void *) ctx->Current.Attrib[i];
|
cl->Ptr = (GLubyte *) ctx->Current.Attrib[i];
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = CA_CLIENT_DATA; /* hack */
|
cl->Flags = CA_CLIENT_DATA; /* hack */
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
@@ -160,7 +160,7 @@ static void _ac_cache_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_FLOAT;
|
cl->Type = GL_FLOAT;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = 4 * sizeof(GLfloat);
|
cl->StrideB = 4 * sizeof(GLfloat);
|
||||||
cl->Ptr = MALLOC( cl->StrideB * size );
|
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = 0;
|
cl->Flags = 0;
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
@@ -172,7 +172,7 @@ static void _ac_cache_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_FLOAT;
|
cl->Type = GL_FLOAT;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = 3 * sizeof(GLfloat);
|
cl->StrideB = 3 * sizeof(GLfloat);
|
||||||
cl->Ptr = MALLOC( cl->StrideB * size );
|
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = 0;
|
cl->Flags = 0;
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
@@ -184,7 +184,7 @@ static void _ac_cache_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_FLOAT;
|
cl->Type = GL_FLOAT;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = 4 * sizeof(GLfloat);
|
cl->StrideB = 4 * sizeof(GLfloat);
|
||||||
cl->Ptr = MALLOC( cl->StrideB * size );
|
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = 0;
|
cl->Flags = 0;
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
@@ -196,7 +196,7 @@ static void _ac_cache_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_FLOAT;
|
cl->Type = GL_FLOAT;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = 4 * sizeof(GLfloat);
|
cl->StrideB = 4 * sizeof(GLfloat);
|
||||||
cl->Ptr = MALLOC( cl->StrideB * size );
|
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = 0;
|
cl->Flags = 0;
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
@@ -208,7 +208,7 @@ static void _ac_cache_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_FLOAT;
|
cl->Type = GL_FLOAT;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = sizeof(GLfloat);
|
cl->StrideB = sizeof(GLfloat);
|
||||||
cl->Ptr = MALLOC( cl->StrideB * size );
|
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = 0;
|
cl->Flags = 0;
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
@@ -220,7 +220,7 @@ static void _ac_cache_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_UNSIGNED_INT;
|
cl->Type = GL_UNSIGNED_INT;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = sizeof(GLuint);
|
cl->StrideB = sizeof(GLuint);
|
||||||
cl->Ptr = MALLOC( cl->StrideB * size );
|
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = 0;
|
cl->Flags = 0;
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
@@ -233,7 +233,7 @@ static void _ac_cache_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_FLOAT;
|
cl->Type = GL_FLOAT;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = 4 * sizeof(GLfloat);
|
cl->StrideB = 4 * sizeof(GLfloat);
|
||||||
cl->Ptr = MALLOC( cl->StrideB * size );
|
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = 0;
|
cl->Flags = 0;
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
@@ -246,7 +246,7 @@ static void _ac_cache_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_UNSIGNED_BYTE;
|
cl->Type = GL_UNSIGNED_BYTE;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = sizeof(GLubyte);
|
cl->StrideB = sizeof(GLubyte);
|
||||||
cl->Ptr = MALLOC( cl->StrideB * size );
|
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = 0;
|
cl->Flags = 0;
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
@@ -259,7 +259,7 @@ static void _ac_cache_init( GLcontext *ctx )
|
|||||||
cl->Type = GL_FLOAT;
|
cl->Type = GL_FLOAT;
|
||||||
cl->Stride = 0;
|
cl->Stride = 0;
|
||||||
cl->StrideB = 4 * sizeof(GLfloat);
|
cl->StrideB = 4 * sizeof(GLfloat);
|
||||||
cl->Ptr = MALLOC( cl->StrideB * size );
|
cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
|
||||||
cl->Enabled = 1;
|
cl->Enabled = 1;
|
||||||
cl->Flags = 0;
|
cl->Flags = 0;
|
||||||
#if FEATURE_ARB_vertex_buffer_object
|
#if FEATURE_ARB_vertex_buffer_object
|
||||||
|
@@ -673,10 +673,10 @@ _glapi_add_entrypoint(const char *funcName, GLuint offset)
|
|||||||
if (ExtEntryTable[i].Offset == offset) {
|
if (ExtEntryTable[i].Offset == offset) {
|
||||||
return GL_TRUE; /* offsets match */
|
return GL_TRUE; /* offsets match */
|
||||||
}
|
}
|
||||||
else if (ExtEntryTable[i].Offset == ~0
|
else if (ExtEntryTable[i].Offset == (GLuint) ~0
|
||||||
&& offset < DISPATCH_TABLE_SIZE) {
|
&& offset < DISPATCH_TABLE_SIZE) {
|
||||||
/* need to patch-up the dispatch code */
|
/* need to patch-up the dispatch code */
|
||||||
if (offset != ~0) {
|
if (offset != (GLuint) ~0) {
|
||||||
fill_in_entrypoint_offset(ExtEntryTable[i].Address, offset);
|
fill_in_entrypoint_offset(ExtEntryTable[i].Address, offset);
|
||||||
ExtEntryTable[i].Offset = offset;
|
ExtEntryTable[i].Offset = offset;
|
||||||
}
|
}
|
||||||
|
@@ -196,7 +196,8 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
|
|||||||
_mesa_error(ctx, GL_INVALID_ENUM, "glProgramStringARB(format)");
|
_mesa_error(ctx, GL_INVALID_ENUM, "glProgramStringARB(format)");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_mesa_parse_arb_vertex_program(ctx, target, string, len, prog);
|
_mesa_parse_arb_vertex_program(ctx, target, (const GLubyte *) string,
|
||||||
|
len, prog);
|
||||||
}
|
}
|
||||||
else if (target == GL_FRAGMENT_PROGRAM_ARB
|
else if (target == GL_FRAGMENT_PROGRAM_ARB
|
||||||
&& ctx->Extensions.ARB_fragment_program) {
|
&& ctx->Extensions.ARB_fragment_program) {
|
||||||
@@ -205,7 +206,8 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
|
|||||||
_mesa_error(ctx, GL_INVALID_ENUM, "glProgramStringARB(format)");
|
_mesa_error(ctx, GL_INVALID_ENUM, "glProgramStringARB(format)");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_mesa_parse_arb_fragment_program(ctx, target, string, len, prog);
|
_mesa_parse_arb_fragment_program(ctx, target, (const GLubyte *) string,
|
||||||
|
len, prog);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM, "glProgramStringARB(target)");
|
_mesa_error(ctx, GL_INVALID_ENUM, "glProgramStringARB(target)");
|
||||||
|
@@ -226,7 +226,7 @@ _mesa_buffer_data( GLcontext *ctx, GLenum target, GLsizeiptrARB size,
|
|||||||
|
|
||||||
new_data = _mesa_realloc( bufObj->Data, bufObj->Size, size );
|
new_data = _mesa_realloc( bufObj->Data, bufObj->Size, size );
|
||||||
if ( new_data != NULL ) {
|
if ( new_data != NULL ) {
|
||||||
bufObj->Data = new_data;
|
bufObj->Data = (GLubyte *) new_data;
|
||||||
bufObj->Size = size;
|
bufObj->Size = size;
|
||||||
bufObj->Usage = usage;
|
bufObj->Usage = usage;
|
||||||
|
|
||||||
|
@@ -4219,8 +4219,7 @@ save_RequestResidentProgramsNV(GLsizei num, const GLuint *ids)
|
|||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
Node *n;
|
Node *n;
|
||||||
GLuint *idCopy;
|
GLuint *idCopy = (GLuint *) _mesa_malloc(num * sizeof(GLuint));
|
||||||
idCopy = _mesa_malloc(num * sizeof(GLuint));
|
|
||||||
if (!idCopy) {
|
if (!idCopy) {
|
||||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glRequestResidentProgramsNV");
|
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glRequestResidentProgramsNV");
|
||||||
return;
|
return;
|
||||||
@@ -4357,9 +4356,7 @@ save_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte *name,
|
|||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
Node *n;
|
Node *n;
|
||||||
GLubyte *nameCopy;
|
GLubyte *nameCopy = (GLubyte *) _mesa_malloc(len);
|
||||||
|
|
||||||
nameCopy = _mesa_malloc(len);
|
|
||||||
if (!nameCopy) {
|
if (!nameCopy) {
|
||||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramNamedParameter4fNV");
|
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramNamedParameter4fNV");
|
||||||
return;
|
return;
|
||||||
@@ -5251,10 +5248,12 @@ execute_list( GLcontext *ctx, GLuint list )
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OPCODE_REQUEST_RESIDENT_PROGRAMS_NV:
|
case OPCODE_REQUEST_RESIDENT_PROGRAMS_NV:
|
||||||
(*ctx->Exec->RequestResidentProgramsNV)(n[1].ui, n[2].data);
|
(*ctx->Exec->RequestResidentProgramsNV)(n[1].ui,
|
||||||
|
(GLuint *) n[2].data);
|
||||||
break;
|
break;
|
||||||
case OPCODE_LOAD_PROGRAM_NV:
|
case OPCODE_LOAD_PROGRAM_NV:
|
||||||
(*ctx->Exec->LoadProgramNV)(n[1].e, n[2].ui, n[3].i, n[4].data);
|
(*ctx->Exec->LoadProgramNV)(n[1].e, n[2].ui, n[3].i,
|
||||||
|
(const GLubyte *) n[4].data);
|
||||||
break;
|
break;
|
||||||
case OPCODE_PROGRAM_PARAMETER4F_NV:
|
case OPCODE_PROGRAM_PARAMETER4F_NV:
|
||||||
(*ctx->Exec->ProgramParameter4fNV)(n[1].e, n[2].ui, n[3].f,
|
(*ctx->Exec->ProgramParameter4fNV)(n[1].e, n[2].ui, n[3].f,
|
||||||
@@ -5271,7 +5270,8 @@ execute_list( GLcontext *ctx, GLuint list )
|
|||||||
n[4].f, n[5].f, n[6].f);
|
n[4].f, n[5].f, n[6].f);
|
||||||
break;
|
break;
|
||||||
case OPCODE_PROGRAM_NAMED_PARAMETER_NV:
|
case OPCODE_PROGRAM_NAMED_PARAMETER_NV:
|
||||||
(*ctx->Exec->ProgramNamedParameter4fNV)(n[1].ui, n[2].i, n[3].data,
|
(*ctx->Exec->ProgramNamedParameter4fNV)(n[1].ui, n[2].i,
|
||||||
|
(const GLubyte *) n[3].data,
|
||||||
n[4].f, n[5].f, n[6].f, n[7].f);
|
n[4].f, n[5].f, n[6].f, n[7].f);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -423,7 +423,7 @@ _mesa_make_extension_string( GLcontext *ctx )
|
|||||||
extStrLen += _mesa_strlen(default_extensions[i].name) + 1;
|
extStrLen += _mesa_strlen(default_extensions[i].name) + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
s = _mesa_malloc(extStrLen);
|
s = (GLubyte *) _mesa_malloc(extStrLen);
|
||||||
|
|
||||||
/* second, build the extension string */
|
/* second, build the extension string */
|
||||||
extStrLen = 0;
|
extStrLen = 0;
|
||||||
|
@@ -260,7 +260,8 @@ add_parameter(struct program_parameter_list *paramList,
|
|||||||
{
|
{
|
||||||
const GLuint n = paramList->NumParameters;
|
const GLuint n = paramList->NumParameters;
|
||||||
|
|
||||||
paramList->Parameters = _mesa_realloc(paramList->Parameters,
|
paramList->Parameters = (struct program_parameter *)
|
||||||
|
_mesa_realloc(paramList->Parameters,
|
||||||
n * sizeof(struct program_parameter),
|
n * sizeof(struct program_parameter),
|
||||||
(n + 1) * sizeof(struct program_parameter));
|
(n + 1) * sizeof(struct program_parameter));
|
||||||
if (!paramList->Parameters) {
|
if (!paramList->Parameters) {
|
||||||
@@ -1011,7 +1012,7 @@ _mesa_GetProgramRegisterfvMESA(GLenum target,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* make null-terminated copy of registerName */
|
/* make null-terminated copy of registerName */
|
||||||
len = MIN2(len, sizeof(reg) - 1);
|
len = MIN2((unsigned int) len, sizeof(reg) - 1);
|
||||||
_mesa_memcpy(reg, registerName, len);
|
_mesa_memcpy(reg, registerName, len);
|
||||||
reg[len] = 0;
|
reg[len] = 0;
|
||||||
|
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
#include "glheader.h"
|
#include "glheader.h"
|
||||||
#include "context.h"
|
#include "context.h"
|
||||||
#include "colormac.h"
|
#include "colormac.h"
|
||||||
|
#include "context.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "imports.h"
|
#include "imports.h"
|
||||||
#include "s_aatriangle.h"
|
#include "s_aatriangle.h"
|
||||||
|
@@ -121,7 +121,7 @@ get_register_pointer( GLcontext *ctx,
|
|||||||
src = ctx->FragmentProgram.Parameters[source->Index];
|
src = ctx->FragmentProgram.Parameters[source->Index];
|
||||||
break;
|
break;
|
||||||
case PROGRAM_NAMED_PARAM:
|
case PROGRAM_NAMED_PARAM:
|
||||||
ASSERT(source->Index < program->Parameters->NumParameters);
|
ASSERT(source->Index < (GLint) program->Parameters->NumParameters);
|
||||||
src = program->Parameters->Parameters[source->Index].Values;
|
src = program->Parameters->Parameters[source->Index].Values;
|
||||||
break;
|
break;
|
||||||
case PROGRAM_STATE_VAR:
|
case PROGRAM_STATE_VAR:
|
||||||
|
@@ -46,7 +46,7 @@ static void do_import( struct vertex_buffer *VB,
|
|||||||
GLuint count = VB->Count;
|
GLuint count = VB->Count;
|
||||||
|
|
||||||
if (!to->Ptr) {
|
if (!to->Ptr) {
|
||||||
to->Ptr = ALIGN_MALLOC( VB->Size * 4 * sizeof(GLchan), 32 );
|
to->Ptr = (GLubyte *) ALIGN_MALLOC( VB->Size * 4 * sizeof(GLchan), 32 );
|
||||||
to->Type = CHAN_TYPE;
|
to->Type = CHAN_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -59,14 +59,14 @@ real_alloc_immediate( GLcontext *ctx )
|
|||||||
/* Only allocate space for vertex positions right now. Color, texcoord,
|
/* Only allocate space for vertex positions right now. Color, texcoord,
|
||||||
* etc storage will be allocated as needed.
|
* etc storage will be allocated as needed.
|
||||||
*/
|
*/
|
||||||
immed->Attrib[VERT_ATTRIB_POS] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
|
immed->Attrib[VERT_ATTRIB_POS] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
|
||||||
|
|
||||||
/* Enable this to allocate all attribute arrays up front */
|
/* Enable this to allocate all attribute arrays up front */
|
||||||
if (0)
|
if (0)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 1; i < VERT_ATTRIB_MAX; i++) {
|
for (i = 1; i < VERT_ATTRIB_MAX; i++) {
|
||||||
immed->Attrib[i] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
|
immed->Attrib[i] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -619,7 +619,7 @@ void _tnl_translate_array_elts( GLcontext *ctx, struct immediate *IM,
|
|||||||
ASSERT(IM->Attrib[VERT_ATTRIB_POS]);
|
ASSERT(IM->Attrib[VERT_ATTRIB_POS]);
|
||||||
for (attr = 1; attr < VERT_ATTRIB_MAX; attr++) {
|
for (attr = 1; attr < VERT_ATTRIB_MAX; attr++) {
|
||||||
if ((translate & (1 << attr)) && !IM->Attrib[attr]) {
|
if ((translate & (1 << attr)) && !IM->Attrib[attr]) {
|
||||||
IM->Attrib[attr] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
|
IM->Attrib[attr] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
|
||||||
if (!IM->Attrib[attr]) {
|
if (!IM->Attrib[attr]) {
|
||||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "vertex processing2");
|
_mesa_error(ctx, GL_OUT_OF_MEMORY, "vertex processing2");
|
||||||
return;
|
return;
|
||||||
|
@@ -507,7 +507,7 @@ void _tnl_eval_immediate( GLcontext *ctx, struct immediate *IM )
|
|||||||
/* Allocate vertex attribute storage now */
|
/* Allocate vertex attribute storage now */
|
||||||
for (attr = 0; attr < VERT_ATTRIB_MAX; attr++) {
|
for (attr = 0; attr < VERT_ATTRIB_MAX; attr++) {
|
||||||
if ((req & (1 << attr)) && !store->Attrib[attr]) {
|
if ((req & (1 << attr)) && !store->Attrib[attr]) {
|
||||||
store->Attrib[attr] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
|
store->Attrib[attr] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
|
||||||
if (!store->Attrib[attr]) {
|
if (!store->Attrib[attr]) {
|
||||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "evaluator processing");
|
_mesa_error(ctx, GL_OUT_OF_MEMORY, "evaluator processing");
|
||||||
return;
|
return;
|
||||||
|
@@ -155,7 +155,7 @@ copy_from_current( GLcontext *ctx, struct immediate *IM,
|
|||||||
for (attrib = 0, attribBit = 1; attrib < 16; attrib++, attribBit <<= 1) {
|
for (attrib = 0, attribBit = 1; attrib < 16; attrib++, attribBit <<= 1) {
|
||||||
if (copyMask & attribBit) {
|
if (copyMask & attribBit) {
|
||||||
if (!IM->Attrib[attrib]) {
|
if (!IM->Attrib[attrib]) {
|
||||||
IM->Attrib[attrib] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
|
IM->Attrib[attrib] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
|
||||||
if (!IM->Attrib[attrib]) {
|
if (!IM->Attrib[attrib]) {
|
||||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "vertex processing3");
|
_mesa_error(ctx, GL_OUT_OF_MEMORY, "vertex processing3");
|
||||||
return;
|
return;
|
||||||
@@ -229,7 +229,7 @@ _tnl_fixup_input( GLcontext *ctx, struct immediate *IM )
|
|||||||
const GLuint attrBit = 1 << attr;
|
const GLuint attrBit = 1 << attr;
|
||||||
if (fixup & attrBit) {
|
if (fixup & attrBit) {
|
||||||
if (!IM->Attrib[attr]) {
|
if (!IM->Attrib[attr]) {
|
||||||
IM->Attrib[attr] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
|
IM->Attrib[attr] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
|
||||||
if (!IM->Attrib[attr]) {
|
if (!IM->Attrib[attr]) {
|
||||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "vertex processing");
|
_mesa_error(ctx, GL_OUT_OF_MEMORY, "vertex processing");
|
||||||
return;
|
return;
|
||||||
@@ -409,7 +409,7 @@ _tnl_copy_immediate_vertices( GLcontext *ctx, struct immediate *next )
|
|||||||
/* Allocate attribute arrays in the destination immediate struct */
|
/* Allocate attribute arrays in the destination immediate struct */
|
||||||
for (attr = 0; attr < VERT_ATTRIB_MAX; attr++) {
|
for (attr = 0; attr < VERT_ATTRIB_MAX; attr++) {
|
||||||
if ((copy & (1 << attr)) && !next->Attrib[attr]) {
|
if ((copy & (1 << attr)) && !next->Attrib[attr]) {
|
||||||
next->Attrib[attr] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
|
next->Attrib[attr] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
|
||||||
if (!next->Attrib[attr]) {
|
if (!next->Attrib[attr]) {
|
||||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "vertex processing");
|
_mesa_error(ctx, GL_OUT_OF_MEMORY, "vertex processing");
|
||||||
return;
|
return;
|
||||||
@@ -546,7 +546,7 @@ _tnl_fixup_compiled_cassette( GLcontext *ctx, struct immediate *IM )
|
|||||||
const GLuint attrBit = 1 << attr;
|
const GLuint attrBit = 1 << attr;
|
||||||
if (fixup & attrBit) {
|
if (fixup & attrBit) {
|
||||||
if (!IM->Attrib[attr]) {
|
if (!IM->Attrib[attr]) {
|
||||||
IM->Attrib[attr] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
|
IM->Attrib[attr] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
|
||||||
if (!IM->Attrib[attr]) {
|
if (!IM->Attrib[attr]) {
|
||||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "vertex processing");
|
_mesa_error(ctx, GL_OUT_OF_MEMORY, "vertex processing");
|
||||||
}
|
}
|
||||||
|
@@ -69,7 +69,7 @@ static void import_color_material( GLcontext *ctx,
|
|||||||
GLuint count = VB->Count;
|
GLuint count = VB->Count;
|
||||||
|
|
||||||
if (!to->Ptr) {
|
if (!to->Ptr) {
|
||||||
to->Ptr = ALIGN_MALLOC( VB->Size * 4 * sizeof(GLfloat), 32 );
|
to->Ptr = (GLubyte *) ALIGN_MALLOC( VB->Size * 4 * sizeof(GLfloat), 32 );
|
||||||
to->Type = GL_FLOAT;
|
to->Type = GL_FLOAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,7 +248,7 @@ static GLboolean run_validate_lighting( GLcontext *ctx,
|
|||||||
|
|
||||||
static void alloc_4chan( struct gl_client_array *a, GLuint sz )
|
static void alloc_4chan( struct gl_client_array *a, GLuint sz )
|
||||||
{
|
{
|
||||||
a->Ptr = ALIGN_MALLOC( sz * sizeof(GLchan) * 4, 32 );
|
a->Ptr = (GLubyte *) ALIGN_MALLOC( sz * sizeof(GLchan) * 4, 32 );
|
||||||
a->Size = 4;
|
a->Size = 4;
|
||||||
a->Type = CHAN_TYPE;
|
a->Type = CHAN_TYPE;
|
||||||
a->Stride = 0;
|
a->Stride = 0;
|
||||||
|
Reference in New Issue
Block a user