GLubyte IndexBits;
GLubyte DepthBits;
- GLint TexelBytes; /**< Bytes per texel, 0 if compressed format */
+ GLuint TexelBytes; /**< Bytes per texel, 0 if compressed format */
StoreTexImageFunc StoreImage;
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
GL_COMPRESSED_RGB_FXT1_3DFX,
- texWidth, dstAddr);
+ texWidth, (GLubyte *) dstAddr);
compress_fxt1(ctx, srcWidth, srcHeight, srcFormat, pixels, srcRowStride,
dst, dstRowStride);
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
GL_COMPRESSED_RGBA_FXT1_3DFX,
- texWidth, dstAddr);
+ texWidth, (GLubyte *) dstAddr);
compress_fxt1(ctx, srcWidth, srcHeight, srcFormat, pixels, srcRowStride,
dst, dstRowStride);
GLint dstRowStride)
{
/* here be dragons */
- return -1;
+ return 0;
}
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
- texWidth, dstAddr);
+ texWidth, (GLubyte *) dstAddr);
#if 0
compress_dxt1(ctx, srcWidth, srcHeight, srcFormat, pixels, srcRowStride,
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,
- texWidth, dstAddr);
+ texWidth, (GLubyte *) dstAddr);
#if 0
compress_dxt1(ctx, srcWidth, srcHeight, srcFormat, pixels, srcRowStride,
dst, dstRowStride);
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
GL_COMPRESSED_RGBA_S3TC_DXT3_EXT,
- texWidth, dstAddr);
+ texWidth, (GLubyte *) dstAddr);
#if 0
compress_rgba_dxt3(ctx, srcWidth, srcHeight, pixels,
srcRowStride, dst, dstRowStride);
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,
- texWidth, dstAddr);
+ texWidth, (GLubyte *) dstAddr);
#if 0
compress_rgba_dxt5(ctx, srcWidth, srcHeight, pixels,
srcRowStride, dst, dstRowStride);
for (img = 0; img < srcDepth; img++) {
const GLint srcRowStride = _mesa_image_row_stride(srcPacking,
srcWidth, srcFormat, srcType);
- GLchan *srcRow = _mesa_image_address(srcPacking, srcAddr, srcWidth,
- srcHeight, srcFormat, srcType,
- img, 0, 0);
+ GLchan *srcRow = (GLchan *) _mesa_image_address(srcPacking, srcAddr,
+ srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
GLchan *dstRow = dstImage;
for (row = 0; row < srcHeight; row++) {
for (col = 0; col < srcWidth; col++) {
for (img = 0; img < srcDepth; img++) {
const GLint srcRowStride = _mesa_image_row_stride(srcPacking,
srcWidth, srcFormat, srcType);
- GLubyte *srcRow = _mesa_image_address(srcPacking, srcAddr, srcWidth,
- srcHeight, srcFormat, srcType,
- img, 0, 0);
+ GLubyte *srcRow = (GLubyte *) _mesa_image_address(srcPacking, srcAddr,
+ srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
GLubyte *dstRow = dstImage;
for (row = 0; row < srcHeight; row++) {
for (col = 0; col < srcWidth; col++) {
/* copy the program string to a null-terminated string */
/* XXX should I check for NULL from malloc()? */
- strz = _mesa_malloc (len + 1);
+ strz = (GLubyte *) _mesa_malloc (len + 1);
_mesa_memcpy (strz, str, len);
strz[len] = '\0';
static void map_byte_create (map_byte **ma)
{
- *ma = mem_alloc (sizeof (map_byte));
+ *ma = (map_byte *) mem_alloc (sizeof (map_byte));
if (*ma)
{
(**ma).key = NULL;
static void regbyte_ctx_create (regbyte_ctx **re)
{
- *re = mem_alloc (sizeof (regbyte_ctx));
+ *re = (regbyte_ctx *) mem_alloc (sizeof (regbyte_ctx));
if (*re)
{
(**re).m_regbyte = NULL;
static void emit_create (emit **em)
{
- *em = mem_alloc (sizeof (emit));
+ *em = (emit *) mem_alloc (sizeof (emit));
if (*em)
{
(**em).m_emit_dest = ed_output;
static void error_create (error **er)
{
- *er = mem_alloc (sizeof (error));
+ *er = (error *) mem_alloc (sizeof (error));
if (*er)
{
(**er).m_text = NULL;
static void cond_create (cond **co)
{
- *co = mem_alloc (sizeof (cond));
+ *co = (cond *) mem_alloc (sizeof (cond));
if (*co)
{
(**co).m_operands[0].m_regname = NULL;
static void spec_create (spec **sp)
{
- *sp = mem_alloc (sizeof (spec));
+ *sp = (spec *) mem_alloc (sizeof (spec));
if (*sp)
{
(**sp).m_spec_type = st_false;
static void rule_create (rule **ru)
{
- *ru = mem_alloc (sizeof (rule));
+ *ru = (rule *) mem_alloc (sizeof (rule));
if (*ru)
{
(**ru).m_oper = op_none;
static void dict_create (dict **di)
{
- *di = mem_alloc (sizeof (dict));
+ *di = (dict *) mem_alloc (sizeof (dict));
if (*di)
{
(**di).m_rulez = NULL;
static void barray_create (barray **ba)
{
- *ba = mem_alloc (sizeof (barray));
+ *ba = (barray *) mem_alloc (sizeof (barray));
if (*ba)
{
(**ba).data = NULL;
}
else
{
- new_pointer = mem_realloc ((**ba).data, (**ba).len * sizeof (byte), nlen * sizeof (byte));
+ new_pointer = (byte *) mem_realloc ((**ba).data, (**ba).len * sizeof (byte), nlen * sizeof (byte));
if (new_pointer)
{
(**ba).data = new_pointer;
static void map_str_create (map_str **ma)
{
- *ma = mem_alloc (sizeof (map_str));
+ *ma = (map_str *) mem_alloc (sizeof (map_str));
if (*ma)
{
(**ma).key = NULL;
static void map_rule_create (map_rule **ma)
{
- *ma = mem_alloc (sizeof (map_rule));
+ *ma = (map_rule *) mem_alloc (sizeof (map_rule));
if (*ma)
{
(**ma).key = NULL;
/* reallocate the string in 16-byte increments */
if ((*len & 0x0F) == 0x0F || *ptr == NULL)
{
- byte *tmp = mem_realloc (*ptr, ((*len + 1) & ~0x0F) * sizeof (byte),
+ byte *tmp = (byte *) mem_realloc (*ptr, ((*len + 1) & ~0x0F) * sizeof (byte),
((*len + 1 + 0x10) & ~0x0F) * sizeof (byte));
if (tmp == NULL)
return 1;
if (match (di, text + ind, &filter_index, er->m_token, &ba, 0, &ctx) == mr_matched &&
filter_index)
{
- str = mem_alloc (filter_index + 1);
+ str = (byte *) mem_alloc (filter_index + 1);
if (str != NULL)
{
str_copy_n (str, text + ind, filter_index);
static void grammar_load_state_create (grammar_load_state **gr)
{
- *gr = mem_alloc (sizeof (grammar_load_state));
+ *gr = (grammar_load_state *) mem_alloc (sizeof (grammar_load_state));
if (*gr)
{
(**gr).di = NULL;
free_regbyte_ctx_stack (rbc, NULL);
- *prod = mem_alloc (ba->len * sizeof (byte));
+ *prod = (byte *) mem_alloc (ba->len * sizeof (byte));
if (*prod == NULL)
{
barray_destroy (&ba);
void
_swrast_alloc_aux_buffers( GLframebuffer *buffer )
{
- GLuint i;
+ GLint i;
for (i = 0; i < buffer->Visual.numAuxBuffers; i++) {
if (buffer->AuxBuffers[i]) {
buffer->AuxBuffers[i] = NULL;
}
- buffer->AuxBuffers[i] = _mesa_malloc(buffer->Width * buffer->Height
- * 4 * sizeof(GLchan));
+ buffer->AuxBuffers[i] = (GLchan *) _mesa_malloc(buffer->Width
+ * buffer->Height * 4 * sizeof(GLchan));
}
}
ASSERT(ctx->RenderMode == GL_RENDER);
- bitmap = _swrast_validate_pbo_access(unpack, width, height, 1,
+ bitmap = (const GLubyte *) _swrast_validate_pbo_access(unpack, width,
+ height, 1,
GL_COLOR_INDEX, GL_BITMAP,
(GLvoid *) bitmap);
if (!bitmap) {
GLfloat win[4];
GLfloat color[4];
GLfloat tc[4];
- GLuint index;
win[0] = v->win[0];
win[1] = v->win[1];
COPY_4V(tc, v->texcoord[texUnit]);
}
- index = v->index;
-
- _mesa_feedback_vertex( ctx, win, color, (GLfloat)index, tc );
+ _mesa_feedback_vertex( ctx, win, color, (GLfloat) v->index, tc );
}
SWvertex *v2 = &verts[e2];
GLchan c[2][4];
GLchan s[2][4];
- GLuint i[2];
+ GLfloat i[2];
/* cull testing */
if (ctx->Polygon.CullFlag) {
SWvertex *v2 = &verts[e2];
GLchan c[2][4];
GLchan s[2][4];
- GLuint i[2];
+ GLfloat i[2];
/* cull testing */
if (ctx->Polygon.CullFlag) {
GLuint facing = 0;
GLchan saved_color[3][4];
GLchan saved_spec[3][4];
- GLuint saved_index[3];
+ GLfloat saved_index[3];
v[0] = &verts[e0];
v[1] = &verts[e1];
struct _tnl_dynfn {
struct _tnl_dynfn *next, *prev;
- int key;
+ GLuint key;
char *code;
};
GLuint j;
for (j = 0; j < attr_count; j++) {
- if (a[j].attrib == (int)attr) {
+ if (a[j].attrib == attr) {
a[j].extract( &a[j], dest, (GLubyte *)vin + a[j].vertoffset );
return;
}
GLuint j;
for (j = 0; j < attr_count; j++) {
- if (a[j].attrib == (int)attr) {
+ if (a[j].attrib == attr) {
a[j].insert[4-1]( &a[j], (GLubyte *)vout + a[j].vertoffset, src );
return;
}