.PHONY : all libgl clean realclean
CPU ?= pentium
-
-CFLAGS = -Wall -W -pedantic
+\r
+# when -std=c99 mingw will not define WIN32
+CFLAGS = -Wall -W -Werror -pedantic -std=c99 -DWIN32
CFLAGS += -O2 -ffast-math -mcpu=$(CPU)
export CFLAGS
#include "gl\gl.h"
-#pragma warning (disable:4273)
-#pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
-#pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
-#pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
-#pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */
-#pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
-#pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */
-#if (MESA_WARNQUIET>1)
-# pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */
+#if defined(_MSV_VER) && !defined(__GNUC__)
+# pragma warning (disable:4273)
+# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
+# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
+# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
+# pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */
+# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
+# pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */
+# if (MESA_WARNQUIET>1)
+# pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */
+# endif
#endif
/*
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.TexCoord[unit];
struct gl_client_array *to = &ac->Cache.TexCoord[unit];
+ (void) type; (void) stride;
ASSERT(unit < ctx->Const.MaxTextureCoordUnits);
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Vertex;
struct gl_client_array *to = &ac->Cache.Vertex;
+ (void) type; (void) stride;
/* Limited choices at this stage:
*/
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Normal;
struct gl_client_array *to = &ac->Cache.Normal;
+ (void) type; (void) stride;
/* Limited choices at this stage:
*/
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Color;
struct gl_client_array *to = &ac->Cache.Color;
+ (void) stride;
import( ctx, type, to, from );
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Index;
struct gl_client_array *to = &ac->Cache.Index;
+ (void) type; (void) stride;
/* Limited choices at this stage:
*/
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.SecondaryColor;
struct gl_client_array *to = &ac->Cache.SecondaryColor;
+ (void) stride;
import( ctx, type, to, from );
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.FogCoord;
struct gl_client_array *to = &ac->Cache.FogCoord;
+ (void) type; (void) stride;
/* Limited choices at this stage:
*/
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.EdgeFlag;
struct gl_client_array *to = &ac->Cache.EdgeFlag;
+ (void) type; (void) stride;
/* Limited choices at this stage:
*/
ACcontext *ac = AC_CONTEXT(ctx);
const struct gl_client_array *from = &ac->Raw.Attrib[index];
struct gl_client_array *to = &ac->Cache.Attrib[index];
+ (void) type; (void) stride;
ASSERT(index < VERT_ATTRIB_MAX);
/*
* $Log: colors.h,v $
+ * Revision 1.2 2004/08/25 15:59:48 brianp
+ * Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch 1015696)
+ *
* Revision 1.1 2003/07/24 03:47:46 kschultz
* Source code for GDI driver.
*
/*
* $Log: colors.h,v $
+ * Revision 1.2 2004/08/25 15:59:48 brianp
+ * Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch 1015696)
+ *
* Revision 1.1 2003/07/24 03:47:46 kschultz
* Source code for GDI driver.
*
/*
* $Log: colors.h,v $
+ * Revision 1.2 2004/08/25 15:59:48 brianp
+ * Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch 1015696)
+ *
* Revision 1.1 2003/07/24 03:47:46 kschultz
* Source code for GDI driver.
*
0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F};
-#define BGR8(r,g,b) (unsigned)(((BYTE)(b & 0xc0 | (g & 0xe0)>>2 | (r & 0xe0)>>5)))
+#define BGR8(r,g,b) (unsigned)(((BYTE)((b & 0xc0) | ((g & 0xe0)>>2) | ((r & 0xe0)>>5))))
#ifdef DDRAW
#define BGR16(r,g,b) ((WORD)(((BYTE)(ColorMap16[b]) | ((BYTE)(g&0xfc) << 3)) | (((WORD)(BYTE)(ColorMap16[r])) << 11)))
#else
-/* $Id: wgl.c,v 1.4 2004/08/25 14:59:45 brianp Exp $ */
+/* $Id: wgl.c,v 1.5 2004/08/25 15:59:48 brianp Exp $ */
/*
* This library is free software; you can redistribute it and/or
WGLAPI BOOL GLAPIENTRY wglCopyContext(HGLRC hglrcSrc,HGLRC hglrcDst,UINT mask)
{
+ (void) hglrcSrc; (void) hglrcDst; (void) mask;\r
return(FALSE);
}
WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC hdc,int iLayerPlane)
{
+ (void) hdc; (void) iLayerPlane;\r
SetLastError(0);
return(NULL);
}
}
WGLAPI BOOL GLAPIENTRY wglShareLists(HGLRC hglrc1,HGLRC hglrc2)
-{
+{\r
+ (void) hglrc1; (void) hglrc2;
return(TRUE);
}
static FIXED FixedFromDouble(double d)
{
long l = (long) (d * 65536L);
- return *(FIXED *)&l;
+ return *(FIXED *) (void *) &l;
}
SetTextColor(bitDevice, tempColor);
// Place chars based on base line
- VERIFY(SetTextAlign(bitDevice, TA_BASELINE) >= 0 ? 1 : 0);
+ VERIFY(SetTextAlign(bitDevice, TA_BASELINE) != GDI_ERROR ? 1 : 0);
- for(i = 0; i < numChars; i++) {
+ for(i = 0; i < (int)numChars; i++) {
SIZE size;
char curChar;
int charWidth,charHeight,bmapWidth,bmapHeight,numBytes,res;
// Assign the output bitmap to the device
origBmap = SelectObject(bitDevice, bitObject);
- VERIFY(origBmap);
+ (void) VERIFY(origBmap);
VERIFY( PatBlt( bitDevice, 0, 0, bmapWidth, bmapHeight,BLACKNESS ) );
MAT2 mat;
int success = TRUE;
- if (first<0)
- return FALSE;
- if (count<0)
- return FALSE;
- if (listBase<0)
+ if (count == 0)
return FALSE;
font_list = listBase;
/*
** Otherwise process all desired characters.
*/
- for (i = 0; i < count; i++)
+ for (i = 0; i < (int)count; i++)
{
DWORD err;
WGLAPI BOOL GLAPIENTRY wglUseFontBitmapsW(HDC hdc,DWORD first,DWORD count,DWORD listBase)
{
+ (void) hdc; (void) first; (void) count; (void) listBase;\r
return FALSE;
}
FLOAT extrusion,int format,
LPGLYPHMETRICSFLOAT lpgmf)
{
+ (void) hdc; (void) first; (void) count;\r
+ (void) listBase; (void) deviation; (void) extrusion; (void) format;\r
+ (void) lpgmf;\r
SetLastError(0);
return(FALSE);
}
FLOAT extrusion,int format,
LPGLYPHMETRICSFLOAT lpgmf)
{
+ (void) hdc; (void) first; (void) count;\r
+ (void) listBase; (void) deviation; (void) extrusion; (void) format;\r
+ (void) lpgmf;\r
SetLastError(0);
return(FALSE);
}
int iLayerPlane,UINT nBytes,
LPLAYERPLANEDESCRIPTOR plpd)
{
+ (void) hdc; (void) iPixelFormat; (void) iLayerPlane; (void) nBytes; (void) plpd;\r
SetLastError(0);
return(FALSE);
}
int iStart,int cEntries,
CONST COLORREF *pcr)
{
+ (void) hdc; (void) iLayerPlane; (void) iStart; (void) cEntries; (void) pcr;\r
SetLastError(0);
return(0);
}
int iStart,int cEntries,
COLORREF *pcr)
{
+ (void) hdc; (void) iLayerPlane; (void) iStart; (void) cEntries; (void) pcr;\r
SetLastError(0);
return(0);
}
WGLAPI BOOL GLAPIENTRY wglRealizeLayerPalette(HDC hdc,int iLayerPlane,BOOL bRealize)
{
+ (void) hdc; (void) iLayerPlane; (void) bRealize;\r
SetLastError(0);
return(FALSE);
}
WGLAPI BOOL GLAPIENTRY wglSwapLayerBuffers(HDC hdc,UINT fuPlanes)
{
+ (void) fuPlanes;\r
if( !hdc )
{
WMesaSwapBuffers();
CONST PIXELFORMATDESCRIPTOR *ppfd)
{
int i,best = -1,bestdelta = 0x7FFFFFFF,delta,qt_valid_pix;
+ (void) hdc;\r
qt_valid_pix = qt_pix;
if(ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR) || ppfd->nVersion != 1)
LPPIXELFORMATDESCRIPTOR ppfd)
{
int qt_valid_pix;
+ (void) hdc;\r
qt_valid_pix = qt_pix;
if(ppfd == NULL)
WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc)
{
+ (void) hdc;\r
if(curPFD == 0)
{
SetLastError(0);
PIXELFORMATDESCRIPTOR *ppfd)
{
int qt_valid_pix;
+ (void) hdc;\r
qt_valid_pix = qt_pix;
if(iPixelFormat < 1 || iPixelFormat > qt_valid_pix || ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR))
WGLAPI BOOL GLAPIENTRY wglSwapBuffers(HDC hdc)
{
+ (void) hdc;\r
if (ctx_current < 0)
return FALSE;
#include "array_cache/acache.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
+#include "swrast/s_alphabuf.h"
#include "swrast/s_context.h"
#include "swrast/s_depth.h"
#include "swrast/s_lines.h"
#define USE_GDI_TO_CLEAR 1
#endif
-static void FlushToFile(PWMC pwc, PSTR szFile);
BOOL wmCreateBackingStore(PWMC pwc, long lxSize, long lySize);
BOOL wmDeleteBackingStore(PWMC pwc);
void wmCreatePalette( PWMC pwdc );
BYTE DITHER_RGB_2_8BIT( int r, int g, int b, int x, int y);
+#if 0 /* unused */
+
/* Finish all pending operations and synchronize. */
static void finish(GLcontext* ctx)
{
/* No op */
+ (void) ctx;
}
+#endif /* unused */
static void flush(GLcontext* ctx)
{
+ (void) ctx;
if((Current->rgb_flag &&!(Current->db_flag))
||(!Current->rgb_flag))
{
*/
static void clear_index(GLcontext* ctx, GLuint index)
{
+ (void) ctx;
Current->clearpixel = index;
}
static void clear_color( GLcontext* ctx, const GLfloat color[4] )
{
GLubyte col[4];
+ (void) ctx;
CLAMPED_FLOAT_TO_UBYTE(col[0], color[0]);
CLAMPED_FLOAT_TO_UBYTE(col[1], color[1]);
CLAMPED_FLOAT_TO_UBYTE(col[2], color[2]);
* Otherwise, we let swrast do it.
*/
-static clear(GLcontext* ctx, GLbitfield mask,
+static void clear(GLcontext* ctx, GLbitfield mask,
GLboolean all, GLint x, GLint y, GLint width, GLint height)
{
const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask;
WORD wColor;
BYTE bColor;
LPDWORD lpdw = (LPDWORD)Current->pbPixels;
- LPWORD lpw = (LPWORD)Current->pbPixels;
+ /*LPWORD lpw = (LPWORD)Current->pbPixels; */
LPBYTE lpb = Current->pbPixels;
int lines;
/* Double-buffering - clear back buffer */
dwColor = BGR32(GetRValue(Current->clearpixel),
GetGValue(Current->clearpixel),
GetBValue(Current->clearpixel));
- }
+ }
+ else
+ dwColor = 0;
if (nBypp != 3)
{
static void enable( GLcontext* ctx, GLenum pname, GLboolean enable )
{
+ (void) ctx;
if (!Current)
return;
static void set_buffer(GLcontext *ctx, GLframebuffer *colorBuffer,
GLuint bufferBit )
{
+ (void) ctx; (void) colorBuffer; (void) bufferBit;
/* XXX todo - examine bufferBit and set read/write pointers */
return;
}
/* Return characteristics of the output buffer. */
static void buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
{
- GET_CURRENT_CONTEXT(ctx);
+ /*GET_CURRENT_CONTEXT(ctx);*/
int New_Size;
RECT CR;
+ (void) buffer;
GetClientRect(Current->Window,&CR);
/* Accelerated routines are not implemented in 4.0. See OSMesa for ideas. */
+#if 0 /* unused */
+
static void fast_rgb_points( GLcontext* ctx, GLuint first, GLuint last )
{
+ (void) ctx; (void) first; (void) last;
}
+#endif /* unused */
+
/* Return pointer to accelerated points function */
extern tnl_points_func choose_points_function( GLcontext* ctx )
{
+ (void) ctx;
return NULL;
}
+#if 0 /* unused */
+
static void fast_flat_rgb_line( GLcontext* ctx, GLuint v0,
GLuint v1, GLuint pv )
{
+ (void) ctx; (void) v0; (void) v1; (void) pv;
}
static tnl_line_func choose_line_function( GLcontext* ctx )
{
+ (void) ctx;
}
+#endif /* unused */
/**********************************************************************/
/***** Span-based pixel drawing *****/
{
GLuint i;
PBYTE Mem=Current->ScreenMem+FLIP(y)*Current->ScanWidth+x;
+ (void) ctx;
assert(Current->rgb_flag==GL_FALSE);
for (i=0; i<n; i++)
if (mask[i])
{
GLuint i;
PBYTE Mem=Current->ScreenMem+FLIP(y)*Current->ScanWidth+x;
+ (void) ctx;
assert(Current->rgb_flag==GL_FALSE);
for (i=0; i<n; i++)
if (mask[i])
{
GLuint i;
BYTE *Mem=Current->ScreenMem+FLIP(y)*Current->ScanWidth+x;
+ (void) ctx;
assert(Current->rgb_flag==GL_FALSE);
for (i=0; i<n; i++)
if (mask[i])
const GLubyte rgba[][4], const GLubyte mask[] )
{
PWMC pwc = Current;
+ (void) ctx;
if (pwc->rgb_flag==GL_TRUE)
{
GLuint i;
- HDC DC=DD_GETDC;
+ /*HDC DC=DD_GETDC;*/
y=FLIP(y);
if (mask) {
for (i=0; i<n; i++)
const GLubyte rgb[][3], const GLubyte mask[] )
{
PWMC pwc = Current;
-
+ (void) ctx;
+
if (pwc->rgb_flag==GL_TRUE)
{
GLuint i;
- HDC DC=DD_GETDC;
+ /*HDC DC=DD_GETDC;*/
y=FLIP(y);
if (mask) {
for (i=0; i<n; i++)
{
GLuint i;
PWMC pwc = Current;
+ (void) ctx;
assert(Current->rgb_flag==GL_TRUE);
y=FLIP(y);
if(Current->rgb_flag==GL_TRUE)
const GLuint index[], const GLubyte mask[] )
{
GLuint i;
+ (void) ctx;
assert(Current->rgb_flag==GL_FALSE);
for (i=0; i<n; i++) {
if (mask[i]) {
GLuint colorIndex, const GLubyte mask[] )
{
GLuint i;
+ (void) ctx;
assert(Current->rgb_flag==GL_FALSE);
for (i=0; i<n; i++) {
if (mask[i]) {
{
GLuint i;
PWMC pwc = Current;
- HDC DC=DD_GETDC;
+ /*HDC DC=DD_GETDC;*/
+ (void) ctx;
assert(Current->rgb_flag==GL_TRUE);
for (i=0; i<n; i++)
if (mask[i])
{
GLuint i;
PWMC pwc = Current;
- HDC DC=DD_GETDC;
+ /*HDC DC=DD_GETDC;*/
+ (void) ctx;
assert(Current->rgb_flag==GL_TRUE);
for (i=0; i<n; i++)
if (mask[i])
GLuint index[])
{
GLuint i;
+ (void) ctx;
BYTE *Mem=Current->ScreenMem+FLIP(y)*Current->ScanWidth+x;
assert(Current->rgb_flag==GL_FALSE);
for (i=0; i<n; i++)
GLuint indx[], const GLubyte mask[] )
{
GLuint i;
+ (void) ctx;
assert(Current->rgb_flag==GL_FALSE);
for (i=0; i<n; i++) {
if (mask[i]) {
UINT i;
COLORREF Color;
HDC DC=DD_GETDC;
+ (void) ctx;
assert(Current->rgb_flag==GL_TRUE);
y = Current->height - y - 1;
for (i=0; i<n; i++) {
GLuint i;
COLORREF Color;
HDC DC=DD_GETDC;
+ (void) ctx;
assert(Current->rgb_flag==GL_TRUE);
for (i=0; i<n; i++) {
if (mask[i]) {
static const GLubyte *get_string(GLcontext *ctx, GLenum name)
{
+ (void) ctx;
if (name == GL_RENDERER) {
return (GLubyte *) "Mesa Windows";
}
static void wmesa_update_state( GLcontext *ctx, GLuint new_state )
{
- struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx );
+ /*struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx );*/
TNLcontext *tnl = TNL_CONTEXT(ctx);
/*
/***** WMesa API Functions *****/
/**********************************************************************/
-
+#if 0 /* unused */
#define PAL_SIZE 256
static void GetPalette(HPALETTE Pal,RGBQUAD *aRGB)
WORD Version;
WORD NumberOfEntries;
PALETTEENTRY aEntries[PAL_SIZE];
- } Palette =
- {
- 0x300,
- PAL_SIZE
- };
+ } Palette;
+ Palette.Version = 0x300;
+ Palette.NumberOfEntries = PAL_SIZE;
hdc=GetDC(NULL);
if (Pal!=NULL)
GetPaletteEntries(Pal,0,PAL_SIZE,Palette.aEntries);
}
}
+#endif /* unused */
WMesaContext WMesaCreateContext( HWND hWnd, HPALETTE* Pal,
GLboolean rgb_flag,
WMesaContext c;
GLboolean true_color_flag;
struct dd_function_table functions;
+ (void) Pal;
c = (struct wmesa_context * ) calloc(1,sizeof(struct wmesa_context));
if (!c)
void WMesaSwapBuffers( void )
{
- HDC DC = Current->hDC;
+/* HDC DC = Current->hDC;*/
GET_CURRENT_CONTEXT(ctx);
/* If we're swapping the buffer associated with the current context
DWORD dwScanWidth;
UINT nBypp = pwc->cColorBits / 8;
HDC hic;
+ (void) hDC;
+ (void) pbmi;
dwScanWidth = (((pwc->ScanWidth * nBypp)+ 3) & ~3);
pwc->hbmDIB = CreateDIBSection(hic,
&(pwc->bmi),
(iUsage ? DIB_PAL_COLORS : DIB_RGB_COLORS),
- &(pwc->pbPixels),
+ (void **)&(pwc->pbPixels),
pwc->dib.hFileMap,
0);
#else
pwc->hbmDIB = CreateDIBSection(hic,
&(pwc->bmi),
(iUsage ? DIB_PAL_COLORS : DIB_RGB_COLORS),
- &(pwc->pbPixels),
+ (void **)&(pwc->pbPixels),
0,
0);
#endif // USE_MAPPED_FILE
BOOL wmFlush(PWMC pwc)
{
BOOL bRet = 0;
- DWORD dwErr = 0;
+/* DWORD dwErr = 0;*/
#ifdef DDRAW
HRESULT ddrval;
#endif
#endif
/************** END DEAD TRIANGLE CODE ***********************/
+#if 0 /* unused */
+
static tnl_triangle_func choose_triangle_function( GLcontext *ctx )
{
+ (void) ctx;
#if 0
WMesaContext wmesa = (WMesaContext) ctx->DriverCtx;
int depth = wmesa->cColorBits;
#endif
}
+#endif /* unused */
+
/*
* Define a new viewport and reallocate auxillary buffers if the size of
* the window (color buffer) has changed.
void WMesaViewport( GLcontext *ctx,
GLint x, GLint y, GLsizei width, GLsizei height )
{
+ (void) ctx; (void) x; (void) y; (void) width; (void) height;
assert(0); /* I don't think that this is being used. */
#if 0
/* Save viewport */
}WMDIBSECTION, *PWMDIBSECTION;
#ifdef COMPILE_SETPIXEL
+struct wmesa_context;
typedef void (*SETPIXELTYPE)(struct wmesa_context *pwc, int iScanLine, int iPixel, BYTE r, BYTE g, BYTE b);
#endif
}
return code;
#else
+ (void) functionOffset;
return NULL;
#endif /* USE_*_ASM */
}
__glapi_sparc_icache_flush(&code[2]);
#endif /* __sparc_v9__ && !linux */
+#else
+
+ /* an unimplemented architecture */
+ (void) entrypoint;
+ (void) offset;
+
#endif /* USE_*_ASM */
}
/* trivial rejection test */
#ifdef MANGLE
if (!funcName || funcName[0] != 'm' || funcName[1] != 'g' || funcName[2] != 'l')
- return NULL;
+ return GL_FALSE;
#else
if (!funcName || funcName[0] != 'g' || funcName[1] != 'l')
return GL_FALSE;
assert(setFenceOffset == offset);
assert(_glapi_get_proc_address("glSetFenceNV") == (void *) &glSetFenceNV);
}
+#else
+ (void) table;
#endif
}
*/
void GLAPIENTRY _mesa_noop_Begin( GLenum mode )
{
+ (void) mode;
}
_mesa_new_buffer_object( GLcontext *ctx, GLuint name, GLenum target )
{
struct gl_buffer_object *obj;
+
+ (void) ctx;
+
obj = MALLOC_STRUCT(gl_buffer_object);
_mesa_initialize_buffer_object(obj, name, target);
return obj;
void
_mesa_delete_buffer_object( GLcontext *ctx, struct gl_buffer_object *bufObj )
{
+ (void) ctx;
+
if (bufObj->Data)
_mesa_free(bufObj->Data);
_mesa_free(bufObj);
_mesa_initialize_buffer_object( struct gl_buffer_object *obj,
GLuint name, GLenum target )
{
+ (void) target;
+
_mesa_bzero(obj, sizeof(struct gl_buffer_object));
obj->RefCount = 1;
obj->Name = name;
{
void * new_data;
- (void) target;
+ (void) ctx; (void) target;
new_data = _mesa_realloc( bufObj->Data, bufObj->Size, size );
if ( new_data != NULL ) {
GLsizeiptrARB size, const GLvoid * data,
struct gl_buffer_object * bufObj )
{
+ (void) ctx; (void) target;
+
if ( (bufObj->Data != NULL)
&& ((GLuint)(size + offset) <= bufObj->Size) ) {
_mesa_memcpy( (GLubyte *) bufObj->Data + offset, data, size );
GLsizeiptrARB size, GLvoid * data,
struct gl_buffer_object * bufObj )
{
+ (void) ctx; (void) target;
+
if ( (bufObj->Data != NULL)
&& ((GLuint)(size + offset) <= bufObj->Size) ) {
_mesa_memcpy( data, (GLubyte *) bufObj->Data + offset, size );
_mesa_buffer_map( GLcontext *ctx, GLenum target, GLenum access,
struct gl_buffer_object * bufObj )
{
+ (void) ctx; (void) target; (void) access;
return bufObj->Data;
}
_mesa_loseCurrent(__GLcontext *gc)
{
/* XXX unbind context from thread */
+ (void) gc;
return GL_TRUE;
}
_mesa_makeCurrent(__GLcontext *gc)
{
/* XXX bind context to thread */
+ (void) gc;
return GL_TRUE;
}
GLboolean
_mesa_forceCurrent(__GLcontext *gc)
{
+ (void) gc;
return GL_TRUE;
}
_mesa_notifyDestroy(__GLcontext *gc)
{
/* Unbind from it. */
+ (void) gc;
}
/**
struct __GLdispatchStateRec *
_mesa_dispatchExec(__GLcontext *gc)
{
+ (void) gc;
return NULL;
}
void
_mesa_beginDispatchOverride(__GLcontext *gc)
{
+ (void) gc;
}
/** No-op */
void
_mesa_endDispatchOverride(__GLcontext *gc)
{
+ (void) gc;
}
/**
exports->dispatchExec = _mesa_dispatchExec;
exports->beginDispatchOverride = _mesa_beginDispatchOverride;
exports->endDispatchOverride = _mesa_endDispatchOverride;
+#else
+ (void) exports;
#endif
}
one_time_init( GLcontext *ctx )
{
static GLboolean alreadyCalled = GL_FALSE;
+ (void) ctx;
_glthread_LOCK_MUTEX(OneTimeLock);
if (!alreadyCalled) {
GLuint i;
*/
if (_mesa_strstr(debug, "flush"))
MESA_DEBUG_FLAGS |= DEBUG_ALWAYS_FLUSH;
+#else
+ (void) debug;
#endif
}
* integer values starting at 0 is very important, see InstSize array usage)
*/
typedef enum {
+ OPCODE_INVALID = -1, /* Force signed enum */\r
OPCODE_ACCUM,
OPCODE_ALPHA_FUNC,
OPCODE_BIND_TEXTURE,
_mesa_error(ctx, GL_INVALID_ENUM, "glGetPointerv");
return;
}
- *params = (GLvoid *) ctx->FragmentProgram.Callback;
+ *params = *(GLvoid **) &ctx->FragmentProgram.Callback;
break;
case GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA:
if (!ctx->Extensions.MESA_program_debug) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetPointerv");
return;
}
- *params = (GLvoid *) ctx->VertexProgram.Callback;
+ *params = *(GLvoid **) &ctx->VertexProgram.Callback;
break;
case GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA:
if (!ctx->Extensions.MESA_program_debug) {
GLenum srcType, const GLvoid *source,
const struct gl_pixelstore_attrib *srcPacking )
{
+ (void) srcPacking;
+
switch (srcType) {
case GL_BYTE:
{
GLhalfARB
_mesa_float_to_half(float val)
{
- const int flt = *((int *) &val);
+ const int flt = *((int *) (void *) &val);
const int flt_m = flt & 0x7fffff;
const int flt_e = (flt >> 23) & 0xff;
const int flt_s = (flt >> 31) & 0x1;
}
flt = (flt_s << 31) | (flt_e << 23) | flt_m;
- result = *((float *) &flt);
+ result = *((float *) (void *) &flt);
return result;
}
{
char s[MAXSTRING];
va_list args;
+ (void) ctx;
va_start(args, fmtString);
vsnprintf(s, MAXSTRING, fmtString, args);
va_end(args);
{
int r;
va_list args;
+ (void) gc;
va_start( args, fmt );
r = vsprintf( str, fmt, args );
va_end( args );
static void * CAPI
default_fopen(__GLcontext *gc, const char *path, const char *mode)
{
+ (void) gc;
return fopen(path, mode);
}
static int CAPI
default_fclose(__GLcontext *gc, void *stream)
{
+ (void) gc;
return fclose((FILE *) stream);
}
{
int r;
va_list args;
+ (void) gc;
va_start( args, fmt );
r = vfprintf( (FILE *) stream, fmt, args );
va_end( args );
static __GLdrawablePrivate *
default_GetDrawablePrivate(__GLcontext *gc)
{
+ (void) gc;
return NULL;
}
***/
#if defined(USE_IEEE) && !defined(DEBUG)
#define COPY_FLOAT( dst, src ) \
- ((fi_type *) &(dst))->i = ((fi_type *) &(src))->i
+ ((fi_type *) &(dst))->i = ((fi_type *) (void *) &(src))->i
#else
#define COPY_FLOAT( dst, src ) (dst) = (src)
#endif
{
const GLuint oldneedeyecoords = ctx->_NeedEyeCoords;
+ (void) new_state;
ctx->_NeedEyeCoords = 0;
if (ctx->_ForceEyeCoords ||
GLfloat rBias, GLfloat gBias,
GLfloat bBias, GLfloat aBias)
{
+ (void) ctx;
+
if (rScale != 1.0 || rBias != 0.0) {
GLuint i;
for (i = 0; i < n; i++) {
void
_mesa_init_no_op_table(struct _glapi_table *table, GLuint tableSize)
{
+ typedef void (*func_ptr_t)();
GLuint i;
- void **dispatch = (void **) table;
+ func_ptr_t *dispatch = (func_ptr_t *) table;
for (i = 0; i < tableSize; i++) {
- dispatch[i] = (void *) generic_noop;
+ dispatch[i] = (func_ptr_t)generic_noop;
}
}
GLuint size;
ASSERT(depth == 1);
+ (void) depth;
switch (format) {
case GL_COMPRESSED_RGB_FXT1_3DFX:
void
_mesa_init_texture_fxt1( GLcontext *ctx )
{
+ (void) ctx;
}
ASSERT(dstXoffset % 8 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset == 0);
+ (void) dstZoffset; (void) dstImageStride;
if (srcFormat != GL_RGB ||
srcType != CHAN_TYPE ||
ASSERT(dstXoffset % 8 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset == 0);
+ (void) dstZoffset; (void) dstImageStride;
if (srcFormat != GL_RGBA ||
srcType != CHAN_TYPE ||
fetch_texel_2d_rgba_fxt1( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
+ (void) k;
fxt1_decode_1(texImage->Data, texImage->Width, i, j, texel);
}
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
+ (void) k;
fxt1_decode_1(texImage->Data, texImage->Width, i, j, rgba);
texel[RCOMP] = CHAN_TO_FLOAT(rgba[RCOMP]);
texel[GCOMP] = CHAN_TO_FLOAT(rgba[GCOMP]);
fetch_texel_2d_rgb_fxt1( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
+ (void) k;
fxt1_decode_1(texImage->Data, texImage->Width, i, j, texel);
texel[ACOMP] = 255;
}
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
+ (void) k;
fxt1_decode_1(texImage->Data, texImage->Width, i, j, rgba);
texel[RCOMP] = CHAN_TO_FLOAT(rgba[RCOMP]);
texel[GCOMP] = CHAN_TO_FLOAT(rgba[GCOMP]);
#endif /* !__GNUC__ */
+#if 0 /* unused */
static int
fxt1_bestcol (float vec[][MAX_COMP], int nv,
return worst;
}
+#endif /* unused */
static int
fxt1_variance (double variance[MAX_COMP],
return best;
}
+#if 0 /* unused */
static int
fxt1_choose (float vec[][MAX_COMP], int nv,
cc[0] = lolo;
}
+#endif /* unused */
static void
fxt1_quantize_ALPHA1 (unsigned long *cc,
((Fx64 *)cc)[1] = hi;
}
+#if 0 /* unused*/
static void
fxt1_quantize_HI (unsigned long *cc,
}
}
+#endif /* unused */
static void
fxt1_quantize_MIXED1 (unsigned long *cc,
}
/* funky encoding for LSB of green */
- if (((lolo >> 1) & 1) != (((vec[1][GCOMP] ^ vec[0][GCOMP]) >> 2) & 1)) {
+ if ((int)((lolo >> 1) & 1) != (((vec[1][GCOMP] ^ vec[0][GCOMP]) >> 2) & 1)) {
for (i = 0; i < n_comp; i++) {
vec[1][i] = input[minColL][i];
vec[0][i] = input[maxColL][i];
}
/* funky encoding for LSB of green */
- if (((lohi >> 1) & 1) != (((vec[3][GCOMP] ^ vec[2][GCOMP]) >> 2) & 1)) {
+ if ((int)((lohi >> 1) & 1) != (((vec[3][GCOMP] ^ vec[2][GCOMP]) >> 2) & 1)) {
for (i = 0; i < n_comp; i++) {
vec[3][i] = input[minColR][i];
vec[2][i] = input[maxColR][i];
unsigned long *encoded = dest;
GLubyte *newSource = NULL;
+ (void) ctx;
+
/*
* Rescale image if width is less than 8 or height is less than 4.
*/
_mesa_init_texture_s3tc( GLcontext *ctx )
{
/* called during context initialization */
+ (void) ctx;
}
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
+ (void) dstZoffset; (void) dstImageStride;
if (srcFormat != GL_RGB ||
srcType != CHAN_TYPE ||
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
+ (void) dstZoffset; (void) dstImageStride;
if (srcFormat != GL_RGBA ||
srcType != CHAN_TYPE ||
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
+ (void) dstZoffset; (void) dstImageStride;
if (srcFormat != GL_RGBA ||
srcType != CHAN_TYPE ||
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
+ (void) dstZoffset; (void) dstImageStride;
if (srcFormat != GL_RGBA ||
srcType != CHAN_TYPE ||
fetch_texel_2d_rgb_dxt1( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
+ (void) texImage; (void) i; (void) j; (void) k; (void) texel;
}
fetch_texel_2d_rgba_dxt1( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
+ (void) texImage; (void) i; (void) j; (void) k; (void) texel;
}
fetch_texel_2d_rgba_dxt3( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
+ (void) texImage; (void) i; (void) j; (void) k; (void) texel;
}
fetch_texel_2d_rgba_dxt5( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
+ (void) texImage; (void) i; (void) j; (void) k; (void) texel;
}
static void fetch_null_texel( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLchan *texel )
{
+ (void) texImage; (void) i; (void) j; (void) k;
texel[RCOMP] = 0;
texel[GCOMP] = 0;
texel[BCOMP] = 0;
static void fetch_null_texelf( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
+ (void) texImage; (void) i; (void) j; (void) k;
texel[RCOMP] = 0.0;
texel[GCOMP] = 0.0;
texel[BCOMP] = 0.0;
#if DIM == 1
#define CHAN_SRC( t, i, j, k, sz ) \
- ((GLchan *)(t)->Data + (i) * (sz))
+ ((void) (j), (void) (k), \
+ ((GLchan *)(t)->Data + (i) * (sz)))
#define UBYTE_SRC( t, i, j, k, sz ) \
- ((GLubyte *)(t)->Data + (i) * (sz))
+ ((void) (j), (void) (k), \
+ ((GLubyte *)(t)->Data + (i) * (sz)))
#define USHORT_SRC( t, i, j, k ) \
- ((GLushort *)(t)->Data + (i))
+ ((void) (j), (void) (k), \
+ ((GLushort *)(t)->Data + (i)))
#define UINT_SRC( t, i, j, k ) \
- ((GLuint *)(t)->Data + (i))
+ ((void) (j), (void) (k), \
+ ((GLuint *)(t)->Data + (i)))
#define FLOAT_SRC( t, i, j, k, sz ) \
- ((GLfloat *)(t)->Data + (i) * (sz))
+ ((void) (j), (void) (k), \
+ ((GLfloat *)(t)->Data + (i) * (sz)))
#define HALF_SRC( t, i, j, k, sz ) \
- ((GLhalfARB *)(t)->Data + (i) * (sz))
+ ((void) (j), (void) (k), \
+ ((GLhalfARB *)(t)->Data + (i) * (sz)))
#define FETCH(x) fetch_texel_1d_##x
#elif DIM == 2
#define CHAN_SRC( t, i, j, k, sz ) \
- ((GLchan *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz))
+ ((void) (k), \
+ ((GLchan *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)))
#define UBYTE_SRC( t, i, j, k, sz ) \
- ((GLubyte *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz))
+ ((void) (k), \
+ ((GLubyte *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)))
#define USHORT_SRC( t, i, j, k ) \
- ((GLushort *)(t)->Data + ((t)->RowStride * (j) + (i)))
+ ((void) (k), \
+ ((GLushort *)(t)->Data + ((t)->RowStride * (j) + (i))))
#define UINT_SRC( t, i, j, k ) \
- ((GLuint *)(t)->Data + ((t)->RowStride * (j) + (i)))
+ ((void) (k), \
+ ((GLuint *)(t)->Data + ((t)->RowStride * (j) + (i))))
#define FLOAT_SRC( t, i, j, k, sz ) \
- ((GLfloat *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz))
+ ((void) (k), \
+ ((GLfloat *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)))
#define HALF_SRC( t, i, j, k, sz ) \
- ((GLhalfARB *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz))
+ ((void) (k), \
+ ((GLhalfARB *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)))
#define FETCH(x) fetch_texel_2d_##x
static GLboolean
is_compressed_format(GLcontext *ctx, GLenum internalFormat)
{
+ (void) ctx;
switch (internalFormat) {
case GL_COMPRESSED_RGB_FXT1_3DFX:
case GL_COMPRESSED_RGBA_FXT1_3DFX:
GLenum format, GLsizei imageSize)
{
GLint expectedSize, maxLevels = 0, maxTextureSize;
+ (void) zoffset;
if (dimensions == 1) {
/* 1D compressed textures not allowed */
_mesa_new_texture_object( GLcontext *ctx, GLuint name, GLenum target )
{
struct gl_texture_object *obj;
+ (void) ctx;
obj = MALLOC_STRUCT(gl_texture_object);
_mesa_initialize_texture_object(obj, name, target);
return obj;
GLboolean
_mesa_texstore_depth_component_float32(STORE_PARAMS)
{
+ (void) dims;
ASSERT(dstFormat == &_mesa_texformat_depth_component_float32);
ASSERT(dstFormat->TexelBytes == sizeof(GLfloat));
GLboolean
_mesa_texstore_depth_component16(STORE_PARAMS)
{
+ (void) dims;
ASSERT(dstFormat == &_mesa_texformat_depth_component16);
ASSERT(dstFormat->TexelBytes == sizeof(GLushort));
GLboolean
_mesa_texstore_ci8(STORE_PARAMS)
{
+ (void) dims; (void) baseInternalFormat;
ASSERT(dstFormat == &_mesa_texformat_ci8);
ASSERT(dstFormat->TexelBytes == 1);
ASSERT(baseInternalFormat == GL_COLOR_INDEX);
{
const GLuint ui = 1;
const GLubyte littleEndian = *((const GLubyte *) &ui);
+ (void) ctx; (void) dims; (void) baseInternalFormat;
ASSERT((dstFormat == &_mesa_texformat_ycbcr) ||
(dstFormat == &_mesa_texformat_ycbcr_rev));
{
GLint postConvWidth = width;
GLint sizeInBytes;
+ (void) border;
if (ctx->_ImageTransferState & IMAGE_CONVOLUTION_BIT) {
_mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL);
{
GLint postConvWidth = width, postConvHeight = height;
GLint texelBytes, sizeInBytes;
+ (void) border;
if (ctx->_ImageTransferState & IMAGE_CONVOLUTION_BIT) {
_mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth,
struct gl_texture_image *texImage)
{
GLint texelBytes, sizeInBytes;
+ (void) border;
/* choose the texture format */
assert(ctx->Driver.ChooseTextureFormat);
struct gl_texture_image *texImage)
{
/* this space intentionally left blank */
+ (void) ctx;
+ (void) target; (void) level;
+ (void) internalFormat;
+ (void) width; (void) border;
+ (void) imageSize; (void) data;
+ (void) texObj;
+ (void) texImage;
}
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
{
+ (void) width; (void) height; (void) border;
+
/* This is pretty simple, basically just do a memcpy without worrying
* about the usual image unpacking or image transfer operations.
*/
struct gl_texture_image *texImage)
{
/* this space intentionally left blank */
+ (void) ctx;
+ (void) target; (void) level;
+ (void) internalFormat;
+ (void) width; (void) height; (void) depth;
+ (void) border;
+ (void) imageSize; (void) data;
+ (void) texObj;
+ (void) texImage;
}
struct gl_texture_image *texImage)
{
/* this space intentionally left blank */
+ (void) ctx;
+ (void) target; (void) level;
+ (void) xoffset; (void) width;
+ (void) format;
+ (void) imageSize; (void) data;
+ (void) texObj;
+ (void) texImage;
}
GLint i, rows;
GLubyte *dest;
const GLubyte *src;
+ (void) format;
/* these should have been caught sooner */
ASSERT((width & 3) == 0 || width == 2 || width == 1);
struct gl_texture_image *texImage)
{
/* this space intentionally left blank */
+ (void) ctx;
+ (void) target; (void) level;
+ (void) xoffset; (void) yoffset; (void) zoffset;
+ (void) width; (void) height; (void) depth;
+ (void) format;
+ (void) imageSize; (void) data;
+ (void) texObj;
+ (void) texImage;
}
{ \
GET_CURRENT_CONTEXT(ctx); \
struct gl_tnl_module *tnl = &(ctx->TnlModule); \
+ typedef void (*func_ptr_t)(); \
\
ASSERT( tnl->Current ); \
ASSERT( tnl->SwapCount < NUM_VERTEX_FORMAT_ENTRIES ); \
/* Save the swapped function's dispatch entry so it can be */ \
/* restored later. */ \
tnl->Swapped[tnl->SwapCount][0] = (void *)&(ctx->Exec->FUNC); \
- tnl->Swapped[tnl->SwapCount][1] = (void *)TAG(FUNC); \
+ *(func_ptr_t *)(tnl->Swapped[tnl->SwapCount]+1) = (func_ptr_t)TAG(FUNC); \
tnl->SwapCount++; \
\
if ( 0 ) \
GLubyte tmpAndMask = *andMask;
GLubyte tmpOrMask = *orMask;
GLuint i;
+ (void) proj_vec;
STRIDE_LOOP {
const GLfloat cx = from[0];
const GLfloat cy = from[1];
const GLuint stride = clip_vec->stride;
const GLuint count = clip_vec->count;
const GLfloat *from = (GLfloat *)clip_vec->start;
+ (void) proj_vec;
GLubyte tmpOrMask = *orMask;
GLubyte tmpAndMask = *andMask;
const GLuint stride = clip_vec->stride;
const GLuint count = clip_vec->count;
const GLfloat *from = (GLfloat *)clip_vec->start;
+ (void) proj_vec;
GLubyte tmpOrMask = *orMask;
GLubyte tmpAndMask = *andMask;
GLuint count = from_vec->count;
GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
GLuint i;
+ (void) m;
if (to_vec == from_vec) return;
STRIDE_LOOP {
to[i][0] = from[0];
GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
GLuint count = from_vec->count;
GLuint i;
+ (void) m;
if (to_vec == from_vec) return;
STRIDE_LOOP {
to[i][0] = from[0];
GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
GLuint count = from_vec->count;
GLuint i;
+ (void) m;
if (to_vec == from_vec) return;
STRIDE_LOOP {
to[i][0] = from[0];
GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
GLuint count = from_vec->count;
GLuint i;
+ (void) m;
if (to_vec == from_vec) return;
STRIDE_LOOP {
to[i][0] = from[0];
to_vec->count = from_vec->count;
}
-static transform_func _XFORMAPI TAG(transform_tab_1)[7];
-static transform_func _XFORMAPI TAG(transform_tab_2)[7];
-static transform_func _XFORMAPI TAG(transform_tab_3)[7];
-static transform_func _XFORMAPI TAG(transform_tab_4)[7];
+static transform_func TAG(transform_tab_1)[7];
+static transform_func TAG(transform_tab_2)[7];
+static transform_func TAG(transform_tab_3)[7];
+static transform_func TAG(transform_tab_4)[7];
/* Similar functions could be called several times, with more highly
* optimized routines overwriting the arrays. This only occurs during
{
GLuint a, retval;
struct arb_program ap;
+ (void) target;
/* set the program target before parsing */
ap.Base.Target = GL_FRAGMENT_PROGRAM_ARB;
#include "arbprogparse.h"
#include "grammar_mesa.h"
+#if !defined(__GNUC__) && !defined(__extension__)
+# define __extension__
+#endif
+
/* TODO:
* Fragment Program Stuff:
* -----------------------------------------------------
/**
* This is the text describing the rules to parse the grammar
*/
-static char arb_grammar_text[] =
+__extension__ static char arb_grammar_text[] =
#include "arbprogram_syn.h"
;
{
GLubyte *i = *inst;
struct var_cache *va = NULL;
+ (void) Program;
*inst += _mesa_strlen ((char *) i) + 1;
parse_string_without_adding (GLubyte ** inst, struct arb_program *Program)
{
GLubyte *i = *inst;
-
+ (void) Program;
+
*inst += _mesa_strlen ((char *) i) + 1;
return (char *) i;
parse_color_type (GLcontext * ctx, GLubyte ** inst, struct arb_program *Program,
GLint * color)
{
+ (void) ctx; (void) Program;
*color = *(*inst)++ != COLOR_PRIMARY;
return 0;
}
{
GLint i = parse_integer (inst, Program);
- if ((i < 0) || (i >= ctx->Const.MaxTextureUnits)) {
+ if ((i < 0) || (i >= (int)ctx->Const.MaxTextureUnits)) {
_mesa_set_program_error (ctx, Program->Position,
"Invalid texture unit index");
_mesa_error (ctx, GL_INVALID_OPERATION, "Invalid texture unit index");
/* Test array length here! */
if (specified_length) {
- if (specified_length != param_var->param_binding_length) {
+ if (specified_length != (int)param_var->param_binding_length) {
_mesa_set_program_error (ctx, Program->Position,
"Declared parameter array lenght does not match parameter list");
_mesa_error (ctx, GL_INVALID_OPERATION,
{
struct var_cache *dst;
GLuint result;
+ (void) Index;
dst = parse_string (inst, vc_head, Program, &result);
Program->Position = parse_position (inst);
offset = parse_integer (inst, Program);
if ((offset < 0)
- || (offset >= src->param_binding_length)) {
+ || (offset >= (int)src->param_binding_length)) {
_mesa_set_program_error (ctx, Program->Position,
"Index out of range");
_mesa_error (ctx, GL_INVALID_OPERATION,
}
/* XXX temporary */
-static char core_grammar_text[] =
+__extension__ static char core_grammar_text[] =
#include "grammar_syn.h"
;
{
GLuint retval;
struct arb_program ap;
+ (void) target;
/* set the program target before parsing */
ap.Base.Target = GL_VERTEX_PROGRAM_ARB;
/* free error parameter - if error_param is a "???" don't free it - it's static */
if (error_param != unknown)
- mem_free ((void **) &error_param);
+ mem_free ((void **) (void *) &error_param);
else
error_param = NULL;
/* error message can only be set only once */
if (error_message != NULL)
{
- mem_free ((void **) ¶m);
+ mem_free ((void **) (void *) ¶m);
return;
}
{
if (string_grow (&p, &len, *t++))
{
- mem_free ((void **) &p);
+ mem_free ((void **) (void *) &p);
return 1;
}
}
if (string_grow (&p, &len, c))
{
- mem_free ((void **) &p);
+ mem_free ((void **) (void *) &p);
return 1;
}
}
}
m->data = (byte) c[0];
- mem_free ((void **) &c);
+ mem_free ((void **) (void *) &c);
}
else
{
if (!str_equal ((byte *) "error", temp))
{
- mem_free ((void **) &temp);
+ mem_free ((void **) (void *) &temp);
return 0;
}
- mem_free ((void **) &temp);
+ mem_free ((void **) (void *) &temp);
error_create (er);
if (*er == NULL)
if (map_str_find (&maps, temp, &(**er).m_text))
{
- mem_free ((void **) &temp);
+ mem_free ((void **) (void *) &temp);
error_destroy (er);
return 1;
}
- mem_free ((void **) &temp);
+ mem_free ((void **) (void *) &temp);
}
/* try to extract "token" from "...$token$..." */
{
if (string_grow (&processed, &len, '$'))
{
- mem_free ((void **) &processed);
+ mem_free ((void **) (void *) &processed);
error_destroy (er);
return 1;
}
{
if (string_grow (&processed, &len, (**er).m_text[i]))
{
- mem_free ((void **) &processed);
+ mem_free ((void **) (void *) &processed);
error_destroy (er);
return 1;
}
{
if (string_grow (&processed, &len, '$'))
{
- mem_free ((void **) &processed);
+ mem_free ((void **) (void *) &processed);
error_destroy (er);
return 1;
}
if (string_grow (&(**er).m_token_name, &tlen, '\0'))
{
- mem_free ((void **) &processed);
+ mem_free ((void **) (void *) &processed);
error_destroy (er);
return 1;
}
{
if (string_grow (&(**er).m_token_name, &tlen, (**er).m_text[i]))
{
- mem_free ((void **) &processed);
+ mem_free ((void **) (void *) &processed);
error_destroy (er);
return 1;
}
dest = ed_regbyte;
else
{
- mem_free ((void **) &temp);
+ mem_free ((void **) (void *) &temp);
return 0;
}
- mem_free ((void **) &temp);
+ mem_free ((void **) (void *) &temp);
emit_create (&e);
if (e == NULL)
}
e->m_byte = (byte) temp[0];
- mem_free ((void **) &temp);
+ mem_free ((void **) (void *) &temp);
e->m_emit_type = et_byte;
}
if (map_byte_find (&mapb, temp, &e->m_byte))
{
- mem_free ((void **) &temp);
+ mem_free ((void **) (void *) &temp);
emit_destroy (&e);
return 1;
}
- mem_free ((void **) &temp);
+ mem_free ((void **) (void *) &temp);
e->m_emit_type = et_byte;
}
t = u;
}
- mem_free ((void **) &keyword);
+ mem_free ((void **) (void *) &keyword);
}
if (*t == '\'')
if (get_string (&t, &temp2))
{
- mem_free ((void **) &temp);
+ mem_free ((void **) (void *) &temp);
spec_destroy (&s);
return 1;
}
s->m_byte[0] = *temp;
s->m_byte[1] = *temp2;
- mem_free ((void **) &temp2);
+ mem_free ((void **) (void *) &temp2);
}
else
{
*s->m_byte = *temp;
}
- mem_free ((void **) &temp);
+ mem_free ((void **) (void *) &temp);
}
else if (*t == '"')
{
{
if (get_identifier (&t, &s->m_string))
{
- mem_free ((void **) &keyword);
+ mem_free ((void **) (void *) &keyword);
spec_destroy (&s);
return 1;
}
s->m_spec_type = st_identifier_loop;
}
- mem_free ((void **) &keyword);
+ mem_free ((void **) (void *) &keyword);
}
else
{
r->m_oper = op_or;
}
- mem_free ((void **) &op);
+ mem_free ((void **) (void *) &op);
if (get_spec (&t, &sp, maps, mapb))
{
{
map_byte *ma = NULL;
- mem_free ((void **) &symbol);
+ mem_free ((void **) (void *) &symbol);
if (get_emtcode (&text, &ma))
{
{
map_byte *ma = NULL;
- mem_free ((void **) &symbol);
+ mem_free ((void **) (void *) &symbol);
if (get_regbyte (&text, &ma))
{
{
map_str *ma = NULL;
- mem_free ((void **) &symbol);
+ mem_free ((void **) (void *) &symbol);
if (get_errtext (&text, &ma))
{
/* .string */
else if (is_dot && str_equal (symbol, (byte *) "string"))
{
- mem_free ((void **) &symbol);
+ mem_free ((void **) (void *) &symbol);
if (g->di->m_string != NULL)
{
*text = '\0';
#define APPEND_CHARACTER(x) if (dots_made == 0) {\
- if (len < size - 1) {\
+ if (len < (int)size - 1) {\
text[len++] = (x); text[len] = '\0';\
} else {\
int i;\
/* Fragment program instruction opcodes */
enum fp_opcode {
+ FP_OPCODE_INVALID = -1, /* Force signed enum */
FP_OPCODE_ABS = 1000, /* ARB_f_p only */
FP_OPCODE_ADD,
FP_OPCODE_CMP, /* ARB_f_p only */
* Set x to positive or negative infinity.
*/
#if defined(USE_IEEE) || defined(_WIN32)
-#define SET_POS_INFINITY(x) ( *((GLuint *) &x) = 0x7F800000 )
-#define SET_NEG_INFINITY(x) ( *((GLuint *) &x) = 0xFF800000 )
+#define SET_POS_INFINITY(x) ( *((GLuint *) (void *)&x) = 0x7F800000 )
+#define SET_NEG_INFINITY(x) ( *((GLuint *) (void *)&x) = 0xFF800000 )
#elif defined(VMS)
#define SET_POS_INFINITY(x) x = __MAXFLOAT
#define SET_NEG_INFINITY(x) x = -__MAXFLOAT
#define SET_NEG_INFINITY(x) x = (GLfloat) -HUGE_VAL
#endif
-#define SET_FLOAT_BITS(x, bits) ((fi_type *) &(x))->i = bits
+#define SET_FLOAT_BITS(x, bits) ((fi_type *) (void *) &(x))->i = bits
/**
GLint ii = (GLint) floor_t0;
ii = (ii < 23) + 0x3f800000;
SET_FLOAT_BITS(q[0], ii);
- q[0] = *((GLfloat *) &ii);
+ q[0] = *((GLfloat *) (void *)&ii);
#else
q[0] = (GLfloat) pow(2.0, floor_t0);
#endif
Parse_OptionSequence(struct parse_state *parseState,
struct vp_instruction program[])
{
+ (void) program;
while (1) {
if (!Parse_String(parseState, "OPTION"))
return GL_TRUE; /* ok, not an OPTION statement */
struct program *prog,
GLenum target, GLuint id)
{
+ (void) ctx;
if (prog) {
prog->Id = id;
prog->Target = target;
void
_mesa_delete_program(GLcontext *ctx, struct program *prog)
{
+ (void) ctx;
ASSERT(prog);
if (prog->String)
_swrast_use_aux_buffer(GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
+ (void) buffer;
switch (bufferBit) {
case DD_AUX0_BIT:
GLint x, GLint y, GLint width, GLint height )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
+ (void) all; (void) x; (void) y; (void) width; (void) height;
#ifdef DEBUG
{
const GLbitfield legalBits =
void
_swrast_DrawBuffer( GLcontext *ctx, GLenum mode )
{
+ (void) mode;
_swrast_use_draw_buffer(ctx);
}
static void
_swrast_sleep( GLcontext *ctx, GLuint new_state )
{
+ (void) ctx; (void) new_state;
}
const GLuint n = span->end;
GLchan (*rgba)[4] = span->array->rgba;
GLuint i;
+ (void) ctx;
ASSERT((span->interpMask & SPAN_RGBA) &&
!(span->arrayMask & SPAN_RGBA));
const GLuint n = span->end;
GLuint *indexes = span->array->index;
GLuint i;
+ (void) ctx;
ASSERT((span->interpMask & SPAN_INDEX) &&
!(span->arrayMask & SPAN_INDEX));
static void
interpolate_specular(GLcontext *ctx, struct sw_span *span)
{
+ (void) ctx;
if (span->interpMask & SPAN_FLAT) {
/* constant color */
const GLchan r = FixedToChan(span->specRed);
struct fp_machine *machine, const struct sw_span *span,
GLuint column )
{
+ (void) ctx;
+ (void) program; (void) maxInst;
+ (void) machine; (void) span;
+ (void) column;
return 0;
}
{
const GLint width = img->Width2; /* without border, power of two */
GLint i;
+ (void) ctx;
COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapS, texcoord[0], width, i);
GLint i0, i1;
GLfloat u;
GLuint useBorderColor;
+ (void) ctx;
COMPUTE_LINEAR_TEXEL_LOCATIONS(tObj->WrapS, texcoord[0], u, width, i0, i1);
{
GLuint i;
struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
+ (void) texUnit;
(void) lambda;
for (i=0;i<n;i++) {
sample_1d_nearest(ctx, tObj, image, texcoords[i], rgba[i]);
{
GLuint i;
struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
+ (void) texUnit;
(void) lambda;
for (i=0;i<n;i++) {
sample_1d_linear(ctx, tObj, image, texcoords[i], rgba[i]);
const GLint width = img->Width2; /* without border, power of two */
const GLint height = img->Height2; /* without border, power of two */
GLint i, j;
+ (void) ctx;
COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapS, texcoord[0], width, i);
COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapT, texcoord[1], height, j);
GLint i0, j0, i1, j1;
GLuint useBorderColor;
GLfloat u, v;
+ (void) ctx;
COMPUTE_LINEAR_TEXEL_LOCATIONS(tObj->WrapS, texcoord[0], u, width, i0, i1);
COMPUTE_LINEAR_TEXEL_LOCATIONS(tObj->WrapT, texcoord[1], v, height, j0, j1);
const GLint height = img->Height2;
GLint i0, j0, i1, j1;
GLfloat u, v;
-
+ (void) ctx;
+ (void) tObj;
+
ASSERT(tObj->WrapS == GL_REPEAT);
ASSERT(tObj->WrapT == GL_REPEAT);
ASSERT(img->Border == 0);
{
GLuint i;
struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
+ (void) texUnit;
(void) lambda;
for (i=0;i<n;i++) {
sample_2d_nearest(ctx, tObj, image, texcoords[i], rgba[i]);
{
GLuint i;
struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
+ (void) texUnit;
(void) lambda;
for (i=0;i<n;i++) {
sample_2d_linear(ctx, tObj, image, texcoords[i], rgba[i]);
const GLint rowMask = img->Height - 1;
const GLint shift = img->WidthLog2;
GLuint k;
+ (void) ctx;
+ (void) texUnit;
(void) lambda;
ASSERT(tObj->WrapS==GL_REPEAT);
ASSERT(tObj->WrapT==GL_REPEAT);
const GLint rowMask = img->Height - 1;
const GLint shift = img->WidthLog2;
GLuint i;
+ (void) ctx;
+ (void) texUnit;
(void) lambda;
ASSERT(tObj->WrapS==GL_REPEAT);
ASSERT(tObj->WrapT==GL_REPEAT);
const GLint height = img->Height2; /* without border, power of two */
const GLint depth = img->Depth2; /* without border, power of two */
GLint i, j, k;
+ (void) ctx;
COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapS, texcoord[0], width, i);
COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapT, texcoord[1], height, j);
GLint i0, j0, k0, i1, j1, k1;
GLuint useBorderColor;
GLfloat u, v, w;
+ (void) ctx;
COMPUTE_LINEAR_TEXEL_LOCATIONS(tObj->WrapS, texcoord[0], u, width, i0, i1);
COMPUTE_LINEAR_TEXEL_LOCATIONS(tObj->WrapT, texcoord[1], v, height, j0, j1);
{
GLuint i;
struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
+ (void) texUnit;
(void) lambda;
for (i=0;i<n;i++) {
sample_3d_nearest(ctx, tObj, image, texcoords[i], rgba[i]);
{
GLuint i;
struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
+ (void) texUnit;
(void) lambda;
for (i=0;i<n;i++) {
sample_3d_linear(ctx, tObj, image, texcoords[i], rgba[i]);
GLchan rgba[][4])
{
GLuint i;
+ (void) texUnit;
(void) lambda;
for (i = 0; i < n; i++) {
const struct gl_texture_image **images;
const GLfloat lambda[], GLchan rgba[][4])
{
GLuint i;
+ (void) texUnit;
(void) lambda;
for (i = 0; i < n; i++) {
const struct gl_texture_image **images;
const GLfloat lambda[], GLchan rgba[][4])
{
GLuint i;
+ (void) texUnit;
ASSERT(lambda != NULL);
for (i = 0; i < n; i++) {
const struct gl_texture_image **images;
const GLfloat lambda[], GLchan rgba[][4])
{
GLuint i;
+ (void) texUnit;
ASSERT(lambda != NULL);
for (i = 0; i < n; i++) {
const struct gl_texture_image **images;
const GLfloat lambda[], GLchan rgba[][4])
{
GLuint i;
+ (void) texUnit;
ASSERT(lambda != NULL);
for (i = 0; i < n; i++) {
const struct gl_texture_image **images;
const GLfloat lambda[], GLchan rgba[][4])
{
GLuint i;
+ (void) texUnit;
ASSERT(lambda != NULL);
for (i = 0; i < n; i++) {
const struct gl_texture_image **images;
const GLint height_minus_1 = img->Height - 1;
GLuint i;
+ (void) ctx;
(void) texUnit;
(void) lambda;
const GLint height_minus_1 = img->Height - 1;
GLuint i;
+ (void) ctx;
(void) texUnit;
(void) lambda;
GLenum function;
GLchan result;
+ (void) lambda;
(void) unit;
ASSERT(tObj->Image[0][tObj->BaseLevel]->Format == GL_DEPTH_COMPONENT);
GLuint i;
GLint Rc, Gc, Bc, Ac;
GLenum format;
+ (void) primary_rgba;
ASSERT(texUnit);
ASSERT(texUnit->_Current);
const GLuint *zRow = (const GLuint *) \
_swrast_zbuffer_address(ctx, span.x, span.y); \
for (i = 0; i < span.end; i++) { \
- if (span.z < zRow[i]) { \
+ if ((GLuint)span.z < zRow[i]) { \
ctx->OcclusionResult = GL_TRUE; \
ctx->Occlusion.PassedCounter++; \
} \
*/
void _tnl_array_destroy( GLcontext *ctx )
{
+ (void) ctx;
}
struct gl_client_array *tmp;
GLboolean is_writeable = 0;
const GLubyte *data;
+ (void) writeable; (void) stride;
tmp = _ac_import_edgeflag(ctx, GL_UNSIGNED_BYTE,
sizeof(GLubyte),
GLframebuffer *drawBuffer,
GLframebuffer *readBuffer )
{
+ (void) ctx; (void) drawBuffer; (void) readBuffer;
}
static struct tnl_vertex_store *alloc_vertex_store( GLcontext *ctx )
{
struct tnl_vertex_store *store = MALLOC_STRUCT(tnl_vertex_store);
+ (void) ctx;
store->used = 0;
store->refcount = 1;
return store;
static struct tnl_primitive_store *alloc_prim_store( GLcontext *ctx )
{
struct tnl_primitive_store *store = MALLOC_STRUCT(tnl_primitive_store);
+ (void) ctx;
store->used = 0;
store->refcount = 1;
return store;
const GLvoid *indices)
{
GET_CURRENT_CONTEXT(ctx);
+ (void) mode; (void) count; (void) type; (void) indices;
_mesa_compile_error( ctx, GL_INVALID_OPERATION, "glDrawElements" );
}
const GLvoid *indices)
{
GET_CURRENT_CONTEXT(ctx);
+ (void) mode; (void) start; (void) end; (void) count; (void) type; (void) indices;
_mesa_compile_error( ctx, GL_INVALID_OPERATION, "glDrawRangeElements" );
}
static void GLAPIENTRY _save_DrawArrays(GLenum mode, GLint start, GLsizei count)
{
GET_CURRENT_CONTEXT(ctx);
+ (void) mode; (void) start; (void) count;
_mesa_compile_error( ctx, GL_INVALID_OPERATION, "glDrawArrays" );
}
static void GLAPIENTRY _save_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 )
{
GET_CURRENT_CONTEXT(ctx);
+ (void) x1; (void) y1; (void) x2; (void) y2;
_mesa_compile_error( ctx, GL_INVALID_OPERATION, "glRectf" );
}
static void GLAPIENTRY _save_EvalMesh1( GLenum mode, GLint i1, GLint i2 )
{
GET_CURRENT_CONTEXT(ctx);
+ (void) mode; (void) i1; (void) i2;
_mesa_compile_error( ctx, GL_INVALID_OPERATION, "glEvalMesh1" );
}
GLint j1, GLint j2 )
{
GET_CURRENT_CONTEXT(ctx);
+ (void) mode; (void) i1; (void) i2; (void) j1; (void) j2;
_mesa_compile_error( ctx, GL_INVALID_OPERATION, "glEvalMesh2" );
}
static void GLAPIENTRY _save_Begin( GLenum mode )
{
GET_CURRENT_CONTEXT( ctx );
+ (void) mode;
_mesa_compile_error( ctx, GL_INVALID_OPERATION, "Recursive glBegin" );
}
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
+ (void) list; (void) mode;
+
if (!tnl->save.prim_store)
tnl->save.prim_store = alloc_prim_store( ctx );
void _tnl_EndList( GLcontext *ctx )
{
+ (void) ctx;
assert(TNL_CONTEXT(ctx)->save.vertex_size == 0);
}
void _tnl_BeginCallList( GLcontext *ctx, GLuint list )
{
+ (void) ctx; (void) list;
}
void _tnl_EndCallList( GLcontext *ctx )
{
+ (void) ctx;
}
static void _tnl_destroy_vertex_list( GLcontext *ctx, void *data )
{
struct tnl_vertex_list *node = (struct tnl_vertex_list *)data;
+ (void) ctx;
if ( --node->vertex_store->refcount == 0 )
FREE( node->vertex_store );
{
struct tnl_vertex_list *node = (struct tnl_vertex_list *)data;
GLuint i;
+ (void) ctx;
_mesa_debug(0, "TNL-VERTEX-LIST, %u vertices %d primitives, %d vertsize\n",
node->count,
*/
void _tnl_save_destroy( GLcontext *ctx )
{
+ (void) ctx;
}
static void index_attr1fv(GLcontext *ctx, GLint target, const GLfloat *v)
{
+ (void) target;
ctx->Exec->Indexf(v[0]);
}
static void edgeflag_attr1fv(GLcontext *ctx, GLint target, const GLfloat *v)
{
+ (void) target;
ctx->Exec->EdgeFlag((GLboolean)(v[0] == 1.0));
}
static void dtr( struct tnl_pipeline_stage *stage )
{
+ (void) stage;
}
static void insert_4f_4( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
+ (void) a;
out[0] = in[0];
out[1] = in[1];
static void insert_4f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
+ (void) a;
out[0] = in[0];
out[1] = in[1];
static void insert_4f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
+ (void) a;
out[0] = in[0];
out[1] = in[1];
static void insert_4f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
+ (void) a;
out[0] = in[0];
out[1] = 0;
static void insert_3f_xyw_4( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
+ (void) a;
out[0] = in[0];
out[1] = in[1];
static void insert_3f_xyw_err( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
+ (void) a; (void) v; (void) in;
abort();
}
static void insert_3f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
+ (void) a;
out[0] = in[0];
out[1] = in[1];
static void insert_3f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
+ (void) a;
out[0] = in[0];
out[1] = in[1];
static void insert_3f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
+ (void) a;
out[0] = in[0];
out[1] = 0;
static void insert_2f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
+ (void) a;
out[0] = in[0];
out[1] = in[1];
static void insert_2f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
+ (void) a;
out[0] = in[0];
out[1] = 0;
static void insert_1f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
-
+ (void) a;
+
out[0] = in[0];
}
const GLfloat *in )
{
GLchan *c = (GLchan *)v;
+ (void) a;
UNCLAMPED_FLOAT_TO_CHAN(c[0], in[0]);
UNCLAMPED_FLOAT_TO_CHAN(c[1], in[1]);
UNCLAMPED_FLOAT_TO_CHAN(c[2], in[2]);
const GLfloat *in )
{
GLchan *c = (GLchan *)v;
+ (void) a;
UNCLAMPED_FLOAT_TO_CHAN(c[0], in[0]);
UNCLAMPED_FLOAT_TO_CHAN(c[1], in[1]);
UNCLAMPED_FLOAT_TO_CHAN(c[2], in[2]);
const GLfloat *in )
{
GLchan *c = (GLchan *)v;
+ (void) a;
UNCLAMPED_FLOAT_TO_CHAN(c[0], in[0]);
UNCLAMPED_FLOAT_TO_CHAN(c[1], in[1]);
c[2] = 0;
const GLfloat *in )
{
GLchan *c = (GLchan *)v;
+ (void) a;
UNCLAMPED_FLOAT_TO_CHAN(c[0], in[0]);
c[1] = 0;
c[2] = 0;
static void insert_4ub_4f_rgba_4( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
+ (void) a;
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[2]);
static void insert_4ub_4f_rgba_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
+ (void) a;
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[2]);
static void insert_4ub_4f_rgba_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
+ (void) a;
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
v[2] = 0;
static void insert_4ub_4f_rgba_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
+ (void) a;
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
v[1] = 0;
v[2] = 0;
static void insert_4ub_4f_bgra_4( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
+ (void) a;
UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[2]);
static void insert_4ub_4f_bgra_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
+ (void) a;
UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[2]);
static void insert_4ub_4f_bgra_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
+ (void) a;
UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
v[0] = 0;
static void insert_4ub_4f_bgra_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
+ (void) a;
UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
v[1] = 0;
v[0] = 0;
static void insert_3ub_3f_rgb_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
+ (void) a;
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[2]);
static void insert_3ub_3f_rgb_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
+ (void) a;
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
v[2] = 0;
static void insert_3ub_3f_rgb_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
+ (void) a;
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
v[1] = 0;
v[2] = 0;
static void insert_3ub_3f_bgr_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
+ (void) a;
UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[2]);
static void insert_3ub_3f_bgr_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
+ (void) a;
UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
UNCLAMPED_FLOAT_TO_UBYTE(v[1], in[1]);
v[0] = 0;
static void insert_3ub_3f_bgr_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
+ (void) a;
UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[0]);
v[1] = 0;
v[0] = 0;
static void insert_1ub_1f_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
+ (void) a;
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[0]);
}
static void extract_4f( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v )
{
const GLfloat *in = (const GLfloat *)v;
+ (void) a;
out[0] = in[0];
out[1] = in[1];
static void extract_3f_xyw( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v )
{
const GLfloat *in = (const GLfloat *)v;
+ (void) a;
out[0] = in[0];
out[1] = in[1];
static void extract_3f( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v )
{
const GLfloat *in = (const GLfloat *)v;
+ (void) a;
out[0] = in[0];
out[1] = in[1];
static void extract_2f( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v )
{
const GLfloat *in = (const GLfloat *)v;
+ (void) a;
out[0] = in[0];
out[1] = in[1];
static void extract_1f( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v )
{
const GLfloat *in = (const GLfloat *)v;
+ (void) a;
out[0] = in[0];
out[1] = 0;
const GLubyte *v )
{
GLchan *c = (GLchan *)v;
+ (void) a;
out[0] = CHAN_TO_FLOAT(c[0]);
out[1] = CHAN_TO_FLOAT(c[1]);
static void extract_4ub_4f_rgba( const struct tnl_clipspace_attr *a, GLfloat *out,
const GLubyte *v )
{
+ (void) a;
out[0] = UBYTE_TO_FLOAT(v[0]);
out[1] = UBYTE_TO_FLOAT(v[1]);
out[2] = UBYTE_TO_FLOAT(v[2]);
static void extract_4ub_4f_bgra( const struct tnl_clipspace_attr *a, GLfloat *out,
const GLubyte *v )
{
+ (void) a;
out[2] = UBYTE_TO_FLOAT(v[0]);
out[1] = UBYTE_TO_FLOAT(v[1]);
out[0] = UBYTE_TO_FLOAT(v[2]);
static void extract_3ub_3f_rgb( const struct tnl_clipspace_attr *a, GLfloat *out,
const GLubyte *v )
{
+ (void) a;
out[0] = UBYTE_TO_FLOAT(v[0]);
out[1] = UBYTE_TO_FLOAT(v[1]);
out[2] = UBYTE_TO_FLOAT(v[2]);
static void extract_3ub_3f_bgr( const struct tnl_clipspace_attr *a, GLfloat *out,
const GLubyte *v )
{
+ (void) a;
out[2] = UBYTE_TO_FLOAT(v[0]);
out[1] = UBYTE_TO_FLOAT(v[1]);
out[0] = UBYTE_TO_FLOAT(v[2]);
static void extract_1ub_1f( const struct tnl_clipspace_attr *a, GLfloat *out, const GLubyte *v )
{
+ (void) a;
out[0] = UBYTE_TO_FLOAT(v[0]);
out[1] = 0;
out[2] = 0;
const struct tnl_clipspace_attr *a = vtx->attr;
const GLuint attr_count = vtx->attr_count;
GLuint j;
+ (void) force_boundary;
if (tnl->NeedNdcCoords) {
const GLfloat *dstclip = VB->ClipPtr->data[edst];
static GLboolean emit_3f_xyw_err( struct tnl_clipspace_codegen *p )
{
+ (void) p;
assert(0);
return GL_FALSE;
}
ctx->Driver.NeedFlush |= FLUSH_UPDATE_CURRENT;
}
+#ifdef USE_X86_ASM
static struct _tnl_dynfn *lookup( struct _tnl_dynfn *l, GLuint key )
{
}
if (dfn)
- return (tnl_attrfv_func) dfn->code;
+ return *(tnl_attrfv_func *) &dfn->code;
else
return 0;
}
+#endif /* USE_X86_ASM */
+
/* Helper function for 'CHOOSE' macro. Do what's necessary when an
* entrypoint is called for the first time.
*/
void _tnl_FlushVertices( GLcontext *ctx, GLuint flags )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
+ (void) flags;
if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END)
return;
static struct _tnl_dynfn *no_codegen( GLcontext *ctx, int key )
{
+ (void) ctx; (void) key;
return 0;
}