Compare commits
	
		
			8 Commits
		
	
	
		
			embedded-1
			...
			embedded-1
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					7b7af467dd | ||
| 
						 | 
					3101d43a76 | ||
| 
						 | 
					d95443f030 | ||
| 
						 | 
					be49c0fef2 | ||
| 
						 | 
					61d31cab97 | ||
| 
						 | 
					7067815785 | ||
| 
						 | 
					ad79ba8208 | ||
| 
						 | 
					b8cdeaae3a | 
@@ -12,7 +12,7 @@
 | 
			
		||||
<h2>
 | 
			
		||||
<center>
 | 
			
		||||
<h3>Tungsten Graphics, Inc.</h3>
 | 
			
		||||
<h3>February 3, 2003<br>
 | 
			
		||||
<h3>February 26, 2003<br>
 | 
			
		||||
</h3>
 | 
			
		||||
</center>
 | 
			
		||||
</h2>
 | 
			
		||||
@@ -623,34 +623,7 @@ Polygon culling is enabled and disabled with the commands <span
 | 
			
		||||
 style="font-weight: bold;">glDisable</span>(GL_CULL_FACE),
 | 
			
		||||
respectively.<br>
 | 
			
		||||
<br>
 | 
			
		||||
<h3>4.3.3 Polygon Fill Mode</h3>
 | 
			
		||||
The command<br>
 | 
			
		||||
<br>
 | 
			
		||||
<div style="margin-left: 40px;">void<span style="font-weight: bold;"><span
 | 
			
		||||
 style="font-weight: bold;"> </span><span style="font-weight: bold;"></span>glPolygonMode</span>(GLenum<span
 | 
			
		||||
 style="font-style: italic;">face</span>, GLenum <span
 | 
			
		||||
 style="font-style: italic;">mode</span>)<br>
 | 
			
		||||
</div>
 | 
			
		||||
<br>
 | 
			
		||||
controls whether polygons are filled, outlined or drawn with a point at
 | 
			
		||||
each vertex.  The <span style="font-style: italic;">face</span>
 | 
			
		||||
parameter must be GL_FRONT_AND_BACK.  The values GL_FRONT and
 | 
			
		||||
GL_BACK are not permitted by the subset.<br>
 | 
			
		||||
<br>
 | 
			
		||||
If <span style="font-style: italic;">mode</span> is GL_FILL then
 | 
			
		||||
triangles, quadrilaterals and triangles will be filled (the default).
 | 
			
		||||
 If <span style="font-style: italic;">mode</span> is GL_LINE then
 | 
			
		||||
triangles, quadrilaterals and polygons will be outlined with line
 | 
			
		||||
segments instead of being filled.<span style="font-weight: bold;"></span>
 | 
			
		||||
 If <span style="font-style: italic;">mode</span> is GL_POINT then
 | 
			
		||||
triangles, quadrilaterals and polygons will be rendered with a point at
 | 
			
		||||
each vertex instead of being filled.<span style="font-weight: bold;"></span><br>
 | 
			
		||||
<br>
 | 
			
		||||
Any other values for <span style="font-style: italic;">face</span> or <span
 | 
			
		||||
 style="font-style: italic;">mode</span> will raise the error
 | 
			
		||||
GL_INVALID_ENUM.<br>
 | 
			
		||||
<br>
 | 
			
		||||
<h3>4.3.4 Polygon Antialiasing</h3>
 | 
			
		||||
<h3>4.3.3 Polygon Antialiasing</h3>
 | 
			
		||||
Polygons may be antialiased in order to smooth their edges.
 | 
			
		||||
 Polygon antialiasing is enabled and disabled with the commands <span
 | 
			
		||||
 style="font-weight: bold;">glEnable</span>(GL_POLYGON_SMOOTH) and <span
 | 
			
		||||
@@ -688,8 +661,8 @@ are linearly interpolated to produce the fragment colors.<br>
 | 
			
		||||
<h2>4.5 Bitmap Rasterization</h2>
 | 
			
		||||
A bitmap is a monochromatic, binary image in which each image element
 | 
			
		||||
(or pixel) is represented by one bit.  Fragments are only generated
 | 
			
		||||
for the bits (pixels) which are set.   Bitmaps are commonly used
 | 
			
		||||
to draw text (glyphs) and markers.<br>
 | 
			
		||||
for the bits (pixels) which are set.   Bitmaps are commonly used to
 | 
			
		||||
draw text (glyphs) and markers.<br>
 | 
			
		||||
<br>
 | 
			
		||||
A bitmap is drawn with the command<br>
 | 
			
		||||
<br>
 | 
			
		||||
@@ -844,6 +817,7 @@ the subset.<br>
 | 
			
		||||
Polygon commands:<br>
 | 
			
		||||
<div style="margin-left: 40px; font-weight: bold;">glPolygonStipple<br>
 | 
			
		||||
glPolygonOffset<br>
 | 
			
		||||
glPolygonMode<br>
 | 
			
		||||
<br>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
@@ -2762,15 +2736,6 @@ name stack.<br>
 | 
			
		||||
      <td style="vertical-align: top;">Pixel packing row length.<br>
 | 
			
		||||
      </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
      <td style="vertical-align: top;">GL_POLYGON_MODE<br>
 | 
			
		||||
      </td>
 | 
			
		||||
      <td style="vertical-align: top;">2<br>
 | 
			
		||||
      </td>
 | 
			
		||||
      <td style="vertical-align: top;">Current front and back polygon
 | 
			
		||||
modes: GL_POINT, GL_LINE or GL_FILL.<br>
 | 
			
		||||
      </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
      <td style="vertical-align: top;">GL_POLYGON_SMOOTH<br>
 | 
			
		||||
      </td>
 | 
			
		||||
@@ -3456,7 +3421,7 @@ number of approaches to antialiasing have been summarized in email.<br>
 | 
			
		||||
RECOMMENDATION: don't support edge flags.  They don't effect
 | 
			
		||||
polygon antialiasing.<br>
 | 
			
		||||
<br>
 | 
			
		||||
RESOLUTION: open<br>
 | 
			
		||||
RESOLUTION: closed, as of 26 Feb 2003.<br>
 | 
			
		||||
<br>
 | 
			
		||||
<h2>A.3 glRasterPos vs. glWindowPos</h2>
 | 
			
		||||
Should glRasterPos and/or glWindowPos commands be supported?<br>
 | 
			
		||||
@@ -3601,6 +3566,12 @@ supported.<br>
 | 
			
		||||
<br>
 | 
			
		||||
RESOLUTION: open<br>
 | 
			
		||||
<br>
 | 
			
		||||
<h2>A.15 glPolygonMode</h2>
 | 
			
		||||
Is <span style="font-weight: bold;">glPolygonMode</span> needed?<br>
 | 
			
		||||
<br>
 | 
			
		||||
RECOMMENDATION: No.  Omit it.<br>
 | 
			
		||||
<br>
 | 
			
		||||
RESOLUTION: closed, as of 26 Feb 2003<br>
 | 
			
		||||
<br>
 | 
			
		||||
<br>
 | 
			
		||||
<p> </p>
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ OUTPUT_DIRECTORY       = .
 | 
			
		||||
OUTPUT_LANGUAGE        = English
 | 
			
		||||
EXTRACT_ALL            = YES
 | 
			
		||||
EXTRACT_PRIVATE        = NO
 | 
			
		||||
EXTRACT_STATIC         = NO
 | 
			
		||||
EXTRACT_STATIC         = YES
 | 
			
		||||
EXTRACT_LOCAL_CLASSES  = YES
 | 
			
		||||
HIDE_UNDOC_MEMBERS     = NO
 | 
			
		||||
HIDE_UNDOC_CLASSES     = NO
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										28
									
								
								progs/samples/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								progs/samples/Makefile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
 | 
			
		||||
PROGS = prim \
 | 
			
		||||
	star \
 | 
			
		||||
	line \
 | 
			
		||||
	point \
 | 
			
		||||
	depth \
 | 
			
		||||
	tri \
 | 
			
		||||
	bitmap1 \
 | 
			
		||||
	bitmap2
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
##### RULES #####
 | 
			
		||||
 | 
			
		||||
.SUFFIXES:
 | 
			
		||||
.SUFFIXES: .c
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# make executable from .c file:
 | 
			
		||||
.c: $(LIB_DEP)
 | 
			
		||||
	gcc -I../include -g $< -L../lib -lglut -lGL -lm -o $@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
default: $(PROGS)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	-rm *.o *~
 | 
			
		||||
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
# $Id: Makefile,v 1.1.2.1 2003/02/05 04:37:12 keithw Exp $
 | 
			
		||||
# $Id: Makefile,v 1.1.2.2 2003/03/04 17:29:55 keithw Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  5.0
 | 
			
		||||
@@ -7,27 +7,18 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
MESA = ../..
 | 
			
		||||
MESABUILDDIR = ..
 | 
			
		||||
 | 
			
		||||
default: dri.a
 | 
			
		||||
include $(MESA)/Makefile.include
 | 
			
		||||
 | 
			
		||||
INCLUDES = -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions -I$(MESA)/include -I. -I..
 | 
			
		||||
DEFINES = 
 | 
			
		||||
 | 
			
		||||
CFLAGS = $(INCLUDES) $(DEFINES) -g -MD -Wall -Wpointer-arith \
 | 
			
		||||
	 -Wstrict-prototypes -Wmissing-prototypes \
 | 
			
		||||
	 -Wmissing-declarations -Wnested-externs
 | 
			
		||||
 | 
			
		||||
# The .a files for each mesa module required by this driver:
 | 
			
		||||
#
 | 
			
		||||
DRI_SOURCES = dri_glx.c \
 | 
			
		||||
	      dri_util.c \
 | 
			
		||||
	      xf86drm.c \
 | 
			
		||||
	      xf86drmHash.c \
 | 
			
		||||
	      xf86drmRandom.c \
 | 
			
		||||
	      xf86drmSL.c
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
C_SOURCES = $(DRI_SOURCES) 
 | 
			
		||||
C_SOURCES = dri_glx.c \
 | 
			
		||||
	    dri_util.c \
 | 
			
		||||
	    xf86drm.c \
 | 
			
		||||
	    xf86drmHash.c \
 | 
			
		||||
	    xf86drmRandom.c \
 | 
			
		||||
	    xf86drmSL.c
 | 
			
		||||
 | 
			
		||||
ASM_SOURCES = 
 | 
			
		||||
 | 
			
		||||
@@ -36,32 +27,11 @@ OBJECTS = $(C_SOURCES:.c=.o) \
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
##### RULES #####
 | 
			
		||||
 | 
			
		||||
.S.o:
 | 
			
		||||
	$(CC) -c $(CFLAGS) $< -o $@
 | 
			
		||||
 | 
			
		||||
.c.o: 
 | 
			
		||||
	$(CC) -c $(CFLAGS) $< -o $@
 | 
			
		||||
 | 
			
		||||
##### TARGETS #####
 | 
			
		||||
 | 
			
		||||
default: dri.a
 | 
			
		||||
 | 
			
		||||
dri.a: $(OBJECTS) Makefile
 | 
			
		||||
	rm -f $@ && ar rcv $@ $(OBJECTS) && ranlib $@
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	-rm -f *.o *~ *.d .\#* *.so
 | 
			
		||||
 | 
			
		||||
tags:
 | 
			
		||||
	etags `find . -name \*.[ch]` `find ../include`
 | 
			
		||||
 | 
			
		||||
##### DEPENDENCIES #####
 | 
			
		||||
 | 
			
		||||
-include $(C_SOURCES:.c=.d)
 | 
			
		||||
 | 
			
		||||
.SUFFIXES: .c .d
 | 
			
		||||
 | 
			
		||||
.c.d:
 | 
			
		||||
	$(CC) -M $(INCLUDES) $(DEFINES) $< > $@
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
# $Id: Makefile,v 1.1.2.25 2003/02/23 20:24:11 keithw Exp $
 | 
			
		||||
# $Id: Makefile,v 1.1.2.26 2003/03/04 17:29:56 keithw Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  5.0
 | 
			
		||||
@@ -7,12 +7,25 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
MESA = ../../..
 | 
			
		||||
MESABUILDDIR = ../..
 | 
			
		||||
default: radeon_dri.so 
 | 
			
		||||
include $(MESA)/Makefile.include
 | 
			
		||||
 | 
			
		||||
SHARED_INCLUDES = -I$(MESABUILDDIR) -I$(MESA)/include -I. -I../common -Iserver
 | 
			
		||||
 | 
			
		||||
SHARED_INCLUDES= -I$(MESABUILDDIR) -I$(MESA)/include -I. -I../common -Iserver
 | 
			
		||||
MINIGLX_INCLUDES = -I$(MESABUILDDIR)/miniglx 
 | 
			
		||||
DRI_INCLUDES = -I$(MESABUILDDIR)/dri
 | 
			
		||||
 | 
			
		||||
ifeq ($(FULL_DRIVER),true)
 | 
			
		||||
DEFINES = \
 | 
			
		||||
	-D_HAVE_SWRAST=1 \
 | 
			
		||||
	-D_HAVE_SWTNL=1 \
 | 
			
		||||
	-D_HAVE_SANITY=1 \
 | 
			
		||||
	-D_HAVE_CODEGEN=1 \
 | 
			
		||||
	-D_HAVE_LIGHTING=1 \
 | 
			
		||||
	-D_HAVE_TEXGEN=1 \
 | 
			
		||||
	-D_HAVE_USERCLIP=1 \
 | 
			
		||||
	-D_HAVE_FULL_GL=1
 | 
			
		||||
else
 | 
			
		||||
DEFINES = \
 | 
			
		||||
	-D_HAVE_SWRAST=0 \
 | 
			
		||||
	-D_HAVE_SWTNL=0 \
 | 
			
		||||
@@ -22,10 +35,7 @@ DEFINES = \
 | 
			
		||||
	-D_HAVE_TEXGEN=0 \
 | 
			
		||||
	-D_HAVE_USERCLIP=0 \
 | 
			
		||||
	-D_HAVE_FULL_GL=0
 | 
			
		||||
 | 
			
		||||
CFLAGS = $(INCLUDES) $(DEFINES) -g -MD -Wall -Wpointer-arith \
 | 
			
		||||
	 -Wstrict-prototypes -Wmissing-prototypes \
 | 
			
		||||
	 -Wmissing-declarations -Wnested-externs
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
# The .a files for each mesa module required by this driver:
 | 
			
		||||
#
 | 
			
		||||
@@ -40,7 +50,7 @@ FULL_MESA = 	$(MESABUILDDIR)/swrast_setup/swrast_setup.a \
 | 
			
		||||
SUBSET_MESA = 	$(MESABUILDDIR)/mesa.a \
 | 
			
		||||
		$(MESABUILDDIR)/math/math.a
 | 
			
		||||
 | 
			
		||||
DRI =           $(MESABUILDDIR)/dri/dri.a
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
MINIGLX_SOURCES = server/radeon_dri.c 
 | 
			
		||||
 | 
			
		||||
@@ -63,6 +73,7 @@ FULL_DRIVER_SOURCES = 	\
 | 
			
		||||
		 radeon_tex.c \
 | 
			
		||||
		 radeon_texmem.c \
 | 
			
		||||
		 radeon_texstate.c \
 | 
			
		||||
		 radeon_texcombine.c \
 | 
			
		||||
		 radeon_lighting.c \
 | 
			
		||||
		 radeon_userclip.c \
 | 
			
		||||
		 radeon_texgen.c \
 | 
			
		||||
@@ -81,55 +92,44 @@ FULL_DRIVER_SOURCES = 	\
 | 
			
		||||
INCLUDES = $(MINIGLX_INCLUDES) \
 | 
			
		||||
	   $(SHARED_INCLUDES)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ifeq ($(FULL_DRIVER),true)
 | 
			
		||||
C_SOURCES = $(DRIVER_SOURCES) \
 | 
			
		||||
	    $(FULL_DRIVER_SOURCES) \
 | 
			
		||||
	    $(MINIGLX_SOURCES) 
 | 
			
		||||
MESA_MODULES = $(FULL_MESA)
 | 
			
		||||
else
 | 
			
		||||
C_SOURCES = $(DRIVER_SOURCES) \
 | 
			
		||||
	    $(SUBSET_DRIVER_SOURCES) \
 | 
			
		||||
	    $(MINIGLX_SOURCES) 
 | 
			
		||||
MESA_MODULES = $(FULL_MESA)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ifeq ($(WINDOW_SYSTEM),dri)
 | 
			
		||||
WINOBJ=$(MESABUILDDIR)/dri/dri.a
 | 
			
		||||
WINLIB=
 | 
			
		||||
else
 | 
			
		||||
WINOBJ=
 | 
			
		||||
WINLIB=-L$(MESA)/src/miniglx
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ASM_SOURCES = 
 | 
			
		||||
 | 
			
		||||
OBJECTS = $(C_SOURCES:.c=.o) \
 | 
			
		||||
	  $(ASM_SOURCES:.S=.o) 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
##### RULES #####
 | 
			
		||||
 | 
			
		||||
.S.o:
 | 
			
		||||
	$(CC) -c $(CFLAGS) $< -o $@
 | 
			
		||||
 | 
			
		||||
.c.o: 
 | 
			
		||||
	$(CC) -c $(CFLAGS) $< -o $@
 | 
			
		||||
 | 
			
		||||
##### TARGETS #####
 | 
			
		||||
 | 
			
		||||
default: radeon_dri.so install
 | 
			
		||||
 | 
			
		||||
radeon_dri.so:  $(SUBSET_MESA) $(OBJECTS) Makefile
 | 
			
		||||
	rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(SUBSET_MESA) -L$(MESA)/src/miniglx -lGL -lc -lm
 | 
			
		||||
 | 
			
		||||
#radeon_dri.so:  $(SUBSET_MESA) $(DRI) $(OBJECTS) Makefile
 | 
			
		||||
#	rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(SUBSET_MESA) $(DRI) -lc -lm
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
loc:
 | 
			
		||||
	wc -l $(DRIVER_SOURCES) $(SUBSET_DRIVER_SOURCES)
 | 
			
		||||
	wc -l $(DRIVER_SOURCES) $(FULL_DRIVER_SOURCES) radeon_maos_verts.c radeon_maos_vbtmp.h
 | 
			
		||||
 | 
			
		||||
install:
 | 
			
		||||
# Build the subset or full driver?
 | 
			
		||||
#
 | 
			
		||||
radeon_dri.so:  $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
 | 
			
		||||
	rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(WINLIB) -lGL -lc -lm
 | 
			
		||||
	rm -f $(MESA)/lib/radeon_dri.so && \
 | 
			
		||||
	install radeon_dri.so $(MESA)/lib/radeon_dri.so
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	-rm -f *.o *~ *.d .\#* *.so
 | 
			
		||||
 | 
			
		||||
tags:
 | 
			
		||||
	etags `find . -name \*.[ch]` `find ../include`
 | 
			
		||||
 | 
			
		||||
##### DEPENDENCIES #####
 | 
			
		||||
 | 
			
		||||
-include $(C_SOURCES:.c=.d)
 | 
			
		||||
 | 
			
		||||
.SUFFIXES: .c .d
 | 
			
		||||
 | 
			
		||||
.c.d:
 | 
			
		||||
	$(CC) -M $(INCLUDES) $(DEFINES) $< > $@
 | 
			
		||||
 
 | 
			
		||||
@@ -51,6 +51,8 @@
 | 
			
		||||
#include "radeon_tcl.h"
 | 
			
		||||
#include "radeon_vtxfmt.h"
 | 
			
		||||
#include "radeon_tex.h"
 | 
			
		||||
#include "radeon_span.h"
 | 
			
		||||
#include "radeon_maos.h"
 | 
			
		||||
#else
 | 
			
		||||
#include "radeon_subset.h"
 | 
			
		||||
#endif
 | 
			
		||||
@@ -202,8 +204,10 @@ static void radeonInitDriverFuncs( GLcontext *ctx )
 | 
			
		||||
    ctx->Driver.ResizeBuffers           = ResizeBuffers;
 | 
			
		||||
    ctx->Driver.Error			= NULL;
 | 
			
		||||
    ctx->Driver.DrawPixels		= NULL;
 | 
			
		||||
#if !_HAVE_SWRAST
 | 
			
		||||
    ctx->Driver.Bitmap			= radeonPointsBitmap;
 | 
			
		||||
    ctx->Driver.ReadPixels		= radeonReadPixels;
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -366,8 +370,9 @@ radeonCreateContext( const __GLcontextModes *glVisual,
 | 
			
		||||
#if _HAVE_SWTNL
 | 
			
		||||
   radeonInitSwtcl( ctx );
 | 
			
		||||
#endif
 | 
			
		||||
#if !_HAVE_FULL_GL
 | 
			
		||||
   radeonInitSelect( ctx );
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   rmesa->do_irqs = (rmesa->radeonScreen->irq && !getenv("RADEON_NO_IRQS"));
 | 
			
		||||
   rmesa->irqsEmitted = 0;
 | 
			
		||||
 
 | 
			
		||||
@@ -49,9 +49,47 @@ typedef struct radeon_context *radeonContextPtr;
 | 
			
		||||
#include "radeon_screen.h"
 | 
			
		||||
#include "mm.h"
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Reference counting on DMA buffers.
 | 
			
		||||
 */
 | 
			
		||||
struct radeon_dma_buffer {
 | 
			
		||||
   int refcount;	/**< \brief number of retained regions in radeon_dma_buffer::buf */
 | 
			
		||||
   drmBufPtr buf;	/**< \brief DMA buffer */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Get the start of a DMA region.
 | 
			
		||||
 *
 | 
			
		||||
 * \param rvb pointer to a radeon_dma_region structure.
 | 
			
		||||
 *
 | 
			
		||||
 * \return pointer to the region start.
 | 
			
		||||
 */
 | 
			
		||||
#define GET_START(rvb) (rmesa->radeonScreen->agp_buffer_offset +	\
 | 
			
		||||
			(rvb)->address - rmesa->dma.buf0_address +	\
 | 
			
		||||
			(rvb)->start)
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief A retained DMA region.
 | 
			
		||||
 *
 | 
			
		||||
 * e.g. vertices for indexed vertices.
 | 
			
		||||
 */
 | 
			
		||||
struct radeon_dma_region {
 | 
			
		||||
   struct radeon_dma_buffer *buf;	/**< \brief DMA buffer */
 | 
			
		||||
   char *address;			/**< \brief buf->address */
 | 
			
		||||
   int start;				/**< \brief start offset from start of radeon_dma_region::buf */
 | 
			
		||||
   int end;				/**< \brief end offset from start of radeon_dma_region::buf */
 | 
			
		||||
   int ptr;				/**< \brief offsets from start of radeon_dma_region::buf */
 | 
			
		||||
   int aos_start;			/**< \brief array of structures start */
 | 
			
		||||
   int aos_stride;			/**< \brief array of structures stride */
 | 
			
		||||
   int aos_size;			/**< \brief array of structures size */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#if _HAVE_SWTNL
 | 
			
		||||
#include "radeon_swtcl.h"
 | 
			
		||||
#endif
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
#include "radeon_vtxfmt.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Color buffer state.
 | 
			
		||||
@@ -478,40 +516,6 @@ struct radeon_texture {
 | 
			
		||||
   GLint numHeaps;				/**< \brief number of active heaps */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Reference counting on DMA buffers.
 | 
			
		||||
 */
 | 
			
		||||
struct radeon_dma_buffer {
 | 
			
		||||
   int refcount;	/**< \brief number of retained regions in radeon_dma_buffer::buf */
 | 
			
		||||
   drmBufPtr buf;	/**< \brief DMA buffer */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Get the start of a DMA region.
 | 
			
		||||
 *
 | 
			
		||||
 * \param rvb pointer to a radeon_dma_region structure.
 | 
			
		||||
 *
 | 
			
		||||
 * \return pointer to the region start.
 | 
			
		||||
 */
 | 
			
		||||
#define GET_START(rvb) (rmesa->radeonScreen->agp_buffer_offset +	\
 | 
			
		||||
			(rvb)->address - rmesa->dma.buf0_address +	\
 | 
			
		||||
			(rvb)->start)
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief A retained DMA region.
 | 
			
		||||
 *
 | 
			
		||||
 * e.g. vertices for indexed vertices.
 | 
			
		||||
 */
 | 
			
		||||
struct radeon_dma_region {
 | 
			
		||||
   struct radeon_dma_buffer *buf;	/**< \brief DMA buffer */
 | 
			
		||||
   char *address;			/**< \brief buf->address */
 | 
			
		||||
   int start;				/**< \brief start offset from start of radeon_dma_region::buf */
 | 
			
		||||
   int end;				/**< \brief end offset from start of radeon_dma_region::buf */
 | 
			
		||||
   int ptr;				/**< \brief offsets from start of radeon_dma_region::buf */
 | 
			
		||||
   int aos_start;			/**< \brief array of structures start */
 | 
			
		||||
   int aos_stride;			/**< \brief array of structures stride */
 | 
			
		||||
   int aos_size;			/**< \brief array of structures size */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -709,8 +713,9 @@ struct radeon_context {
 | 
			
		||||
 | 
			
		||||
   /* radeon_vtxfmt.c
 | 
			
		||||
    */
 | 
			
		||||
/*    struct radeon_vbinfo vb; */
 | 
			
		||||
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   struct radeon_vbinfo vb;
 | 
			
		||||
#endif
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Mirrors of some DRI state
 | 
			
		||||
    */
 | 
			
		||||
 
 | 
			
		||||
@@ -53,7 +53,7 @@
 | 
			
		||||
/* Update on colormaterial, material emmissive/ambient, 
 | 
			
		||||
 * lightmodel.globalambient
 | 
			
		||||
 */
 | 
			
		||||
 void update_global_ambient( GLcontext *ctx )
 | 
			
		||||
void update_global_ambient( GLcontext *ctx )
 | 
			
		||||
{
 | 
			
		||||
   radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
 | 
			
		||||
   float *fcmd = (float *)RADEON_DB_STATE( glt );
 | 
			
		||||
@@ -137,7 +137,7 @@ void check_twoside_fallback( GLcontext *ctx )
 | 
			
		||||
   TCL_FALLBACK( ctx, RADEON_TCL_FALLBACK_LIGHT_TWOSIDE, fallback );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 void radeonColorMaterial( GLcontext *ctx, GLenum face, GLenum mode )
 | 
			
		||||
void radeonColorMaterial( GLcontext *ctx, GLenum face, GLenum mode )
 | 
			
		||||
{
 | 
			
		||||
   if (ctx->Light.ColorMaterialEnabled) {
 | 
			
		||||
      radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
 | 
			
		||||
@@ -321,8 +321,9 @@ void radeonUpdateLighting( GLcontext *ctx )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 void radeonLightfv( GLcontext *ctx, GLenum light,
 | 
			
		||||
			   GLenum pname, const GLfloat *params )
 | 
			
		||||
 | 
			
		||||
void radeonLightfv( GLcontext *ctx, GLenum light,
 | 
			
		||||
		    GLenum pname, const GLfloat *params )
 | 
			
		||||
{
 | 
			
		||||
   radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
 | 
			
		||||
   GLint p = light - GL_LIGHT0;
 | 
			
		||||
@@ -395,8 +396,8 @@ void radeonUpdateLighting( GLcontext *ctx )
 | 
			
		||||
		  
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 void radeonLightModelfv( GLcontext *ctx, GLenum pname,
 | 
			
		||||
				const GLfloat *param )
 | 
			
		||||
void radeonLightModelfv( GLcontext *ctx, GLenum pname,
 | 
			
		||||
			 const GLfloat *param )
 | 
			
		||||
{
 | 
			
		||||
   radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -38,5 +38,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
#define __RADEON_SPAN_H__
 | 
			
		||||
 | 
			
		||||
extern void radeonInitSpanFuncs( GLcontext *ctx );
 | 
			
		||||
extern void radeonCreateSwrastContext( GLcontext *ctx );
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1307,8 +1307,8 @@ static void radeonEnable( GLcontext *ctx, GLenum cap, GLboolean state )
 | 
			
		||||
   case GL_CLIP_PLANE2:
 | 
			
		||||
   case GL_CLIP_PLANE3:
 | 
			
		||||
   case GL_CLIP_PLANE4:
 | 
			
		||||
   case GL_CLIP_PLANE5: 
 | 
			
		||||
      p = cap-GL_CLIP_PLANE0;
 | 
			
		||||
   case GL_CLIP_PLANE5: {
 | 
			
		||||
      GLuint p = cap-GL_CLIP_PLANE0;
 | 
			
		||||
      RADEON_STATECHANGE( rmesa, tcl );
 | 
			
		||||
      if (state) {
 | 
			
		||||
	 rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] |= (RADEON_UCP_ENABLE_0<<p);
 | 
			
		||||
@@ -1318,6 +1318,7 @@ static void radeonEnable( GLcontext *ctx, GLenum cap, GLboolean state )
 | 
			
		||||
	 rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] &= ~(RADEON_UCP_ENABLE_0<<p);
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
   }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   case GL_CULL_FACE:
 | 
			
		||||
 
 | 
			
		||||
@@ -75,7 +75,6 @@ extern void radeonFallback( GLcontext *ctx, GLuint bit, GLboolean mode );
 | 
			
		||||
#define TEXMAT_2   5
 | 
			
		||||
 | 
			
		||||
extern void radeonUpdateSpecular( GLcontext *ctx );
 | 
			
		||||
extern void radeonClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq );
 | 
			
		||||
 | 
			
		||||
extern void radeonUploadMatrixTranspose( radeonContextPtr rmesa, GLfloat *src, 
 | 
			
		||||
					 int idx );
 | 
			
		||||
@@ -83,5 +82,18 @@ extern void radeonUploadMatrix( radeonContextPtr rmesa, GLfloat *src, int idx );
 | 
			
		||||
 | 
			
		||||
extern void radeonUpdateScissor( GLcontext *ctx );
 | 
			
		||||
 | 
			
		||||
/* radeon_lighting.c
 | 
			
		||||
 */
 | 
			
		||||
extern void radeonInitLightStateFuncs( GLcontext *ctx );
 | 
			
		||||
extern void radeonColorMaterial( GLcontext *ctx, GLenum face, GLenum mode );
 | 
			
		||||
extern void check_twoside_fallback( GLcontext *ctx );
 | 
			
		||||
extern void radeonUpdateLighting( GLcontext *ctx );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* radeon_userclip.c
 | 
			
		||||
 */
 | 
			
		||||
extern void radeonClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq );
 | 
			
		||||
extern void radeonInitUserClip( GLcontext *ctx );
 | 
			
		||||
extern void radeonUpdateClipPlanes( GLcontext *ctx );
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -33,13 +33,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __RADEON_TRIS_H__
 | 
			
		||||
#define __RADEON_TRIS_H__
 | 
			
		||||
#ifndef __RADEON_SWTCL_H__
 | 
			
		||||
#define __RADEON_SWTCL_H__
 | 
			
		||||
 | 
			
		||||
#include "mtypes.h"
 | 
			
		||||
#include "swrast/swrast.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Flags for software fallback cases */
 | 
			
		||||
/* See correponding strings in radeon_swtcl.c */
 | 
			
		||||
#define RADEON_FALLBACK_TEXTURE		0x0001
 | 
			
		||||
@@ -94,6 +93,7 @@ struct radeon_swtcl_info {
 | 
			
		||||
   struct radeon_dma_region indexed_verts;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern void radeonCreateTnlContext( GLcontext *ctx );
 | 
			
		||||
extern void radeonInitSwtcl( GLcontext *ctx );
 | 
			
		||||
extern void radeonDestroySwtcl( GLcontext *ctx );
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -40,6 +40,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
#include "mtypes.h"
 | 
			
		||||
#include "enums.h"
 | 
			
		||||
 | 
			
		||||
#include "radeon_context.h"
 | 
			
		||||
 | 
			
		||||
#if _HAVE_SWTNL
 | 
			
		||||
#include "array_cache/acache.h"
 | 
			
		||||
#include "tnl/tnl.h"
 | 
			
		||||
@@ -48,7 +50,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
#include "radeon_maos.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "radeon_context.h"
 | 
			
		||||
#include "radeon_state.h"
 | 
			
		||||
#include "radeon_ioctl.h"
 | 
			
		||||
#include "radeon_tex.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -39,6 +39,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
extern void radeonUpdateTextureState( GLcontext *ctx );
 | 
			
		||||
extern void radeonUpdateTextureMatrix( GLcontext *ctx );
 | 
			
		||||
extern GLboolean radeonUpdateTexgen( GLcontext *ctx, GLuint unit );
 | 
			
		||||
extern GLboolean radeonUpdateTextureEnvCombine( GLcontext *ctx, int unit );
 | 
			
		||||
 | 
			
		||||
extern int radeonUploadTexImages( radeonContextPtr rmesa, radeonTexObjPtr t );
 | 
			
		||||
 | 
			
		||||
@@ -52,4 +55,7 @@ extern void radeonUpdateTexLRU( radeonContextPtr rmesa, radeonTexObjPtr t );
 | 
			
		||||
 | 
			
		||||
extern void radeonInitTextureFuncs( GLcontext *ctx );
 | 
			
		||||
 | 
			
		||||
extern void radeonInitTexTransform( GLcontext *ctx );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif /* __RADEON_TEX_H__ */
 | 
			
		||||
 
 | 
			
		||||
@@ -140,6 +140,36 @@ struct radeon_vbinfo {
 | 
			
		||||
   GLvertexformat vtxfmt;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct radeon_vb {
 | 
			
		||||
   /* Keep these first: referenced from codegen templates:
 | 
			
		||||
    */
 | 
			
		||||
   GLint counter, initial_counter;
 | 
			
		||||
   GLint *dmaptr;
 | 
			
		||||
   void (*notify)( void );
 | 
			
		||||
   GLint vertex_size;
 | 
			
		||||
 | 
			
		||||
   /* A maximum total of 15 elements per vertex:  3 floats for position, 3
 | 
			
		||||
    * floats for normal, 4 floats for color, 4 bytes for secondary color,
 | 
			
		||||
    * 2 floats for each texture unit (4 floats total).
 | 
			
		||||
    * 
 | 
			
		||||
    * As soon as the 3rd TMU is supported or cube maps (or 3D textures) are
 | 
			
		||||
    * supported, this value will grow.
 | 
			
		||||
    * 
 | 
			
		||||
    * The position data is never actually stored here, so 3 elements could be
 | 
			
		||||
    * trimmed out of the buffer.
 | 
			
		||||
    */
 | 
			
		||||
   union { float f; int i; radeon_color_t color; } vertex[15];
 | 
			
		||||
 | 
			
		||||
   GLfloat *normalptr;
 | 
			
		||||
   GLfloat *floatcolorptr;
 | 
			
		||||
   radeon_color_t *colorptr;
 | 
			
		||||
   GLfloat *floatspecptr;
 | 
			
		||||
   radeon_color_t *specptr;
 | 
			
		||||
   GLfloat *texcoordptr[2];
 | 
			
		||||
 | 
			
		||||
   GLcontext *context;		/* current context : Single thread only! */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
extern struct radeon_vb vb;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -38,7 +38,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
#include "api_noop.h"
 | 
			
		||||
#include "vtxfmt.h"
 | 
			
		||||
 | 
			
		||||
#include "radeon_vtxfmt.h"
 | 
			
		||||
#include "radeon_context.h"
 | 
			
		||||
 | 
			
		||||
/* Fallback versions of all the entrypoints for situations where
 | 
			
		||||
 * codegen isn't available.  This is still a lot faster than the
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
#include "glheader.h"
 | 
			
		||||
#include "imports.h"
 | 
			
		||||
#include "simple_list.h" 
 | 
			
		||||
#include "radeon_vtxfmt.h"
 | 
			
		||||
#include "radeon_context.h"
 | 
			
		||||
 | 
			
		||||
#if defined(USE_SSE_ASM) && _HAVE_CODEGEN
 | 
			
		||||
#include "X86/common_x86_asm.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -36,7 +36,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
#include "imports.h"
 | 
			
		||||
#include "mmath.h" 
 | 
			
		||||
#include "simple_list.h" 
 | 
			
		||||
#include "radeon_vtxfmt.h"
 | 
			
		||||
#include "radeon_context.h"
 | 
			
		||||
 | 
			
		||||
#if defined(USE_X86_ASM)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1096,6 +1096,7 @@ static int __driInitFBDev( struct MiniGLXDisplayRec *dpy )
 | 
			
		||||
 | 
			
		||||
   if (!get_chipfamily_from_chipset( info )) {
 | 
			
		||||
      fprintf(stderr, "Unknown or non-radeon chipset -- cannot continue\n");
 | 
			
		||||
      fprintf(stderr, "==> Verify PCI BusID is correct in miniglx.conf\n");
 | 
			
		||||
      return 0;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,6 @@
 | 
			
		||||
/* $Id: glapi.h,v 1.20 2002/06/29 19:48:16 brianp Exp $ */
 | 
			
		||||
/**
 | 
			
		||||
 * \file glapi.h
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -24,6 +26,7 @@
 | 
			
		||||
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/* $Id: glapi.h,v 1.20.6.1 2003/03/02 00:27:35 jrfonseca Exp $ */
 | 
			
		||||
 | 
			
		||||
#ifndef _GLAPI_H
 | 
			
		||||
#define _GLAPI_H
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,8 @@
 | 
			
		||||
/* $Id: context.c,v 1.188.2.1.2.3 2003/02/21 21:14:08 keithw Exp $ */
 | 
			
		||||
/**
 | 
			
		||||
 * \file context.c
 | 
			
		||||
 * \brief Mesa context/visual/framebuffer management functions.
 | 
			
		||||
 * \author Brian Paul
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -24,7 +28,7 @@
 | 
			
		||||
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* $Id: context.c,v 1.188.2.1.2.5 2003/03/04 17:23:34 keithw Exp $ */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \mainpage Mesa Core Module
 | 
			
		||||
@@ -68,13 +72,6 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \file context.c
 | 
			
		||||
 * \brief Mesa context/visual/framebuffer management functions.
 | 
			
		||||
 * \author Brian Paul
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include "glheader.h"
 | 
			
		||||
#include "imports.h"
 | 
			
		||||
#include "buffers.h"
 | 
			
		||||
@@ -132,10 +129,12 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/*****       OpenGL SI-style interface (new in Mesa 3.5)          *****/
 | 
			
		||||
/** \name OpenGL SI-style interface (new in Mesa 3.5)                 */
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
/* Called by window system/device driver (via gc->exports.destroyCurrent())
 | 
			
		||||
/**
 | 
			
		||||
 * Called by window system/device driver (via gc->exports.destroyCurrent())
 | 
			
		||||
 * when the rendering context is to be destroyed.
 | 
			
		||||
 */
 | 
			
		||||
GLboolean
 | 
			
		||||
@@ -148,7 +147,8 @@ _mesa_destroyContext(__GLcontext *gc)
 | 
			
		||||
   return GL_TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Called by window system/device driver (via gc->exports.loseCurrent())
 | 
			
		||||
/**
 | 
			
		||||
 * Called by window system/device driver (via gc->exports.loseCurrent())
 | 
			
		||||
 * when the rendering context is made non-current.
 | 
			
		||||
 */
 | 
			
		||||
GLboolean
 | 
			
		||||
@@ -158,7 +158,8 @@ _mesa_loseCurrent(__GLcontext *gc)
 | 
			
		||||
   return GL_TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Called by window system/device driver (via gc->exports.makeCurrent())
 | 
			
		||||
/**
 | 
			
		||||
 * Called by window system/device driver (via gc->exports.makeCurrent())
 | 
			
		||||
 * when the rendering context is made current.
 | 
			
		||||
 */
 | 
			
		||||
GLboolean
 | 
			
		||||
@@ -168,7 +169,8 @@ _mesa_makeCurrent(__GLcontext *gc)
 | 
			
		||||
   return GL_TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Called by window system/device driver - yadda, yadda, yadda.
 | 
			
		||||
/**
 | 
			
		||||
 * Called by window system/device driver - yadda, yadda, yadda.
 | 
			
		||||
 * See above comments.
 | 
			
		||||
 */
 | 
			
		||||
GLboolean
 | 
			
		||||
@@ -219,14 +221,17 @@ _mesa_notifyResize(__GLcontext *gc)
 | 
			
		||||
   return GL_TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Called when the context's window/buffer is going to be destroyed. 
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
_mesa_notifyDestroy(__GLcontext *gc)
 | 
			
		||||
{
 | 
			
		||||
   /* Called when the context's window/buffer is going to be destroyed. */
 | 
			
		||||
   /* Unbind from it. */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Called by window system just before swapping buffers.
 | 
			
		||||
/**
 | 
			
		||||
 * Called by window system just before swapping buffers.
 | 
			
		||||
 * We have to finish any pending rendering.
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
@@ -251,9 +256,13 @@ _mesa_endDispatchOverride(__GLcontext *gc)
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Setup the exports.  The window system will call these functions
 | 
			
		||||
 * when it needs Mesa to do something.
 | 
			
		||||
 * NOTE: Device drivers should override these functions!  For example,
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Setup the exports.  
 | 
			
		||||
 *
 | 
			
		||||
 * The window system will call these functions when it needs Mesa to do
 | 
			
		||||
 * something.
 | 
			
		||||
 * 
 | 
			
		||||
 * \note Device drivers should override these functions!  For example,
 | 
			
		||||
 * the Xlib driver should plug in the XMesa*-style functions into this
 | 
			
		||||
 * structure.  The XMesa-style functions should then call the _mesa_*
 | 
			
		||||
 * version of these functions.  This is an approximation to OO design
 | 
			
		||||
@@ -276,9 +285,9 @@ _mesa_init_default_exports(__GLexports *exports)
 | 
			
		||||
    exports->endDispatchOverride = _mesa_endDispatchOverride;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* exported OpenGL SI interface */
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Exported OpenGL SI interface.
 | 
			
		||||
 */
 | 
			
		||||
__GLcontext *
 | 
			
		||||
__glCoreCreateContext(__GLimports *imports, __GLcontextModes *modes)
 | 
			
		||||
{
 | 
			
		||||
@@ -295,8 +304,9 @@ __glCoreCreateContext(__GLimports *imports, __GLcontextModes *modes)
 | 
			
		||||
    return ctx;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* exported OpenGL SI interface */
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Exported OpenGL SI interface.
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
__glCoreNopDispatch(void)
 | 
			
		||||
{
 | 
			
		||||
@@ -309,28 +319,34 @@ __glCoreNopDispatch(void)
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/***** GL Visual allocation/destruction                           *****/
 | 
			
		||||
/** \name GL Visual allocation/destruction                            */
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Allocate a new GLvisual object.
 | 
			
		||||
 * Input:  rgbFlag - GL_TRUE=RGB(A) mode, GL_FALSE=Color Index mode
 | 
			
		||||
 *         dbFlag - double buffering?
 | 
			
		||||
 *         stereoFlag - stereo buffer?
 | 
			
		||||
 *         depthBits - requested bits per depth buffer value
 | 
			
		||||
 *                     Any value in [0, 32] is acceptable but the actual
 | 
			
		||||
 *                     depth type will be GLushort or GLuint as needed.
 | 
			
		||||
 *         stencilBits - requested minimum bits per stencil buffer value
 | 
			
		||||
 *         accumBits - requested minimum bits per accum buffer component
 | 
			
		||||
 *         indexBits - number of bits per pixel if rgbFlag==GL_FALSE
 | 
			
		||||
 *         red/green/blue/alphaBits - number of bits per color component
 | 
			
		||||
 *                                    in frame buffer for RGB(A) mode.
 | 
			
		||||
 *                                    We always use 8 in core Mesa though.
 | 
			
		||||
 * Return:  pointer to new GLvisual or NULL if requested parameters can't
 | 
			
		||||
 *          be met.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Allocate a new GLvisual object.
 | 
			
		||||
 * 
 | 
			
		||||
 * \param rgbFlag GL_TRUE=RGB(A) mode, GL_FALSE=Color Index mode
 | 
			
		||||
 * \param dbFlag double buffering?
 | 
			
		||||
 * \param stereoFlag stereo buffer?
 | 
			
		||||
 * \param depthBits requested bits per depth buffer value. Any value in [0, 32]
 | 
			
		||||
 * is acceptable but the actual depth type will be GLushort or GLuint as
 | 
			
		||||
 * needed.
 | 
			
		||||
 * \param stencilBits requested minimum bits per stencil buffer value
 | 
			
		||||
 * \param accumBits requested minimum bits per accum buffer component
 | 
			
		||||
 * \param indexBits number of bits per pixel if rgbFlag==GL_FALSE
 | 
			
		||||
 * \param red number of bits per color component in frame buffer for RGB(A)
 | 
			
		||||
 * mode.  We always use 8 in core Mesa though.
 | 
			
		||||
 * \param green same as above.
 | 
			
		||||
 * \param blue same as above.
 | 
			
		||||
 * \param alphaBits same as above.
 | 
			
		||||
 * 
 | 
			
		||||
 * \return pointer to new GLvisual or NULL if requested parameters can't be
 | 
			
		||||
 * met.
 | 
			
		||||
 */
 | 
			
		||||
GLvisual *
 | 
			
		||||
_mesa_create_visual( GLboolean rgbFlag,
 | 
			
		||||
@@ -364,12 +380,12 @@ _mesa_create_visual( GLboolean rgbFlag,
 | 
			
		||||
   return vis;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Initialize the fields of the given GLvisual.
 | 
			
		||||
 * Input:  see _mesa_create_visual() above.
 | 
			
		||||
 * Return: GL_TRUE = success
 | 
			
		||||
 *         GL_FALSE = failure.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Initialize the fields of the given GLvisual.
 | 
			
		||||
 * 
 | 
			
		||||
 * \return GL_TRUE on success, or GL_FALSE on failure.
 | 
			
		||||
 *
 | 
			
		||||
 * \sa see _mesa_create_visual() above.
 | 
			
		||||
 */
 | 
			
		||||
GLboolean
 | 
			
		||||
_mesa_initialize_visual( GLvisual *vis,
 | 
			
		||||
@@ -446,29 +462,33 @@ _mesa_initialize_visual( GLvisual *vis,
 | 
			
		||||
   return GL_TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_mesa_destroy_visual( GLvisual *vis )
 | 
			
		||||
{
 | 
			
		||||
   FREE(vis);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/***** GL Framebuffer allocation/destruction                      *****/
 | 
			
		||||
/** \name GL Framebuffer allocation/destruction                       */
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Create a new framebuffer.  A GLframebuffer is a struct which
 | 
			
		||||
 * encapsulates the depth, stencil and accum buffers and related
 | 
			
		||||
 * parameters.
 | 
			
		||||
 * Input:  visual - a GLvisual pointer (we copy the struct contents)
 | 
			
		||||
 *         softwareDepth - create/use a software depth buffer?
 | 
			
		||||
 *         softwareStencil - create/use a software stencil buffer?
 | 
			
		||||
 *         softwareAccum - create/use a software accum buffer?
 | 
			
		||||
 *         softwareAlpha - create/use a software alpha buffer?
 | 
			
		||||
 * Return:  pointer to new GLframebuffer struct or NULL if error.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Create a new framebuffer.  
 | 
			
		||||
 *
 | 
			
		||||
 * A GLframebuffer is a struct which encapsulates the depth, stencil and accum
 | 
			
		||||
 * buffers and related parameters.
 | 
			
		||||
 * 
 | 
			
		||||
 * \param visual a GLvisual pointer (we copy the struct contents)
 | 
			
		||||
 * \param softwareDepth create/use a software depth buffer?
 | 
			
		||||
 * \param softwareStencil create/use a software stencil buffer?
 | 
			
		||||
 * \param softwareAccum create/use a software accum buffer?
 | 
			
		||||
 * \param softwareAlpha create/use a software alpha buffer?
 | 
			
		||||
 *
 | 
			
		||||
 * \return pointer to new GLframebuffer struct or NULL if error.
 | 
			
		||||
 */
 | 
			
		||||
GLframebuffer *
 | 
			
		||||
_mesa_create_framebuffer( const GLvisual *visual,
 | 
			
		||||
@@ -487,10 +507,10 @@ _mesa_create_framebuffer( const GLvisual *visual,
 | 
			
		||||
   return buffer;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Initialize a GLframebuffer object.
 | 
			
		||||
 * Input:  See _mesa_create_framebuffer() above.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Initialize a GLframebuffer object.
 | 
			
		||||
 * 
 | 
			
		||||
 * \sa _mesa_create_framebuffer() above.
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
_mesa_initialize_framebuffer( GLframebuffer *buffer,
 | 
			
		||||
@@ -531,8 +551,8 @@ _mesa_initialize_framebuffer( GLframebuffer *buffer,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Free a framebuffer struct and its buffers.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Free a framebuffer struct and its buffers.
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
_mesa_destroy_framebuffer( GLframebuffer *buffer )
 | 
			
		||||
@@ -544,8 +564,8 @@ _mesa_destroy_framebuffer( GLframebuffer *buffer )
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Free the data hanging off of <buffer>, but not <buffer> itself.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Free the data hanging off of \p buffer, but not \p buffer itself.
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
_mesa_free_framebuffer_data( GLframebuffer *buffer )
 | 
			
		||||
@@ -583,18 +603,18 @@ _mesa_free_framebuffer_data( GLframebuffer *buffer )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/*****       Context allocation, initialization, destroying       *****/
 | 
			
		||||
/** \name Context allocation, initialization, destroying       *****/
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
_glthread_DECLARE_STATIC_MUTEX(OneTimeLock);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * This function just calls all the various one-time-init functions in Mesa.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief This function just calls all the various one-time-init functions in Mesa.
 | 
			
		||||
 */
 | 
			
		||||
static void
 | 
			
		||||
one_time_init( GLcontext *ctx )
 | 
			
		||||
@@ -641,7 +661,6 @@ one_time_init( GLcontext *ctx )
 | 
			
		||||
   _glthread_UNLOCK_MUTEX(OneTimeLock);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
init_matrix_stack( struct matrix_stack *stack,
 | 
			
		||||
                   GLuint maxDepth, GLuint dirtyFlag )
 | 
			
		||||
@@ -660,7 +679,6 @@ init_matrix_stack( struct matrix_stack *stack,
 | 
			
		||||
   stack->Top = stack->Stack;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
free_matrix_stack( struct matrix_stack *stack )
 | 
			
		||||
{
 | 
			
		||||
@@ -672,9 +690,8 @@ free_matrix_stack( struct matrix_stack *stack )
 | 
			
		||||
   stack->Stack = stack->Top = NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Allocate and initialize a shared context state structure.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Allocate and initialize a shared context state structure.
 | 
			
		||||
 */
 | 
			
		||||
static struct gl_shared_state *
 | 
			
		||||
alloc_shared_state( void )
 | 
			
		||||
@@ -754,9 +771,8 @@ alloc_shared_state( void )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Deallocate a shared state context and all children structures.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Deallocate a shared state context and all children structures.
 | 
			
		||||
 */
 | 
			
		||||
static void
 | 
			
		||||
free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
 | 
			
		||||
@@ -799,11 +815,10 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
 | 
			
		||||
   FREE(ss);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Initialize the nth light.  Note that the defaults for light 0 are
 | 
			
		||||
 * different than the other lights.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Initialize the n-th light.  
 | 
			
		||||
 *
 | 
			
		||||
 * Note that the defaults for light 0 are different than the other lights.
 | 
			
		||||
 */
 | 
			
		||||
static void
 | 
			
		||||
init_light( struct gl_light *l, GLuint n )
 | 
			
		||||
@@ -831,8 +846,6 @@ init_light( struct gl_light *l, GLuint n )
 | 
			
		||||
   l->Enabled = GL_FALSE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
init_lightmodel( struct gl_lightmodel *lm )
 | 
			
		||||
{
 | 
			
		||||
@@ -842,7 +855,6 @@ init_lightmodel( struct gl_lightmodel *lm )
 | 
			
		||||
   lm->ColorControl = GL_SINGLE_COLOR;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
init_material( struct gl_material *m )
 | 
			
		||||
{
 | 
			
		||||
@@ -856,8 +868,6 @@ init_material( struct gl_material *m )
 | 
			
		||||
   m->SpecularIndex = 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
init_texture_unit( GLcontext *ctx, GLuint unit )
 | 
			
		||||
{
 | 
			
		||||
@@ -910,9 +920,9 @@ init_texture_unit( GLcontext *ctx, GLuint unit )
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Initialize a 1-D evaluator map */
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Initialize a 1-D evaluator map.
 | 
			
		||||
 */
 | 
			
		||||
static void
 | 
			
		||||
init_1d_map( struct gl_1d_map *map, int n, const float *initial )
 | 
			
		||||
{
 | 
			
		||||
@@ -928,7 +938,9 @@ init_1d_map( struct gl_1d_map *map, int n, const float *initial )
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Initialize a 2-D evaluator map */
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Initialize a 2-D evaluator map 
 | 
			
		||||
 */
 | 
			
		||||
static void
 | 
			
		||||
init_2d_map( struct gl_2d_map *map, int n, const float *initial )
 | 
			
		||||
{
 | 
			
		||||
@@ -946,9 +958,8 @@ init_2d_map( struct gl_2d_map *map, int n, const float *initial )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Initialize the attribute groups in a GLcontext.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Initialize the attribute groups in a GLcontext.
 | 
			
		||||
 */
 | 
			
		||||
static void
 | 
			
		||||
init_attrib_groups( GLcontext *ctx )
 | 
			
		||||
@@ -1547,13 +1558,13 @@ init_attrib_groups( GLcontext *ctx )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Allocate the proxy textures.  If we run out of memory part way through
 | 
			
		||||
 * the allocations clean up and return GL_FALSE.
 | 
			
		||||
 * Return:  GL_TRUE=success, GL_FALSE=failure
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Allocate the proxy textures.  
 | 
			
		||||
 *
 | 
			
		||||
 * If we run out of memory part way through the allocations clean up and return
 | 
			
		||||
 * GL_FALSE.
 | 
			
		||||
 *
 | 
			
		||||
 * \return GL_TRUE on success, or GL_FALSE on failure
 | 
			
		||||
 */
 | 
			
		||||
static GLboolean
 | 
			
		||||
alloc_proxy_textures( GLcontext *ctx )
 | 
			
		||||
@@ -1645,7 +1656,6 @@ alloc_proxy_textures( GLcontext *ctx )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void add_debug_flags( const char *debug )
 | 
			
		||||
{
 | 
			
		||||
#ifdef MESA_DEBUG
 | 
			
		||||
@@ -1683,10 +1693,11 @@ static void add_debug_flags( const char *debug )
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Initialize a GLcontext struct.  This includes allocating all the
 | 
			
		||||
 * other structs and arrays which hang off of the context by pointers.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Initialize a GLcontext struct. 
 | 
			
		||||
 *
 | 
			
		||||
 * This includes allocating all the other structs and arrays which hang off of
 | 
			
		||||
 * the context by pointers.
 | 
			
		||||
 */
 | 
			
		||||
GLboolean
 | 
			
		||||
_mesa_initialize_context( GLcontext *ctx,
 | 
			
		||||
@@ -1883,7 +1894,9 @@ _mesa_initialize_context( GLcontext *ctx,
 | 
			
		||||
   ctx->SavePrefersFloat = GL_FALSE;
 | 
			
		||||
 | 
			
		||||
   /* Neutral tnl module stuff */
 | 
			
		||||
/*    _mesa_init_exec_vtxfmt( ctx ); */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   _mesa_init_exec_vtxfmt( ctx ); 
 | 
			
		||||
#endif
 | 
			
		||||
   ctx->TnlModule.Current = NULL;
 | 
			
		||||
   ctx->TnlModule.SwapCount = 0;
 | 
			
		||||
 | 
			
		||||
@@ -1920,15 +1933,15 @@ _mesa_initialize_context( GLcontext *ctx,
 | 
			
		||||
   return GL_TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Allocate and initialize a GLcontext structure.
 | 
			
		||||
 * Input:  visual - a GLvisual pointer (we copy the struct contents)
 | 
			
		||||
 *         sharelist - another context to share display lists with or NULL
 | 
			
		||||
 *         driver_ctx - pointer to device driver's context state struct
 | 
			
		||||
 *         direct - direct rendering?
 | 
			
		||||
 * Return:  pointer to a new __GLcontextRec or NULL if error.
 | 
			
		||||
 * \brief Allocate and initialize a GLcontext structure.
 | 
			
		||||
 *
 | 
			
		||||
 * \param visual a GLvisual pointer (we copy the struct contents)
 | 
			
		||||
 * \param sharelist another context to share display lists with or NULL
 | 
			
		||||
 * \param driver_ctx pointer to device driver's context state struct
 | 
			
		||||
 * \param direct direct rendering?
 | 
			
		||||
 * 
 | 
			
		||||
 * \return pointer to a new __GLcontextRec or NULL if error.
 | 
			
		||||
 */
 | 
			
		||||
GLcontext *
 | 
			
		||||
_mesa_create_context( const GLvisual *visual,
 | 
			
		||||
@@ -1955,10 +1968,9 @@ _mesa_create_context( const GLvisual *visual,
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Free the data associated with the given context.
 | 
			
		||||
 * \brief Free the data associated with the given context.
 | 
			
		||||
 * 
 | 
			
		||||
 * But don't free() the GLcontext struct itself!
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
@@ -2073,10 +2085,8 @@ _mesa_free_context_data( GLcontext *ctx )
 | 
			
		||||
   FREE(ctx->Save);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Destroy a GLcontext structure.
 | 
			
		||||
 * \brief Destroy a GLcontext structure.
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
_mesa_destroy_context( GLcontext *ctx )
 | 
			
		||||
@@ -2087,13 +2097,12 @@ _mesa_destroy_context( GLcontext *ctx )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copy attribute groups from one context to another.
 | 
			
		||||
 * Input:  src - source context
 | 
			
		||||
 *         dst - destination context
 | 
			
		||||
 *         mask - bitwise OR of GL_*_BIT flags
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Copy attribute groups from one context to another.
 | 
			
		||||
 * 
 | 
			
		||||
 * \param src source context
 | 
			
		||||
 * \param dst destination context
 | 
			
		||||
 * \param mask bitwise OR of GL_*_BIT flags
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
_mesa_copy_context( const GLcontext *src, GLcontext *dst, GLuint mask )
 | 
			
		||||
@@ -2202,8 +2211,6 @@ _mesa_copy_context( const GLcontext *src, GLcontext *dst, GLuint mask )
 | 
			
		||||
   dst->NewState = _NEW_ALL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void print_info( void )
 | 
			
		||||
{
 | 
			
		||||
   _mesa_debug(NULL, "Mesa GL_VERSION = %s\n",
 | 
			
		||||
@@ -2231,9 +2238,8 @@ static void print_info( void )
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Set the current context, binding the given frame buffer to the context.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Set the current context, binding the given frame buffer to the context.
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
_mesa_make_current( GLcontext *newCtx, GLframebuffer *buffer )
 | 
			
		||||
@@ -2242,9 +2248,9 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *buffer )
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Bind the given context to the given draw-buffer and read-buffer
 | 
			
		||||
 * and make it the current context for this thread.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Bind the given context to the given draw-buffer and read-buffer and
 | 
			
		||||
 * make it the current context for this thread.
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
_mesa_make_current2( GLcontext *newCtx, GLframebuffer *drawBuffer,
 | 
			
		||||
@@ -2345,10 +2351,9 @@ _mesa_make_current2( GLcontext *newCtx, GLframebuffer *drawBuffer,
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Return current context handle for the calling thread.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Return current context handle for the calling thread.
 | 
			
		||||
 * 
 | 
			
		||||
 * This isn't the fastest way to get the current context.
 | 
			
		||||
 * If you need speed, see the GET_CURRENT_CONTEXT() macro in context.h
 | 
			
		||||
 */
 | 
			
		||||
@@ -2358,11 +2363,11 @@ _mesa_get_current_context( void )
 | 
			
		||||
   return (GLcontext *) _glapi_get_context();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Return pointer to this context's current API dispatch table.
 | 
			
		||||
 * It'll either be the immediate-mode execute dispatcher or the
 | 
			
		||||
 * display list compile dispatcher.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Return pointer to this context's current API dispatch table.
 | 
			
		||||
 *
 | 
			
		||||
 * It'll either be the immediate-mode execute dispatcher or the display list
 | 
			
		||||
 * compile dispatcher.
 | 
			
		||||
 */
 | 
			
		||||
struct _glapi_table *
 | 
			
		||||
_mesa_get_dispatch(GLcontext *ctx)
 | 
			
		||||
@@ -2370,15 +2375,17 @@ _mesa_get_dispatch(GLcontext *ctx)
 | 
			
		||||
   return ctx->CurrentDispatch;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/*****                Miscellaneous functions                     *****/
 | 
			
		||||
/** \name Miscellaneous functions                     *****/
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
/**
 | 
			
		||||
 * Record the given error code and call the driver's Error function if defined.
 | 
			
		||||
 *
 | 
			
		||||
 * This is called via _mesa_error().
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
@@ -2397,7 +2404,6 @@ _mesa_record_error( GLcontext *ctx, GLenum error )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_mesa_Finish( void )
 | 
			
		||||
{
 | 
			
		||||
@@ -2408,8 +2414,6 @@ _mesa_Finish( void )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_mesa_Flush( void )
 | 
			
		||||
{
 | 
			
		||||
@@ -2420,8 +2424,9 @@ _mesa_Flush( void )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Primitive names
 | 
			
		||||
 */
 | 
			
		||||
const char *_mesa_prim_name[GL_POLYGON+4] = {
 | 
			
		||||
   "GL_POINTS",
 | 
			
		||||
   "GL_LINES",
 | 
			
		||||
@@ -2437,3 +2442,5 @@ const char *_mesa_prim_name[GL_POLYGON+4] = {
 | 
			
		||||
   "inside unkown primitive",
 | 
			
		||||
   "unknown state"
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*@{*/
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,23 @@
 | 
			
		||||
/* $Id: context.h,v 1.35 2002/10/24 23:57:20 brianp Exp $ */
 | 
			
		||||
/**
 | 
			
		||||
 * \file context.h
 | 
			
		||||
 * \brief Context.
 | 
			
		||||
 *
 | 
			
		||||
 * There are three Mesa datatypes which are meant to be used by device
 | 
			
		||||
 * drivers:
 | 
			
		||||
 * - GLcontext: this contains the Mesa rendering state
 | 
			
		||||
 * - GLvisual:  this describes the color buffer (RGB vs. ci), whether or not
 | 
			
		||||
 *   there's a depth buffer, stencil buffer, etc.
 | 
			
		||||
 * - GLframebuffer:  contains pointers to the depth buffer, stencil buffer,
 | 
			
		||||
 *   accum buffer and alpha buffers.
 | 
			
		||||
 *
 | 
			
		||||
 * These types should be encapsulated by corresponding device driver
 | 
			
		||||
 * datatypes.  See xmesa.h and xmesaP.h for an example.
 | 
			
		||||
 *
 | 
			
		||||
 * In OOP terms, GLcontext, GLvisual, and GLframebuffer are base classes
 | 
			
		||||
 * which the device driver must derive from.
 | 
			
		||||
 *
 | 
			
		||||
 * The following functions create and destroy these datatypes.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -24,6 +43,7 @@
 | 
			
		||||
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/* $Id: context.h,v 1.35.4.1 2003/03/02 00:27:32 jrfonseca Exp $ */
 | 
			
		||||
 | 
			
		||||
#ifndef CONTEXT_H
 | 
			
		||||
#define CONTEXT_H
 | 
			
		||||
@@ -33,28 +53,10 @@
 | 
			
		||||
#include "mtypes.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * There are three Mesa datatypes which are meant to be used by device
 | 
			
		||||
 * drivers:
 | 
			
		||||
 *   GLcontext:  this contains the Mesa rendering state
 | 
			
		||||
 *   GLvisual:  this describes the color buffer (rgb vs. ci), whether
 | 
			
		||||
 *              or not there's a depth buffer, stencil buffer, etc.
 | 
			
		||||
 *   GLframebuffer:  contains pointers to the depth buffer, stencil
 | 
			
		||||
 *                   buffer, accum buffer and alpha buffers.
 | 
			
		||||
 *
 | 
			
		||||
 * These types should be encapsulated by corresponding device driver
 | 
			
		||||
 * datatypes.  See xmesa.h and xmesaP.h for an example.
 | 
			
		||||
 *
 | 
			
		||||
 * In OOP terms, GLcontext, GLvisual, and GLframebuffer are base classes
 | 
			
		||||
 * which the device driver must derive from.
 | 
			
		||||
 *
 | 
			
		||||
 * The following functions create and destroy these datatypes.
 | 
			
		||||
 */
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/** \name Create/destroy a GLvisual. */
 | 
			
		||||
/*@{*/
 | 
			
		||||
 
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Create/destroy a GLvisual.
 | 
			
		||||
 */
 | 
			
		||||
extern GLvisual *
 | 
			
		||||
_mesa_create_visual( GLboolean rgbFlag,
 | 
			
		||||
                     GLboolean dbFlag,
 | 
			
		||||
@@ -93,11 +95,13 @@ _mesa_initialize_visual( GLvisual *v,
 | 
			
		||||
extern void
 | 
			
		||||
_mesa_destroy_visual( GLvisual *vis );
 | 
			
		||||
 | 
			
		||||
/*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Create/destroy a GLframebuffer.
 | 
			
		||||
 */
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/** \name Create/destroy a GLframebuffer. */
 | 
			
		||||
/*@{*/
 | 
			
		||||
 
 | 
			
		||||
extern GLframebuffer *
 | 
			
		||||
_mesa_create_framebuffer( const GLvisual *visual,
 | 
			
		||||
                          GLboolean softwareDepth,
 | 
			
		||||
@@ -119,11 +123,13 @@ _mesa_free_framebuffer_data( GLframebuffer *buffer );
 | 
			
		||||
extern void
 | 
			
		||||
_mesa_destroy_framebuffer( GLframebuffer *buffer );
 | 
			
		||||
 | 
			
		||||
/*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Create/destroy a GLcontext.
 | 
			
		||||
 */
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/** \name Create/destroy a GLcontext. */
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
extern GLcontext *
 | 
			
		||||
_mesa_create_context( const GLvisual *visual,
 | 
			
		||||
                      GLcontext *share_list,
 | 
			
		||||
@@ -160,10 +166,13 @@ _mesa_make_current2( GLcontext *ctx, GLframebuffer *drawBuffer,
 | 
			
		||||
extern GLcontext *
 | 
			
		||||
_mesa_get_current_context(void);
 | 
			
		||||
 | 
			
		||||
/*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Macros for fetching current context.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Macro for fetching the current context.
 | 
			
		||||
 *
 | 
			
		||||
 * It should be used in the variable declaration area of a function.
 | 
			
		||||
 */
 | 
			
		||||
#ifdef THREADS
 | 
			
		||||
 | 
			
		||||
@@ -177,7 +186,9 @@ _mesa_get_current_context(void);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* OpenGL SI-style export functions. */
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/** \name OpenGL SI-style export functions. */
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
extern GLboolean
 | 
			
		||||
_mesa_destroyContext(__GLcontext *gc);
 | 
			
		||||
@@ -215,6 +226,7 @@ _mesa_beginDispatchOverride(__GLcontext *gc);
 | 
			
		||||
extern void
 | 
			
		||||
_mesa_endDispatchOverride(__GLcontext *gc);
 | 
			
		||||
 | 
			
		||||
/*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
extern struct _glapi_table *
 | 
			
		||||
@@ -222,9 +234,9 @@ _mesa_get_dispatch(GLcontext *ctx);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Miscellaneous
 | 
			
		||||
 */
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/** \name Miscellaneous */
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
extern void
 | 
			
		||||
_mesa_record_error( GLcontext *ctx, GLenum error );
 | 
			
		||||
@@ -236,5 +248,6 @@ _mesa_Finish( void );
 | 
			
		||||
extern void
 | 
			
		||||
_mesa_Flush( void );
 | 
			
		||||
 | 
			
		||||
/*@}*/
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,7 @@
 | 
			
		||||
/* $Id: dd.h,v 1.74 2002/10/11 17:41:04 brianp Exp $ */
 | 
			
		||||
/**
 | 
			
		||||
 * \file dd.h
 | 
			
		||||
 * \brief Device driver interfaces.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -24,6 +27,7 @@
 | 
			
		||||
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/* $Id: dd.h,v 1.74.6.1 2003/03/02 00:27:33 jrfonseca Exp $ */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef DD_INCLUDED
 | 
			
		||||
@@ -47,136 +51,181 @@ struct gl_pixelstore_attrib;
 | 
			
		||||
#define DD_STENCIL_BIT     GL_STENCIL_BUFFER_BIT  /* 0x00000400 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Device Driver function table.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Device driver function table.
 | 
			
		||||
 */
 | 
			
		||||
struct dd_function_table {
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Return a string as needed by glGetString().
 | 
			
		||||
    *
 | 
			
		||||
    * Only the GL_RENDERER token must be implemented.  Otherwise, NULL can be
 | 
			
		||||
    * returned.
 | 
			
		||||
    */
 | 
			
		||||
   const GLubyte * (*GetString)( GLcontext *ctx, GLenum name );
 | 
			
		||||
   /* Return a string as needed by glGetString().
 | 
			
		||||
    * Only the GL_RENDERER token must be implemented.  Otherwise,
 | 
			
		||||
    * NULL can be returned.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Notify the driver after Mesa has made some internal state changes.  
 | 
			
		||||
    *
 | 
			
		||||
    * This is in addition to any statechange callbacks Mesa may already have
 | 
			
		||||
    * made.
 | 
			
		||||
    */
 | 
			
		||||
   void (*UpdateState)( GLcontext *ctx, GLuint new_state );
 | 
			
		||||
   /*
 | 
			
		||||
    * UpdateState() is called to notify the driver after Mesa has made
 | 
			
		||||
    * some internal state changes.  This is in addition to any
 | 
			
		||||
    * statechange callbacks Mesa may already have made.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   void (*Clear)( GLcontext *ctx, GLbitfield mask, GLboolean all,
 | 
			
		||||
		  GLint x, GLint y, GLint width, GLint height );
 | 
			
		||||
   /* Clear the color/depth/stencil/accum buffer(s).
 | 
			
		||||
    * 'mask' is a bitmask of the DD_*_BIT values defined above that indicates
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Clear the color/depth/stencil/accum buffer(s).
 | 
			
		||||
    *
 | 
			
		||||
    * \p mask is a bitmask of the DD_*_BIT values defined above that indicates
 | 
			
		||||
    * which buffers need to be cleared.
 | 
			
		||||
    * If 'all' is true then the clear the whole buffer, else clear only the
 | 
			
		||||
    * region defined by (x,y,width,height).
 | 
			
		||||
    * This function must obey the glColorMask, glIndexMask and glStencilMask
 | 
			
		||||
    * If \p all is true then clear the whole buffer, else clear only the
 | 
			
		||||
    * region defined by \c (x, y, width, height).
 | 
			
		||||
    * This function must obey the glColorMask(), glIndexMask() and glStencilMask()
 | 
			
		||||
    * settings!
 | 
			
		||||
    * Software Mesa can do masked clears if the device driver can't.
 | 
			
		||||
    */
 | 
			
		||||
   void (*Clear)( GLcontext *ctx, GLbitfield mask, GLboolean all,
 | 
			
		||||
		  GLint x, GLint y, GLint width, GLint height );
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Specify the current buffer for writing.  
 | 
			
		||||
    *
 | 
			
		||||
    * Called via glDrawBuffer().  Note the driver must organize fallbacks (e.g.
 | 
			
		||||
    * with swrast) if it cannot implement the requested mode.
 | 
			
		||||
    */
 | 
			
		||||
   void (*DrawBuffer)( GLcontext *ctx, GLenum buffer );
 | 
			
		||||
   /*
 | 
			
		||||
    * Specifies the current buffer for writing.  Called via glDrawBuffer().
 | 
			
		||||
    * Note the driver must organize fallbacks (eg with swrast) if it
 | 
			
		||||
    * cannot implement the requested mode.
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Specifies the current buffer for reading.  
 | 
			
		||||
    *
 | 
			
		||||
    * Called via glReadBuffer().
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   void (*ReadBuffer)( GLcontext *ctx, GLenum buffer );
 | 
			
		||||
   /*
 | 
			
		||||
    * Specifies the current buffer for reading.  Called via glReadBuffer().
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   void (*GetBufferSize)( GLframebuffer *buffer,
 | 
			
		||||
                          GLuint *width, GLuint *height );
 | 
			
		||||
   /*
 | 
			
		||||
    * Returns the width and height of the named buffer/window.
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Get the width and height of the named buffer/window.
 | 
			
		||||
    *
 | 
			
		||||
    * Mesa uses this to determine when the driver's window size has changed.
 | 
			
		||||
    */
 | 
			
		||||
   void (*GetBufferSize)( GLframebuffer *buffer,
 | 
			
		||||
                          GLuint *width, GLuint *height );
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Resize the driver's depth/stencil/accum/back buffers to match the
 | 
			
		||||
    * size given in the GLframebuffer struct.  
 | 
			
		||||
    *
 | 
			
		||||
    * This is typically called when Mesa detects that a window size has changed.
 | 
			
		||||
    */
 | 
			
		||||
   void (*ResizeBuffers)( GLframebuffer *buffer );
 | 
			
		||||
   /*
 | 
			
		||||
    * Resize the driver's depth/stencil/accum/back buffers to match the
 | 
			
		||||
    * size given in the GLframebuffer struct.  This is typically called
 | 
			
		||||
    * when Mesa detects that a window size has changed.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief This is called whenever glFinish() is called.
 | 
			
		||||
    */
 | 
			
		||||
   void (*Finish)( GLcontext *ctx );
 | 
			
		||||
   /*
 | 
			
		||||
    * This is called whenever glFinish() is called.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief This is called whenever glFlush() is called.
 | 
			
		||||
    */
 | 
			
		||||
   void (*Flush)( GLcontext *ctx );
 | 
			
		||||
   /*
 | 
			
		||||
    * This is called whenever glFlush() is called.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   void (*Error)( GLcontext *ctx );
 | 
			
		||||
   /*
 | 
			
		||||
    * Called whenever an error is generated.  ctx->ErrorValue contains
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called whenever an error is generated.  ctx->ErrorValue contains
 | 
			
		||||
    * the error value.
 | 
			
		||||
    */
 | 
			
		||||
   void (*Error)( GLcontext *ctx );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   /***
 | 
			
		||||
    *** For hardware accumulation buffer:
 | 
			
		||||
    ***/
 | 
			
		||||
   /**
 | 
			
		||||
    * \name For hardware accumulation buffer
 | 
			
		||||
    */
 | 
			
		||||
   /*@{*/
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Execute glAccum command within the given scissor region.
 | 
			
		||||
    */
 | 
			
		||||
   void (*Accum)( GLcontext *ctx, GLenum op, GLfloat value,
 | 
			
		||||
		  GLint xpos, GLint ypos, GLint width, GLint height );
 | 
			
		||||
   /* Execute glAccum command within the given scissor region.
 | 
			
		||||
   /*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \name glDraw(), glRead(), glCopyPixels() and glBitmap() functions
 | 
			
		||||
    */
 | 
			
		||||
   /*@{*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   /***
 | 
			
		||||
    *** glDraw/Read/CopyPixels and glBitmap functions:
 | 
			
		||||
    ***/
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief This is called by glDrawPixels().
 | 
			
		||||
    *
 | 
			
		||||
    * \p unpack describes how to unpack the source image data.
 | 
			
		||||
    */
 | 
			
		||||
   void (*DrawPixels)( GLcontext *ctx,
 | 
			
		||||
		       GLint x, GLint y, GLsizei width, GLsizei height,
 | 
			
		||||
		       GLenum format, GLenum type,
 | 
			
		||||
		       const struct gl_pixelstore_attrib *unpack,
 | 
			
		||||
		       const GLvoid *pixels );
 | 
			
		||||
   /* This is called by glDrawPixels.
 | 
			
		||||
    * 'unpack' describes how to unpack the source image data.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glReadPixels().
 | 
			
		||||
    */
 | 
			
		||||
   void (*ReadPixels)( GLcontext *ctx,
 | 
			
		||||
		       GLint x, GLint y, GLsizei width, GLsizei height,
 | 
			
		||||
		       GLenum format, GLenum type,
 | 
			
		||||
		       const struct gl_pixelstore_attrib *unpack,
 | 
			
		||||
		       GLvoid *dest );
 | 
			
		||||
   /* Called by glReadPixels.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Do a glCopyPixels().  
 | 
			
		||||
    *
 | 
			
		||||
    * This function must respect all rasterization state, glPixelTransfer(),
 | 
			
		||||
    * glPixelZoom(), etc.
 | 
			
		||||
    */
 | 
			
		||||
   void (*CopyPixels)( GLcontext *ctx,
 | 
			
		||||
                            GLint srcx, GLint srcy,
 | 
			
		||||
                            GLsizei width, GLsizei height,
 | 
			
		||||
                            GLint dstx, GLint dsty, GLenum type );
 | 
			
		||||
   /* Do a glCopyPixels.  This function must respect all rasterization
 | 
			
		||||
    * state, glPixelTransfer, glPixelZoom, etc.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief This is called by glBitmap().  
 | 
			
		||||
    *
 | 
			
		||||
    * Works the same as dd_function_table::DrawPixels, above.
 | 
			
		||||
    */
 | 
			
		||||
   void (*Bitmap)( GLcontext *ctx,
 | 
			
		||||
		   GLint x, GLint y, GLsizei width, GLsizei height,
 | 
			
		||||
		   const struct gl_pixelstore_attrib *unpack,
 | 
			
		||||
		   const GLubyte *bitmap );
 | 
			
		||||
   /* This is called by glBitmap.  Works the same as DrawPixels, above.
 | 
			
		||||
    */
 | 
			
		||||
   /*@}*/
 | 
			
		||||
 | 
			
		||||
   /***
 | 
			
		||||
    *** Texture image functions:
 | 
			
		||||
    ***/
 | 
			
		||||
   
 | 
			
		||||
   /**
 | 
			
		||||
    * \name Texture image functions
 | 
			
		||||
    */
 | 
			
		||||
   /*@{*/
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Choose texture format.
 | 
			
		||||
    * 
 | 
			
		||||
    * This is called by the \c _mesa_store_tex[sub]image[123]d() fallback
 | 
			
		||||
    * functions.  The driver should examine \p internalFormat and return a
 | 
			
		||||
    * pointer to an appropriate gl_texture_format.
 | 
			
		||||
    */
 | 
			
		||||
   const struct gl_texture_format *
 | 
			
		||||
   (*ChooseTextureFormat)( GLcontext *ctx, GLint internalFormat,
 | 
			
		||||
                           GLenum srcFormat, GLenum srcType );
 | 
			
		||||
   /* This is called by the _mesa_store_tex[sub]image[123]d() fallback
 | 
			
		||||
    * functions.  The driver should examine <internalFormat> and return a
 | 
			
		||||
    * pointer to an appropriate gl_texture_format.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glTexImage1D().
 | 
			
		||||
    * 
 | 
			
		||||
    * \param target user specified.
 | 
			
		||||
    * \param format user specified.
 | 
			
		||||
    * \param type user specified.
 | 
			
		||||
    * \param pixels user specified.
 | 
			
		||||
    * \param packing indicates the image packing of pixels.
 | 
			
		||||
    * \param texObj is the target texture object.
 | 
			
		||||
    * \param texImage is the target texture image.  It will have the texture \p
 | 
			
		||||
    * width, \p height, \p depth, \p border and \p internalFormat information.
 | 
			
		||||
    * 
 | 
			
		||||
    * \p retainInternalCopy is returned by this function and indicates whether
 | 
			
		||||
    * core Mesa should keep an internal copy of the texture image.
 | 
			
		||||
    *
 | 
			
		||||
    * Drivers should call a fallback routine from texstore.c if needed.
 | 
			
		||||
    */
 | 
			
		||||
   void (*TexImage1D)( GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
                       GLint internalFormat,
 | 
			
		||||
                       GLint width, GLint border,
 | 
			
		||||
@@ -184,6 +233,12 @@ struct dd_function_table {
 | 
			
		||||
                       const struct gl_pixelstore_attrib *packing,
 | 
			
		||||
                       struct gl_texture_object *texObj,
 | 
			
		||||
                       struct gl_texture_image *texImage );
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glTexImage2D().
 | 
			
		||||
    * 
 | 
			
		||||
    * \sa dd_function_table::TexImage1D.
 | 
			
		||||
    */
 | 
			
		||||
   void (*TexImage2D)( GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
                       GLint internalFormat,
 | 
			
		||||
                       GLint width, GLint height, GLint border,
 | 
			
		||||
@@ -191,6 +246,12 @@ struct dd_function_table {
 | 
			
		||||
                       const struct gl_pixelstore_attrib *packing,
 | 
			
		||||
                       struct gl_texture_object *texObj,
 | 
			
		||||
                       struct gl_texture_image *texImage );
 | 
			
		||||
   
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glTexImage3D().
 | 
			
		||||
    * 
 | 
			
		||||
    * \sa dd_function_table::TexImage1D.
 | 
			
		||||
    */
 | 
			
		||||
   void (*TexImage3D)( GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
                       GLint internalFormat,
 | 
			
		||||
                       GLint width, GLint height, GLint depth, GLint border,
 | 
			
		||||
@@ -198,18 +259,28 @@ struct dd_function_table {
 | 
			
		||||
                       const struct gl_pixelstore_attrib *packing,
 | 
			
		||||
                       struct gl_texture_object *texObj,
 | 
			
		||||
                       struct gl_texture_image *texImage );
 | 
			
		||||
   /* Called by glTexImage1/2/3D.
 | 
			
		||||
    * Arguments:
 | 
			
		||||
    *   <target>, <level>, <format>, <type> and <pixels> are user specified.
 | 
			
		||||
    *   <packing> indicates the image packing of pixels.
 | 
			
		||||
    *   <texObj> is the target texture object.
 | 
			
		||||
    *   <texImage> is the target texture image.  It will have the texture
 | 
			
		||||
    *      width, height, depth, border and internalFormat information.
 | 
			
		||||
    *   <retainInternalCopy> is returned by this function and indicates whether
 | 
			
		||||
    *      core Mesa should keep an internal copy of the texture image.
 | 
			
		||||
    * Drivers should call a fallback routine from texstore.c if needed.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glTexSubImage1D().
 | 
			
		||||
    *
 | 
			
		||||
    * \param target user specified.
 | 
			
		||||
    * \param level user specified.
 | 
			
		||||
    * \param xoffset user specified.
 | 
			
		||||
    * \param yoffset user specified.
 | 
			
		||||
    * \param zoffset user specified.
 | 
			
		||||
    * \param width user specified.
 | 
			
		||||
    * \param height user specified.
 | 
			
		||||
    * \param depth user specified.
 | 
			
		||||
    * \param format user specified.
 | 
			
		||||
    * \param type user specified.
 | 
			
		||||
    * \param pixels user specified.
 | 
			
		||||
    * \param packing indicates the image packing of pixels.
 | 
			
		||||
    * \param texObj is the target texture object.
 | 
			
		||||
    * \param texImage is the target texture image.  It will have the texture \p
 | 
			
		||||
    * width, \p height, \p border and \p internalFormat information.
 | 
			
		||||
    *
 | 
			
		||||
    * The driver should use a fallback routine from texstore.c if needed.
 | 
			
		||||
    */
 | 
			
		||||
   void (*TexSubImage1D)( GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
                          GLint xoffset, GLsizei width,
 | 
			
		||||
                          GLenum format, GLenum type,
 | 
			
		||||
@@ -217,6 +288,12 @@ struct dd_function_table {
 | 
			
		||||
                          const struct gl_pixelstore_attrib *packing,
 | 
			
		||||
                          struct gl_texture_object *texObj,
 | 
			
		||||
                          struct gl_texture_image *texImage );
 | 
			
		||||
   
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glTexSubImage2D().
 | 
			
		||||
    *
 | 
			
		||||
    * \sa dd_function_table::TexSubImage1D.
 | 
			
		||||
    */
 | 
			
		||||
   void (*TexSubImage2D)( GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
                          GLint xoffset, GLint yoffset,
 | 
			
		||||
                          GLsizei width, GLsizei height,
 | 
			
		||||
@@ -225,6 +302,12 @@ struct dd_function_table {
 | 
			
		||||
                          const struct gl_pixelstore_attrib *packing,
 | 
			
		||||
                          struct gl_texture_object *texObj,
 | 
			
		||||
                          struct gl_texture_image *texImage );
 | 
			
		||||
   
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glTexSubImage3D().
 | 
			
		||||
    *
 | 
			
		||||
    * \sa dd_function_table::TexSubImage1D.
 | 
			
		||||
    */
 | 
			
		||||
   void (*TexSubImage3D)( GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
                          GLint xoffset, GLint yoffset, GLint zoffset,
 | 
			
		||||
                          GLsizei width, GLsizei height, GLint depth,
 | 
			
		||||
@@ -233,68 +316,108 @@ struct dd_function_table {
 | 
			
		||||
                          const struct gl_pixelstore_attrib *packing,
 | 
			
		||||
                          struct gl_texture_object *texObj,
 | 
			
		||||
                          struct gl_texture_image *texImage );
 | 
			
		||||
   /* Called by glTexSubImage1/2/3D.
 | 
			
		||||
    * Arguments:
 | 
			
		||||
    *   <target>, <level>, <xoffset>, <yoffset>, <zoffset>, <width>, <height>,
 | 
			
		||||
    *      <depth>, <format>, <type> and <pixels> are user specified.
 | 
			
		||||
    *   <packing> indicates the image packing of pixels.
 | 
			
		||||
    *   <texObj> is the target texture object.
 | 
			
		||||
    *   <texImage> is the target texture image.  It will have the texture
 | 
			
		||||
    *      width, height, border and internalFormat information.
 | 
			
		||||
    * The driver should use a fallback routine from texstore.c if needed.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glCopyTexImage1D().
 | 
			
		||||
    * 
 | 
			
		||||
    * Drivers should use a fallback routine from texstore.c if needed.
 | 
			
		||||
    */
 | 
			
		||||
   void (*CopyTexImage1D)( GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
                           GLenum internalFormat, GLint x, GLint y,
 | 
			
		||||
                           GLsizei width, GLint border );
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glCopyTexImage2D().
 | 
			
		||||
    * 
 | 
			
		||||
    * Drivers should use a fallback routine from texstore.c if needed.
 | 
			
		||||
    */
 | 
			
		||||
   void (*CopyTexImage2D)( GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
                           GLenum internalFormat, GLint x, GLint y,
 | 
			
		||||
                           GLsizei width, GLsizei height, GLint border );
 | 
			
		||||
   /* Called by glCopyTexImage1D and glCopyTexImage2D.
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glCopyTexSubImage1D().
 | 
			
		||||
    * 
 | 
			
		||||
    * Drivers should use a fallback routine from texstore.c if needed.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   void (*CopyTexSubImage1D)( GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
                              GLint xoffset,
 | 
			
		||||
                              GLint x, GLint y, GLsizei width );
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glCopyTexSubImage2D().
 | 
			
		||||
    * 
 | 
			
		||||
    * Drivers should use a fallback routine from texstore.c if needed.
 | 
			
		||||
    */
 | 
			
		||||
   void (*CopyTexSubImage2D)( GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
                              GLint xoffset, GLint yoffset,
 | 
			
		||||
                              GLint x, GLint y,
 | 
			
		||||
                              GLsizei width, GLsizei height );
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glCopyTexSubImage3D().
 | 
			
		||||
    * 
 | 
			
		||||
    * Drivers should use a fallback routine from texstore.c if needed.
 | 
			
		||||
    */
 | 
			
		||||
   void (*CopyTexSubImage3D)( GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
                              GLint xoffset, GLint yoffset, GLint zoffset,
 | 
			
		||||
                              GLint x, GLint y,
 | 
			
		||||
                              GLsizei width, GLsizei height );
 | 
			
		||||
   /* Called by glCopyTexSubImage1/2/3D.
 | 
			
		||||
    * Drivers should use a fallback routine from texstore.c if needed.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glTexImage[123]D when user specifies a proxy texture
 | 
			
		||||
    * target.  
 | 
			
		||||
    *
 | 
			
		||||
    * \return GL_TRUE if the proxy test passes, or GL_FALSE if the test fails.
 | 
			
		||||
    */
 | 
			
		||||
   GLboolean (*TestProxyTexImage)(GLcontext *ctx, GLenum target,
 | 
			
		||||
                                  GLint level, GLint internalFormat,
 | 
			
		||||
                                  GLenum format, GLenum type,
 | 
			
		||||
                                  GLint width, GLint height,
 | 
			
		||||
                                  GLint depth, GLint border);
 | 
			
		||||
   /* Called by glTexImage[123]D when user specifies a proxy texture
 | 
			
		||||
    * target.  Return GL_TRUE if the proxy test passes, return GL_FALSE
 | 
			
		||||
    * if the test fails.
 | 
			
		||||
   /*@}*/
 | 
			
		||||
 | 
			
		||||
   
 | 
			
		||||
   /**
 | 
			
		||||
    * \name Compressed texture functions
 | 
			
		||||
    */
 | 
			
		||||
   /*@{*/
 | 
			
		||||
 | 
			
		||||
   /***
 | 
			
		||||
    *** Compressed texture functions:
 | 
			
		||||
    ***/
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glCompressedTexImage1D().
 | 
			
		||||
    *
 | 
			
		||||
    * \param target user specified.
 | 
			
		||||
    * \param format user specified.
 | 
			
		||||
    * \param type user specified.
 | 
			
		||||
    * \param pixels user specified.
 | 
			
		||||
    * \param packing indicates the image packing of pixels.
 | 
			
		||||
    * \param texObj is the target texture object.
 | 
			
		||||
    * \param texImage is the target texture image.  It will have the texture \p
 | 
			
		||||
    * width, \p height, \p depth, \p border and \p internalFormat information.
 | 
			
		||||
    *      
 | 
			
		||||
    * \a retainInternalCopy is returned by this function and indicates whether
 | 
			
		||||
    * core Mesa should keep an internal copy of the texture image.
 | 
			
		||||
    */
 | 
			
		||||
   void (*CompressedTexImage1D)( GLcontext *ctx, GLenum target,
 | 
			
		||||
                                 GLint level, GLint internalFormat,
 | 
			
		||||
                                 GLsizei width, GLint border,
 | 
			
		||||
                                 GLsizei imageSize, const GLvoid *data,
 | 
			
		||||
                                 struct gl_texture_object *texObj,
 | 
			
		||||
                                 struct gl_texture_image *texImage );
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glCompressedTexImage2D().
 | 
			
		||||
    *
 | 
			
		||||
    * \sa dd_function_table::glCompressedTexImage1D.
 | 
			
		||||
    */
 | 
			
		||||
   void (*CompressedTexImage2D)( GLcontext *ctx, GLenum target,
 | 
			
		||||
                                 GLint level, GLint internalFormat,
 | 
			
		||||
                                 GLsizei width, GLsizei height, GLint border,
 | 
			
		||||
                                 GLsizei imageSize, const GLvoid *data,
 | 
			
		||||
                                 struct gl_texture_object *texObj,
 | 
			
		||||
                                 struct gl_texture_image *texImage );
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glCompressedTexImage3D().
 | 
			
		||||
    *
 | 
			
		||||
    * \sa dd_function_table::glCompressedTexImage3D.
 | 
			
		||||
    */
 | 
			
		||||
   void (*CompressedTexImage3D)( GLcontext *ctx, GLenum target,
 | 
			
		||||
                                 GLint level, GLint internalFormat,
 | 
			
		||||
                                 GLsizei width, GLsizei height, GLsizei depth,
 | 
			
		||||
@@ -302,24 +425,35 @@ struct dd_function_table {
 | 
			
		||||
                                 GLsizei imageSize, const GLvoid *data,
 | 
			
		||||
                                 struct gl_texture_object *texObj,
 | 
			
		||||
                                 struct gl_texture_image *texImage );
 | 
			
		||||
   /* Called by glCompressedTexImage1/2/3D.
 | 
			
		||||
    * Arguments:
 | 
			
		||||
    *   <target>, <level>, <internalFormat>, <data> are user specified.
 | 
			
		||||
    *   <texObj> is the target texture object.
 | 
			
		||||
    *   <texImage> is the target texture image.  It will have the texture
 | 
			
		||||
    *      width, height, depth, border and internalFormat information.
 | 
			
		||||
    *   <retainInternalCopy> is returned by this function and indicates whether
 | 
			
		||||
    *      core Mesa should keep an internal copy of the texture image.
 | 
			
		||||
    * Return GL_TRUE if operation completed, return GL_FALSE if core Mesa
 | 
			
		||||
    * should do the job.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glCompressedTexSubImage1D().
 | 
			
		||||
    * 
 | 
			
		||||
    * \param target user specified.
 | 
			
		||||
    * \param level user specified.
 | 
			
		||||
    * \param xoffset user specified.
 | 
			
		||||
    * \param yoffset user specified.
 | 
			
		||||
    * \param zoffset user specified.
 | 
			
		||||
    * \param width user specified.
 | 
			
		||||
    * \param height user specified.
 | 
			
		||||
    * \param depth user specified.
 | 
			
		||||
    * \param imageSize user specified.
 | 
			
		||||
    * \param data user specified.
 | 
			
		||||
    * \param texObj is the target texture object.
 | 
			
		||||
    * \param texImage is the target texture image.  It will have the texture \p
 | 
			
		||||
    * width, \p height, \p depth, \p border and \p internalFormat information.
 | 
			
		||||
    */
 | 
			
		||||
   void (*CompressedTexSubImage1D)(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
                                   GLint xoffset, GLsizei width,
 | 
			
		||||
                                   GLenum format,
 | 
			
		||||
                                   GLsizei imageSize, const GLvoid *data,
 | 
			
		||||
                                   struct gl_texture_object *texObj,
 | 
			
		||||
                                   struct gl_texture_image *texImage);
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glCompressedTexSubImage2D().
 | 
			
		||||
    *
 | 
			
		||||
    * \sa dd_function_table::glCompressedTexImage3D.
 | 
			
		||||
    */
 | 
			
		||||
   void (*CompressedTexSubImage2D)(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
                                   GLint xoffset, GLint yoffset,
 | 
			
		||||
                                   GLsizei width, GLint height,
 | 
			
		||||
@@ -327,6 +461,11 @@ struct dd_function_table {
 | 
			
		||||
                                   GLsizei imageSize, const GLvoid *data,
 | 
			
		||||
                                   struct gl_texture_object *texObj,
 | 
			
		||||
                                   struct gl_texture_image *texImage);
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glCompressedTexSubImage3D().
 | 
			
		||||
    *
 | 
			
		||||
    * \sa dd_function_table::glCompressedTexImage3D.
 | 
			
		||||
    */
 | 
			
		||||
   void (*CompressedTexSubImage3D)(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
                                   GLint xoffset, GLint yoffset, GLint zoffset,
 | 
			
		||||
                                   GLsizei width, GLint height, GLint depth,
 | 
			
		||||
@@ -334,59 +473,64 @@ struct dd_function_table {
 | 
			
		||||
                                   GLsizei imageSize, const GLvoid *data,
 | 
			
		||||
                                   struct gl_texture_object *texObj,
 | 
			
		||||
                                   struct gl_texture_image *texImage);
 | 
			
		||||
   /* Called by glCompressedTexSubImage1/2/3D.
 | 
			
		||||
    * Arguments:
 | 
			
		||||
    *   <target>, <level>, <x/z/zoffset>, <width>, <height>, <depth>,
 | 
			
		||||
    *      <imageSize>, and <data> are user specified.
 | 
			
		||||
    *   <texObj> is the target texture object.
 | 
			
		||||
    *   <texImage> is the target texture image.  It will have the texture
 | 
			
		||||
    *      width, height, depth, border and internalFormat information.
 | 
			
		||||
    * Return GL_TRUE if operation completed, return GL_FALSE if core Mesa
 | 
			
		||||
    * should do the job.
 | 
			
		||||
   /*@}*/
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \name Texture object functions
 | 
			
		||||
    */
 | 
			
		||||
   /*@{*/
 | 
			
		||||
 | 
			
		||||
   /***
 | 
			
		||||
    *** Texture object functions:
 | 
			
		||||
    ***/
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glBindTexture().
 | 
			
		||||
    */
 | 
			
		||||
   void (*BindTexture)( GLcontext *ctx, GLenum target,
 | 
			
		||||
                        struct gl_texture_object *tObj );
 | 
			
		||||
   /* Called by glBindTexture().
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called when a texture object is created.
 | 
			
		||||
    */
 | 
			
		||||
   void (*CreateTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
 | 
			
		||||
   /* Called when a texture object is created.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called when a texture object is about to be deallocated.  
 | 
			
		||||
    *
 | 
			
		||||
    * Driver should free anything attached to the DriverData pointers.
 | 
			
		||||
    */
 | 
			
		||||
   void (*DeleteTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
 | 
			
		||||
   /* Called when a texture object is about to be deallocated.  Driver
 | 
			
		||||
    * should free anything attached to the DriverData pointers.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glAreTextureResident().
 | 
			
		||||
    */
 | 
			
		||||
   GLboolean (*IsTextureResident)( GLcontext *ctx,
 | 
			
		||||
                                   struct gl_texture_object *t );
 | 
			
		||||
   /* Called by glAreTextureResident().
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glPrioritizeTextures().
 | 
			
		||||
    */
 | 
			
		||||
   void (*PrioritizeTexture)( GLcontext *ctx,  struct gl_texture_object *t,
 | 
			
		||||
                              GLclampf priority );
 | 
			
		||||
   /* Called by glPrioritizeTextures().
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glActiveTextureARB() to set current texture unit.
 | 
			
		||||
    */
 | 
			
		||||
   void (*ActiveTexture)( GLcontext *ctx, GLuint texUnitNumber );
 | 
			
		||||
   /* Called by glActiveTextureARB to set current texture unit.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   void (*UpdateTexturePalette)( GLcontext *ctx,
 | 
			
		||||
                                 struct gl_texture_object *tObj );
 | 
			
		||||
   /* Called when the texture's color lookup table is changed.
 | 
			
		||||
    * If tObj is NULL then the shared texture palette ctx->Texture.Palette
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called when the texture's color lookup table is changed.
 | 
			
		||||
    * 
 | 
			
		||||
    * If \p tObj is NULL then the shared texture palette ctx->Texture.Palette
 | 
			
		||||
    * is to be updated.
 | 
			
		||||
    */
 | 
			
		||||
   void (*UpdateTexturePalette)( GLcontext *ctx,
 | 
			
		||||
                                 struct gl_texture_object *tObj );
 | 
			
		||||
   /*@}*/
 | 
			
		||||
 | 
			
		||||
   /***
 | 
			
		||||
    *** Imaging functionality:
 | 
			
		||||
    ***/
 | 
			
		||||
   
 | 
			
		||||
   /**
 | 
			
		||||
    * \name Imaging functionality
 | 
			
		||||
    * .
 | 
			
		||||
    */
 | 
			
		||||
   /*@{*/
 | 
			
		||||
   void (*CopyColorTable)( GLcontext *ctx,
 | 
			
		||||
			   GLenum target, GLenum internalformat,
 | 
			
		||||
			   GLint x, GLint y, GLsizei width );
 | 
			
		||||
@@ -403,16 +547,19 @@ struct dd_function_table {
 | 
			
		||||
				    GLenum internalFormat,
 | 
			
		||||
				    GLint x, GLint y,
 | 
			
		||||
				    GLsizei width, GLsizei height );
 | 
			
		||||
   /*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   /***
 | 
			
		||||
    *** State-changing functions (drawing functions are above)
 | 
			
		||||
    ***
 | 
			
		||||
    *** These functions are called by their corresponding OpenGL API functions.
 | 
			
		||||
    *** They're ALSO called by the gl_PopAttrib() function!!!
 | 
			
		||||
    *** May add more functions like these to the device driver in the future.
 | 
			
		||||
    ***/
 | 
			
		||||
   /**
 | 
			
		||||
    * \name State-changing functions.
 | 
			
		||||
    *
 | 
			
		||||
    * \note drawing functions are above.
 | 
			
		||||
    *
 | 
			
		||||
    * These functions are called by their corresponding OpenGL API functions.
 | 
			
		||||
    * They're \e also called by the gl_PopAttrib() function!!!
 | 
			
		||||
    * May add more functions like these to the device driver in the future.
 | 
			
		||||
    */
 | 
			
		||||
   /*@{*/
 | 
			
		||||
   void (*AlphaFunc)(GLcontext *ctx, GLenum func, GLfloat ref);
 | 
			
		||||
   void (*BlendColor)(GLcontext *ctx, const GLfloat color[4]);
 | 
			
		||||
   void (*BlendEquation)(GLcontext *ctx, GLenum mode);
 | 
			
		||||
@@ -465,12 +612,15 @@ struct dd_function_table {
 | 
			
		||||
                        GLenum pname, const GLfloat *params);
 | 
			
		||||
   void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat);
 | 
			
		||||
   void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
 | 
			
		||||
   /*@}*/
 | 
			
		||||
 | 
			
		||||
   /***
 | 
			
		||||
    *** Vertex array functions
 | 
			
		||||
    ***
 | 
			
		||||
    *** Called by the corresponding OpenGL functions.
 | 
			
		||||
    ***/
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \name Vertex array functions
 | 
			
		||||
    *
 | 
			
		||||
    * Called by the corresponding OpenGL functions.
 | 
			
		||||
    */
 | 
			
		||||
   /*@{*/
 | 
			
		||||
   void (*VertexPointer)(GLcontext *ctx, GLint size, GLenum type,
 | 
			
		||||
			 GLsizei stride, const GLvoid *ptr);
 | 
			
		||||
   void (*NormalPointer)(GLcontext *ctx, GLenum type,
 | 
			
		||||
@@ -488,111 +638,164 @@ struct dd_function_table {
 | 
			
		||||
   void (*EdgeFlagPointer)(GLcontext *ctx, GLsizei stride, const GLvoid *ptr);
 | 
			
		||||
   void (*VertexAttribPointer)(GLcontext *ctx, GLuint index, GLint size,
 | 
			
		||||
                               GLenum type, GLsizei stride, const GLvoid *ptr);
 | 
			
		||||
   /*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   /*** State-query functions
 | 
			
		||||
    ***
 | 
			
		||||
    *** Return GL_TRUE if query was completed, GL_FALSE otherwise.
 | 
			
		||||
    ***/
 | 
			
		||||
   /** 
 | 
			
		||||
    * \name State-query functions
 | 
			
		||||
    *
 | 
			
		||||
    * Return GL_TRUE if query was completed, GL_FALSE otherwise.
 | 
			
		||||
    */
 | 
			
		||||
   /*@{*/
 | 
			
		||||
   GLboolean (*GetBooleanv)(GLcontext *ctx, GLenum pname, GLboolean *result);
 | 
			
		||||
   GLboolean (*GetDoublev)(GLcontext *ctx, GLenum pname, GLdouble *result);
 | 
			
		||||
   GLboolean (*GetFloatv)(GLcontext *ctx, GLenum pname, GLfloat *result);
 | 
			
		||||
   GLboolean (*GetIntegerv)(GLcontext *ctx, GLenum pname, GLint *result);
 | 
			
		||||
   GLboolean (*GetPointerv)(GLcontext *ctx, GLenum pname, GLvoid **result);
 | 
			
		||||
   /*@}*/
 | 
			
		||||
   
 | 
			
		||||
   /***
 | 
			
		||||
    *** Support for multiple t&l engines
 | 
			
		||||
    ***/
 | 
			
		||||
 | 
			
		||||
   GLuint NeedValidate;
 | 
			
		||||
   /* Bitmask of state changes that require the current tnl module to be
 | 
			
		||||
   /**
 | 
			
		||||
    * \name Support for multiple T&L engines
 | 
			
		||||
    */
 | 
			
		||||
   /*@{*/
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Bitmask of state changes that require the current T&L module to be
 | 
			
		||||
    * validated, using ValidateTnlModule() below.
 | 
			
		||||
    */
 | 
			
		||||
   GLuint NeedValidate;
 | 
			
		||||
 | 
			
		||||
   void (*ValidateTnlModule)( GLcontext *ctx, GLuint new_state );
 | 
			
		||||
   /* Validate the current tnl module.  This is called directly after
 | 
			
		||||
    * UpdateState() when a state change that has occured matches the
 | 
			
		||||
    * NeedValidate bitmask above.  This ensures all computed values are
 | 
			
		||||
    * up to date, thus allowing the driver to decide if the current tnl
 | 
			
		||||
    * module needs to be swapped out.
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Validate the current T&L module. 
 | 
			
		||||
    *
 | 
			
		||||
    * This must be non-NULL if a driver installs a custom tnl module and
 | 
			
		||||
    * sets the NeedValidate bitmask, but may be NULL otherwise.
 | 
			
		||||
    * This is called directly after UpdateState() when a state change that has
 | 
			
		||||
    * occured matches the dd_function_table::NeedValidate bitmask above.  This
 | 
			
		||||
    * ensures all computed values are up to date, thus allowing the driver to
 | 
			
		||||
    * decide if the current T&L module needs to be swapped out.
 | 
			
		||||
    *
 | 
			
		||||
    * This must be non-NULL if a driver installs a custom T&L module and sets
 | 
			
		||||
    * the dd_function_table::NeedValidate bitmask, but may be NULL otherwise.
 | 
			
		||||
    */
 | 
			
		||||
   void (*ValidateTnlModule)( GLcontext *ctx, GLuint new_state );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define PRIM_OUTSIDE_BEGIN_END   GL_POLYGON+1
 | 
			
		||||
#define PRIM_INSIDE_UNKNOWN_PRIM GL_POLYGON+2
 | 
			
		||||
#define PRIM_UNKNOWN             GL_POLYGON+3
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Set by the driver-supplied T&L engine.  
 | 
			
		||||
    *
 | 
			
		||||
    * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
 | 
			
		||||
    */
 | 
			
		||||
   GLuint CurrentExecPrimitive;
 | 
			
		||||
   /* Set by the driver-supplied t&l engine.  Set to
 | 
			
		||||
    * PRIM_OUTSIDE_BEGIN_END when outside begin/end.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   GLuint CurrentSavePrimitive;
 | 
			
		||||
   /* Current state of an in-progress compilation.  May take on any of
 | 
			
		||||
    * the additional values defined above.
 | 
			
		||||
   /**
 | 
			
		||||
    * Current state of an in-progress compilation.  
 | 
			
		||||
    *
 | 
			
		||||
    * May take on any of the additional values PRIM_OUTSIDE_BEGIN_END,
 | 
			
		||||
    * PRIM_INSIDE_UNKNOWN_PRIM or PRIM_UNKNOWN defined above.
 | 
			
		||||
    */
 | 
			
		||||
   GLuint CurrentSavePrimitive;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define FLUSH_STORED_VERTICES 0x1
 | 
			
		||||
#define FLUSH_UPDATE_CURRENT  0x2
 | 
			
		||||
   GLuint NeedFlush;
 | 
			
		||||
   /* Set by the driver-supplied t&l engine whenever vertices are
 | 
			
		||||
    * buffered between begin/end objects or ctx->Current is not uptodate.
 | 
			
		||||
   /**
 | 
			
		||||
    * Set by the driver-supplied T&L engine whenever vertices are
 | 
			
		||||
    * buffered between glBegin()/glEnd() objects or ctx->Current is not uptodate.
 | 
			
		||||
    *
 | 
			
		||||
    * The FlushVertices() call below may be used to resolve
 | 
			
		||||
    * The dd_function_table::FlushVertices call below may be used to resolve
 | 
			
		||||
    * these conditions.
 | 
			
		||||
    */
 | 
			
		||||
   GLuint NeedFlush;
 | 
			
		||||
 | 
			
		||||
   void (*FlushVertices)( GLcontext *ctx, GLuint flags );
 | 
			
		||||
   /* If inside begin/end, ASSERT(0).
 | 
			
		||||
    * Otherwise,
 | 
			
		||||
    *   if (flags & FLUSH_STORED_VERTICES) flushes any buffered vertices,
 | 
			
		||||
    *   if (flags & FLUSH_UPDATE_CURRENT) updates ctx->Current
 | 
			
		||||
    *                                     and ctx->Light.Material
 | 
			
		||||
   /**
 | 
			
		||||
    * If inside glBegin()/glEnd(), it should ASSERT(0).  Otherwise, if
 | 
			
		||||
    * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
 | 
			
		||||
    * vertices, if FLUSH_UPDATE_CURRENT bit is set updates ctx->Current and
 | 
			
		||||
    * ctx->Light.Material
 | 
			
		||||
    *
 | 
			
		||||
    * Note that the default t&l engine never clears the
 | 
			
		||||
    * Note that the default T&L engine never clears the
 | 
			
		||||
    * FLUSH_UPDATE_CURRENT bit, even after performing the update.
 | 
			
		||||
    */
 | 
			
		||||
   void (*FlushVertices)( GLcontext *ctx, GLuint flags );
 | 
			
		||||
 | 
			
		||||
   void (*LightingSpaceChange)( GLcontext *ctx );
 | 
			
		||||
   /* Notify driver that the special derived value _NeedEyeCoords has
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Notify driver that the special derived value _NeedEyeCoords has
 | 
			
		||||
    * changed.
 | 
			
		||||
    */
 | 
			
		||||
   void (*LightingSpaceChange)( GLcontext *ctx );
 | 
			
		||||
 | 
			
		||||
   void (*NewList)( GLcontext *ctx, GLuint list, GLenum mode );
 | 
			
		||||
   void (*EndList)( GLcontext *ctx );
 | 
			
		||||
   /* Let the t&l component know what is going on with display lists
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glNewList().
 | 
			
		||||
    *
 | 
			
		||||
    * Let the T&L component know what is going on with display lists
 | 
			
		||||
    * in time to make changes to dispatch tables, etc.
 | 
			
		||||
    * Called by glNewList() and glEndList(), respectively.
 | 
			
		||||
    */
 | 
			
		||||
   void (*NewList)( GLcontext *ctx, GLuint list, GLenum mode );
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glEndList().
 | 
			
		||||
    *
 | 
			
		||||
    * \sa dd_function_table::NewList.
 | 
			
		||||
    */
 | 
			
		||||
   void (*EndList)( GLcontext *ctx );
 | 
			
		||||
 | 
			
		||||
   void (*BeginCallList)( GLcontext *ctx, GLuint list );
 | 
			
		||||
   void (*EndCallList)( GLcontext *ctx );
 | 
			
		||||
   /* Notify the t&l component before and after calling a display list.
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glCallList(s), but not recursively.
 | 
			
		||||
    *
 | 
			
		||||
    * Notify the T&L component before and after calling a display list.
 | 
			
		||||
    * Called by glCallList(s), but not recursively.
 | 
			
		||||
    */
 | 
			
		||||
   void (*BeginCallList)( GLcontext *ctx, GLuint list );
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glEndCallList().
 | 
			
		||||
    *
 | 
			
		||||
    * \sa dd_function_table::BeginCallList.
 | 
			
		||||
    */
 | 
			
		||||
   void (*EndCallList)( GLcontext *ctx );
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Let the T&L component know when the context becomes current.
 | 
			
		||||
    */
 | 
			
		||||
   void (*MakeCurrent)( GLcontext *ctx, GLframebuffer *drawBuffer,
 | 
			
		||||
			GLframebuffer *readBuffer );
 | 
			
		||||
   /* Let the t&l component know when the context becomes current.
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by glLockArraysEXT().
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   void (*LockArraysEXT)( GLcontext *ctx, GLint first, GLsizei count );
 | 
			
		||||
   void (*UnlockArraysEXT)( GLcontext *ctx );
 | 
			
		||||
   /* Called by glLockArraysEXT() and glUnlockArraysEXT(), respectively.
 | 
			
		||||
   /**
 | 
			
		||||
    * \brief Called by UnlockArraysEXT().
 | 
			
		||||
    */
 | 
			
		||||
   void (*UnlockArraysEXT)( GLcontext *ctx );
 | 
			
		||||
   /*@}*/
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Transform/Clip/Lighting interface
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Transform/Clip/Lighting interface
 | 
			
		||||
 */
 | 
			
		||||
typedef struct {
 | 
			
		||||
   /**
 | 
			
		||||
    * Drivers present a reduced set of the functions possible in
 | 
			
		||||
    * glBegin()/glEnd() objects.  Core mesa provides translation stubs for the
 | 
			
		||||
    * remaining functions to map down to these entrypoints.
 | 
			
		||||
    *
 | 
			
		||||
    * These are the initial values to be installed into dispatch by
 | 
			
		||||
    * mesa.  If the T&L driver wants to modify the dispatch table
 | 
			
		||||
    * while installed, it must do so itself.  It would be possible for
 | 
			
		||||
    * the vertexformat to install it's own initial values for these
 | 
			
		||||
    * functions, but this way there is an obvious list of what is
 | 
			
		||||
    * expected of the driver.
 | 
			
		||||
    *
 | 
			
		||||
    * If the driver wants to hook in entrypoints other than those
 | 
			
		||||
    * listed, it must restore them to their original values in
 | 
			
		||||
    * the disable() callback, below.
 | 
			
		||||
    */
 | 
			
		||||
   /*@{*/
 | 
			
		||||
   void (*ArrayElement)( GLint ); /* NOTE */
 | 
			
		||||
   void (*Color3f)( GLfloat, GLfloat, GLfloat );
 | 
			
		||||
   void (*Color3fv)( const GLfloat * );
 | 
			
		||||
@@ -648,52 +851,44 @@ typedef struct {
 | 
			
		||||
   void (*End)( void );
 | 
			
		||||
   void (*VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
 | 
			
		||||
   void (*VertexAttrib4fvNV)( GLuint index, const GLfloat *v );
 | 
			
		||||
   /*@}*/
 | 
			
		||||
 | 
			
		||||
   /* Drivers present a reduced set of the functions possible in
 | 
			
		||||
    * begin/end objects.  Core mesa provides translation stubs for the
 | 
			
		||||
    * remaining functions to map down to these entrypoints.
 | 
			
		||||
    *
 | 
			
		||||
    * These are the initial values to be installed into dispatch by
 | 
			
		||||
    * mesa.  If the t&l driver wants to modify the dispatch table
 | 
			
		||||
    * while installed, it must do so itself.  It would be possible for
 | 
			
		||||
    * the vertexformat to install it's own initial values for these
 | 
			
		||||
    * functions, but this way there is an obvious list of what is
 | 
			
		||||
    * expected of the driver.
 | 
			
		||||
    *
 | 
			
		||||
    * If the driver wants to hook in entrypoints other than those
 | 
			
		||||
    * listed above, it must restore them to their original values in
 | 
			
		||||
    * the disable() callback, below.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   void (*Rectf)( GLfloat, GLfloat, GLfloat, GLfloat );
 | 
			
		||||
   /*
 | 
			
		||||
    */
 | 
			
		||||
   void (*Rectf)( GLfloat, GLfloat, GLfloat, GLfloat );
 | 
			
		||||
 | 
			
		||||
   /**
 | 
			
		||||
    * These may or may not belong here.  Heuristic: if an array is
 | 
			
		||||
    * enabled, the installed vertex format should support that array and
 | 
			
		||||
    * it's current size natively.
 | 
			
		||||
    */
 | 
			
		||||
   /*@{*/
 | 
			
		||||
   void (*DrawArrays)( GLenum mode, GLint start, GLsizei count );
 | 
			
		||||
   void (*DrawElements)( GLenum mode, GLsizei count, GLenum type,
 | 
			
		||||
			 const GLvoid *indices );
 | 
			
		||||
   void (*DrawRangeElements)( GLenum mode, GLuint start,
 | 
			
		||||
			      GLuint end, GLsizei count,
 | 
			
		||||
			      GLenum type, const GLvoid *indices );
 | 
			
		||||
   /* These may or may not belong here.  Heuristic: If an array is
 | 
			
		||||
    * enabled, the installed vertex format should support that array and
 | 
			
		||||
    * it's current size natively.
 | 
			
		||||
    */
 | 
			
		||||
   /*@}*/
 | 
			
		||||
 | 
			
		||||
   void (*EvalMesh1)( GLenum mode, GLint i1, GLint i2 );
 | 
			
		||||
   void (*EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
 | 
			
		||||
   /* If you don't support eval, fallback to the default vertex format
 | 
			
		||||
   /**
 | 
			
		||||
    * If you don't support eval, fallback to the default vertex format
 | 
			
		||||
    * on receiving an eval call and use the pipeline mechanism to
 | 
			
		||||
    * provide partial t&l acceleration.
 | 
			
		||||
    * provide partial T&L acceleration.
 | 
			
		||||
    *
 | 
			
		||||
    * Mesa will provide a set of helper functions to do eval within
 | 
			
		||||
    * accelerated vertex formats, eventually...
 | 
			
		||||
    */
 | 
			
		||||
   /*@{*/
 | 
			
		||||
   void (*EvalMesh1)( GLenum mode, GLint i1, GLint i2 );
 | 
			
		||||
   void (*EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
 | 
			
		||||
   /*@}*/
 | 
			
		||||
 | 
			
		||||
   GLboolean prefer_float_colors;
 | 
			
		||||
   /* Should core try to send colors to glColor4f or glColor4chan,
 | 
			
		||||
   /**
 | 
			
		||||
    * Should core try to send colors to glColor4f or glColor4chan,
 | 
			
		||||
    * where it has a choice?
 | 
			
		||||
    */
 | 
			
		||||
   GLboolean prefer_float_colors;
 | 
			
		||||
} GLvertexformat;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,7 @@
 | 
			
		||||
/* $Id: dlist.c,v 1.100 2002/11/06 15:16:23 brianp Exp $ */
 | 
			
		||||
/**
 | 
			
		||||
 * \file dlist.c
 | 
			
		||||
 * \brief Display lists management functions.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -24,6 +27,8 @@
 | 
			
		||||
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/* $Id: dlist.c,v 1.100.4.1 2003/03/02 00:27:34 jrfonseca Exp $ */
 | 
			
		||||
 | 
			
		||||
#include "glheader.h"
 | 
			
		||||
#include "imports.h"
 | 
			
		||||
#include "api_loopback.h"
 | 
			
		||||
@@ -70,47 +75,48 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
Functions which aren't compiled but executed immediately:
 | 
			
		||||
	glIsList
 | 
			
		||||
	glGenLists
 | 
			
		||||
	glDeleteLists
 | 
			
		||||
	glEndList  --- BUT:  call ctx->Driver.EndList at end of list execution?
 | 
			
		||||
	glFeedbackBuffer
 | 
			
		||||
	glSelectBuffer
 | 
			
		||||
	glRenderMode
 | 
			
		||||
	glReadPixels
 | 
			
		||||
	glPixelStore
 | 
			
		||||
	glFlush
 | 
			
		||||
	glFinish
 | 
			
		||||
	glIsEnabled
 | 
			
		||||
	glGet*
 | 
			
		||||
 | 
			
		||||
Functions which cause errors if called while compiling a display list:
 | 
			
		||||
	glNewList
 | 
			
		||||
*/
 | 
			
		||||
/**
 | 
			
		||||
 * Functions which aren't compiled but executed immediately:
 | 
			
		||||
 * - glIsList
 | 
			
		||||
 * - glGenLists
 | 
			
		||||
 * - glDeleteLists
 | 
			
		||||
 * - glEndList  --- BUT:  call ctx->Driver.EndList at end of list execution?
 | 
			
		||||
 * - glFeedbackBuffer
 | 
			
		||||
 * - glSelectBuffer
 | 
			
		||||
 * - glRenderMode
 | 
			
		||||
 * - glReadPixels
 | 
			
		||||
 * - glPixelStore
 | 
			
		||||
 * - glFlush
 | 
			
		||||
 * - glFinish
 | 
			
		||||
 * - glIsEnabled
 | 
			
		||||
 * - glGet*
 | 
			
		||||
 * 
 | 
			
		||||
 * Functions which cause errors if called while compiling a display list:
 | 
			
		||||
 *  - glNewList
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
/**
 | 
			
		||||
 * Display list instructions are stored as sequences of "nodes".  Nodes
 | 
			
		||||
 * are allocated in blocks.  Each block has BLOCK_SIZE nodes.  Blocks
 | 
			
		||||
 * are linked together with a pointer.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* How many nodes to allocate at a time:
 | 
			
		||||
 * - reduced now that we hold vertices etc. elsewhere.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief How many nodes to allocate at a time.
 | 
			
		||||
 * 
 | 
			
		||||
 * \note Reduced now that we hold vertices etc. elsewhere.
 | 
			
		||||
 */
 | 
			
		||||
#define BLOCK_SIZE 256
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Display list opcodes.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Display list opcodes.
 | 
			
		||||
 *
 | 
			
		||||
 * The fact that these identifiers are assigned consecutive
 | 
			
		||||
 * integer values starting at 0 is very important, see InstSize array usage)
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
typedef enum {
 | 
			
		||||
	OPCODE_ACCUM,
 | 
			
		||||
@@ -258,7 +264,9 @@ typedef enum {
 | 
			
		||||
} OpCode;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Display list node.
 | 
			
		||||
 *
 | 
			
		||||
 * Each instruction in the display list is stored as a sequence of
 | 
			
		||||
 * contiguous nodes in memory.
 | 
			
		||||
 * Each node is the union of a variety of datatypes.
 | 
			
		||||
@@ -279,9 +287,9 @@ union node {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Number of nodes of storage needed for each instruction.  Sizes for
 | 
			
		||||
 * dynamically allocated opcodes are stored in the context struct.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Number of nodes of storage needed for each instruction.  
 | 
			
		||||
 * Sizes for dynamically allocated opcodes are stored in the context struct.
 | 
			
		||||
 */
 | 
			
		||||
static GLuint InstSize[ OPCODE_END_OF_LIST+1 ];
 | 
			
		||||
 | 
			
		||||
@@ -292,10 +300,6 @@ void mesa_print_display_list( GLuint list );
 | 
			
		||||
/*****                           Private                          *****/
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Make an empty display list.  This is used by glGenLists() to
 | 
			
		||||
 * reserver display list IDs.
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,20 @@
 | 
			
		||||
/* $Id: glheader.h,v 1.29 2002/10/30 19:44:41 brianp Exp $ */
 | 
			
		||||
/**
 | 
			
		||||
 * \file glheader.h
 | 
			
		||||
 * \brief Top-most include file.
 | 
			
		||||
 * 
 | 
			
		||||
 * This is the top-most include file of the Mesa sources.
 | 
			
		||||
 * It includes gl.h and all system headers which are needed.
 | 
			
		||||
 * Other Mesa source files should _not_ directly include any system
 | 
			
		||||
 * headers.  This allows Mesa to be integrated into XFree86 and
 | 
			
		||||
 * allows system-dependent hacks/work-arounds to be collected in one place.
 | 
			
		||||
 *
 | 
			
		||||
 * If you touch this file, everything gets recompiled!
 | 
			
		||||
 *
 | 
			
		||||
 * This file should be included before any other header in the .c files.
 | 
			
		||||
 *
 | 
			
		||||
 * Put compiler/OS/assembly pragmas and macros here to avoid
 | 
			
		||||
 * cluttering other source files.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -24,26 +40,13 @@
 | 
			
		||||
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/* $Id: glheader.h,v 1.29.4.1 2003/03/02 00:27:35 jrfonseca Exp $ */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef GLHEADER_H
 | 
			
		||||
#define GLHEADER_H
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * This is the top-most include file of the Mesa sources.
 | 
			
		||||
 * It includes gl.h and all system headers which are needed.
 | 
			
		||||
 * Other Mesa source files should _not_ directly include any system
 | 
			
		||||
 * headers.  This allows Mesa to be integrated into XFree86 and
 | 
			
		||||
 * allows system-dependent hacks/work-arounds to be collected in one place.
 | 
			
		||||
 *
 | 
			
		||||
 * If you touch this file, everything gets recompiled!
 | 
			
		||||
 *
 | 
			
		||||
 * This file should be included before any other header in the .c files.
 | 
			
		||||
 *
 | 
			
		||||
 * Put compiler/OS/assembly pragmas and macros here to avoid
 | 
			
		||||
 * cluttering other source files.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(XFree86LOADER) && defined(IN_MODULE)
 | 
			
		||||
@@ -282,7 +285,7 @@ typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESC
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
/**
 | 
			
		||||
 * Sometimes we treat GLfloats as GLints.  On x86 systems, moving a float
 | 
			
		||||
 * as a int (thereby using integer registers instead of fp registers) is
 | 
			
		||||
 * a performance win.  Typically, this can be done with ordinary casts.
 | 
			
		||||
 
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: state.c,v 1.97.4.1 2003/02/21 21:14:18 keithw Exp $ */
 | 
			
		||||
/* $Id: state.c,v 1.97.4.2 2003/03/04 17:10:39 keithw Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -114,264 +114,272 @@ _mesa_init_exec_table(struct _glapi_table *exec, GLuint tableSize)
 | 
			
		||||
   _mesa_loopback_init_api_table( exec, GL_TRUE );
 | 
			
		||||
 | 
			
		||||
   /* load the dispatch slots we understand */
 | 
			
		||||
/*    exec->Accum = _mesa_Accum; */
 | 
			
		||||
   exec->AlphaFunc = _mesa_AlphaFunc;
 | 
			
		||||
   exec->Bitmap = _mesa_Bitmap;
 | 
			
		||||
   exec->BlendFunc = _mesa_BlendFunc;
 | 
			
		||||
/*    exec->CallList = _mesa_CallList; */
 | 
			
		||||
/*    exec->CallLists = _mesa_CallLists; */
 | 
			
		||||
   exec->Clear = _mesa_Clear;
 | 
			
		||||
/*    exec->ClearAccum = _mesa_ClearAccum; */
 | 
			
		||||
   exec->ClearColor = _mesa_ClearColor;
 | 
			
		||||
/*    exec->ClearDepth = _mesa_ClearDepth; */
 | 
			
		||||
/*    exec->ClearIndex = _mesa_ClearIndex; */
 | 
			
		||||
   exec->ClearStencil = _mesa_ClearStencil;
 | 
			
		||||
/*    exec->ClipPlane = _mesa_ClipPlane; */
 | 
			
		||||
   exec->ColorMask = _mesa_ColorMask;
 | 
			
		||||
/*    exec->ColorMaterial = _mesa_ColorMaterial; */
 | 
			
		||||
/*    exec->CopyPixels = _mesa_CopyPixels; */
 | 
			
		||||
   exec->CullFace = _mesa_CullFace;
 | 
			
		||||
/*    exec->DeleteLists = _mesa_DeleteLists; */
 | 
			
		||||
/*    exec->DepthFunc = _mesa_DepthFunc; */
 | 
			
		||||
/*    exec->DepthMask = _mesa_DepthMask; */
 | 
			
		||||
/*    exec->DepthRange = _mesa_DepthRange; */
 | 
			
		||||
   exec->Disable = _mesa_Disable;
 | 
			
		||||
   exec->DrawBuffer = _mesa_DrawBuffer;
 | 
			
		||||
/*    exec->DrawPixels = _mesa_DrawPixels; */
 | 
			
		||||
   exec->Enable = _mesa_Enable;
 | 
			
		||||
/*    exec->EndList = _mesa_EndList; */
 | 
			
		||||
/*    exec->FeedbackBuffer = _mesa_FeedbackBuffer; */
 | 
			
		||||
   exec->Finish = _mesa_Finish;
 | 
			
		||||
   exec->Flush = _mesa_Flush;
 | 
			
		||||
/*    exec->FogCoordPointerEXT = _mesa_FogCoordPointerEXT; */
 | 
			
		||||
/*    exec->Fogf = _mesa_Fogf; */
 | 
			
		||||
/*    exec->Fogfv = _mesa_Fogfv; */
 | 
			
		||||
/*    exec->Fogi = _mesa_Fogi; */
 | 
			
		||||
/*    exec->Fogiv = _mesa_Fogiv; */
 | 
			
		||||
   exec->FrontFace = _mesa_FrontFace;
 | 
			
		||||
   exec->Frustum = _mesa_Frustum;
 | 
			
		||||
/*    exec->GenLists = _mesa_GenLists; */
 | 
			
		||||
   exec->GetBooleanv = _mesa_GetBooleanv;
 | 
			
		||||
/*    exec->GetClipPlane = _mesa_GetClipPlane; */
 | 
			
		||||
/*    exec->GetDoublev = _mesa_GetDoublev; */
 | 
			
		||||
   exec->GetError = _mesa_GetError;
 | 
			
		||||
   exec->GetFloatv = _mesa_GetFloatv;
 | 
			
		||||
   exec->GetIntegerv = _mesa_GetIntegerv;
 | 
			
		||||
/*    exec->GetLightfv = _mesa_GetLightfv; */
 | 
			
		||||
/*    exec->GetLightiv = _mesa_GetLightiv; */
 | 
			
		||||
/*    exec->GetMapdv = _mesa_GetMapdv; */
 | 
			
		||||
/*    exec->GetMapfv = _mesa_GetMapfv; */
 | 
			
		||||
/*    exec->GetMapiv = _mesa_GetMapiv; */
 | 
			
		||||
/*    exec->GetMaterialfv = _mesa_GetMaterialfv; */
 | 
			
		||||
/*    exec->GetMaterialiv = _mesa_GetMaterialiv; */
 | 
			
		||||
/*    exec->GetPixelMapfv = _mesa_GetPixelMapfv; */
 | 
			
		||||
/*    exec->GetPixelMapuiv = _mesa_GetPixelMapuiv; */
 | 
			
		||||
/*    exec->GetPixelMapusv = _mesa_GetPixelMapusv; */
 | 
			
		||||
/*    exec->GetPolygonStipple = _mesa_GetPolygonStipple; */
 | 
			
		||||
   exec->GetString = _mesa_GetString;
 | 
			
		||||
   exec->GetTexEnvfv = _mesa_GetTexEnvfv;
 | 
			
		||||
   exec->GetTexEnviv = _mesa_GetTexEnviv;
 | 
			
		||||
/*    exec->GetTexGendv = _mesa_GetTexGendv; */
 | 
			
		||||
/*    exec->GetTexGenfv = _mesa_GetTexGenfv; */
 | 
			
		||||
/*    exec->GetTexGeniv = _mesa_GetTexGeniv; */
 | 
			
		||||
/*    exec->GetTexImage = _mesa_GetTexImage; */
 | 
			
		||||
   exec->GetTexLevelParameterfv = _mesa_GetTexLevelParameterfv;
 | 
			
		||||
   exec->GetTexLevelParameteriv = _mesa_GetTexLevelParameteriv;
 | 
			
		||||
   exec->GetTexParameterfv = _mesa_GetTexParameterfv;
 | 
			
		||||
   exec->GetTexParameteriv = _mesa_GetTexParameteriv;
 | 
			
		||||
/*    exec->Hint = _mesa_Hint; */
 | 
			
		||||
/*    exec->IndexMask = _mesa_IndexMask; */
 | 
			
		||||
   exec->InitNames = _mesa_InitNames;
 | 
			
		||||
/*    exec->IsEnabled = _mesa_IsEnabled; */
 | 
			
		||||
/*    exec->IsList = _mesa_IsList; */
 | 
			
		||||
/*    exec->LightModelf = _mesa_LightModelf; */
 | 
			
		||||
/*    exec->LightModelfv = _mesa_LightModelfv; */
 | 
			
		||||
/*    exec->LightModeli = _mesa_LightModeli; */
 | 
			
		||||
/*    exec->LightModeliv = _mesa_LightModeliv; */
 | 
			
		||||
/*    exec->Lightf = _mesa_Lightf; */
 | 
			
		||||
/*    exec->Lightfv = _mesa_Lightfv; */
 | 
			
		||||
/*    exec->Lighti = _mesa_Lighti; */
 | 
			
		||||
/*    exec->Lightiv = _mesa_Lightiv; */
 | 
			
		||||
   exec->LineStipple = _mesa_LineStipple;
 | 
			
		||||
   exec->LineWidth = _mesa_LineWidth;
 | 
			
		||||
/*    exec->ListBase = _mesa_ListBase; */
 | 
			
		||||
   exec->LoadIdentity = _mesa_LoadIdentity;
 | 
			
		||||
/*    exec->LoadMatrixd = _mesa_LoadMatrixd; */
 | 
			
		||||
   exec->LoadMatrixf = _mesa_LoadMatrixf;
 | 
			
		||||
   exec->LoadName = _mesa_LoadName;
 | 
			
		||||
   exec->LogicOp = _mesa_LogicOp;
 | 
			
		||||
/*    exec->Map1d = _mesa_Map1d; */
 | 
			
		||||
/*    exec->Map1f = _mesa_Map1f; */
 | 
			
		||||
/*    exec->Map2d = _mesa_Map2d; */
 | 
			
		||||
/*    exec->Map2f = _mesa_Map2f; */
 | 
			
		||||
/*    exec->MapGrid1d = _mesa_MapGrid1d; */
 | 
			
		||||
/*    exec->MapGrid1f = _mesa_MapGrid1f; */
 | 
			
		||||
/*    exec->MapGrid2d = _mesa_MapGrid2d; */
 | 
			
		||||
/*    exec->MapGrid2f = _mesa_MapGrid2f; */
 | 
			
		||||
   exec->MatrixMode = _mesa_MatrixMode;
 | 
			
		||||
/*    exec->MultMatrixd = _mesa_MultMatrixd; */
 | 
			
		||||
   exec->MultMatrixf = _mesa_MultMatrixf;
 | 
			
		||||
/*    exec->NewList = _mesa_NewList; */
 | 
			
		||||
   exec->Ortho = _mesa_Ortho;
 | 
			
		||||
/*    exec->PassThrough = _mesa_PassThrough; */
 | 
			
		||||
/*    exec->PixelMapfv = _mesa_PixelMapfv; */
 | 
			
		||||
/*    exec->PixelMapuiv = _mesa_PixelMapuiv; */
 | 
			
		||||
/*    exec->PixelMapusv = _mesa_PixelMapusv; */
 | 
			
		||||
/*    exec->PixelStoref = _mesa_PixelStoref; */
 | 
			
		||||
   exec->PixelStorei = _mesa_PixelStorei;
 | 
			
		||||
/*    exec->PixelTransferf = _mesa_PixelTransferf; */
 | 
			
		||||
/*    exec->PixelTransferi = _mesa_PixelTransferi; */
 | 
			
		||||
/*    exec->PixelZoom = _mesa_PixelZoom; */
 | 
			
		||||
/*    exec->PointSize = _mesa_PointSize; */
 | 
			
		||||
/*    exec->PolygonMode = _mesa_PolygonMode; */
 | 
			
		||||
/*    exec->PolygonOffset = _mesa_PolygonOffset; */
 | 
			
		||||
/*    exec->PolygonStipple = _mesa_PolygonStipple; */
 | 
			
		||||
/*    exec->PopAttrib = _mesa_PopAttrib; */
 | 
			
		||||
   exec->PopMatrix = _mesa_PopMatrix;
 | 
			
		||||
   exec->PopName = _mesa_PopName;
 | 
			
		||||
/*    exec->PushAttrib = _mesa_PushAttrib; */
 | 
			
		||||
   exec->PushMatrix = _mesa_PushMatrix;
 | 
			
		||||
   exec->PushName = _mesa_PushName;
 | 
			
		||||
/*    exec->RasterPos2d = _mesa_RasterPos2d; */
 | 
			
		||||
/*    exec->RasterPos2dv = _mesa_RasterPos2dv; */
 | 
			
		||||
   exec->RasterPos2f = _mesa_RasterPos2f;
 | 
			
		||||
   exec->RasterPos2fv = _mesa_RasterPos2fv;
 | 
			
		||||
   exec->RasterPos2i = _mesa_RasterPos2i;
 | 
			
		||||
   exec->RasterPos2iv = _mesa_RasterPos2iv;
 | 
			
		||||
/*    exec->RasterPos2s = _mesa_RasterPos2s; */
 | 
			
		||||
/*    exec->RasterPos2sv = _mesa_RasterPos2sv; */
 | 
			
		||||
/*    exec->RasterPos3d = _mesa_RasterPos3d; */
 | 
			
		||||
/*    exec->RasterPos3dv = _mesa_RasterPos3dv; */
 | 
			
		||||
/*    exec->RasterPos3f = _mesa_RasterPos3f; */
 | 
			
		||||
/*    exec->RasterPos3fv = _mesa_RasterPos3fv; */
 | 
			
		||||
/*    exec->RasterPos3i = _mesa_RasterPos3i; */
 | 
			
		||||
/*    exec->RasterPos3iv = _mesa_RasterPos3iv; */
 | 
			
		||||
/*    exec->RasterPos3s = _mesa_RasterPos3s; */
 | 
			
		||||
/*    exec->RasterPos3sv = _mesa_RasterPos3sv; */
 | 
			
		||||
/*    exec->RasterPos4d = _mesa_RasterPos4d; */
 | 
			
		||||
/*    exec->RasterPos4dv = _mesa_RasterPos4dv; */
 | 
			
		||||
/*    exec->RasterPos4f = _mesa_RasterPos4f; */
 | 
			
		||||
/*    exec->RasterPos4fv = _mesa_RasterPos4fv; */
 | 
			
		||||
/*    exec->RasterPos4i = _mesa_RasterPos4i; */
 | 
			
		||||
/*    exec->RasterPos4iv = _mesa_RasterPos4iv; */
 | 
			
		||||
/*    exec->RasterPos4s = _mesa_RasterPos4s; */
 | 
			
		||||
/*    exec->RasterPos4sv = _mesa_RasterPos4sv; */
 | 
			
		||||
   exec->ReadBuffer = _mesa_ReadBuffer;
 | 
			
		||||
   exec->ReadPixels = _mesa_ReadPixels;
 | 
			
		||||
   exec->RenderMode = _mesa_RenderMode;
 | 
			
		||||
/*    exec->Rotated = _mesa_Rotated; */
 | 
			
		||||
   exec->Rotatef = _mesa_Rotatef;
 | 
			
		||||
/*    exec->Scaled = _mesa_Scaled; */
 | 
			
		||||
   exec->Scalef = _mesa_Scalef;
 | 
			
		||||
   exec->Scissor = _mesa_Scissor;
 | 
			
		||||
/*    exec->SecondaryColorPointerEXT = _mesa_SecondaryColorPointerEXT; */
 | 
			
		||||
   exec->SelectBuffer = _mesa_SelectBuffer;
 | 
			
		||||
   exec->ShadeModel = _mesa_ShadeModel;
 | 
			
		||||
   exec->StencilFunc = _mesa_StencilFunc;
 | 
			
		||||
   exec->StencilMask = _mesa_StencilMask;
 | 
			
		||||
   exec->StencilOp = _mesa_StencilOp;
 | 
			
		||||
/*    exec->TexEnvf = _mesa_TexEnvf; */
 | 
			
		||||
   exec->TexEnvfv = _mesa_TexEnvfv;
 | 
			
		||||
   exec->TexEnvi = _mesa_TexEnvi;
 | 
			
		||||
/*    exec->TexEnviv = _mesa_TexEnviv; */
 | 
			
		||||
/*    exec->TexGend = _mesa_TexGend; */
 | 
			
		||||
/*    exec->TexGendv = _mesa_TexGendv; */
 | 
			
		||||
/*    exec->TexGenf = _mesa_TexGenf; */
 | 
			
		||||
/*    exec->TexGenfv = _mesa_TexGenfv; */
 | 
			
		||||
/*    exec->TexGeni = _mesa_TexGeni; */
 | 
			
		||||
/*    exec->TexGeniv = _mesa_TexGeniv; */
 | 
			
		||||
/*    exec->TexImage1D = _mesa_TexImage1D; */
 | 
			
		||||
   exec->TexImage2D = _mesa_TexImage2D;
 | 
			
		||||
/*    exec->TexParameterf = _mesa_TexParameterf; */
 | 
			
		||||
/*    exec->TexParameterfv = _mesa_TexParameterfv; */
 | 
			
		||||
   exec->TexParameteri = _mesa_TexParameteri; 
 | 
			
		||||
/*    exec->TexParameteriv = _mesa_TexParameteriv; */
 | 
			
		||||
/*    exec->Translated = _mesa_Translated; */
 | 
			
		||||
   exec->Translatef = _mesa_Translatef;
 | 
			
		||||
   exec->Viewport = _mesa_Viewport;
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->Accum = _mesa_Accum;
 | 
			
		||||
   exec->CallList = _mesa_CallList;
 | 
			
		||||
   exec->CallLists = _mesa_CallLists;
 | 
			
		||||
   exec->ClearAccum = _mesa_ClearAccum;
 | 
			
		||||
   exec->ClearDepth = _mesa_ClearDepth;
 | 
			
		||||
   exec->ClearIndex = _mesa_ClearIndex;
 | 
			
		||||
   exec->ClipPlane = _mesa_ClipPlane;
 | 
			
		||||
   exec->ColorMaterial = _mesa_ColorMaterial;
 | 
			
		||||
   exec->CopyPixels = _mesa_CopyPixels;
 | 
			
		||||
   exec->DeleteLists = _mesa_DeleteLists;
 | 
			
		||||
   exec->DepthFunc = _mesa_DepthFunc;
 | 
			
		||||
   exec->DepthMask = _mesa_DepthMask;
 | 
			
		||||
   exec->DepthRange = _mesa_DepthRange;
 | 
			
		||||
   exec->DrawPixels = _mesa_DrawPixels;
 | 
			
		||||
   exec->EndList = _mesa_EndList;
 | 
			
		||||
   exec->FeedbackBuffer = _mesa_FeedbackBuffer;
 | 
			
		||||
   exec->FogCoordPointerEXT = _mesa_FogCoordPointerEXT;
 | 
			
		||||
   exec->Fogf = _mesa_Fogf;
 | 
			
		||||
   exec->Fogfv = _mesa_Fogfv;
 | 
			
		||||
   exec->Fogi = _mesa_Fogi;
 | 
			
		||||
   exec->Fogiv = _mesa_Fogiv;
 | 
			
		||||
   exec->GenLists = _mesa_GenLists;
 | 
			
		||||
   exec->GetClipPlane = _mesa_GetClipPlane;
 | 
			
		||||
   exec->GetDoublev = _mesa_GetDoublev;
 | 
			
		||||
   exec->GetLightfv = _mesa_GetLightfv;
 | 
			
		||||
   exec->GetLightiv = _mesa_GetLightiv;
 | 
			
		||||
   exec->GetMapdv = _mesa_GetMapdv;
 | 
			
		||||
   exec->GetMapfv = _mesa_GetMapfv;
 | 
			
		||||
   exec->GetMapiv = _mesa_GetMapiv;
 | 
			
		||||
   exec->GetMaterialfv = _mesa_GetMaterialfv;
 | 
			
		||||
   exec->GetMaterialiv = _mesa_GetMaterialiv;
 | 
			
		||||
   exec->GetPixelMapfv = _mesa_GetPixelMapfv;
 | 
			
		||||
   exec->GetPixelMapuiv = _mesa_GetPixelMapuiv;
 | 
			
		||||
   exec->GetPixelMapusv = _mesa_GetPixelMapusv;
 | 
			
		||||
   exec->GetPolygonStipple = _mesa_GetPolygonStipple;
 | 
			
		||||
   exec->GetTexGendv = _mesa_GetTexGendv;
 | 
			
		||||
   exec->GetTexGenfv = _mesa_GetTexGenfv;
 | 
			
		||||
   exec->GetTexGeniv = _mesa_GetTexGeniv;
 | 
			
		||||
   exec->GetTexImage = _mesa_GetTexImage;
 | 
			
		||||
   exec->Hint = _mesa_Hint;
 | 
			
		||||
   exec->IndexMask = _mesa_IndexMask;
 | 
			
		||||
   exec->IsEnabled = _mesa_IsEnabled;
 | 
			
		||||
   exec->IsList = _mesa_IsList;
 | 
			
		||||
   exec->LightModelf = _mesa_LightModelf;
 | 
			
		||||
   exec->LightModelfv = _mesa_LightModelfv;
 | 
			
		||||
   exec->LightModeli = _mesa_LightModeli;
 | 
			
		||||
   exec->LightModeliv = _mesa_LightModeliv;
 | 
			
		||||
   exec->Lightf = _mesa_Lightf;
 | 
			
		||||
   exec->Lightfv = _mesa_Lightfv;
 | 
			
		||||
   exec->Lighti = _mesa_Lighti;
 | 
			
		||||
   exec->Lightiv = _mesa_Lightiv;
 | 
			
		||||
   exec->ListBase = _mesa_ListBase;
 | 
			
		||||
   exec->LoadMatrixd = _mesa_LoadMatrixd;
 | 
			
		||||
   exec->Map1d = _mesa_Map1d;
 | 
			
		||||
   exec->Map1f = _mesa_Map1f;
 | 
			
		||||
   exec->Map2d = _mesa_Map2d;
 | 
			
		||||
   exec->Map2f = _mesa_Map2f;
 | 
			
		||||
   exec->MapGrid1d = _mesa_MapGrid1d;
 | 
			
		||||
   exec->MapGrid1f = _mesa_MapGrid1f;
 | 
			
		||||
   exec->MapGrid2d = _mesa_MapGrid2d;
 | 
			
		||||
   exec->MapGrid2f = _mesa_MapGrid2f;
 | 
			
		||||
   exec->MultMatrixd = _mesa_MultMatrixd;
 | 
			
		||||
   exec->NewList = _mesa_NewList;
 | 
			
		||||
   exec->PassThrough = _mesa_PassThrough;
 | 
			
		||||
   exec->PixelMapfv = _mesa_PixelMapfv;
 | 
			
		||||
   exec->PixelMapuiv = _mesa_PixelMapuiv;
 | 
			
		||||
   exec->PixelMapusv = _mesa_PixelMapusv;
 | 
			
		||||
   exec->PixelStoref = _mesa_PixelStoref;
 | 
			
		||||
   exec->PixelTransferf = _mesa_PixelTransferf;
 | 
			
		||||
   exec->PixelTransferi = _mesa_PixelTransferi;
 | 
			
		||||
   exec->PixelZoom = _mesa_PixelZoom;
 | 
			
		||||
   exec->PointSize = _mesa_PointSize;
 | 
			
		||||
   exec->PolygonMode = _mesa_PolygonMode;
 | 
			
		||||
   exec->PolygonOffset = _mesa_PolygonOffset;
 | 
			
		||||
   exec->PolygonStipple = _mesa_PolygonStipple;
 | 
			
		||||
   exec->PopAttrib = _mesa_PopAttrib;
 | 
			
		||||
   exec->PushAttrib = _mesa_PushAttrib;
 | 
			
		||||
   exec->RasterPos2d = _mesa_RasterPos2d;
 | 
			
		||||
   exec->RasterPos2dv = _mesa_RasterPos2dv;
 | 
			
		||||
   exec->RasterPos2s = _mesa_RasterPos2s;
 | 
			
		||||
   exec->RasterPos2sv = _mesa_RasterPos2sv;
 | 
			
		||||
   exec->RasterPos3d = _mesa_RasterPos3d;
 | 
			
		||||
   exec->RasterPos3dv = _mesa_RasterPos3dv;
 | 
			
		||||
   exec->RasterPos3f = _mesa_RasterPos3f;
 | 
			
		||||
   exec->RasterPos3fv = _mesa_RasterPos3fv;
 | 
			
		||||
   exec->RasterPos3i = _mesa_RasterPos3i;
 | 
			
		||||
   exec->RasterPos3iv = _mesa_RasterPos3iv;
 | 
			
		||||
   exec->RasterPos3s = _mesa_RasterPos3s;
 | 
			
		||||
   exec->RasterPos3sv = _mesa_RasterPos3sv;
 | 
			
		||||
   exec->RasterPos4d = _mesa_RasterPos4d;
 | 
			
		||||
   exec->RasterPos4dv = _mesa_RasterPos4dv;
 | 
			
		||||
   exec->RasterPos4f = _mesa_RasterPos4f;
 | 
			
		||||
   exec->RasterPos4fv = _mesa_RasterPos4fv;
 | 
			
		||||
   exec->RasterPos4i = _mesa_RasterPos4i;
 | 
			
		||||
   exec->RasterPos4iv = _mesa_RasterPos4iv;
 | 
			
		||||
   exec->RasterPos4s = _mesa_RasterPos4s;
 | 
			
		||||
   exec->RasterPos4sv = _mesa_RasterPos4sv;
 | 
			
		||||
   exec->Rotated = _mesa_Rotated;
 | 
			
		||||
   exec->Scaled = _mesa_Scaled;
 | 
			
		||||
   exec->SecondaryColorPointerEXT = _mesa_SecondaryColorPointerEXT;
 | 
			
		||||
   exec->TexEnvf = _mesa_TexEnvf;
 | 
			
		||||
   exec->TexEnviv = _mesa_TexEnviv;
 | 
			
		||||
   exec->TexGend = _mesa_TexGend;
 | 
			
		||||
   exec->TexGendv = _mesa_TexGendv;
 | 
			
		||||
   exec->TexGenf = _mesa_TexGenf;
 | 
			
		||||
   exec->TexGenfv = _mesa_TexGenfv;
 | 
			
		||||
   exec->TexGeni = _mesa_TexGeni;
 | 
			
		||||
   exec->TexGeniv = _mesa_TexGeniv;
 | 
			
		||||
   exec->TexImage1D = _mesa_TexImage1D;
 | 
			
		||||
   exec->TexParameterf = _mesa_TexParameterf;
 | 
			
		||||
   exec->TexParameterfv = _mesa_TexParameterfv;
 | 
			
		||||
   exec->TexParameteriv = _mesa_TexParameteriv;
 | 
			
		||||
   exec->Translated = _mesa_Translated;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 1.1 */
 | 
			
		||||
/*    exec->AreTexturesResident = _mesa_AreTexturesResident; */
 | 
			
		||||
/*    exec->AreTexturesResidentEXT = _mesa_AreTexturesResident; */
 | 
			
		||||
   exec->BindTexture = _mesa_BindTexture;
 | 
			
		||||
/*    exec->ColorPointer = _mesa_ColorPointer; */
 | 
			
		||||
/*    exec->CopyTexImage1D = _mesa_CopyTexImage1D; */
 | 
			
		||||
/*    exec->CopyTexImage2D = _mesa_CopyTexImage2D; */
 | 
			
		||||
/*    exec->CopyTexSubImage1D = _mesa_CopyTexSubImage1D; */
 | 
			
		||||
/*    exec->CopyTexSubImage2D = _mesa_CopyTexSubImage2D; */
 | 
			
		||||
   exec->DeleteTextures = _mesa_DeleteTextures;
 | 
			
		||||
/*    exec->DisableClientState = _mesa_DisableClientState; */
 | 
			
		||||
/*    exec->EdgeFlagPointer = _mesa_EdgeFlagPointer; */
 | 
			
		||||
/*    exec->EnableClientState = _mesa_EnableClientState; */
 | 
			
		||||
   exec->GenTextures = _mesa_GenTextures;
 | 
			
		||||
/*    exec->GenTexturesEXT = _mesa_GenTextures; */
 | 
			
		||||
/*    exec->GetPointerv = _mesa_GetPointerv; */
 | 
			
		||||
/*    exec->IndexPointer = _mesa_IndexPointer; */
 | 
			
		||||
/*    exec->InterleavedArrays = _mesa_InterleavedArrays; */
 | 
			
		||||
/*    exec->IsTexture = _mesa_IsTexture; */
 | 
			
		||||
/*    exec->IsTextureEXT = _mesa_IsTexture; */
 | 
			
		||||
/*    exec->NormalPointer = _mesa_NormalPointer; */
 | 
			
		||||
/*    exec->PopClientAttrib = _mesa_PopClientAttrib; */
 | 
			
		||||
/*    exec->PrioritizeTextures = _mesa_PrioritizeTextures; */
 | 
			
		||||
/*    exec->PushClientAttrib = _mesa_PushClientAttrib; */
 | 
			
		||||
/*    exec->TexCoordPointer = _mesa_TexCoordPointer; */
 | 
			
		||||
/*    exec->TexSubImage1D = _mesa_TexSubImage1D; */
 | 
			
		||||
/*    exec->TexSubImage2D = _mesa_TexSubImage2D; */
 | 
			
		||||
/*    exec->VertexPointer = _mesa_VertexPointer; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->AreTexturesResident = _mesa_AreTexturesResident;
 | 
			
		||||
   exec->AreTexturesResidentEXT = _mesa_AreTexturesResident;
 | 
			
		||||
   exec->ColorPointer = _mesa_ColorPointer;
 | 
			
		||||
   exec->CopyTexImage1D = _mesa_CopyTexImage1D;
 | 
			
		||||
   exec->CopyTexImage2D = _mesa_CopyTexImage2D;
 | 
			
		||||
   exec->CopyTexSubImage1D = _mesa_CopyTexSubImage1D;
 | 
			
		||||
   exec->CopyTexSubImage2D = _mesa_CopyTexSubImage2D;
 | 
			
		||||
   exec->DisableClientState = _mesa_DisableClientState;
 | 
			
		||||
   exec->EdgeFlagPointer = _mesa_EdgeFlagPointer;
 | 
			
		||||
   exec->EnableClientState = _mesa_EnableClientState;
 | 
			
		||||
   exec->GenTexturesEXT = _mesa_GenTextures;
 | 
			
		||||
   exec->GetPointerv = _mesa_GetPointerv;
 | 
			
		||||
   exec->IndexPointer = _mesa_IndexPointer;
 | 
			
		||||
   exec->InterleavedArrays = _mesa_InterleavedArrays;
 | 
			
		||||
   exec->IsTexture = _mesa_IsTexture;
 | 
			
		||||
   exec->IsTextureEXT = _mesa_IsTexture;
 | 
			
		||||
   exec->NormalPointer = _mesa_NormalPointer;
 | 
			
		||||
   exec->PopClientAttrib = _mesa_PopClientAttrib;
 | 
			
		||||
   exec->PrioritizeTextures = _mesa_PrioritizeTextures;
 | 
			
		||||
   exec->PushClientAttrib = _mesa_PushClientAttrib;
 | 
			
		||||
   exec->TexCoordPointer = _mesa_TexCoordPointer;
 | 
			
		||||
   exec->TexSubImage1D = _mesa_TexSubImage1D;
 | 
			
		||||
   exec->TexSubImage2D = _mesa_TexSubImage2D;
 | 
			
		||||
   exec->VertexPointer = _mesa_VertexPointer;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 1.2 */
 | 
			
		||||
/*    exec->CopyTexSubImage3D = _mesa_CopyTexSubImage3D; */
 | 
			
		||||
/*    exec->TexImage3D = _mesa_TexImage3D; */
 | 
			
		||||
/*    exec->TexSubImage3D = _mesa_TexSubImage3D; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->CopyTexSubImage3D = _mesa_CopyTexSubImage3D;
 | 
			
		||||
   exec->TexImage3D = _mesa_TexImage3D;
 | 
			
		||||
   exec->TexSubImage3D = _mesa_TexSubImage3D;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* OpenGL 1.2  GL_ARB_imaging */
 | 
			
		||||
/*    exec->BlendColor = _mesa_BlendColor; */
 | 
			
		||||
/*    exec->BlendEquation = _mesa_BlendEquation; */
 | 
			
		||||
/*    exec->ColorSubTable = _mesa_ColorSubTable; */
 | 
			
		||||
/*    exec->ColorTable = _mesa_ColorTable; */
 | 
			
		||||
/*    exec->ColorTableParameterfv = _mesa_ColorTableParameterfv; */
 | 
			
		||||
/*    exec->ColorTableParameteriv = _mesa_ColorTableParameteriv; */
 | 
			
		||||
/*    exec->ConvolutionFilter1D = _mesa_ConvolutionFilter1D; */
 | 
			
		||||
/*    exec->ConvolutionFilter2D = _mesa_ConvolutionFilter2D; */
 | 
			
		||||
/*    exec->ConvolutionParameterf = _mesa_ConvolutionParameterf; */
 | 
			
		||||
/*    exec->ConvolutionParameterfv = _mesa_ConvolutionParameterfv; */
 | 
			
		||||
/*    exec->ConvolutionParameteri = _mesa_ConvolutionParameteri; */
 | 
			
		||||
/*    exec->ConvolutionParameteriv = _mesa_ConvolutionParameteriv; */
 | 
			
		||||
/*    exec->CopyColorSubTable = _mesa_CopyColorSubTable; */
 | 
			
		||||
/*    exec->CopyColorTable = _mesa_CopyColorTable; */
 | 
			
		||||
/*    exec->CopyConvolutionFilter1D = _mesa_CopyConvolutionFilter1D; */
 | 
			
		||||
/*    exec->CopyConvolutionFilter2D = _mesa_CopyConvolutionFilter2D; */
 | 
			
		||||
/*    exec->GetColorTable = _mesa_GetColorTable; */
 | 
			
		||||
/*    exec->GetColorTableEXT = _mesa_GetColorTable; */
 | 
			
		||||
/*    exec->GetColorTableParameterfv = _mesa_GetColorTableParameterfv; */
 | 
			
		||||
/*    exec->GetColorTableParameterfvEXT = _mesa_GetColorTableParameterfv; */
 | 
			
		||||
/*    exec->GetColorTableParameteriv = _mesa_GetColorTableParameteriv; */
 | 
			
		||||
/*    exec->GetColorTableParameterivEXT = _mesa_GetColorTableParameteriv; */
 | 
			
		||||
/*    exec->GetConvolutionFilter = _mesa_GetConvolutionFilter; */
 | 
			
		||||
/*    exec->GetConvolutionFilterEXT = _mesa_GetConvolutionFilter; */
 | 
			
		||||
/*    exec->GetConvolutionParameterfv = _mesa_GetConvolutionParameterfv; */
 | 
			
		||||
/*    exec->GetConvolutionParameterfvEXT = _mesa_GetConvolutionParameterfv; */
 | 
			
		||||
/*    exec->GetConvolutionParameteriv = _mesa_GetConvolutionParameteriv; */
 | 
			
		||||
/*    exec->GetConvolutionParameterivEXT = _mesa_GetConvolutionParameteriv; */
 | 
			
		||||
/*    exec->GetHistogram = _mesa_GetHistogram; */
 | 
			
		||||
/*    exec->GetHistogramEXT = _mesa_GetHistogram; */
 | 
			
		||||
/*    exec->GetHistogramParameterfv = _mesa_GetHistogramParameterfv; */
 | 
			
		||||
/*    exec->GetHistogramParameterfvEXT = _mesa_GetHistogramParameterfv; */
 | 
			
		||||
/*    exec->GetHistogramParameteriv = _mesa_GetHistogramParameteriv; */
 | 
			
		||||
/*    exec->GetHistogramParameterivEXT = _mesa_GetHistogramParameteriv; */
 | 
			
		||||
/*    exec->GetMinmax = _mesa_GetMinmax; */
 | 
			
		||||
/*    exec->GetMinmaxEXT = _mesa_GetMinmax; */
 | 
			
		||||
/*    exec->GetMinmaxParameterfv = _mesa_GetMinmaxParameterfv; */
 | 
			
		||||
/*    exec->GetMinmaxParameterfvEXT = _mesa_GetMinmaxParameterfv; */
 | 
			
		||||
/*    exec->GetMinmaxParameteriv = _mesa_GetMinmaxParameteriv; */
 | 
			
		||||
/*    exec->GetMinmaxParameterivEXT = _mesa_GetMinmaxParameteriv; */
 | 
			
		||||
/*    exec->GetSeparableFilter = _mesa_GetSeparableFilter; */
 | 
			
		||||
/*    exec->GetSeparableFilterEXT = _mesa_GetSeparableFilter; */
 | 
			
		||||
/*    exec->Histogram = _mesa_Histogram; */
 | 
			
		||||
/*    exec->Minmax = _mesa_Minmax; */
 | 
			
		||||
/*    exec->ResetHistogram = _mesa_ResetHistogram; */
 | 
			
		||||
/*    exec->ResetMinmax = _mesa_ResetMinmax; */
 | 
			
		||||
/*    exec->SeparableFilter2D = _mesa_SeparableFilter2D; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->BlendColor = _mesa_BlendColor;
 | 
			
		||||
   exec->BlendEquation = _mesa_BlendEquation;
 | 
			
		||||
   exec->ColorSubTable = _mesa_ColorSubTable;
 | 
			
		||||
   exec->ColorTable = _mesa_ColorTable;
 | 
			
		||||
   exec->ColorTableParameterfv = _mesa_ColorTableParameterfv;
 | 
			
		||||
   exec->ColorTableParameteriv = _mesa_ColorTableParameteriv;
 | 
			
		||||
   exec->ConvolutionFilter1D = _mesa_ConvolutionFilter1D;
 | 
			
		||||
   exec->ConvolutionFilter2D = _mesa_ConvolutionFilter2D;
 | 
			
		||||
   exec->ConvolutionParameterf = _mesa_ConvolutionParameterf;
 | 
			
		||||
   exec->ConvolutionParameterfv = _mesa_ConvolutionParameterfv;
 | 
			
		||||
   exec->ConvolutionParameteri = _mesa_ConvolutionParameteri;
 | 
			
		||||
   exec->ConvolutionParameteriv = _mesa_ConvolutionParameteriv;
 | 
			
		||||
   exec->CopyColorSubTable = _mesa_CopyColorSubTable;
 | 
			
		||||
   exec->CopyColorTable = _mesa_CopyColorTable;
 | 
			
		||||
   exec->CopyConvolutionFilter1D = _mesa_CopyConvolutionFilter1D;
 | 
			
		||||
   exec->CopyConvolutionFilter2D = _mesa_CopyConvolutionFilter2D;
 | 
			
		||||
   exec->GetColorTable = _mesa_GetColorTable;
 | 
			
		||||
   exec->GetColorTableEXT = _mesa_GetColorTable;
 | 
			
		||||
   exec->GetColorTableParameterfv = _mesa_GetColorTableParameterfv;
 | 
			
		||||
   exec->GetColorTableParameterfvEXT = _mesa_GetColorTableParameterfv;
 | 
			
		||||
   exec->GetColorTableParameteriv = _mesa_GetColorTableParameteriv;
 | 
			
		||||
   exec->GetColorTableParameterivEXT = _mesa_GetColorTableParameteriv;
 | 
			
		||||
   exec->GetConvolutionFilter = _mesa_GetConvolutionFilter;
 | 
			
		||||
   exec->GetConvolutionFilterEXT = _mesa_GetConvolutionFilter;
 | 
			
		||||
   exec->GetConvolutionParameterfv = _mesa_GetConvolutionParameterfv;
 | 
			
		||||
   exec->GetConvolutionParameterfvEXT = _mesa_GetConvolutionParameterfv;
 | 
			
		||||
   exec->GetConvolutionParameteriv = _mesa_GetConvolutionParameteriv;
 | 
			
		||||
   exec->GetConvolutionParameterivEXT = _mesa_GetConvolutionParameteriv;
 | 
			
		||||
   exec->GetHistogram = _mesa_GetHistogram;
 | 
			
		||||
   exec->GetHistogramEXT = _mesa_GetHistogram;
 | 
			
		||||
   exec->GetHistogramParameterfv = _mesa_GetHistogramParameterfv;
 | 
			
		||||
   exec->GetHistogramParameterfvEXT = _mesa_GetHistogramParameterfv;
 | 
			
		||||
   exec->GetHistogramParameteriv = _mesa_GetHistogramParameteriv;
 | 
			
		||||
   exec->GetHistogramParameterivEXT = _mesa_GetHistogramParameteriv;
 | 
			
		||||
   exec->GetMinmax = _mesa_GetMinmax;
 | 
			
		||||
   exec->GetMinmaxEXT = _mesa_GetMinmax;
 | 
			
		||||
   exec->GetMinmaxParameterfv = _mesa_GetMinmaxParameterfv;
 | 
			
		||||
   exec->GetMinmaxParameterfvEXT = _mesa_GetMinmaxParameterfv;
 | 
			
		||||
   exec->GetMinmaxParameteriv = _mesa_GetMinmaxParameteriv;
 | 
			
		||||
   exec->GetMinmaxParameterivEXT = _mesa_GetMinmaxParameteriv;
 | 
			
		||||
   exec->GetSeparableFilter = _mesa_GetSeparableFilter;
 | 
			
		||||
   exec->GetSeparableFilterEXT = _mesa_GetSeparableFilter;
 | 
			
		||||
   exec->Histogram = _mesa_Histogram;
 | 
			
		||||
   exec->Minmax = _mesa_Minmax;
 | 
			
		||||
   exec->ResetHistogram = _mesa_ResetHistogram;
 | 
			
		||||
   exec->ResetMinmax = _mesa_ResetMinmax;
 | 
			
		||||
   exec->SeparableFilter2D = _mesa_SeparableFilter2D;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 2. GL_EXT_blend_color */
 | 
			
		||||
#if 0
 | 
			
		||||
@@ -379,7 +387,9 @@ _mesa_init_exec_table(struct _glapi_table *exec, GLuint tableSize)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 3. GL_EXT_polygon_offset */
 | 
			
		||||
/*    exec->PolygonOffsetEXT = _mesa_PolygonOffsetEXT; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->PolygonOffsetEXT = _mesa_PolygonOffsetEXT;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 6. GL_EXT_texture3d */
 | 
			
		||||
#if 0
 | 
			
		||||
@@ -389,147 +399,181 @@ _mesa_init_exec_table(struct _glapi_table *exec, GLuint tableSize)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 11. GL_EXT_histogram */
 | 
			
		||||
/*    exec->GetHistogramEXT = _mesa_GetHistogram; */
 | 
			
		||||
/*    exec->GetHistogramParameterfvEXT = _mesa_GetHistogramParameterfv; */
 | 
			
		||||
/*    exec->GetHistogramParameterivEXT = _mesa_GetHistogramParameteriv; */
 | 
			
		||||
/*    exec->GetMinmaxEXT = _mesa_GetMinmax; */
 | 
			
		||||
/*    exec->GetMinmaxParameterfvEXT = _mesa_GetMinmaxParameterfv; */
 | 
			
		||||
/*    exec->GetMinmaxParameterivEXT = _mesa_GetMinmaxParameteriv; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->GetHistogramEXT = _mesa_GetHistogram;
 | 
			
		||||
   exec->GetHistogramParameterfvEXT = _mesa_GetHistogramParameterfv;
 | 
			
		||||
   exec->GetHistogramParameterivEXT = _mesa_GetHistogramParameteriv;
 | 
			
		||||
   exec->GetMinmaxEXT = _mesa_GetMinmax;
 | 
			
		||||
   exec->GetMinmaxParameterfvEXT = _mesa_GetMinmaxParameterfv;
 | 
			
		||||
   exec->GetMinmaxParameterivEXT = _mesa_GetMinmaxParameteriv;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* ?. GL_SGIX_pixel_texture */
 | 
			
		||||
/*    exec->PixelTexGenSGIX = _mesa_PixelTexGenSGIX; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->PixelTexGenSGIX = _mesa_PixelTexGenSGIX;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 15. GL_SGIS_pixel_texture */
 | 
			
		||||
/*    exec->PixelTexGenParameteriSGIS = _mesa_PixelTexGenParameteriSGIS; */
 | 
			
		||||
/*    exec->PixelTexGenParameterivSGIS = _mesa_PixelTexGenParameterivSGIS; */
 | 
			
		||||
/*    exec->PixelTexGenParameterfSGIS = _mesa_PixelTexGenParameterfSGIS; */
 | 
			
		||||
/*    exec->PixelTexGenParameterfvSGIS = _mesa_PixelTexGenParameterfvSGIS; */
 | 
			
		||||
/*    exec->GetPixelTexGenParameterivSGIS = _mesa_GetPixelTexGenParameterivSGIS; */
 | 
			
		||||
/*    exec->GetPixelTexGenParameterfvSGIS = _mesa_GetPixelTexGenParameterfvSGIS; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->PixelTexGenParameteriSGIS = _mesa_PixelTexGenParameteriSGIS;
 | 
			
		||||
   exec->PixelTexGenParameterivSGIS = _mesa_PixelTexGenParameterivSGIS;
 | 
			
		||||
   exec->PixelTexGenParameterfSGIS = _mesa_PixelTexGenParameterfSGIS;
 | 
			
		||||
   exec->PixelTexGenParameterfvSGIS = _mesa_PixelTexGenParameterfvSGIS;
 | 
			
		||||
   exec->GetPixelTexGenParameterivSGIS = _mesa_GetPixelTexGenParameterivSGIS;
 | 
			
		||||
   exec->GetPixelTexGenParameterfvSGIS = _mesa_GetPixelTexGenParameterfvSGIS;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 30. GL_EXT_vertex_array */
 | 
			
		||||
/*    exec->ColorPointerEXT = _mesa_ColorPointerEXT; */
 | 
			
		||||
/*    exec->EdgeFlagPointerEXT = _mesa_EdgeFlagPointerEXT; */
 | 
			
		||||
/*    exec->IndexPointerEXT = _mesa_IndexPointerEXT; */
 | 
			
		||||
/*    exec->NormalPointerEXT = _mesa_NormalPointerEXT; */
 | 
			
		||||
/*    exec->TexCoordPointerEXT = _mesa_TexCoordPointerEXT; */
 | 
			
		||||
/*    exec->VertexPointerEXT = _mesa_VertexPointerEXT; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->ColorPointerEXT = _mesa_ColorPointerEXT;
 | 
			
		||||
   exec->EdgeFlagPointerEXT = _mesa_EdgeFlagPointerEXT;
 | 
			
		||||
   exec->IndexPointerEXT = _mesa_IndexPointerEXT;
 | 
			
		||||
   exec->NormalPointerEXT = _mesa_NormalPointerEXT;
 | 
			
		||||
   exec->TexCoordPointerEXT = _mesa_TexCoordPointerEXT;
 | 
			
		||||
   exec->VertexPointerEXT = _mesa_VertexPointerEXT;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 37. GL_EXT_blend_minmax */
 | 
			
		||||
#if 0
 | 
			
		||||
/*    exec->BlendEquationEXT = _mesa_BlendEquationEXT; */
 | 
			
		||||
   exec->BlendEquationEXT = _mesa_BlendEquationEXT;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 54. GL_EXT_point_parameters */
 | 
			
		||||
/*    exec->PointParameterfEXT = _mesa_PointParameterfEXT; */
 | 
			
		||||
/*    exec->PointParameterfvEXT = _mesa_PointParameterfvEXT; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->PointParameterfEXT = _mesa_PointParameterfEXT;
 | 
			
		||||
   exec->PointParameterfvEXT = _mesa_PointParameterfvEXT;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 78. GL_EXT_paletted_texture */
 | 
			
		||||
#if 0
 | 
			
		||||
/*    exec->ColorTableEXT = _mesa_ColorTableEXT; */
 | 
			
		||||
/*    exec->ColorSubTableEXT = _mesa_ColorSubTableEXT; */
 | 
			
		||||
   exec->ColorTableEXT = _mesa_ColorTableEXT;
 | 
			
		||||
   exec->ColorSubTableEXT = _mesa_ColorSubTableEXT;
 | 
			
		||||
#endif
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->GetColorTableEXT = _mesa_GetColorTable;
 | 
			
		||||
   exec->GetColorTableParameterfvEXT = _mesa_GetColorTableParameterfv;
 | 
			
		||||
   exec->GetColorTableParameterivEXT = _mesa_GetColorTableParameteriv;
 | 
			
		||||
#endif
 | 
			
		||||
/*    exec->GetColorTableEXT = _mesa_GetColorTable; */
 | 
			
		||||
/*    exec->GetColorTableParameterfvEXT = _mesa_GetColorTableParameterfv; */
 | 
			
		||||
/*    exec->GetColorTableParameterivEXT = _mesa_GetColorTableParameteriv; */
 | 
			
		||||
 | 
			
		||||
   /* 97. GL_EXT_compiled_vertex_array */
 | 
			
		||||
/*    exec->LockArraysEXT = _mesa_LockArraysEXT; */
 | 
			
		||||
/*    exec->UnlockArraysEXT = _mesa_UnlockArraysEXT; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->LockArraysEXT = _mesa_LockArraysEXT;
 | 
			
		||||
   exec->UnlockArraysEXT = _mesa_UnlockArraysEXT;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 148. GL_EXT_multi_draw_arrays */
 | 
			
		||||
/*    exec->MultiDrawArraysEXT = _mesa_MultiDrawArraysEXT; */
 | 
			
		||||
/*    exec->MultiDrawElementsEXT = _mesa_MultiDrawElementsEXT; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->MultiDrawArraysEXT = _mesa_MultiDrawArraysEXT;
 | 
			
		||||
   exec->MultiDrawElementsEXT = _mesa_MultiDrawElementsEXT;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 173. GL_INGR_blend_func_separate */
 | 
			
		||||
/*    exec->BlendFuncSeparateEXT = _mesa_BlendFuncSeparateEXT; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->BlendFuncSeparateEXT = _mesa_BlendFuncSeparateEXT;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 196. GL_MESA_resize_buffers */
 | 
			
		||||
/*    exec->ResizeBuffersMESA = _mesa_ResizeBuffersMESA; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->ResizeBuffersMESA = _mesa_ResizeBuffersMESA;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 197. GL_MESA_window_pos */
 | 
			
		||||
/*    exec->WindowPos2dMESA = _mesa_WindowPos2dMESA; */
 | 
			
		||||
/*    exec->WindowPos2dvMESA = _mesa_WindowPos2dvMESA; */
 | 
			
		||||
/*    exec->WindowPos2fMESA = _mesa_WindowPos2fMESA; */
 | 
			
		||||
/*    exec->WindowPos2fvMESA = _mesa_WindowPos2fvMESA; */
 | 
			
		||||
/*    exec->WindowPos2iMESA = _mesa_WindowPos2iMESA; */
 | 
			
		||||
/*    exec->WindowPos2ivMESA = _mesa_WindowPos2ivMESA; */
 | 
			
		||||
/*    exec->WindowPos2sMESA = _mesa_WindowPos2sMESA; */
 | 
			
		||||
/*    exec->WindowPos2svMESA = _mesa_WindowPos2svMESA; */
 | 
			
		||||
/*    exec->WindowPos3dMESA = _mesa_WindowPos3dMESA; */
 | 
			
		||||
/*    exec->WindowPos3dvMESA = _mesa_WindowPos3dvMESA; */
 | 
			
		||||
/*    exec->WindowPos3fMESA = _mesa_WindowPos3fMESA; */
 | 
			
		||||
/*    exec->WindowPos3fvMESA = _mesa_WindowPos3fvMESA; */
 | 
			
		||||
/*    exec->WindowPos3iMESA = _mesa_WindowPos3iMESA; */
 | 
			
		||||
/*    exec->WindowPos3ivMESA = _mesa_WindowPos3ivMESA; */
 | 
			
		||||
/*    exec->WindowPos3sMESA = _mesa_WindowPos3sMESA; */
 | 
			
		||||
/*    exec->WindowPos3svMESA = _mesa_WindowPos3svMESA; */
 | 
			
		||||
/*    exec->WindowPos4dMESA = _mesa_WindowPos4dMESA; */
 | 
			
		||||
/*    exec->WindowPos4dvMESA = _mesa_WindowPos4dvMESA; */
 | 
			
		||||
/*    exec->WindowPos4fMESA = _mesa_WindowPos4fMESA; */
 | 
			
		||||
/*    exec->WindowPos4fvMESA = _mesa_WindowPos4fvMESA; */
 | 
			
		||||
/*    exec->WindowPos4iMESA = _mesa_WindowPos4iMESA; */
 | 
			
		||||
/*    exec->WindowPos4ivMESA = _mesa_WindowPos4ivMESA; */
 | 
			
		||||
/*    exec->WindowPos4sMESA = _mesa_WindowPos4sMESA; */
 | 
			
		||||
/*    exec->WindowPos4svMESA = _mesa_WindowPos4svMESA; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->WindowPos2dMESA = _mesa_WindowPos2dMESA;
 | 
			
		||||
   exec->WindowPos2dvMESA = _mesa_WindowPos2dvMESA;
 | 
			
		||||
   exec->WindowPos2fMESA = _mesa_WindowPos2fMESA;
 | 
			
		||||
   exec->WindowPos2fvMESA = _mesa_WindowPos2fvMESA;
 | 
			
		||||
   exec->WindowPos2iMESA = _mesa_WindowPos2iMESA;
 | 
			
		||||
   exec->WindowPos2ivMESA = _mesa_WindowPos2ivMESA;
 | 
			
		||||
   exec->WindowPos2sMESA = _mesa_WindowPos2sMESA;
 | 
			
		||||
   exec->WindowPos2svMESA = _mesa_WindowPos2svMESA;
 | 
			
		||||
   exec->WindowPos3dMESA = _mesa_WindowPos3dMESA;
 | 
			
		||||
   exec->WindowPos3dvMESA = _mesa_WindowPos3dvMESA;
 | 
			
		||||
   exec->WindowPos3fMESA = _mesa_WindowPos3fMESA;
 | 
			
		||||
   exec->WindowPos3fvMESA = _mesa_WindowPos3fvMESA;
 | 
			
		||||
   exec->WindowPos3iMESA = _mesa_WindowPos3iMESA;
 | 
			
		||||
   exec->WindowPos3ivMESA = _mesa_WindowPos3ivMESA;
 | 
			
		||||
   exec->WindowPos3sMESA = _mesa_WindowPos3sMESA;
 | 
			
		||||
   exec->WindowPos3svMESA = _mesa_WindowPos3svMESA;
 | 
			
		||||
   exec->WindowPos4dMESA = _mesa_WindowPos4dMESA;
 | 
			
		||||
   exec->WindowPos4dvMESA = _mesa_WindowPos4dvMESA;
 | 
			
		||||
   exec->WindowPos4fMESA = _mesa_WindowPos4fMESA;
 | 
			
		||||
   exec->WindowPos4fvMESA = _mesa_WindowPos4fvMESA;
 | 
			
		||||
   exec->WindowPos4iMESA = _mesa_WindowPos4iMESA;
 | 
			
		||||
   exec->WindowPos4ivMESA = _mesa_WindowPos4ivMESA;
 | 
			
		||||
   exec->WindowPos4sMESA = _mesa_WindowPos4sMESA;
 | 
			
		||||
   exec->WindowPos4svMESA = _mesa_WindowPos4svMESA;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 233. GL_NV_vertex_program */
 | 
			
		||||
#if FEATURE_NV_vertex_program
 | 
			
		||||
/*    exec->BindProgramNV = _mesa_BindProgramNV; */
 | 
			
		||||
/*    exec->DeleteProgramsNV = _mesa_DeleteProgramsNV; */
 | 
			
		||||
/*    exec->ExecuteProgramNV = _mesa_ExecuteProgramNV; */
 | 
			
		||||
/*    exec->GenProgramsNV = _mesa_GenProgramsNV; */
 | 
			
		||||
/*    exec->AreProgramsResidentNV = _mesa_AreProgramsResidentNV; */
 | 
			
		||||
/*    exec->RequestResidentProgramsNV = _mesa_RequestResidentProgramsNV; */
 | 
			
		||||
/*    exec->GetProgramParameterfvNV = _mesa_GetProgramParameterfvNV; */
 | 
			
		||||
/*    exec->GetProgramParameterdvNV = _mesa_GetProgramParameterdvNV; */
 | 
			
		||||
/*    exec->GetProgramivNV = _mesa_GetProgramivNV; */
 | 
			
		||||
/*    exec->GetProgramStringNV = _mesa_GetProgramStringNV; */
 | 
			
		||||
/*    exec->GetTrackMatrixivNV = _mesa_GetTrackMatrixivNV; */
 | 
			
		||||
/*    exec->GetVertexAttribdvNV = _mesa_GetVertexAttribdvNV; */
 | 
			
		||||
/*    exec->GetVertexAttribfvNV = _mesa_GetVertexAttribfvNV; */
 | 
			
		||||
/*    exec->GetVertexAttribivNV = _mesa_GetVertexAttribivNV; */
 | 
			
		||||
/*    exec->GetVertexAttribPointervNV = _mesa_GetVertexAttribPointervNV; */
 | 
			
		||||
/*    exec->IsProgramNV = _mesa_IsProgramNV; */
 | 
			
		||||
/*    exec->LoadProgramNV = _mesa_LoadProgramNV; */
 | 
			
		||||
/*    exec->ProgramParameter4dNV = _mesa_ProgramParameter4dNV; */
 | 
			
		||||
/*    exec->ProgramParameter4dvNV = _mesa_ProgramParameter4dvNV; */
 | 
			
		||||
/*    exec->ProgramParameter4fNV = _mesa_ProgramParameter4fNV; */
 | 
			
		||||
/*    exec->ProgramParameter4fvNV = _mesa_ProgramParameter4fvNV; */
 | 
			
		||||
/*    exec->ProgramParameters4dvNV = _mesa_ProgramParameters4dvNV; */
 | 
			
		||||
/*    exec->ProgramParameters4fvNV = _mesa_ProgramParameters4fvNV; */
 | 
			
		||||
/*    exec->TrackMatrixNV = _mesa_TrackMatrixNV; */
 | 
			
		||||
/*    exec->VertexAttribPointerNV = _mesa_VertexAttribPointerNV; */
 | 
			
		||||
#if _HAVE_FULL_GL && FEATURE_NV_vertex_program
 | 
			
		||||
   exec->BindProgramNV = _mesa_BindProgramNV;
 | 
			
		||||
   exec->DeleteProgramsNV = _mesa_DeleteProgramsNV;
 | 
			
		||||
   exec->ExecuteProgramNV = _mesa_ExecuteProgramNV;
 | 
			
		||||
   exec->GenProgramsNV = _mesa_GenProgramsNV;
 | 
			
		||||
   exec->AreProgramsResidentNV = _mesa_AreProgramsResidentNV;
 | 
			
		||||
   exec->RequestResidentProgramsNV = _mesa_RequestResidentProgramsNV;
 | 
			
		||||
   exec->GetProgramParameterfvNV = _mesa_GetProgramParameterfvNV;
 | 
			
		||||
   exec->GetProgramParameterdvNV = _mesa_GetProgramParameterdvNV;
 | 
			
		||||
   exec->GetProgramivNV = _mesa_GetProgramivNV;
 | 
			
		||||
   exec->GetProgramStringNV = _mesa_GetProgramStringNV;
 | 
			
		||||
   exec->GetTrackMatrixivNV = _mesa_GetTrackMatrixivNV;
 | 
			
		||||
   exec->GetVertexAttribdvNV = _mesa_GetVertexAttribdvNV;
 | 
			
		||||
   exec->GetVertexAttribfvNV = _mesa_GetVertexAttribfvNV;
 | 
			
		||||
   exec->GetVertexAttribivNV = _mesa_GetVertexAttribivNV;
 | 
			
		||||
   exec->GetVertexAttribPointervNV = _mesa_GetVertexAttribPointervNV;
 | 
			
		||||
   exec->IsProgramNV = _mesa_IsProgramNV;
 | 
			
		||||
   exec->LoadProgramNV = _mesa_LoadProgramNV;
 | 
			
		||||
   exec->ProgramParameter4dNV = _mesa_ProgramParameter4dNV;
 | 
			
		||||
   exec->ProgramParameter4dvNV = _mesa_ProgramParameter4dvNV;
 | 
			
		||||
   exec->ProgramParameter4fNV = _mesa_ProgramParameter4fNV;
 | 
			
		||||
   exec->ProgramParameter4fvNV = _mesa_ProgramParameter4fvNV;
 | 
			
		||||
   exec->ProgramParameters4dvNV = _mesa_ProgramParameters4dvNV;
 | 
			
		||||
   exec->ProgramParameters4fvNV = _mesa_ProgramParameters4fvNV;
 | 
			
		||||
   exec->TrackMatrixNV = _mesa_TrackMatrixNV;
 | 
			
		||||
   exec->VertexAttribPointerNV = _mesa_VertexAttribPointerNV;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 262. GL_NV_point_sprite */
 | 
			
		||||
/*    exec->PointParameteriNV = _mesa_PointParameteriNV; */
 | 
			
		||||
/*    exec->PointParameterivNV = _mesa_PointParameterivNV; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->PointParameteriNV = _mesa_PointParameteriNV;
 | 
			
		||||
   exec->PointParameterivNV = _mesa_PointParameterivNV;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* 268. GL_EXT_stencil_two_side */
 | 
			
		||||
/*    exec->ActiveStencilFaceEXT = _mesa_ActiveStencilFaceEXT; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->ActiveStencilFaceEXT = _mesa_ActiveStencilFaceEXT;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* ARB 1. GL_ARB_multitexture */
 | 
			
		||||
/*    exec->ActiveTextureARB = _mesa_ActiveTextureARB; */
 | 
			
		||||
/*    exec->ClientActiveTextureARB = _mesa_ClientActiveTextureARB; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->ActiveTextureARB = _mesa_ActiveTextureARB;
 | 
			
		||||
   exec->ClientActiveTextureARB = _mesa_ClientActiveTextureARB;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* ARB 3. GL_ARB_transpose_matrix */
 | 
			
		||||
/*    exec->LoadTransposeMatrixdARB = _mesa_LoadTransposeMatrixdARB; */
 | 
			
		||||
/*    exec->LoadTransposeMatrixfARB = _mesa_LoadTransposeMatrixfARB; */
 | 
			
		||||
/*    exec->MultTransposeMatrixdARB = _mesa_MultTransposeMatrixdARB; */
 | 
			
		||||
/*    exec->MultTransposeMatrixfARB = _mesa_MultTransposeMatrixfARB; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->LoadTransposeMatrixdARB = _mesa_LoadTransposeMatrixdARB;
 | 
			
		||||
   exec->LoadTransposeMatrixfARB = _mesa_LoadTransposeMatrixfARB;
 | 
			
		||||
   exec->MultTransposeMatrixdARB = _mesa_MultTransposeMatrixdARB;
 | 
			
		||||
   exec->MultTransposeMatrixfARB = _mesa_MultTransposeMatrixfARB;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* ARB 5. GL_ARB_multisample */
 | 
			
		||||
/*    exec->SampleCoverageARB = _mesa_SampleCoverageARB; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->SampleCoverageARB = _mesa_SampleCoverageARB;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* ARB 12. GL_ARB_texture_compression */
 | 
			
		||||
/*    exec->CompressedTexImage3DARB = _mesa_CompressedTexImage3DARB; */
 | 
			
		||||
/*    exec->CompressedTexImage2DARB = _mesa_CompressedTexImage2DARB; */
 | 
			
		||||
/*    exec->CompressedTexImage1DARB = _mesa_CompressedTexImage1DARB; */
 | 
			
		||||
/*    exec->CompressedTexSubImage3DARB = _mesa_CompressedTexSubImage3DARB; */
 | 
			
		||||
/*    exec->CompressedTexSubImage2DARB = _mesa_CompressedTexSubImage2DARB; */
 | 
			
		||||
/*    exec->CompressedTexSubImage1DARB = _mesa_CompressedTexSubImage1DARB; */
 | 
			
		||||
/*    exec->GetCompressedTexImageARB = _mesa_GetCompressedTexImageARB; */
 | 
			
		||||
#if _HAVE_FULL_GL
 | 
			
		||||
   exec->CompressedTexImage3DARB = _mesa_CompressedTexImage3DARB;
 | 
			
		||||
   exec->CompressedTexImage2DARB = _mesa_CompressedTexImage2DARB;
 | 
			
		||||
   exec->CompressedTexImage1DARB = _mesa_CompressedTexImage1DARB;
 | 
			
		||||
   exec->CompressedTexSubImage3DARB = _mesa_CompressedTexSubImage3DARB;
 | 
			
		||||
   exec->CompressedTexSubImage2DARB = _mesa_CompressedTexSubImage2DARB;
 | 
			
		||||
   exec->CompressedTexSubImage1DARB = _mesa_CompressedTexSubImage1DARB;
 | 
			
		||||
   exec->GetCompressedTexImageARB = _mesa_GetCompressedTexImageARB;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* ARB 14. GL_ARB_point_parameters */
 | 
			
		||||
   /* reuse EXT_point_parameters functions */
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,12 @@
 | 
			
		||||
/* $Id: m_matrix.c,v 1.14 2002/10/24 23:57:24 brianp Exp $ */
 | 
			
		||||
/**
 | 
			
		||||
 * \file m_matrix.c
 | 
			
		||||
 * \brief Matrix operations.
 | 
			
		||||
 *
 | 
			
		||||
 * \note
 | 
			
		||||
 * -# 4x4 transformation matrices are stored in memory in column major order.
 | 
			
		||||
 * -# Points/vertices are to be thought of as column vectors.
 | 
			
		||||
 * -# Transformation of a point p by a matrix M is: p' = M * p
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -24,15 +32,8 @@
 | 
			
		||||
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/* $Id: m_matrix.c,v 1.14.4.1 2003/03/02 00:27:36 jrfonseca Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Matrix operations
 | 
			
		||||
 *
 | 
			
		||||
 * NOTES:
 | 
			
		||||
 * 1. 4x4 transformation matrices are stored in memory in column major order.
 | 
			
		||||
 * 2. Points/vertices are to be thought of as column vectors.
 | 
			
		||||
 * 3. Transformation of a point p by a matrix M is: p' = M * p
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "glheader.h"
 | 
			
		||||
#include "imports.h"
 | 
			
		||||
@@ -43,6 +44,9 @@
 | 
			
		||||
#include "m_matrix.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Names of the corresponding GLmatrixtype values.
 | 
			
		||||
 */
 | 
			
		||||
static const char *types[] = {
 | 
			
		||||
   "MATRIX_GENERAL",
 | 
			
		||||
   "MATRIX_IDENTITY",
 | 
			
		||||
@@ -54,6 +58,9 @@ static const char *types[] = {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Identity matrix.
 | 
			
		||||
 */
 | 
			
		||||
static GLfloat Identity[16] = {
 | 
			
		||||
   1.0, 0.0, 0.0, 0.0,
 | 
			
		||||
   0.0, 1.0, 0.0, 0.0,
 | 
			
		||||
@@ -63,22 +70,27 @@ static GLfloat Identity[16] = {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/** \name Matrix multiplication */
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * This matmul was contributed by Thomas Malik
 | 
			
		||||
 *
 | 
			
		||||
 * Perform a 4x4 matrix multiplication  (product = a x b).
 | 
			
		||||
 * Input:  a, b - matrices to multiply
 | 
			
		||||
 * Output:  product - product of a and b
 | 
			
		||||
 * WARNING: (product != b) assumed
 | 
			
		||||
 * NOTE:    (product == a) allowed
 | 
			
		||||
 *
 | 
			
		||||
 * KW: 4*16 = 64 muls
 | 
			
		||||
 */
 | 
			
		||||
#define A(row,col)  a[(col<<2)+row]
 | 
			
		||||
#define B(row,col)  b[(col<<2)+row]
 | 
			
		||||
#define P(row,col)  product[(col<<2)+row]
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Perform a full 4x4 matrix multiplication.
 | 
			
		||||
 *
 | 
			
		||||
 * \param a matrix.
 | 
			
		||||
 * \param b matrix.
 | 
			
		||||
 * \param product will receive the product of \p a and \p b.
 | 
			
		||||
 *
 | 
			
		||||
 * \warning Is assumed that \p product != \p b. \p product == \p a is allowed.
 | 
			
		||||
 *
 | 
			
		||||
 * \note KW: 4*16 = 64 multiplications
 | 
			
		||||
 * 
 | 
			
		||||
 * \author This \c matmul was contributed by Thomas Malik
 | 
			
		||||
 */
 | 
			
		||||
static void matmul4( GLfloat *product, const GLfloat *a, const GLfloat *b )
 | 
			
		||||
{
 | 
			
		||||
   GLint i;
 | 
			
		||||
@@ -91,9 +103,13 @@ static void matmul4( GLfloat *product, const GLfloat *a, const GLfloat *b )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Multiply two matrices known to occupy only the top three rows, such
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Multiply two matrices known to occupy only the top three rows, such
 | 
			
		||||
 * as typical model matrices, and ortho matrices.
 | 
			
		||||
 *
 | 
			
		||||
 * \param a matrix.
 | 
			
		||||
 * \param b matrix.
 | 
			
		||||
 * \param product will receive the product of \p a and \p b.
 | 
			
		||||
 */
 | 
			
		||||
static void matmul34( GLfloat *product, const GLfloat *a, const GLfloat *b )
 | 
			
		||||
{
 | 
			
		||||
@@ -111,14 +127,20 @@ static void matmul34( GLfloat *product, const GLfloat *a, const GLfloat *b )
 | 
			
		||||
   P(3,3) = 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#undef A
 | 
			
		||||
#undef B
 | 
			
		||||
#undef P
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Multiply a matrix by an array of floats with known properties.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Multiply a matrix by an array of floats with known properties.
 | 
			
		||||
 *
 | 
			
		||||
 * \param mat pointer to a GLmatrix structure containing the left mutiplication
 | 
			
		||||
 * matrix, and that will receive the product result.
 | 
			
		||||
 * \param m right multiplication matrix array.
 | 
			
		||||
 * \param flags flags of the matrix \p m.
 | 
			
		||||
 * 
 | 
			
		||||
 * Joins both flags and marks the type and inverse as drity.  Calls matmul34()
 | 
			
		||||
 * if both matrices are 3D, or matmul4() otherwise.
 | 
			
		||||
 */
 | 
			
		||||
static void matrix_multf( GLmatrix *mat, const GLfloat *m, GLuint flags )
 | 
			
		||||
{
 | 
			
		||||
@@ -130,7 +152,49 @@ static void matrix_multf( GLmatrix *mat, const GLfloat *m, GLuint flags )
 | 
			
		||||
      matmul4( mat->m, mat->m, m );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Matrix multiplication.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_mul_matrix( GLmatrix *dest, const GLmatrix *a, const GLmatrix *b )
 | 
			
		||||
{
 | 
			
		||||
   dest->flags = (a->flags |
 | 
			
		||||
		  b->flags |
 | 
			
		||||
		  MAT_DIRTY_TYPE |
 | 
			
		||||
		  MAT_DIRTY_INVERSE);
 | 
			
		||||
 | 
			
		||||
   if (TEST_MAT_FLAGS(dest, MAT_FLAGS_3D))
 | 
			
		||||
      matmul34( dest->m, a->m, b->m );
 | 
			
		||||
   else
 | 
			
		||||
      matmul4( dest->m, a->m, b->m );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_mul_floats( GLmatrix *dest, const GLfloat *m )
 | 
			
		||||
{
 | 
			
		||||
   dest->flags |= (MAT_FLAG_GENERAL |
 | 
			
		||||
		   MAT_DIRTY_TYPE |
 | 
			
		||||
		   MAT_DIRTY_INVERSE);
 | 
			
		||||
 | 
			
		||||
   matmul4( dest->m, dest->m, m );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/** \name Matrix output */
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Print a matrix array.
 | 
			
		||||
 *
 | 
			
		||||
 * \param m matrix array.
 | 
			
		||||
 *
 | 
			
		||||
 * Called by _math_matrix_print() to print a matrix or its inverse.
 | 
			
		||||
 */
 | 
			
		||||
static void print_matrix_floats( const GLfloat m[16] )
 | 
			
		||||
{
 | 
			
		||||
   int i;
 | 
			
		||||
@@ -139,6 +203,11 @@ static void print_matrix_floats( const GLfloat m[16] )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Dumps the contents of a GLmatrix structure.
 | 
			
		||||
 * 
 | 
			
		||||
 * \param m pointer to the GLmatrix strucure.
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_print( const GLmatrix *m )
 | 
			
		||||
{
 | 
			
		||||
@@ -157,16 +226,48 @@ _math_matrix_print( const GLmatrix *m )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define SWAP_ROWS(a, b) { GLfloat *_tmp = a; (a)=(b); (b)=_tmp; }
 | 
			
		||||
/**
 | 
			
		||||
 * \brief References an element of 4x4 matrix.
 | 
			
		||||
 *
 | 
			
		||||
 * \param m matrix array.
 | 
			
		||||
 * \param c column of the desired element.
 | 
			
		||||
 * \param r row of the desired element.
 | 
			
		||||
 * 
 | 
			
		||||
 * \return value of the desired element.
 | 
			
		||||
 *
 | 
			
		||||
 * Calculate the linear storage index of the element and references it. 
 | 
			
		||||
 */
 | 
			
		||||
#define MAT(m,r,c) (m)[(c)*4+(r)]
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Compute inverse of 4x4 transformation matrix.
 | 
			
		||||
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/** \name Matrix inversion */
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Swaps the values of two floating pointer variables.
 | 
			
		||||
 *
 | 
			
		||||
 * Used by invert_matrix_general() to swap the row pointers.
 | 
			
		||||
 */
 | 
			
		||||
#define SWAP_ROWS(a, b) { GLfloat *_tmp = a; (a)=(b); (b)=_tmp; }
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Compute inverse of 4x4 transformation matrix.
 | 
			
		||||
 * 
 | 
			
		||||
 * \param mat pointer to a GLmatrix structure. The matrix inverse will be
 | 
			
		||||
 * stored in the GLmatrix::inv attribute.
 | 
			
		||||
 * 
 | 
			
		||||
 * \return GL_TRUE for success, GL_FALSE for failure (\p singular matrix).
 | 
			
		||||
 * 
 | 
			
		||||
 * \author
 | 
			
		||||
 * Code contributed by Jacques Leroy jle@star.be
 | 
			
		||||
 * Return GL_TRUE for success, GL_FALSE for failure (singular matrix)
 | 
			
		||||
 *
 | 
			
		||||
 * Calculates the inverse matrix by performing the gaussian matrix reduction
 | 
			
		||||
 * with partial pivoting folloed by back/substitution with the loops manually
 | 
			
		||||
 * unrolled.
 | 
			
		||||
 */
 | 
			
		||||
static GLboolean invert_matrix_general( GLmatrix *mat )
 | 
			
		||||
{
 | 
			
		||||
@@ -281,8 +382,20 @@ static GLboolean invert_matrix_general( GLmatrix *mat )
 | 
			
		||||
}
 | 
			
		||||
#undef SWAP_ROWS
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Adapted from graphics gems II.
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Compute inverse of a general 3d transformation matrix.
 | 
			
		||||
 * 
 | 
			
		||||
 * \param mat pointer to a GLmatrix structure. The matrix inverse will be
 | 
			
		||||
 * stored in the GLmatrix::inv attribute.
 | 
			
		||||
 * 
 | 
			
		||||
 * \return GL_TRUE for success, GL_FALSE for failure (\p singular matrix).
 | 
			
		||||
 *
 | 
			
		||||
 * \author Adapted from graphics gems II.
 | 
			
		||||
 *
 | 
			
		||||
 * Calculates the inverse of the upper left by first calculating its
 | 
			
		||||
 * determinant and multiplying it to the simetric adjust matrix of each
 | 
			
		||||
 * element. Finally deals with the translation part by transforming the
 | 
			
		||||
 * original translation vector using by the calculated submatrix inverse.
 | 
			
		||||
 */
 | 
			
		||||
static GLboolean invert_matrix_3d_general( GLmatrix *mat )
 | 
			
		||||
{
 | 
			
		||||
@@ -343,7 +456,19 @@ static GLboolean invert_matrix_3d_general( GLmatrix *mat )
 | 
			
		||||
   return GL_TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Compute inverse of a 3d transformation matrix.
 | 
			
		||||
 * 
 | 
			
		||||
 * \param mat pointer to a GLmatrix structure. The matrix inverse will be
 | 
			
		||||
 * stored in the GLmatrix::inv attribute.
 | 
			
		||||
 * 
 | 
			
		||||
 * \return GL_TRUE for success, GL_FALSE for failure (\p singular matrix).
 | 
			
		||||
 *
 | 
			
		||||
 * If the matrix is not an angle preserving matrix then calls
 | 
			
		||||
 * invert_matrix_3d_general for the actual calculation. Otherwise calculates
 | 
			
		||||
 * the inverse matrix analyzing and inverting each of the scaling, rotation and
 | 
			
		||||
 * translation parts.
 | 
			
		||||
 */
 | 
			
		||||
static GLboolean invert_matrix_3d( GLmatrix *mat )
 | 
			
		||||
{
 | 
			
		||||
   const GLfloat *in = mat->m;
 | 
			
		||||
@@ -414,15 +539,32 @@ static GLboolean invert_matrix_3d( GLmatrix *mat )
 | 
			
		||||
   return GL_TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Compute inverse of an identity transformation matrix.
 | 
			
		||||
 * 
 | 
			
		||||
 * \param mat pointer to a GLmatrix structure. The matrix inverse will be
 | 
			
		||||
 * stored in the GLmatrix::inv attribute.
 | 
			
		||||
 * 
 | 
			
		||||
 * \return always GL_TRUE.
 | 
			
		||||
 *
 | 
			
		||||
 * Simply copies Identity into GLmatrix::inv.
 | 
			
		||||
 */
 | 
			
		||||
static GLboolean invert_matrix_identity( GLmatrix *mat )
 | 
			
		||||
{
 | 
			
		||||
   MEMCPY( mat->inv, Identity, sizeof(Identity) );
 | 
			
		||||
   return GL_TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Compute inverse of a no-rotation 3d transformation matrix.
 | 
			
		||||
 * 
 | 
			
		||||
 * \param mat pointer to a GLmatrix structure. The matrix inverse will be
 | 
			
		||||
 * stored in the GLmatrix::inv attribute.
 | 
			
		||||
 * 
 | 
			
		||||
 * \return GL_TRUE for success, GL_FALSE for failure (\p singular matrix).
 | 
			
		||||
 *
 | 
			
		||||
 * Calculates the 
 | 
			
		||||
 */
 | 
			
		||||
static GLboolean invert_matrix_3d_no_rot( GLmatrix *mat )
 | 
			
		||||
{
 | 
			
		||||
   const GLfloat *in = mat->m;
 | 
			
		||||
@@ -445,7 +587,17 @@ static GLboolean invert_matrix_3d_no_rot( GLmatrix *mat )
 | 
			
		||||
   return GL_TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Compute inverse of a no-rotation 2d transformation matrix.
 | 
			
		||||
 * 
 | 
			
		||||
 * \param mat pointer to a GLmatrix structure. The matrix inverse will be
 | 
			
		||||
 * stored in the GLmatrix::inv attribute.
 | 
			
		||||
 * 
 | 
			
		||||
 * \return GL_TRUE for success, GL_FALSE for failure (\p singular matrix).
 | 
			
		||||
 *
 | 
			
		||||
 * Calculates the inverse matrix by applying the inverse scaling and
 | 
			
		||||
 * translation to the identity matrix.
 | 
			
		||||
 */
 | 
			
		||||
static GLboolean invert_matrix_2d_no_rot( GLmatrix *mat )
 | 
			
		||||
{
 | 
			
		||||
   const GLfloat *in = mat->m;
 | 
			
		||||
@@ -466,7 +618,6 @@ static GLboolean invert_matrix_2d_no_rot( GLmatrix *mat )
 | 
			
		||||
   return GL_TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
/* broken */
 | 
			
		||||
static GLboolean invert_matrix_perspective( GLmatrix *mat )
 | 
			
		||||
@@ -495,10 +646,14 @@ static GLboolean invert_matrix_perspective( GLmatrix *mat )
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Matrix inversion function pointer type.
 | 
			
		||||
 */
 | 
			
		||||
typedef GLboolean (*inv_mat_func)( GLmatrix *mat );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Table of the matrix inversion functions according to the matrix type.
 | 
			
		||||
 */
 | 
			
		||||
static inv_mat_func inv_mat_tab[7] = {
 | 
			
		||||
   invert_matrix_general,
 | 
			
		||||
   invert_matrix_identity,
 | 
			
		||||
@@ -516,7 +671,18 @@ static inv_mat_func inv_mat_tab[7] = {
 | 
			
		||||
   invert_matrix_3d
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Compute inverse of a transformation matrix.
 | 
			
		||||
 * 
 | 
			
		||||
 * \param mat pointer to a GLmatrix structure. The matrix inverse will be
 | 
			
		||||
 * stored in the GLmatrix::inv attribute.
 | 
			
		||||
 * 
 | 
			
		||||
 * \return GL_TRUE for success, GL_FALSE for failure (\p singular matrix).
 | 
			
		||||
 *
 | 
			
		||||
 * Calls the matrix inversion function in inv_mat_tab corresponding to the
 | 
			
		||||
 * given matrix type.  In case of failure, updates the MAT_FLAG_SINGULAR flag,
 | 
			
		||||
 * and copies the identity matrix into GLmatrix::inv.
 | 
			
		||||
 */
 | 
			
		||||
static GLboolean matrix_invert( GLmatrix *mat )
 | 
			
		||||
{
 | 
			
		||||
   if (inv_mat_tab[mat->type](mat)) {
 | 
			
		||||
@@ -529,16 +695,20 @@ static GLboolean matrix_invert( GLmatrix *mat )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/** \name Matrix generation */
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Generate a 4x4 transformation matrix from glRotate parameters, and
 | 
			
		||||
 * postmultiply the input matrix by it.
 | 
			
		||||
 * This function contributed by Erich Boleyn (erich@uruk.org).
 | 
			
		||||
 * Optimizatios contributed by Rudolf Opalla (rudi@khm.de).
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Generate a 4x4 transformation matrix from glRotate parameters, and
 | 
			
		||||
 * post-multiply the input matrix by it.
 | 
			
		||||
 *
 | 
			
		||||
 * \author
 | 
			
		||||
 * This function was contributed by Erich Boleyn (erich@uruk.org).
 | 
			
		||||
 * Optimizations contributed by Rudolf Opalla (rudi@khm.de).
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_rotate( GLmatrix *mat,
 | 
			
		||||
@@ -710,8 +880,6 @@ _math_matrix_rotate( GLmatrix *mat,
 | 
			
		||||
   matrix_multf( mat, m, MAT_FLAG_ROTATION );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_frustum( GLmatrix *mat,
 | 
			
		||||
		      GLfloat left, GLfloat right,
 | 
			
		||||
@@ -765,6 +933,58 @@ _math_matrix_ortho( GLmatrix *mat,
 | 
			
		||||
   matrix_multf( mat, m, (MAT_FLAG_GENERAL_SCALE|MAT_FLAG_TRANSLATION));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_scale( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z )
 | 
			
		||||
{
 | 
			
		||||
   GLfloat *m = mat->m;
 | 
			
		||||
   m[0] *= x;   m[4] *= y;   m[8]  *= z;
 | 
			
		||||
   m[1] *= x;   m[5] *= y;   m[9]  *= z;
 | 
			
		||||
   m[2] *= x;   m[6] *= y;   m[10] *= z;
 | 
			
		||||
   m[3] *= x;   m[7] *= y;   m[11] *= z;
 | 
			
		||||
 | 
			
		||||
   if (fabs(x - y) < 1e-8 && fabs(x - z) < 1e-8)
 | 
			
		||||
      mat->flags |= MAT_FLAG_UNIFORM_SCALE;
 | 
			
		||||
   else
 | 
			
		||||
      mat->flags |= MAT_FLAG_GENERAL_SCALE;
 | 
			
		||||
 | 
			
		||||
   mat->flags |= (MAT_DIRTY_TYPE |
 | 
			
		||||
		  MAT_DIRTY_INVERSE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_translate( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z )
 | 
			
		||||
{
 | 
			
		||||
   GLfloat *m = mat->m;
 | 
			
		||||
   m[12] = m[0] * x + m[4] * y + m[8]  * z + m[12];
 | 
			
		||||
   m[13] = m[1] * x + m[5] * y + m[9]  * z + m[13];
 | 
			
		||||
   m[14] = m[2] * x + m[6] * y + m[10] * z + m[14];
 | 
			
		||||
   m[15] = m[3] * x + m[7] * y + m[11] * z + m[15];
 | 
			
		||||
 | 
			
		||||
   mat->flags |= (MAT_FLAG_TRANSLATION |
 | 
			
		||||
		  MAT_DIRTY_TYPE |
 | 
			
		||||
		  MAT_DIRTY_INVERSE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_set_identity( GLmatrix *mat )
 | 
			
		||||
{
 | 
			
		||||
   MEMCPY( mat->m, Identity, 16*sizeof(GLfloat) );
 | 
			
		||||
 | 
			
		||||
   if (mat->inv)
 | 
			
		||||
      MEMCPY( mat->inv, Identity, 16*sizeof(GLfloat) );
 | 
			
		||||
 | 
			
		||||
   mat->type = MATRIX_IDENTITY;
 | 
			
		||||
   mat->flags &= ~(MAT_DIRTY_FLAGS|
 | 
			
		||||
		   MAT_DIRTY_TYPE|
 | 
			
		||||
		   MAT_DIRTY_INVERSE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/** \name Matrix analysis */
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
#define ZERO(x) (1<<x)
 | 
			
		||||
#define ONE(x)  (1<<(x+16))
 | 
			
		||||
@@ -917,7 +1137,6 @@ static void analyse_from_scratch( GLmatrix *mat )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Analyse a matrix given that its flags are accurate - this is the
 | 
			
		||||
 * more common operation, hopefully.
 | 
			
		||||
 */
 | 
			
		||||
@@ -959,7 +1178,6 @@ static void analyse_from_flags( GLmatrix *mat )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_analyse( GLmatrix *mat )
 | 
			
		||||
{
 | 
			
		||||
@@ -979,6 +1197,12 @@ _math_matrix_analyse( GLmatrix *mat )
 | 
			
		||||
		   MAT_DIRTY_INVERSE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/** \name Matrix setup */
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_copy( GLmatrix *to, const GLmatrix *from )
 | 
			
		||||
@@ -998,40 +1222,6 @@ _math_matrix_copy( GLmatrix *to, const GLmatrix *from )
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_scale( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z )
 | 
			
		||||
{
 | 
			
		||||
   GLfloat *m = mat->m;
 | 
			
		||||
   m[0] *= x;   m[4] *= y;   m[8]  *= z;
 | 
			
		||||
   m[1] *= x;   m[5] *= y;   m[9]  *= z;
 | 
			
		||||
   m[2] *= x;   m[6] *= y;   m[10] *= z;
 | 
			
		||||
   m[3] *= x;   m[7] *= y;   m[11] *= z;
 | 
			
		||||
 | 
			
		||||
   if (fabs(x - y) < 1e-8 && fabs(x - z) < 1e-8)
 | 
			
		||||
      mat->flags |= MAT_FLAG_UNIFORM_SCALE;
 | 
			
		||||
   else
 | 
			
		||||
      mat->flags |= MAT_FLAG_GENERAL_SCALE;
 | 
			
		||||
 | 
			
		||||
   mat->flags |= (MAT_DIRTY_TYPE |
 | 
			
		||||
		  MAT_DIRTY_INVERSE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_translate( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z )
 | 
			
		||||
{
 | 
			
		||||
   GLfloat *m = mat->m;
 | 
			
		||||
   m[12] = m[0] * x + m[4] * y + m[8]  * z + m[12];
 | 
			
		||||
   m[13] = m[1] * x + m[5] * y + m[9]  * z + m[13];
 | 
			
		||||
   m[14] = m[2] * x + m[6] * y + m[10] * z + m[14];
 | 
			
		||||
   m[15] = m[3] * x + m[7] * y + m[11] * z + m[15];
 | 
			
		||||
 | 
			
		||||
   mat->flags |= (MAT_FLAG_TRANSLATION |
 | 
			
		||||
		  MAT_DIRTY_TYPE |
 | 
			
		||||
		  MAT_DIRTY_INVERSE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_loadf( GLmatrix *mat, const GLfloat *m )
 | 
			
		||||
{
 | 
			
		||||
@@ -1063,7 +1253,6 @@ _math_matrix_dtr( GLmatrix *m )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_alloc_inv( GLmatrix *m )
 | 
			
		||||
{
 | 
			
		||||
@@ -1074,47 +1263,12 @@ _math_matrix_alloc_inv( GLmatrix *m )
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_mul_matrix( GLmatrix *dest, const GLmatrix *a, const GLmatrix *b )
 | 
			
		||||
{
 | 
			
		||||
   dest->flags = (a->flags |
 | 
			
		||||
		  b->flags |
 | 
			
		||||
		  MAT_DIRTY_TYPE |
 | 
			
		||||
		  MAT_DIRTY_INVERSE);
 | 
			
		||||
 | 
			
		||||
   if (TEST_MAT_FLAGS(dest, MAT_FLAGS_3D))
 | 
			
		||||
      matmul34( dest->m, a->m, b->m );
 | 
			
		||||
   else
 | 
			
		||||
      matmul4( dest->m, a->m, b->m );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_mul_floats( GLmatrix *dest, const GLfloat *m )
 | 
			
		||||
{
 | 
			
		||||
   dest->flags |= (MAT_FLAG_GENERAL |
 | 
			
		||||
		   MAT_DIRTY_TYPE |
 | 
			
		||||
		   MAT_DIRTY_INVERSE);
 | 
			
		||||
 | 
			
		||||
   matmul4( dest->m, dest->m, m );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_math_matrix_set_identity( GLmatrix *mat )
 | 
			
		||||
{
 | 
			
		||||
   MEMCPY( mat->m, Identity, 16*sizeof(GLfloat) );
 | 
			
		||||
 | 
			
		||||
   if (mat->inv)
 | 
			
		||||
      MEMCPY( mat->inv, Identity, 16*sizeof(GLfloat) );
 | 
			
		||||
 | 
			
		||||
   mat->type = MATRIX_IDENTITY;
 | 
			
		||||
   mat->flags &= ~(MAT_DIRTY_FLAGS|
 | 
			
		||||
		   MAT_DIRTY_TYPE|
 | 
			
		||||
		   MAT_DIRTY_INVERSE);
 | 
			
		||||
}
 | 
			
		||||
/*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**********************************************************************/
 | 
			
		||||
/** \name Matrix transpose */
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_math_transposef( GLfloat to[16], const GLfloat from[16] )
 | 
			
		||||
@@ -1137,7 +1291,6 @@ _math_transposef( GLfloat to[16], const GLfloat from[16] )
 | 
			
		||||
   to[15] = from[15];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_math_transposed( GLdouble to[16], const GLdouble from[16] )
 | 
			
		||||
{
 | 
			
		||||
@@ -1179,3 +1332,6 @@ _math_transposefd( GLfloat to[16], const GLdouble from[16] )
 | 
			
		||||
   to[14] = (GLfloat) from[11];
 | 
			
		||||
   to[15] = (GLfloat) from[15];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*@}*/
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,7 @@
 | 
			
		||||
/* $Id: m_matrix.h,v 1.4 2001/03/12 00:48:41 gareth Exp $ */
 | 
			
		||||
/**
 | 
			
		||||
 * \file m_matrix.h
 | 
			
		||||
 * \brief Matrix operations.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -24,13 +27,15 @@
 | 
			
		||||
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/* $Id: m_matrix.h,v 1.4.8.1 2003/03/02 00:27:36 jrfonseca Exp $ */
 | 
			
		||||
 | 
			
		||||
#ifndef _M_MATRIX_H
 | 
			
		||||
#define _M_MATRIX_H
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Give symbolic names to some of the entries in the matrix to help
 | 
			
		||||
/**
 | 
			
		||||
 * Give symbolic names to some of the entries in the matrix to help
 | 
			
		||||
 * out with the rework of the viewport_map as a matrix transform.
 | 
			
		||||
 */
 | 
			
		||||
#define MAT_SX 0
 | 
			
		||||
@@ -40,43 +45,52 @@
 | 
			
		||||
#define MAT_TY 13
 | 
			
		||||
#define MAT_TZ 14
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Different kinds of 4x4 transformation matrices:
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Different kinds of 4x4 transformation matrices.
 | 
			
		||||
 */
 | 
			
		||||
#define MATRIX_GENERAL		0	/* general 4x4 matrix */
 | 
			
		||||
#define MATRIX_IDENTITY		1	/* identity matrix */
 | 
			
		||||
#define MATRIX_3D_NO_ROT	2	/* ortho projection and others... */
 | 
			
		||||
#define MATRIX_PERSPECTIVE	3	/* perspective projection matrix */
 | 
			
		||||
#define MATRIX_2D		4	/* 2-D transformation */
 | 
			
		||||
#define MATRIX_2D_NO_ROT	5	/* 2-D scale & translate only */
 | 
			
		||||
#define MATRIX_3D		6	/* 3-D transformation */
 | 
			
		||||
enum GLmatrixtype {
 | 
			
		||||
	MATRIX_GENERAL = 0,	/**< \brief general 4x4 matrix */
 | 
			
		||||
	MATRIX_IDENTITY = 1,	/**< \brief identity matrix */
 | 
			
		||||
	MATRIX_3D_NO_ROT = 2,	/**< \brief ortho projection and others... */
 | 
			
		||||
	MATRIX_PERSPECTIVE = 3,	/**< \brief perspective projection matrix */
 | 
			
		||||
	MATRIX_2D = 4,		/**< \brief 2-D transformation */
 | 
			
		||||
	MATRIX_2D_NO_ROT = 5,	/**< \brief 2-D scale & translate only */
 | 
			
		||||
	MATRIX_3D = 6,		/**< \brief 3-D transformation */
 | 
			
		||||
} ;
 | 
			
		||||
 | 
			
		||||
#define MAT_FLAG_IDENTITY       0
 | 
			
		||||
#define MAT_FLAG_GENERAL        0x1
 | 
			
		||||
#define MAT_FLAG_ROTATION       0x2
 | 
			
		||||
#define MAT_FLAG_TRANSLATION    0x4
 | 
			
		||||
#define MAT_FLAG_UNIFORM_SCALE  0x8
 | 
			
		||||
#define MAT_FLAG_GENERAL_SCALE  0x10
 | 
			
		||||
#define MAT_FLAG_GENERAL_3D     0x20
 | 
			
		||||
#define MAT_FLAG_PERSPECTIVE    0x40
 | 
			
		||||
#define MAT_FLAG_SINGULAR       0x80
 | 
			
		||||
#define MAT_DIRTY_TYPE          0x100
 | 
			
		||||
#define MAT_DIRTY_FLAGS         0x200
 | 
			
		||||
#define MAT_DIRTY_INVERSE       0x400
 | 
			
		||||
#define MAT_FLAG_IDENTITY       0	/**< \brief is an identity matrix flag.
 | 
			
		||||
					 *   (Not actualy used - the identity
 | 
			
		||||
					 *   matrix is identified by the abcense
 | 
			
		||||
					 /   of all other flags.) */
 | 
			
		||||
#define MAT_FLAG_GENERAL        0x1	/**< \brief is a general matrix flag */
 | 
			
		||||
#define MAT_FLAG_ROTATION       0x2	/**< \brief is a rotation matrix flag */
 | 
			
		||||
#define MAT_FLAG_TRANSLATION    0x4	/**< \brief is a translation matrix flag */
 | 
			
		||||
#define MAT_FLAG_UNIFORM_SCALE  0x8	/**< \brief is an uniform scaling matrix flag */
 | 
			
		||||
#define MAT_FLAG_GENERAL_SCALE  0x10	/**< \brief is a general scaling matrix flag */
 | 
			
		||||
#define MAT_FLAG_GENERAL_3D     0x20	/**< \brief general 3D matrix flag */
 | 
			
		||||
#define MAT_FLAG_PERSPECTIVE    0x40	/**< \brief is a perspective projection matrix flag */
 | 
			
		||||
#define MAT_FLAG_SINGULAR       0x80	/**< \brief is a singular matrix flag */
 | 
			
		||||
#define MAT_DIRTY_TYPE          0x100	/**< \brief matrix type is dirty */
 | 
			
		||||
#define MAT_DIRTY_FLAGS         0x200	/**< \brief matrix flags are dirty */
 | 
			
		||||
#define MAT_DIRTY_INVERSE       0x400	/**< \brief matrix inverse is dirty */
 | 
			
		||||
 | 
			
		||||
/** \brief angle preserving matrix flags mask */
 | 
			
		||||
#define MAT_FLAGS_ANGLE_PRESERVING (MAT_FLAG_ROTATION | \
 | 
			
		||||
				    MAT_FLAG_TRANSLATION | \
 | 
			
		||||
				    MAT_FLAG_UNIFORM_SCALE)
 | 
			
		||||
 | 
			
		||||
/** \brief length preserving matrix flags mask */
 | 
			
		||||
#define MAT_FLAGS_LENGTH_PRESERVING (MAT_FLAG_ROTATION | \
 | 
			
		||||
				     MAT_FLAG_TRANSLATION)
 | 
			
		||||
 | 
			
		||||
/** \brief 3D (non-perspective) matrix flags mask */
 | 
			
		||||
#define MAT_FLAGS_3D (MAT_FLAG_ROTATION | \
 | 
			
		||||
		      MAT_FLAG_TRANSLATION | \
 | 
			
		||||
		      MAT_FLAG_UNIFORM_SCALE | \
 | 
			
		||||
		      MAT_FLAG_GENERAL_SCALE | \
 | 
			
		||||
		      MAT_FLAG_GENERAL_3D)
 | 
			
		||||
 | 
			
		||||
/** \brief geometry related matrix flags mask */
 | 
			
		||||
#define MAT_FLAGS_GEOMETRY (MAT_FLAG_GENERAL | \
 | 
			
		||||
			    MAT_FLAG_ROTATION | \
 | 
			
		||||
			    MAT_FLAG_TRANSLATION | \
 | 
			
		||||
@@ -86,19 +100,32 @@
 | 
			
		||||
			    MAT_FLAG_PERSPECTIVE | \
 | 
			
		||||
	                    MAT_FLAG_SINGULAR)
 | 
			
		||||
 | 
			
		||||
/** \brief dirty matrix flags mask */
 | 
			
		||||
#define MAT_DIRTY          (MAT_DIRTY_TYPE | \
 | 
			
		||||
			    MAT_DIRTY_FLAGS | \
 | 
			
		||||
			    MAT_DIRTY_INVERSE)
 | 
			
		||||
 | 
			
		||||
/** 
 | 
			
		||||
 * \brief Test geometry related matrix flags.
 | 
			
		||||
 * 
 | 
			
		||||
 * \param mat a pointer to a GLmatrix structure.
 | 
			
		||||
 * \param a flags mask.
 | 
			
		||||
 *
 | 
			
		||||
 * \returns non-zero if all geometry related matrix flags are contained within
 | 
			
		||||
 * the mask, or zero otherwise.
 | 
			
		||||
 */ 
 | 
			
		||||
#define TEST_MAT_FLAGS(mat, a)  \
 | 
			
		||||
    ((MAT_FLAGS_GEOMETRY & (~(a)) & ((mat)->flags) ) == 0)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \brief Matrix.
 | 
			
		||||
 */
 | 
			
		||||
typedef struct {
 | 
			
		||||
   GLfloat *m;		/* 16-byte aligned */
 | 
			
		||||
   GLfloat *inv;	/* optional, 16-byte aligned */
 | 
			
		||||
   GLuint flags;
 | 
			
		||||
   GLuint type;		/* one of the MATRIX_* values */
 | 
			
		||||
   GLfloat *m;		/**< \brief matrix, 16-byte aligned */
 | 
			
		||||
   GLfloat *inv;	/**< \brief optional inverse, 16-byte aligned */
 | 
			
		||||
   GLuint flags;	/**< \brief property flags */
 | 
			
		||||
   GLuint type;		/**< \brief one of the GLmatrixtype values */
 | 
			
		||||
} GLmatrix;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -158,9 +185,11 @@ _math_matrix_print( const GLmatrix *m );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Related functions that don't actually operate on GLmatrix structs:
 | 
			
		||||
/**
 | 
			
		||||
 * \name Related functions that don't actually operate on GLmatrix structs
 | 
			
		||||
 */
 | 
			
		||||
/*@{*/
 | 
			
		||||
 | 
			
		||||
extern void
 | 
			
		||||
_math_transposef( GLfloat to[16], const GLfloat from[16] );
 | 
			
		||||
 | 
			
		||||
@@ -170,7 +199,7 @@ _math_transposed( GLdouble to[16], const GLdouble from[16] );
 | 
			
		||||
extern void
 | 
			
		||||
_math_transposefd( GLfloat to[16], const GLdouble from[16] );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*@}*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@ clientDriverName=radeon_dri.so
 | 
			
		||||
 | 
			
		||||
# The pci bus id of the video card.  Find this with scanpci, lspci or
 | 
			
		||||
# look in /proc/pci.  
 | 
			
		||||
pciBusID=PCI:3:0:0 
 | 
			
		||||
pciBusID=PCI:1:0:0 
 | 
			
		||||
 | 
			
		||||
# Virtual screen dimensions.  Can reduce this to save videocard memory
 | 
			
		||||
# at the expense of maximum window size available.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user