summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/relnotes-7.7.1.html48
-rw-r--r--docs/relnotes.html2
-rw-r--r--progs/egl/eglgears.c3
-rw-r--r--progs/egl/eglscreen.c3
-rw-r--r--progs/rbug/simple_server.c4
-rw-r--r--progs/samples/olympic.c20
-rw-r--r--progs/samples/overlay.c18
-rw-r--r--progs/samples/rgbtoppm.c31
-rw-r--r--progs/samples/sphere.c30
-rw-r--r--progs/samples/star.c20
-rw-r--r--progs/samples/stretch.c20
-rw-r--r--progs/samples/wave.c2
-rw-r--r--progs/tests/getprocaddress.c2
-rw-r--r--progs/tests/vparray.c13
-rw-r--r--progs/vp/vp-tris.c3
-rw-r--r--src/gallium/auxiliary/rtasm/rtasm_execmem.c32
-rw-r--r--src/gallium/auxiliary/util/u_bitmask.c32
-rw-r--r--src/gallium/auxiliary/util/u_debug_memory.c8
-rw-r--r--src/gallium/auxiliary/util/u_network.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_flow.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_conv.c2
-rw-r--r--src/gallium/drivers/r300/r300_emit.c4
-rw-r--r--src/gallium/drivers/r300/r300_reg.h16
-rw-r--r--src/gallium/drivers/svga/svga_context.c44
-rw-r--r--src/gallium/drivers/svga/svga_context.h7
-rw-r--r--src/gallium/drivers/svga/svga_draw.c3
-rw-r--r--src/gallium/drivers/svga/svga_pipe_fs.c3
-rw-r--r--src/gallium/drivers/svga/svga_pipe_vs.c3
-rw-r--r--src/gallium/drivers/svga/svga_state_fs.c44
-rw-r--r--src/gallium/drivers/svga/svga_state_vs.c27
-rw-r--r--src/gallium/drivers/svga/svga_tgsi.c2
-rw-r--r--src/gallium/drivers/trace/tr_state.h2
-rw-r--r--src/gallium/state_trackers/xorg/xorg_crtc.c3
-rw-r--r--src/gallium/state_trackers/xorg/xorg_driver.c3
-rw-r--r--src/gallium/winsys/drm/vmware/xorg/SConscript1
-rw-r--r--src/glu/sgi/libnurbs/internals/displaylist.h1
-rw-r--r--src/glu/sgi/libnurbs/internals/knotvector.cc3
-rw-r--r--src/glu/sgi/libnurbs/internals/reader.h12
-rw-r--r--src/glx/x11/dri_glx.c13
-rw-r--r--src/glx/x11/glxcmds.c4
-rw-r--r--src/glx/x11/glxcurrent.c7
-rw-r--r--src/mesa/drivers/dri/i810/i810tex.h1
-rw-r--r--src/mesa/drivers/dri/i915/i915_texstate.c7
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c49
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_copy.c5
-rw-r--r--src/mesa/drivers/dri/r300/compiler/memory_pool.c4
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_code.c3
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_compiler.c11
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c30
-rw-r--r--src/mesa/drivers/dri/sis/sis_context.c2
-rw-r--r--src/mesa/glapi/ARB_sync.xml4
-rw-r--r--src/mesa/main/attrib.c47
-rw-r--r--src/mesa/main/dispatch.c4
-rw-r--r--src/mesa/main/enums.c465
-rw-r--r--src/mesa/main/image.c2
-rw-r--r--src/mesa/main/texparam.c1
-rw-r--r--src/mesa/shader/program_parse.y4
-rw-r--r--src/mesa/shader/slang/slang_codegen.c7
-rw-r--r--src/mesa/state_tracker/st_cb_bufferobjects.c49
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c2
-rw-r--r--src/mesa/x86/gen_matypes.c14
62 files changed, 712 insertions, 500 deletions
diff --git a/docs/relnotes-7.7.1.html b/docs/relnotes-7.7.1.html
new file mode 100644
index 0000000000..61a1167574
--- /dev/null
+++ b/docs/relnotes-7.7.1.html
@@ -0,0 +1,48 @@
+<HTML>
+
+<TITLE>Mesa Release Notes</TITLE>
+
+<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
+
+<BODY>
+
+<body bgcolor="#eeeeee">
+
+<H1>Mesa 7.7.1 Release Notes / date tbd</H1>
+
+<p>
+Mesa 7.7.1 is a bug-fix release.
+</p>
+<p>
+Mesa 7.7.1 implements the OpenGL 2.1 API, but the version reported by
+glGetString(GL_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 2.1.
+</p>
+<p>
+See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+for DRI hardware acceleration.
+</p>
+
+
+<h2>MD5 checksums</h2>
+<pre>
+tbd
+</pre>
+
+
+<h2>New features</h2>
+<ul>
+<li>tbd
+</ul>
+
+
+<h2>Bug fixes</h2>
+<ul>
+<li>Assorted fixes to VMware SVGA gallium driver.
+<li>Fixed broken blending to multiple color buffers in swrast driver.
+<li>Allocate constants more tightly in GL_ARB_vertex/fragment parser.
+</ul>
+
+
+</body>
+</html>
diff --git a/docs/relnotes.html b/docs/relnotes.html
index d0d9b6e5b9..f1f95c5d3c 100644
--- a/docs/relnotes.html
+++ b/docs/relnotes.html
@@ -13,7 +13,9 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
+<<<<<<< HEAD:docs/relnotes.html
<LI><A HREF="relnotes-7.8.html">7.8 release notes</A>
+<LI><A HREF="relnotes-7.7.1.html">7.7.1 release notes</A>
<LI><A HREF="relnotes-7.7.html">7.7 release notes</A>
<LI><A HREF="relnotes-7.6.1.html">7.6.1 release notes</A>
<LI><A HREF="relnotes-7.6.html">7.6 release notes</A>
diff --git a/progs/egl/eglgears.c b/progs/egl/eglgears.c
index 052d0f9e25..2d9b8cac7f 100644
--- a/progs/egl/eglgears.c
+++ b/progs/egl/eglgears.c
@@ -374,7 +374,8 @@ main(int argc, char *argv[])
EGLint screenAttribs[10];
EGLModeMESA mode[MAX_MODES];
EGLScreenMESA screen;
- EGLint count, chosenMode;
+ EGLint count;
+ EGLint chosenMode = 0;
GLboolean printInfo = GL_FALSE;
EGLint width = 0, height = 0;
diff --git a/progs/egl/eglscreen.c b/progs/egl/eglscreen.c
index 47b3ce3366..520f76ea03 100644
--- a/progs/egl/eglscreen.c
+++ b/progs/egl/eglscreen.c
@@ -52,7 +52,8 @@ main(int argc, char *argv[])
EGLint screenAttribs[10];
EGLModeMESA mode[MAX_MODES];
EGLScreenMESA screen;
- EGLint count, chosenMode;
+ EGLint count;
+ EGLint chosenMode = 0;
EGLint width = 0, height = 0;
d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
diff --git a/progs/rbug/simple_server.c b/progs/rbug/simple_server.c
index 04380c3310..3a842c06c4 100644
--- a/progs/rbug/simple_server.c
+++ b/progs/rbug/simple_server.c
@@ -29,7 +29,7 @@
#include "rbug/rbug.h"
-static void wait()
+static void rbug_wait()
{
int s = u_socket_listen_on_port(13370);
int c = u_socket_accept(s);
@@ -57,6 +57,6 @@ static void wait()
int main(int argc, char** argv)
{
- wait();
+ rbug_wait();
return 0;
}
diff --git a/progs/samples/olympic.c b/progs/samples/olympic.c
index 5385e48702..209a8c141b 100644
--- a/progs/samples/olympic.c
+++ b/progs/samples/olympic.c
@@ -74,7 +74,7 @@ int iters[RINGS];
GLuint theTorus;
-void FillTorus(float rc, int numc, float rt, int numt)
+static void FillTorus(float rc, int numc, float rt, int numt)
{
int i, j, k;
double s, t;
@@ -106,7 +106,7 @@ void FillTorus(float rc, int numc, float rt, int numt)
}
}
-float Clamp(int iters_left, float t)
+static float Clamp(int iters_left, float t)
{
if (iters_left < 3) {
return 0.0;
@@ -114,7 +114,7 @@ float Clamp(int iters_left, float t)
return (iters_left-2)*t/iters_left;
}
-void DrawScene(void)
+static void DrawScene(void)
{
int i, j;
GLboolean goIdle;
@@ -172,7 +172,7 @@ void DrawScene(void)
}
}
-float MyRand(void)
+static float MyRand(void)
{
return 10.0 * ( (float) rand() / (float) RAND_MAX - 0.5 );
}
@@ -181,12 +181,12 @@ float MyRand(void)
#define GLUTCALLBACK
#endif
-void GLUTCALLBACK glut_post_redisplay_p(void)
+static void GLUTCALLBACK glut_post_redisplay_p(void)
{
glutPostRedisplay();
}
-void ReInit(void)
+static void ReInit(void)
{
int i;
float deviation;
@@ -206,7 +206,7 @@ void ReInit(void)
glutIdleFunc(glut_post_redisplay_p);
}
-void Init(void)
+static void Init(void)
{
float base, height;
float aspect, x, y;
@@ -312,13 +312,13 @@ void Init(void)
glMatrixMode(GL_MODELVIEW);
}
-void Reshape(int width, int height)
+static void Reshape(int width, int height)
{
glViewport(0, 0, width, height);
}
-void Key(unsigned char key, int x, int y)
+static void Key(unsigned char key, int x, int y)
{
switch (key) {
@@ -330,7 +330,7 @@ void Key(unsigned char key, int x, int y)
}
}
-GLenum Args(int argc, char **argv)
+static GLenum Args(int argc, char **argv)
{
GLint i;
diff --git a/progs/samples/overlay.c b/progs/samples/overlay.c
index 23b5a4793b..6087cef281 100644
--- a/progs/samples/overlay.c
+++ b/progs/samples/overlay.c
@@ -69,19 +69,19 @@ starRec stars[MAXSTARS];
float sinTable[MAXANGLES];
-float Sin(float angle)
+static float Sin(float angle)
{
return (sinTable[(GLint)angle]);
}
-float Cos(float angle)
+static float Cos(float angle)
{
return (sinTable[((GLint)angle+(MAXANGLES/4))%MAXANGLES]);
}
-void NewStar(GLint n, GLint d)
+static void NewStar(GLint n, GLint d)
{
if (rand()%4 == 0) {
@@ -103,7 +103,7 @@ void NewStar(GLint n, GLint d)
}
}
-void RotatePoint(float *x, float *y, float rotation)
+static void RotatePoint(float *x, float *y, float rotation)
{
float tmpX, tmpY;
@@ -113,7 +113,7 @@ void RotatePoint(float *x, float *y, float rotation)
*y = tmpY;
}
-void MoveStars(void)
+static void MoveStars(void)
{
float offset;
GLint n;
@@ -134,7 +134,7 @@ void MoveStars(void)
}
}
-GLenum StarPoint(GLint n)
+static GLenum StarPoint(GLint n)
{
float x0, y0, x1, y1, width;
GLint i;
@@ -182,7 +182,7 @@ GLenum StarPoint(GLint n)
}
}
-void ShowStars(void)
+static void ShowStars(void)
{
GLint n;
@@ -221,7 +221,7 @@ static void Init(void)
glDisable(GL_DITHER);
}
-void Reshape(int width, int height)
+static void Reshape(int width, int height)
{
windW = (GLint)width;
@@ -262,7 +262,7 @@ static void Key(unsigned char key, int x, int y)
}
}
-void Idle(void)
+static void Idle(void)
{
if (overlayInit == GL_FALSE) {
diff --git a/progs/samples/rgbtoppm.c b/progs/samples/rgbtoppm.c
index dcb74228df..403578ef42 100644
--- a/progs/samples/rgbtoppm.c
+++ b/progs/samples/rgbtoppm.c
@@ -3,6 +3,7 @@
/* texload is a simplistic routine for reading an SGI .rgb image file. */
+#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -25,7 +26,7 @@ typedef struct _ImageRec {
int *rowSize;
} ImageRec;
-void
+static void
rgbtorgb(unsigned char *r,unsigned char *g,unsigned char *b,unsigned char *l,int n) {
while(n--) {
l[0] = r[0];
@@ -72,6 +73,7 @@ static ImageRec *ImageOpen(char *fileName)
ImageRec *image;
int swapFlag;
int x;
+ int result;
endianTest.testWord = 1;
if (endianTest.testByte[0] == 1) {
@@ -90,7 +92,8 @@ static ImageRec *ImageOpen(char *fileName)
return NULL;
}
- fread(image, 1, 12, image->file);
+ result = fread(image, 1, 12, image->file);
+ assert(result == 12);
if (swapFlag) {
ConvertShort(&image->imagic, 1);
@@ -117,8 +120,10 @@ static ImageRec *ImageOpen(char *fileName)
}
image->rleEnd = 512 + (2 * x);
fseek(image->file, 512, SEEK_SET);
- fread(image->rowStart, 1, x, image->file);
- fread(image->rowSize, 1, x, image->file);
+ result = fread(image->rowStart, 1, x, image->file);
+ assert(result == x);
+ result = fread(image->rowSize, 1, x, image->file);
+ assert(result == x);
if (swapFlag) {
ConvertUint(image->rowStart, x/(int) sizeof(unsigned));
ConvertUint((unsigned *)image->rowSize, x/(int) sizeof(int));
@@ -138,11 +143,13 @@ static void
ImageGetRow(ImageRec *image, unsigned char *buf, int y, int z) {
unsigned char *iPtr, *oPtr, pixel;
int count;
+ int result;
if ((image->type & 0xFF00) == 0x0100) {
fseek(image->file, (long) image->rowStart[y+z*image->ysize], SEEK_SET);
- fread(image->tmp, 1, (unsigned int)image->rowSize[y+z*image->ysize],
- image->file);
+ result = fread(image->tmp, 1, (unsigned int)image->rowSize[y+z*image->ysize],
+ image->file);
+ assert(result == (unsigned int)image->rowSize[y+z*image->ysize]);
iPtr = image->tmp;
oPtr = buf;
@@ -166,11 +173,13 @@ ImageGetRow(ImageRec *image, unsigned char *buf, int y, int z) {
} else {
fseek(image->file, 512+(y*image->xsize)+(z*image->xsize*image->ysize),
SEEK_SET);
- fread(buf, 1, image->xsize, image->file);
+ result = fread(buf, 1, image->xsize, image->file);
+ assert(result == image->xsize);
}
}
-GLubyte *
+#if 0
+static GLubyte *
read_alpha_texture(char *name, int *width, int *height)
{
unsigned char *base, *lptr;
@@ -199,8 +208,9 @@ read_alpha_texture(char *name, int *width, int *height)
return (unsigned char *) base;
}
+#endif
-GLubyte *
+static GLubyte *
read_rgb_texture(char *name, int *width, int *height)
{
unsigned char *base, *ptr;
@@ -261,7 +271,8 @@ read_rgb_texture(char *name, int *width, int *height)
int main(int argc, char **argv)
{
- int width, height;
+ int width = 0;
+ int height = 0;
GLubyte *data;
char buff[32];
int n;
diff --git a/progs/samples/sphere.c b/progs/samples/sphere.c
index 7d0508dee9..23d4fe32c0 100644
--- a/progs/samples/sphere.c
+++ b/progs/samples/sphere.c
@@ -445,7 +445,7 @@ GLfloat identity[16] = {
};
-void BuildCylinder(int numEdges)
+static void BuildCylinder(int numEdges)
{
int i, top = 1.0, bottom = -1.0;
float x[100], y[100], angle;
@@ -481,7 +481,7 @@ void BuildCylinder(int numEdges)
glEndList();
}
-void BuildTorus(float rc, int numc, float rt, int numt)
+static void BuildTorus(float rc, int numc, float rt, int numt)
{
int i, j, k;
double s, t;
@@ -515,7 +515,7 @@ void BuildTorus(float rc, int numc, float rt, int numt)
glEndList();
}
-void BuildCage(void)
+static void BuildCage(void)
{
int i;
float inc;
@@ -609,7 +609,7 @@ void BuildCage(void)
glEndList();
}
-void BuildCube(void)
+static void BuildCube(void)
{
int i, j;
@@ -628,7 +628,7 @@ void BuildCube(void)
glEndList();
}
-void BuildLists(void)
+static void BuildLists(void)
{
cube = glGenLists(1);
@@ -646,7 +646,7 @@ void BuildLists(void)
genericObject = torus;
}
-void SetDefaultSettings(void)
+static void SetDefaultSettings(void)
{
magFilter = nnearest;
@@ -657,7 +657,7 @@ void SetDefaultSettings(void)
autoRotate = GL_TRUE;
}
-unsigned char *AlphaPadImage(int bufSize, unsigned char *inData, int alpha)
+static unsigned char *AlphaPadImage(int bufSize, unsigned char *inData, int alpha)
{
unsigned char *outData, *out_ptr, *in_ptr;
int i;
@@ -677,7 +677,7 @@ unsigned char *AlphaPadImage(int bufSize, unsigned char *inData, int alpha)
return outData;
}
-void Init(void)
+static void Init(void)
{
float ambient[] = {0.0, 0.0, 0.0, 1.0};
float diffuse[] = {1.0, 1.0, 1.0, 1.0};
@@ -753,7 +753,7 @@ void Init(void)
BuildLists();
}
-void ReInit(void)
+static void ReInit(void)
{
if (genericObject == torus) {
glEnable(GL_DEPTH_TEST);
@@ -773,7 +773,7 @@ void ReInit(void)
glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, textureEnvironment);
}
-void Draw(void)
+static void Draw(void)
{
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
@@ -806,7 +806,7 @@ void Draw(void)
glutSwapBuffers();
}
-void Reshape(int width, int height)
+static void Reshape(int width, int height)
{
W = width;
H = height;
@@ -818,7 +818,7 @@ void Reshape(int width, int height)
glMatrixMode(GL_MODELVIEW);
}
-void Idle(void)
+static void Idle(void)
{
static double t0 = -1.;
double t, dt;
@@ -833,7 +833,7 @@ void Idle(void)
glutPostRedisplay();
}
-void Key2(int key, int x, int y)
+static void Key2(int key, int x, int y)
{
switch (key) {
@@ -863,7 +863,7 @@ void Key2(int key, int x, int y)
glutPostRedisplay();
}
-void Key(unsigned char key, int x, int y)
+static void Key(unsigned char key, int x, int y)
{
switch (key) {
@@ -950,7 +950,7 @@ void Key(unsigned char key, int x, int y)
glutPostRedisplay();
}
-GLenum Args(int argc, char **argv)
+static GLenum Args(int argc, char **argv)
{
GLint i;
diff --git a/progs/samples/star.c b/progs/samples/star.c
index 2cf470e2a2..2c44ebfd49 100644
--- a/progs/samples/star.c
+++ b/progs/samples/star.c
@@ -67,19 +67,19 @@ starRec stars[MAXSTARS];
float sinTable[MAXANGLES];
-float Sin(float angle)
+static float Sin(float angle)
{
return (sinTable[(GLint)angle]);
}
-float Cos(float angle)
+static float Cos(float angle)
{
return (sinTable[((GLint)angle+(MAXANGLES/4))%MAXANGLES]);
}
-void NewStar(GLint n, GLint d)
+static void NewStar(GLint n, GLint d)
{
if (rand()%4 == 0) {
@@ -101,7 +101,7 @@ void NewStar(GLint n, GLint d)
}
}
-void RotatePoint(float *x, float *y, float rotation)
+static void RotatePoint(float *x, float *y, float rotation)
{
float tmpX, tmpY;
@@ -111,7 +111,7 @@ void RotatePoint(float *x, float *y, float rotation)
*y = tmpY;
}
-void MoveStars(void)
+static void MoveStars(void)
{
float offset;
GLint n;
@@ -142,7 +142,7 @@ void MoveStars(void)
}
}
-GLenum StarPoint(GLint n)
+static GLenum StarPoint(GLint n)
{
float x0, y0, x1, y1, width;
GLint i;
@@ -190,7 +190,7 @@ GLenum StarPoint(GLint n)
}
}
-void ShowStars(void)
+static void ShowStars(void)
{
GLint n;
@@ -229,7 +229,7 @@ static void Init(void)
glDisable(GL_DITHER);
}
-void Reshape(int width, int height)
+static void Reshape(int width, int height)
{
windW = (GLint)width;
@@ -260,7 +260,7 @@ static void Key(unsigned char key, int x, int y)
}
}
-void Draw(void)
+static void Draw(void)
{
MoveStars();
@@ -307,7 +307,7 @@ static GLenum Args(int argc, char **argv)
#define GLUTCALLBACK
#endif
-void GLUTCALLBACK glut_post_redisplay_p(void)
+static void GLUTCALLBACK glut_post_redisplay_p(void)
{
glutPostRedisplay();
}
diff --git a/progs/samples/stretch.c b/progs/samples/stretch.c
index 1fd015d794..11201dca23 100644
--- a/progs/samples/stretch.c
+++ b/progs/samples/stretch.c
@@ -67,7 +67,7 @@ int cCount, cIndex[2], cStep;
GLenum op = OP_NOOP;
-void DrawImage(void)
+static void DrawImage(void)
{
glRasterPos2i(0, 0);
@@ -84,7 +84,7 @@ void DrawImage(void)
image->data);
}
-void DrawPoint(void)
+static void DrawPoint(void)
{
int i;
@@ -102,7 +102,7 @@ void DrawPoint(void)
}
}
-void InitVList(void)
+static void InitVList(void)
{
vList[0].x = 0.0;
@@ -141,7 +141,7 @@ void InitVList(void)
vList[4].tY = cList[0].y / (float)imageSizeY;
}
-void ScaleImage(int sizeX, int sizeY)
+static void ScaleImage(int sizeX, int sizeY)
{
GLubyte *buf;
@@ -154,7 +154,7 @@ void ScaleImage(int sizeX, int sizeY)
image->sizeY = sizeY;
}
-void SetPoint(int x, int y)
+static void SetPoint(int x, int y)
{
cList[cCount].x = (float)x;
@@ -162,7 +162,7 @@ void SetPoint(int x, int y)
cCount++;
}
-void Stretch(void)
+static void Stretch(void)
{
glBegin(GL_TRIANGLES);
@@ -221,7 +221,7 @@ void Stretch(void)
}
}
-void Key(unsigned char key, int x, int y)
+static void Key(unsigned char key, int x, int y)
{
switch (key) {
@@ -245,7 +245,7 @@ void Key(unsigned char key, int x, int y)
glutPostRedisplay();
}
-void Mouse(int button, int state, int mouseX, int mouseY)
+static void Mouse(int button, int state, int mouseX, int mouseY)
{
if (state != GLUT_DOWN)
@@ -263,7 +263,7 @@ void Mouse(int button, int state, int mouseX, int mouseY)
glutPostRedisplay();
}
-void Animate(void)
+static void Animate(void)
{
static double t0 = -1.;
double t, dt;
@@ -322,7 +322,7 @@ static GLenum Args(int argc, char **argv)
#define GLUTCALLBACK
#endif
-void GLUTCALLBACK glut_post_redisplay_p(void)
+static void GLUTCALLBACK glut_post_redisplay_p(void)
{
glutPostRedisplay();
}
diff --git a/progs/samples/wave.c b/progs/samples/wave.c
index d3c4687459..396a6943e3 100644
--- a/progs/samples/wave.c
+++ b/progs/samples/wave.c
@@ -92,7 +92,7 @@ GLubyte contourTexture2[] = {
#endif
-void GLUTCALLBACK glut_post_redisplay_p(void)
+static void GLUTCALLBACK glut_post_redisplay_p(void)
{
static double t0 = -1.;
double t, dt;
diff --git a/progs/tests/getprocaddress.c b/progs/tests/getprocaddress.c
index b905eeaf81..e699baf44b 100644
--- a/progs/tests/getprocaddress.c
+++ b/progs/tests/getprocaddress.c
@@ -1188,7 +1188,7 @@ exercise_buffer_objects(enum Map_Buffer_Usage usage)
GLuint bufferID;
GLint bufferMapped;
static GLubyte data[BUFFER_DATA_SIZE] = {0};
- float *dataPtr;
+ float *dataPtr = NULL;
/* Get the function pointers we need. These are from
* GL_ARB_vertex_buffer_object and are required in all
diff --git a/progs/tests/vparray.c b/progs/tests/vparray.c
index af9b62d33e..fe168c6cd5 100644
--- a/progs/tests/vparray.c
+++ b/progs/tests/vparray.c
@@ -37,13 +37,16 @@ static void read_surface( char *filename )
}
numverts = 0;
- while (!feof(f) && numverts < MAXVERTS) {
- fscanf( f, "%f %f %f %f %f %f",
- &data[numverts][0], &data[numverts][1], &data[numverts][2],
- &data[numverts][3], &data[numverts][4], &data[numverts][5] );
+ while (numverts < MAXVERTS) {
+ int result;
+ result = fscanf( f, "%f %f %f %f %f %f",
+ &data[numverts][0], &data[numverts][1], &data[numverts][2],
+ &data[numverts][3], &data[numverts][4], &data[numverts][5] );
+ if (result == EOF) {
+ break;
+ }
numverts++;
}
- numverts--;
printf("%d vertices, %d triangles\n", numverts, numverts-2);
printf("data = %p\n", (void *) data);
diff --git a/progs/vp/vp-tris.c b/progs/vp/vp-tris.c
index 29cd027b00..09236c296f 100644
--- a/progs/vp/vp-tris.c
+++ b/progs/vp/vp-tris.c
@@ -96,7 +96,8 @@ static void Init( void )
exit(1);
}
- sz = (GLuint) fread(buf, 1, sizeof(buf), f);
+ sz = (GLuint) fread(buf, 1, sizeof(buf) - 1, f);
+ buf[sizeof(buf) - 1] = '\0';
if (!feof(f)) {
fprintf(stderr, "file too long\n");
fclose(f);
diff --git a/src/gallium/auxiliary/rtasm/rtasm_execmem.c b/src/gallium/auxiliary/rtasm/rtasm_execmem.c
index 01811d5011..ffed768f97 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_execmem.c
+++ b/src/gallium/auxiliary/rtasm/rtasm_execmem.c
@@ -41,6 +41,12 @@
#define MAP_ANONYMOUS MAP_ANON
#endif
+#if defined(PIPE_OS_WINDOWS)
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
+#include <windows.h>
+#endif
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS)
@@ -118,7 +124,29 @@ rtasm_exec_free(void *addr)
}
-#else /* PIPE_OS_LINUX || PIPE_OS_BSD || PIPE_OS_SOLARIS */
+#elif defined(PIPE_OS_WINDOWS)
+
+
+/*
+ * Avoid Data Execution Prevention.
+ */
+
+void *
+rtasm_exec_malloc(size_t size)
+{
+ return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
+}
+
+
+void
+rtasm_exec_free(void *addr)
+{
+ VirtualFree(addr, 0, MEM_RELEASE);
+}
+
+
+#else
+
/*
* Just use regular memory.
@@ -138,4 +166,4 @@ rtasm_exec_free(void *addr)
}
-#endif /* PIPE_OS_LINUX || PIPE_OS_BSD || PIPE_OS_SOLARIS */
+#endif
diff --git a/src/gallium/auxiliary/util/u_bitmask.c b/src/gallium/auxiliary/util/u_bitmask.c
index 77587c07ec..23c93a3ebc 100644
--- a/src/gallium/auxiliary/util/u_bitmask.c
+++ b/src/gallium/auxiliary/util/u_bitmask.c
@@ -97,12 +97,12 @@ util_bitmask_resize(struct util_bitmask *bm,
if(!minimum_size)
return FALSE;
- if(bm->size > minimum_size)
+ if(bm->size >= minimum_size)
return TRUE;
assert(bm->size % UTIL_BITMASK_BITS_PER_WORD == 0);
new_size = bm->size;
- while(!(new_size > minimum_size)) {
+ while(new_size < minimum_size) {
new_size *= 2;
/* Check integer overflow */
if(new_size < bm->size)
@@ -136,7 +136,7 @@ util_bitmask_filled_set(struct util_bitmask *bm,
unsigned index)
{
assert(bm->filled <= bm->size);
- assert(index <= bm->size);
+ assert(index < bm->size);
if(index == bm->filled) {
++bm->filled;
@@ -149,7 +149,7 @@ util_bitmask_filled_unset(struct util_bitmask *bm,
unsigned index)
{
assert(bm->filled <= bm->size);
- assert(index <= bm->size);
+ assert(index < bm->size);
if(index < bm->filled)
bm->filled = index;
@@ -182,7 +182,7 @@ util_bitmask_add(struct util_bitmask *bm)
mask = 1;
}
found:
-
+
/* grow the bitmask if necessary */
if(!util_bitmask_resize(bm, bm->filled))
return UTIL_BITMASK_INVALID_INDEX;
@@ -198,9 +198,9 @@ unsigned
util_bitmask_set(struct util_bitmask *bm,
unsigned index)
{
- unsigned word = index / UTIL_BITMASK_BITS_PER_WORD;
- unsigned bit = index % UTIL_BITMASK_BITS_PER_WORD;
- util_bitmask_word mask = 1 << bit;
+ unsigned word;
+ unsigned bit;
+ util_bitmask_word mask;
assert(bm);
@@ -208,6 +208,10 @@ util_bitmask_set(struct util_bitmask *bm,
if(!util_bitmask_resize(bm, index))
return UTIL_BITMASK_INVALID_INDEX;
+ word = index / UTIL_BITMASK_BITS_PER_WORD;
+ bit = index % UTIL_BITMASK_BITS_PER_WORD;
+ mask = 1 << bit;
+
bm->words[word] |= mask;
util_bitmask_filled_set(bm, index);
@@ -220,15 +224,19 @@ void
util_bitmask_clear(struct util_bitmask *bm,
unsigned index)
{
- unsigned word = index / UTIL_BITMASK_BITS_PER_WORD;
- unsigned bit = index % UTIL_BITMASK_BITS_PER_WORD;
- util_bitmask_word mask = 1 << bit;
+ unsigned word;
+ unsigned bit;
+ util_bitmask_word mask;
assert(bm);
if(index >= bm->size)
return;
+ word = index / UTIL_BITMASK_BITS_PER_WORD;
+ bit = index % UTIL_BITMASK_BITS_PER_WORD;
+ mask = 1 << bit;
+
bm->words[word] &= ~mask;
util_bitmask_filled_unset(bm, index);
@@ -250,7 +258,7 @@ util_bitmask_get(struct util_bitmask *bm,
return TRUE;
}
- if(index > bm->size)
+ if(index >= bm->size)
return FALSE;
if(bm->words[word] & mask) {
diff --git a/src/gallium/auxiliary/util/u_debug_memory.c b/src/gallium/auxiliary/util/u_debug_memory.c
index 7623cb9398..d6484f4ad5 100644
--- a/src/gallium/auxiliary/util/u_debug_memory.c
+++ b/src/gallium/auxiliary/util/u_debug_memory.c
@@ -297,9 +297,9 @@ debug_memory_end(unsigned long start_no)
if((start_no <= hdr->no && hdr->no < last_no) ||
(last_no < start_no && (hdr->no < last_no || start_no <= hdr->no))) {
- debug_printf("%s:%u:%s: %u bytes at %p not freed\n",
+ debug_printf("%s:%u:%s: %lu bytes at %p not freed\n",
hdr->file, hdr->line, hdr->function,
- hdr->size, ptr);
+ (unsigned long) hdr->size, ptr);
#if DEBUG_MEMORY_STACK
debug_backtrace_dump(hdr->backtrace, DEBUG_MEMORY_STACK);
#endif
@@ -315,8 +315,8 @@ debug_memory_end(unsigned long start_no)
}
if(total_size) {
- debug_printf("Total of %u KB of system memory apparently leaked\n",
- (total_size + 1023)/1024);
+ debug_printf("Total of %lu KB of system memory apparently leaked\n",
+ (unsigned long) (total_size + 1023)/1024);
}
else {
debug_printf("No memory leaks detected.\n");
diff --git a/src/gallium/auxiliary/util/u_network.c b/src/gallium/auxiliary/util/u_network.c
index 9eb8f309cd..87ee0e4768 100644
--- a/src/gallium/auxiliary/util/u_network.c
+++ b/src/gallium/auxiliary/util/u_network.c
@@ -117,7 +117,7 @@ u_socket_connect(const char *hostname, uint16_t port)
if (!host)
return -1;
- memcpy((char *)&sa.sin_addr,host->h_addr,host->h_length);
+ memcpy((char *)&sa.sin_addr,host->h_addr_list[0],host->h_length);
sa.sin_family= host->h_addrtype;
sa.sin_port = htons(port);
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
index d14f468ba9..ced7b9c11d 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
@@ -142,7 +142,7 @@ lp_build_blend_factor_unswizzled(struct lp_build_blend_aos_context *bld,
enum lp_build_blend_swizzle {
LP_BUILD_BLEND_SWIZZLE_RGBA = 0,
- LP_BUILD_BLEND_SWIZZLE_AAAA = 1,
+ LP_BUILD_BLEND_SWIZZLE_AAAA = 1
};
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_flow.c b/src/gallium/drivers/llvmpipe/lp_bld_flow.c
index dcc25fbff8..25c10af29f 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_flow.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_flow.c
@@ -47,7 +47,7 @@
*/
enum lp_build_flow_construct_kind {
lP_BUILD_FLOW_SCOPE,
- LP_BUILD_FLOW_SKIP,
+ LP_BUILD_FLOW_SKIP
};
diff --git a/src/gallium/drivers/llvmpipe/lp_test_conv.c b/src/gallium/drivers/llvmpipe/lp_test_conv.c
index 968c7a2d4a..faddfb9677 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_conv.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_conv.c
@@ -330,7 +330,7 @@ test_one(unsigned verbose,
fprintf(stderr, "conv.bc written\n");
fprintf(stderr, "Invoke as \"llc -o - conv.bc\"\n");
firsttime = FALSE;
- //abort();
+ /* abort(); */
}
}
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 199ce3a945..1dc9216a7b 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -997,7 +997,7 @@ validate:
goto validate;
}
} else {
- // debug_printf("No VBO while emitting dirty state!\n");
+ /* debug_printf("No VBO while emitting dirty state!\n"); */
}
if (!r300->winsys->validate(r300->winsys)) {
r300->context.flush(&r300->context, 0, NULL);
@@ -1129,7 +1129,7 @@ validate:
*/
/* Finally, emit the VBO. */
- //r300_emit_vertex_buffer(r300);
+ /* r300_emit_vertex_buffer(r300); */
r300->dirty_hw++;
}
diff --git a/src/gallium/drivers/r300/r300_reg.h b/src/gallium/drivers/r300/r300_reg.h
index d8d08fbe26..0aa1da07f8 100644
--- a/src/gallium/drivers/r300/r300_reg.h
+++ b/src/gallium/drivers/r300/r300_reg.h
@@ -2638,7 +2638,7 @@ enum {
VE_COND_MUX_GTE = 25,
VE_SET_GREATER_THAN = 26,
VE_SET_EQUAL = 27,
- VE_SET_NOT_EQUAL = 28,
+ VE_SET_NOT_EQUAL = 28
};
enum {
@@ -2672,20 +2672,20 @@ enum {
ME_PRED_SET_CLR = 25,
ME_PRED_SET_INV = 26,
ME_PRED_SET_POP = 27,
- ME_PRED_SET_RESTORE = 28,
+ ME_PRED_SET_RESTORE = 28
};
enum {
/* R3XX */
PVS_MACRO_OP_2CLK_MADD = 0,
- PVS_MACRO_OP_2CLK_M2X_ADD = 1,
+ PVS_MACRO_OP_2CLK_M2X_ADD = 1
};
enum {
PVS_SRC_REG_TEMPORARY = 0, /* Intermediate Storage */
PVS_SRC_REG_INPUT = 1, /* Input Vertex Storage */
PVS_SRC_REG_CONSTANT = 2, /* Constant State Storage */
- PVS_SRC_REG_ALT_TEMPORARY = 3, /* Alternate Intermediate Storage */
+ PVS_SRC_REG_ALT_TEMPORARY = 3 /* Alternate Intermediate Storage */
};
enum {
@@ -2694,7 +2694,7 @@ enum {
PVS_DST_REG_OUT = 2, /* Output Memory. Used for all outputs */
PVS_DST_REG_OUT_REPL_X = 3, /* Output Memory & Replicate X to all channels */
PVS_DST_REG_ALT_TEMPORARY = 4, /* Alternate Intermediate Storage */
- PVS_DST_REG_INPUT = 5, /* Output Memory & Replicate X to all channels */
+ PVS_DST_REG_INPUT = 5 /* Output Memory & Replicate X to all channels */
};
enum {
@@ -2703,7 +2703,7 @@ enum {
PVS_SRC_SELECT_Z = 2, /* Select Z Component */
PVS_SRC_SELECT_W = 3, /* Select W Component */
PVS_SRC_SELECT_FORCE_0 = 4, /* Force Component to 0.0 */
- PVS_SRC_SELECT_FORCE_1 = 5, /* Force Component to 1.0 */
+ PVS_SRC_SELECT_FORCE_1 = 5 /* Force Component to 1.0 */
};
/* PVS Opcode & Destination Operand Description */
@@ -2742,7 +2742,7 @@ enum {
PVS_DST_ADDR_SEL_MASK = 0x3,
PVS_DST_ADDR_SEL_SHIFT = 29,
PVS_DST_ADDR_MODE_0_MASK = 0x1,
- PVS_DST_ADDR_MODE_0_SHIFT = 31,
+ PVS_DST_ADDR_MODE_0_SHIFT = 31
};
/* PVS Source Operand Description */
@@ -2777,7 +2777,7 @@ enum {
PVS_SRC_ADDR_SEL_MASK = 0x3,
PVS_SRC_ADDR_SEL_SHIFT = 29,
PVS_SRC_ADDR_MODE_1_MASK = 0x0,
- PVS_SRC_ADDR_MODE_1_SHIFT = 32,
+ PVS_SRC_ADDR_MODE_1_SHIFT = 32
};
/*\}*/
diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c
index c3de12b4a3..af99c9de37 100644
--- a/src/gallium/drivers/svga/svga_context.c
+++ b/src/gallium/drivers/svga/svga_context.c
@@ -29,6 +29,7 @@
#include "pipe/p_inlines.h"
#include "pipe/p_screen.h"
#include "util/u_memory.h"
+#include "util/u_bitmask.h"
#include "util/u_upload_mgr.h"
#include "svga_context.h"
@@ -61,6 +62,9 @@ static void svga_destroy( struct pipe_context *pipe )
u_upload_destroy( svga->upload_vb );
u_upload_destroy( svga->upload_ib );
+ util_bitmask_destroy( svga->vs_bm );
+ util_bitmask_destroy( svga->fs_bm );
+
for(shader = 0; shader < PIPE_SHADER_TYPES; ++shader)
pipe_buffer_reference( &svga->curr.cb[shader], NULL );
@@ -130,7 +134,7 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen )
svga = CALLOC_STRUCT(svga_context);
if (svga == NULL)
- goto error1;
+ goto no_svga;
svga->pipe.winsys = screen->winsys;
svga->pipe.screen = screen;
@@ -142,7 +146,7 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen )
svga->swc = svgascreen->sws->context_create(svgascreen->sws);
if(!svga->swc)
- goto error2;
+ goto no_swc;
svga_init_blend_functions(svga);
svga_init_blit_functions(svga);
@@ -165,32 +169,40 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen )
svga->debug.disable_shader = debug_get_num_option("SVGA_DISABLE_SHADER", ~0);
if (!svga_init_swtnl(svga))
- goto error3;
+ goto no_swtnl;
+
+ svga->fs_bm = util_bitmask_create();
+ if (svga->fs_bm == NULL)
+ goto no_fs_bm;
+
+ svga->vs_bm = util_bitmask_create();
+ if (svga->vs_bm == NULL)
+ goto no_vs_bm;
svga->upload_ib = u_upload_create( svga->pipe.screen,
32 * 1024,
16,
PIPE_BUFFER_USAGE_INDEX );
if (svga->upload_ib == NULL)
- goto error4;
+ goto no_upload_ib;
svga->upload_vb = u_upload_create( svga->pipe.screen,
128 * 1024,
16,
PIPE_BUFFER_USAGE_VERTEX );
if (svga->upload_vb == NULL)
- goto error5;
+ goto no_upload_vb;
svga->hwtnl = svga_hwtnl_create( svga,
svga->upload_ib,
svga->swc );
if (svga->hwtnl == NULL)
- goto error6;
+ goto no_hwtnl;
ret = svga_emit_initial_state( svga );
if (ret)
- goto error7;
+ goto no_state;
/* Avoid shortcircuiting state with initial value of zero.
*/
@@ -209,19 +221,23 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen )
return &svga->pipe;
-error7:
+no_state:
svga_hwtnl_destroy( svga->hwtnl );
-error6:
+no_hwtnl:
u_upload_destroy( svga->upload_vb );
-error5:
+no_upload_vb:
u_upload_destroy( svga->upload_ib );
-error4:
+no_upload_ib:
+ util_bitmask_destroy( svga->vs_bm );
+no_vs_bm:
+ util_bitmask_destroy( svga->fs_bm );
+no_fs_bm:
svga_destroy_swtnl(svga);
-error3:
+no_swtnl:
svga->swc->destroy(svga->swc);
-error2:
+no_swc:
FREE(svga);
-error1:
+no_svga:
return NULL;
}
diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h
index 0885d9ca74..fa7f6cb3bb 100644
--- a/src/gallium/drivers/svga/svga_context.h
+++ b/src/gallium/drivers/svga/svga_context.h
@@ -41,6 +41,7 @@
struct draw_vertex_shader;
struct svga_shader_result;
struct SVGACmdMemory;
+struct util_bitmask;
struct u_upload_mgr;
@@ -319,12 +320,14 @@ struct svga_context
boolean new_vdecl;
} swtnl;
+ /* Bitmask of used shader IDs */
+ struct util_bitmask *fs_bm;
+ struct util_bitmask *vs_bm;
+
struct {
unsigned dirty[4];
unsigned texture_timestamp;
- unsigned next_fs_id;
- unsigned next_vs_id;
/* Internally generated shaders:
*/
diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c
index 8db40d0fd5..ca73cf9d5a 100644
--- a/src/gallium/drivers/svga/svga_draw.c
+++ b/src/gallium/drivers/svga/svga_draw.c
@@ -164,7 +164,8 @@ svga_hwtnl_flush( struct svga_hwtnl *hwtnl )
}
SVGA_DBG(DEBUG_DMA, "draw to sid %p, %d prims\n",
- svga_surface(svga->curr.framebuffer.cbufs[0])->handle,
+ svga->curr.framebuffer.cbufs[0] ?
+ svga_surface(svga->curr.framebuffer.cbufs[0])->handle : NULL,
hwtnl->cmd.prim_count);
ret = SVGA3D_BeginDrawPrimitives(swc,
diff --git a/src/gallium/drivers/svga/svga_pipe_fs.c b/src/gallium/drivers/svga/svga_pipe_fs.c
index e3be840d92..a461a86dd3 100644
--- a/src/gallium/drivers/svga/svga_pipe_fs.c
+++ b/src/gallium/drivers/svga/svga_pipe_fs.c
@@ -26,6 +26,7 @@
#include "pipe/p_inlines.h"
#include "util/u_math.h"
#include "util/u_memory.h"
+#include "util/u_bitmask.h"
#include "tgsi/tgsi_parse.h"
#include "tgsi/tgsi_text.h"
@@ -107,6 +108,8 @@ void svga_delete_fs_state(struct pipe_context *pipe, void *shader)
assert(ret == PIPE_OK);
}
+ util_bitmask_clear( svga->fs_bm, result->id );
+
svga_destroy_shader_result( result );
}
diff --git a/src/gallium/drivers/svga/svga_pipe_vs.c b/src/gallium/drivers/svga/svga_pipe_vs.c
index c104c41f5f..e82d10c259 100644
--- a/src/gallium/drivers/svga/svga_pipe_vs.c
+++ b/src/gallium/drivers/svga/svga_pipe_vs.c
@@ -27,6 +27,7 @@
#include "pipe/p_inlines.h"
#include "util/u_math.h"
#include "util/u_memory.h"
+#include "util/u_bitmask.h"
#include "tgsi/tgsi_parse.h"
#include "tgsi/tgsi_text.h"
@@ -172,6 +173,8 @@ static void svga_delete_vs_state(struct pipe_context *pipe, void *shader)
assert(ret == PIPE_OK);
}
+ util_bitmask_clear( svga->vs_bm, result->id );
+
svga_destroy_shader_result( result );
}
diff --git a/src/gallium/drivers/svga/svga_state_fs.c b/src/gallium/drivers/svga/svga_state_fs.c
index 6ec38ed3e4..1902b0106b 100644
--- a/src/gallium/drivers/svga/svga_state_fs.c
+++ b/src/gallium/drivers/svga/svga_state_fs.c
@@ -26,6 +26,7 @@
#include "pipe/p_inlines.h"
#include "pipe/p_defines.h"
#include "util/u_math.h"
+#include "util/u_bitmask.h"
#include "svga_context.h"
#include "svga_state.h"
@@ -74,9 +75,12 @@ static enum pipe_error compile_fs( struct svga_context *svga,
goto fail;
}
+ result->id = util_bitmask_add(svga->fs_bm);
+ if(result->id == UTIL_BITMASK_INVALID_INDEX)
+ goto fail;
ret = SVGA3D_DefineShader(svga->swc,
- svga->state.next_fs_id,
+ result->id,
SVGA3D_SHADERTYPE_PS,
result->tokens,
result->nr_tokens * sizeof result->tokens[0]);
@@ -84,14 +88,16 @@ static enum pipe_error compile_fs( struct svga_context *svga,
goto fail;
*out_result = result;
- result->id = svga->state.next_fs_id++;
result->next = fs->base.results;
fs->base.results = result;
return PIPE_OK;
fail:
- if (result)
+ if (result) {
+ if (result->id != UTIL_BITMASK_INVALID_INDEX)
+ util_bitmask_clear( svga->fs_bm, result->id );
svga_destroy_shader_result( result );
+ }
return ret;
}
@@ -116,7 +122,7 @@ fail:
*/
static int emit_white_fs( struct svga_context *svga )
{
- int ret;
+ int ret = PIPE_ERROR;
/* ps_3_0
* def c0, 1.000000, 0.000000, 0.000000, 1.000000
@@ -137,16 +143,26 @@ static int emit_white_fs( struct svga_context *svga )
0x0000ffff,
};
+ assert(SVGA3D_INVALID_ID == UTIL_BITMASK_INVALID_INDEX);
+ svga->state.white_fs_id = util_bitmask_add(svga->fs_bm);
+ if(svga->state.white_fs_id == SVGA3D_INVALID_ID)
+ goto no_fs_id;
+
ret = SVGA3D_DefineShader(svga->swc,
- svga->state.next_fs_id,
+ svga->state.white_fs_id,
SVGA3D_SHADERTYPE_PS,
white_tokens,
sizeof(white_tokens));
if (ret)
- return ret;
+ goto no_definition;
- svga->state.white_fs_id = svga->state.next_fs_id++;
return 0;
+
+no_definition:
+ util_bitmask_clear(svga->fs_bm, svga->state.white_fs_id);
+ svga->state.white_fs_id = SVGA3D_INVALID_ID;
+no_fs_id:
+ return ret;
}
@@ -251,12 +267,14 @@ static int emit_hw_fs( struct svga_context *svga,
assert(id != SVGA3D_INVALID_ID);
- if (id != svga->state.hw_draw.shader_id[PIPE_SHADER_FRAGMENT]) {
- ret = SVGA3D_SetShader(svga->swc,
- SVGA3D_SHADERTYPE_PS,
- id );
- if (ret)
- return ret;
+ if (result != svga->state.hw_draw.fs) {
+ if (id != svga->state.hw_draw.shader_id[PIPE_SHADER_FRAGMENT]) {
+ ret = SVGA3D_SetShader(svga->swc,
+ SVGA3D_SHADERTYPE_PS,
+ id );
+ if (ret)
+ return ret;
+ }
svga->dirty |= SVGA_NEW_FS_RESULT;
svga->state.hw_draw.shader_id[PIPE_SHADER_FRAGMENT] = id;
diff --git a/src/gallium/drivers/svga/svga_state_vs.c b/src/gallium/drivers/svga/svga_state_vs.c
index 44b7ceb4fa..7e34c0a980 100644
--- a/src/gallium/drivers/svga/svga_state_vs.c
+++ b/src/gallium/drivers/svga/svga_state_vs.c
@@ -27,6 +27,7 @@
#include "pipe/p_defines.h"
#include "util/u_format.h"
#include "util/u_math.h"
+#include "util/u_bitmask.h"
#include "translate/translate.h"
#include "svga_context.h"
@@ -78,8 +79,12 @@ static enum pipe_error compile_vs( struct svga_context *svga,
goto fail;
}
+ result->id = util_bitmask_add(svga->vs_bm);
+ if(result->id == UTIL_BITMASK_INVALID_INDEX)
+ goto fail;
+
ret = SVGA3D_DefineShader(svga->swc,
- svga->state.next_vs_id,
+ result->id,
SVGA3D_SHADERTYPE_VS,
result->tokens,
result->nr_tokens * sizeof result->tokens[0]);
@@ -87,14 +92,16 @@ static enum pipe_error compile_vs( struct svga_context *svga,
goto fail;
*out_result = result;
- result->id = svga->state.next_vs_id++;
result->next = vs->base.results;
vs->base.results = result;
return PIPE_OK;
fail:
- if (result)
+ if (result) {
+ if (result->id != UTIL_BITMASK_INVALID_INDEX)
+ util_bitmask_clear( svga->vs_bm, result->id );
svga_destroy_shader_result( result );
+ }
return ret;
}
@@ -142,12 +149,14 @@ static int emit_hw_vs( struct svga_context *svga,
id = result->id;
}
- if (id != svga->state.hw_draw.shader_id[PIPE_SHADER_VERTEX]) {
- ret = SVGA3D_SetShader(svga->swc,
- SVGA3D_SHADERTYPE_VS,
- id );
- if (ret)
- return ret;
+ if (result != svga->state.hw_draw.vs) {
+ if (id != svga->state.hw_draw.shader_id[PIPE_SHADER_VERTEX]) {
+ ret = SVGA3D_SetShader(svga->swc,
+ SVGA3D_SHADERTYPE_VS,
+ id );
+ if (ret)
+ return ret;
+ }
svga->dirty |= SVGA_NEW_VS_RESULT;
svga->state.hw_draw.shader_id[PIPE_SHADER_VERTEX] = id;
diff --git a/src/gallium/drivers/svga/svga_tgsi.c b/src/gallium/drivers/svga/svga_tgsi.c
index b8ef137c01..0cd620189b 100644
--- a/src/gallium/drivers/svga/svga_tgsi.c
+++ b/src/gallium/drivers/svga/svga_tgsi.c
@@ -31,6 +31,7 @@
#include "tgsi/tgsi_dump.h"
#include "tgsi/tgsi_scan.h"
#include "util/u_memory.h"
+#include "util/u_bitmask.h"
#include "svgadump/svga_shader_dump.h"
@@ -221,6 +222,7 @@ svga_tgsi_translate( const struct svga_shader *shader,
result->tokens = (const unsigned *)emit.buf;
result->nr_tokens = (emit.ptr - emit.buf) / sizeof(unsigned);
memcpy(&result->key, &key, sizeof key);
+ result->id = UTIL_BITMASK_INVALID_INDEX;
if (SVGA_DEBUG & DEBUG_TGSI)
{
diff --git a/src/gallium/drivers/trace/tr_state.h b/src/gallium/drivers/trace/tr_state.h
index 1c16042ee5..e2f981d051 100644
--- a/src/gallium/drivers/trace/tr_state.h
+++ b/src/gallium/drivers/trace/tr_state.h
@@ -32,7 +32,7 @@ struct tgsi_token;
enum trace_shader_type {
TRACE_SHADER_FRAGMENT = 0,
TRACE_SHADER_VERTEX = 1,
- TRACE_SHADER_GEOMETRY = 2,
+ TRACE_SHADER_GEOMETRY = 2
};
struct trace_shader
diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
index e390ce29ae..650d2c0d1d 100644
--- a/src/gallium/state_trackers/xorg/xorg_crtc.c
+++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
@@ -123,7 +123,8 @@ crtc_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
drm_mode.vrefresh = mode->VRefresh;
if (!mode->name)
xf86SetModeDefaultName(mode);
- strncpy(drm_mode.name, mode->name, DRM_DISPLAY_MODE_LEN);
+ strncpy(drm_mode.name, mode->name, DRM_DISPLAY_MODE_LEN - 1);
+ drm_mode.name[DRM_DISPLAY_MODE_LEN - 1] = '\0';
ret = drmModeSetCrtc(ms->fd, drm_crtc->crtc_id, ms->fb_id, x, y,
&drm_connector->connector_id, 1, &drm_mode);
diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
index 4d169a1d14..b02fe68f31 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -181,8 +181,7 @@ drv_crtc_resize(ScrnInfoPtr pScrn, int width, int height)
if (!pScreen->ModifyPixmapHeader(rootPixmap, width, height, -1, -1, -1, NULL))
return FALSE;
- /* HW dependent - FIXME */
- pScrn->displayWidth = pScrn->virtualX;
+ pScrn->displayWidth = rootPixmap->devKind / (rootPixmap->drawable.bitsPerPixel / 8);
/* now create new frontbuffer */
return ms->create_front_buffer(pScrn) && ms->bind_front_buffer(pScrn);
diff --git a/src/gallium/winsys/drm/vmware/xorg/SConscript b/src/gallium/winsys/drm/vmware/xorg/SConscript
index f7ce400a7a..1e5d8ff7fe 100644
--- a/src/gallium/winsys/drm/vmware/xorg/SConscript
+++ b/src/gallium/winsys/drm/vmware/xorg/SConscript
@@ -44,6 +44,7 @@ if env['platform'] == 'linux':
sources = [
'vmw_ioctl.c',
'vmw_screen.c',
+ 'vmw_video.c',
'vmw_xorg.c',
]
diff --git a/src/glu/sgi/libnurbs/internals/displaylist.h b/src/glu/sgi/libnurbs/internals/displaylist.h
index 22cbec3787..d009a42513 100644
--- a/src/glu/sgi/libnurbs/internals/displaylist.h
+++ b/src/glu/sgi/libnurbs/internals/displaylist.h
@@ -59,6 +59,7 @@ Dlnode::Dlnode( PFVS _work, void *_arg, PFVS _cleanup )
work = _work;
arg = _arg;
cleanup = _cleanup;
+ next = 0;
}
class DisplayList {
diff --git a/src/glu/sgi/libnurbs/internals/knotvector.cc b/src/glu/sgi/libnurbs/internals/knotvector.cc
index 9eb5cbace9..dcbf0067d8 100644
--- a/src/glu/sgi/libnurbs/internals/knotvector.cc
+++ b/src/glu/sgi/libnurbs/internals/knotvector.cc
@@ -61,6 +61,9 @@ void Knotvector::init( long _knotcount, long _stride, long _order, INREAL *_knot
Knotvector::Knotvector( void )
{
+ knotcount = 0;
+ stride = 0;
+ order = 0;
knotlist = 0;
}
diff --git a/src/glu/sgi/libnurbs/internals/reader.h b/src/glu/sgi/libnurbs/internals/reader.h
index 3f259c777b..cae6cada46 100644
--- a/src/glu/sgi/libnurbs/internals/reader.h
+++ b/src/glu/sgi/libnurbs/internals/reader.h
@@ -64,7 +64,7 @@ struct O_curve : public PooledObj {
int save; /* 1 if in display list */
long nuid;
O_curve() { next = 0; used = 0; owner = 0;
- curve.o_pwlcurve = 0; }
+ curve.o_pwlcurve = 0; curvetype = ct_none; save = 0; nuid = 0; }
};
struct O_nurbscurve : public PooledObj {
@@ -77,7 +77,7 @@ struct O_nurbscurve : public PooledObj {
int save; /* 1 if in display list */
O_curve * owner; /* owning curve */
O_nurbscurve( long _type )
- { type = _type; owner = 0; next = 0; used = 0; }
+ { bezier_curves = 0; type = _type; tesselation = 0; method = 0; next = 0; used = 0; save = 0; owner = 0; }
};
class O_pwlcurve : public PooledObj {
@@ -95,7 +95,7 @@ struct O_trim : public PooledObj {
O_curve *o_curve; /* closed trim loop */
O_trim * next; /* next loop along trim */
int save; /* 1 if in display list */
- O_trim() { next = 0; o_curve = 0; }
+ O_trim() { next = 0; o_curve = 0; save = 0; }
};
struct O_nurbssurface : public PooledObj {
@@ -114,7 +114,7 @@ struct O_surface : public PooledObj {
O_trim * o_trim; /* list of trim loops */
int save; /* 1 if in display list */
long nuid;
- O_surface() { o_trim = 0; o_nurbssurface = 0; }
+ O_surface() { o_trim = 0; o_nurbssurface = 0; save = 0; nuid = 0; }
};
struct Property : public PooledObj {
@@ -123,9 +123,9 @@ struct Property : public PooledObj {
REAL value;
int save; /* 1 if in display list */
Property( long _type, long _tag, INREAL _value )
- { type = _type; tag = _tag; value = (REAL) _value; }
+ { type = _type; tag = _tag; value = (REAL) _value; save = 0; }
Property( long _tag, INREAL _value )
- { type = 0; tag = _tag; value = (REAL) _value; }
+ { type = 0; tag = _tag; value = (REAL) _value; save = 0; }
};
class NurbsTessellator;
diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c
index 4f7acb6cc3..88487b6c96 100644
--- a/src/glx/x11/dri_glx.c
+++ b/src/glx/x11/dri_glx.c
@@ -280,8 +280,6 @@ static const __DRIextension *loader_extensions[] = {
NULL
};
-#ifndef GLX_USE_APPLEGL
-
/**
* Perform the required libGL-side initialization and call the client-side
* driver's \c __driCreateNewScreen function.
@@ -475,17 +473,6 @@ CallCreateNewScreen(Display * dpy, int scrn, __GLXscreenConfigs * psc,
return NULL;
}
-#else /* !GLX_USE_APPLEGL */
-
-static void *
-CallCreateNewScreen(Display * dpy, int scrn, __GLXscreenConfigs * psc,
- __GLXDRIdisplayPrivate * driDpy)
-{
- return NULL;
-}
-
-#endif /* !GLX_USE_APPLEGL */
-
static void
driDestroyContext(__GLXDRIcontext * context,
__GLXscreenConfigs * psc, Display * dpy)
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index daa9076471..d1c68dd02e 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -2575,7 +2575,7 @@ glXAllocateMemoryMESA(Display * dpy, int scrn,
(void) readFreq;
(void) writeFreq;
(void) priority;
-#endif /* GLX_DIRECT_RENDERING */
+#endif /* __DRI_ALLOCATE */
return NULL;
}
@@ -2594,7 +2594,7 @@ glXFreeMemoryMESA(Display * dpy, int scrn, void *pointer)
(void) dpy;
(void) scrn;
(void) pointer;
-#endif /* GLX_DIRECT_RENDERING */
+#endif /* __DRI_ALLOCATE */
}
diff --git a/src/glx/x11/glxcurrent.c b/src/glx/x11/glxcurrent.c
index f1e3e161be..fae1bd9fa6 100644
--- a/src/glx/x11/glxcurrent.c
+++ b/src/glx/x11/glxcurrent.c
@@ -475,13 +475,6 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
IndirectAPI = __glXNewIndirectAPI();
_glapi_set_dispatch(IndirectAPI);
-#ifdef GLX_USE_APPLEGL
- do {
- extern void XAppleDRIUseIndirectDispatch(void);
- XAppleDRIUseIndirectDispatch();
- } while (0);
-#endif
-
state = (__GLXattribute *) (gc->client_state_private);
gc->currentContextTag = reply.contextTag;
diff --git a/src/mesa/drivers/dri/i810/i810tex.h b/src/mesa/drivers/dri/i810/i810tex.h
index d980927030..28958dcb4b 100644
--- a/src/mesa/drivers/dri/i810/i810tex.h
+++ b/src/mesa/drivers/dri/i810/i810tex.h
@@ -29,7 +29,6 @@
#include "main/mtypes.h"
#include "main/mm.h"
-#include "i810context.h"
#include "i810_3d_reg.h"
#include "texmem.h"
diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
index 221bf03332..db71c00941 100644
--- a/src/mesa/drivers/dri/i915/i915_texstate.c
+++ b/src/mesa/drivers/dri/i915/i915_texstate.c
@@ -197,10 +197,11 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
state[I915_TEXREG_MS3] |= MS3_TILE_WALK;
}
- /* We get one field with fraction bits to cover the maximum addressable (smallest
- * resolution) LOD. Use it to cover both MAX_LEVEL and MAX_LOD.
+ /* We get one field with fraction bits for the maximum addressable
+ * (lowest resolution) LOD. Use it to cover both MAX_LEVEL and
+ * MAX_LOD.
*/
- maxlod = MIN2(tObj->MaxLod, tObj->MaxLevel - tObj->BaseLevel);
+ maxlod = MIN2(tObj->MaxLod, tObj->_MaxLevel - tObj->BaseLevel);
state[I915_TEXREG_MS4] =
((((pitch / 4) - 1) << MS4_PITCH_SHIFT) |
MS4_CUBE_FACE_ENA_MASK |
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 7aca3aac8e..9db434c596 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -522,7 +522,8 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
GLubyte color_mask[4];
GLboolean color_blend;
uint32_t tiling;
- uint32_t draw_offset;
+ uint32_t draw_x;
+ uint32_t draw_y;
} key;
memset(&key, 0, sizeof(key));
@@ -564,7 +565,8 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
}
key.pitch = region->pitch;
key.cpp = region->cpp;
- key.draw_offset = region->draw_offset; /* cur 3d or cube face offset */
+ key.draw_x = region->draw_x;
+ key.draw_y = region->draw_y;
} else {
key.surface_type = BRW_SURFACE_NULL;
key.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
@@ -572,7 +574,8 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
key.width = 1;
key.height = 1;
key.cpp = 4;
- key.draw_offset = 0;
+ key.draw_x = 0;
+ key.draw_y = 0;
}
/* _NEW_COLOR */
memcpy(key.color_mask, ctx->Color.ColorMask[0],
@@ -602,26 +605,32 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
surf.ss0.surface_format = key.surface_format;
surf.ss0.surface_type = key.surface_type;
if (key.tiling == I915_TILING_NONE) {
- surf.ss1.base_addr = key.draw_offset;
+ surf.ss1.base_addr = (key.draw_x + key.draw_y * key.pitch) * key.cpp;
} else {
- uint32_t tile_offset = key.draw_offset % 4096;
-
- surf.ss1.base_addr = key.draw_offset - tile_offset;
-
- if (brw->has_surface_tile_offset) {
- if (key.tiling == I915_TILING_X) {
- /* Note that the low bits of these fields are missing, so
- * there's the possibility of getting in trouble.
- */
- surf.ss5.x_offset = (tile_offset % 512) / key.cpp / 4;
- surf.ss5.y_offset = tile_offset / 512 / 2;
- } else {
- surf.ss5.x_offset = (tile_offset % 128) / key.cpp / 4;
- surf.ss5.y_offset = tile_offset / 128 / 2;
- }
+ uint32_t tile_base, tile_x, tile_y;
+ uint32_t pitch = key.pitch * key.cpp;
+
+ if (key.tiling == I915_TILING_X) {
+ tile_x = key.draw_x % (512 / key.cpp);
+ tile_y = key.draw_y % 8;
+ tile_base = ((key.draw_y / 8) * (8 * pitch));
+ tile_base += (key.draw_x - tile_x) / (512 / key.cpp) * 4096;
} else {
- assert(tile_offset == 0);
+ /* Y */
+ tile_x = key.draw_x % (128 / key.cpp);
+ tile_y = key.draw_y % 32;
+ tile_base = ((key.draw_y / 32) * (32 * pitch));
+ tile_base += (key.draw_x - tile_x) / (128 / key.cpp) * 4096;
}
+ assert(BRW_IS_G4X(brw) || (tile_x == 0 && tile_y == 0));
+ assert(tile_x % 4 == 0);
+ assert(tile_y % 2 == 0);
+ /* Note that the low bits of these fields are missing, so
+ * there's the possibility of getting in trouble.
+ */
+ surf.ss1.base_addr = tile_base;
+ surf.ss5.x_offset = tile_x / 4;
+ surf.ss5.y_offset = tile_y / 2;
}
if (region_bo != NULL)
surf.ss1.base_addr += region_bo->offset; /* reloc */
diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c
index ee953cfbe7..ef5aed32f3 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c
@@ -160,13 +160,14 @@ do_copy_texsubimage(struct intel_context *intel,
intelImage->mt->cpp,
src_pitch,
src->buffer,
- src->draw_offset,
+ 0,
src->tiling,
intelImage->mt->pitch,
dst_bo,
0,
intelImage->mt->region->tiling,
- x, y, image_x + dstx, image_y + dsty,
+ src->draw_x + x, src->draw_y + y,
+ image_x + dstx, image_y + dsty,
width, height,
GL_COPY)) {
UNLOCK_HARDWARE(intel);
diff --git a/src/mesa/drivers/dri/r300/compiler/memory_pool.c b/src/mesa/drivers/dri/r300/compiler/memory_pool.c
index 37aa2b6579..76c7c60d8f 100644
--- a/src/mesa/drivers/dri/r300/compiler/memory_pool.c
+++ b/src/mesa/drivers/dri/r300/compiler/memory_pool.c
@@ -71,12 +71,14 @@ static void refill_pool(struct memory_pool * pool)
void * memory_pool_malloc(struct memory_pool * pool, unsigned int bytes)
{
if (bytes < POOL_LARGE_ALLOC) {
+ void * ptr;
+
if (pool->head + bytes > pool->end)
refill_pool(pool);
assert(pool->head + bytes <= pool->end);
- void * ptr = pool->head;
+ ptr = pool->head;
pool->head += bytes;
pool->head = (unsigned char*)(((unsigned long)pool->head + POOL_ALIGN - 1) & ~(POOL_ALIGN - 1));
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_code.c b/src/mesa/drivers/dri/r300/compiler/radeon_code.c
index 1a3d8bb641..853b2becd1 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_code.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_code.c
@@ -143,7 +143,8 @@ unsigned rc_constants_add_immediate_scalar(struct rc_constant_list * c, float da
for(index = 0; index < c->Count; ++index) {
if (c->Constants[index].Type == RC_CONSTANT_IMMEDIATE) {
- for(unsigned comp = 0; comp < c->Constants[index].Size; ++comp) {
+ unsigned comp;
+ for(comp = 0; comp < c->Constants[index].Size; ++comp) {
if (c->Constants[index].u.Immediate[comp] == data) {
*swizzle = RC_MAKE_SWIZZLE(comp, comp, comp, comp);
return index;
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c
index c0e7a7f7a0..41ea23ee32 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c
@@ -232,12 +232,16 @@ void rc_copy_output(struct radeon_compiler * c, unsigned output, unsigned dup_ou
void rc_transform_fragment_wpos(struct radeon_compiler * c, unsigned wpos, unsigned new_input)
{
unsigned tempregi = rc_find_free_temporary(c);
+ struct rc_instruction * inst_rcp;
+ struct rc_instruction * inst_mul;
+ struct rc_instruction * inst_mad;
+ struct rc_instruction * inst;
c->Program.InputsRead &= ~(1 << wpos);
c->Program.InputsRead |= 1 << new_input;
/* perspective divide */
- struct rc_instruction * inst_rcp = rc_insert_new_instruction(c, &c->Program.Instructions);
+ inst_rcp = rc_insert_new_instruction(c, &c->Program.Instructions);
inst_rcp->U.I.Opcode = RC_OPCODE_RCP;
inst_rcp->U.I.DstReg.File = RC_FILE_TEMPORARY;
@@ -248,7 +252,7 @@ void rc_transform_fragment_wpos(struct radeon_compiler * c, unsigned wpos, unsig
inst_rcp->U.I.SrcReg[0].Index = new_input;
inst_rcp->U.I.SrcReg[0].Swizzle = RC_SWIZZLE_WWWW;
- struct rc_instruction * inst_mul = rc_insert_new_instruction(c, inst_rcp);
+ inst_mul = rc_insert_new_instruction(c, inst_rcp);
inst_mul->U.I.Opcode = RC_OPCODE_MUL;
inst_mul->U.I.DstReg.File = RC_FILE_TEMPORARY;
@@ -263,7 +267,7 @@ void rc_transform_fragment_wpos(struct radeon_compiler * c, unsigned wpos, unsig
inst_mul->U.I.SrcReg[1].Swizzle = RC_SWIZZLE_WWWW;
/* viewport transformation */
- struct rc_instruction * inst_mad = rc_insert_new_instruction(c, inst_mul);
+ inst_mad = rc_insert_new_instruction(c, inst_mul);
inst_mad->U.I.Opcode = RC_OPCODE_MAD;
inst_mad->U.I.DstReg.File = RC_FILE_TEMPORARY;
@@ -282,7 +286,6 @@ void rc_transform_fragment_wpos(struct radeon_compiler * c, unsigned wpos, unsig
inst_mad->U.I.SrcReg[2].Index = inst_mad->U.I.SrcReg[1].Index;
inst_mad->U.I.SrcReg[2].Swizzle = RC_MAKE_SWIZZLE(RC_SWIZZLE_X, RC_SWIZZLE_Y, RC_SWIZZLE_Z, RC_SWIZZLE_ZERO);
- struct rc_instruction * inst;
for (inst = inst_mad->Next; inst != &c->Program.Instructions; inst = inst->Next) {
const struct rc_opcode_info * opcode = rc_get_opcode_info(inst->U.I.Opcode);
unsigned i;
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c b/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c
index ced66af1eb..b5c08aea49 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c
@@ -267,9 +267,9 @@ static void transform_LIT(struct radeon_compiler* c,
temp = inst->U.I.DstReg.Index;
srctemp = srcreg(RC_FILE_TEMPORARY, temp);
- // tmp.x = max(0.0, Src.x);
- // tmp.y = max(0.0, Src.y);
- // tmp.w = clamp(Src.z, -128+eps, 128-eps);
+ /* tmp.x = max(0.0, Src.x); */
+ /* tmp.y = max(0.0, Src.y); */
+ /* tmp.w = clamp(Src.z, -128+eps, 128-eps); */
emit2(c, inst->Prev, RC_OPCODE_MAX, 0,
dstregtmpmask(temp, RC_MASK_XYW),
inst->U.I.SrcReg[0],
@@ -280,7 +280,7 @@ static void transform_LIT(struct radeon_compiler* c,
swizzle(srctemp, RC_SWIZZLE_W, RC_SWIZZLE_W, RC_SWIZZLE_W, RC_SWIZZLE_W),
negate(srcregswz(RC_FILE_CONSTANT, constant, constant_swizzle)));
- // tmp.w = Pow(tmp.y, tmp.w)
+ /* tmp.w = Pow(tmp.y, tmp.w) */
emit1(c, inst->Prev, RC_OPCODE_LG2, 0,
dstregtmpmask(temp, RC_MASK_W),
swizzle(srctemp, RC_SWIZZLE_Y, RC_SWIZZLE_Y, RC_SWIZZLE_Y, RC_SWIZZLE_Y));
@@ -292,14 +292,14 @@ static void transform_LIT(struct radeon_compiler* c,
dstregtmpmask(temp, RC_MASK_W),
swizzle(srctemp, RC_SWIZZLE_W, RC_SWIZZLE_W, RC_SWIZZLE_W, RC_SWIZZLE_W));
- // tmp.z = (tmp.x > 0) ? tmp.w : 0.0
+ /* tmp.z = (tmp.x > 0) ? tmp.w : 0.0 */
emit3(c, inst->Prev, RC_OPCODE_CMP, inst->U.I.SaturateMode,
dstregtmpmask(temp, RC_MASK_Z),
negate(swizzle(srctemp, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X)),
swizzle(srctemp, RC_SWIZZLE_W, RC_SWIZZLE_W, RC_SWIZZLE_W, RC_SWIZZLE_W),
builtin_zero);
- // tmp.x, tmp.y, tmp.w = 1.0, tmp.x, 1.0
+ /* tmp.x, tmp.y, tmp.w = 1.0, tmp.x, 1.0 */
emit1(c, inst->Prev, RC_OPCODE_MOV, inst->U.I.SaturateMode,
dstregtmpmask(temp, RC_MASK_XYW),
swizzle(srctemp, RC_SWIZZLE_ONE, RC_SWIZZLE_X, RC_SWIZZLE_ONE, RC_SWIZZLE_ONE));
@@ -533,16 +533,16 @@ static void sincos_constants(struct radeon_compiler* c, unsigned int *constants)
{
static const float SinCosConsts[2][4] = {
{
- 1.273239545, // 4/PI
- -0.405284735, // -4/(PI*PI)
- 3.141592654, // PI
- 0.2225 // weight
+ 1.273239545, /* 4/PI */
+ -0.405284735, /* -4/(PI*PI) */
+ 3.141592654, /* PI */
+ 0.2225 /* weight */
},
{
0.75,
0.5,
- 0.159154943, // 1/(2*PI)
- 6.283185307 // 2*PI
+ 0.159154943, /* 1/(2*PI) */
+ 6.283185307 /* 2*PI */
}
};
int i;
@@ -602,9 +602,9 @@ int radeonTransformTrigSimple(struct radeon_compiler* c,
sincos_constants(c, constants);
if (inst->U.I.Opcode == RC_OPCODE_COS) {
- // MAD tmp.x, src, 1/(2*PI), 0.75
- // FRC tmp.x, tmp.x
- // MAD tmp.z, tmp.x, 2*PI, -PI
+ /* MAD tmp.x, src, 1/(2*PI), 0.75 */
+ /* FRC tmp.x, tmp.x */
+ /* MAD tmp.z, tmp.x, 2*PI, -PI */
emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_W),
swizzle(inst->U.I.SrcReg[0], RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X),
swizzle(srcreg(RC_FILE_CONSTANT, constants[1]), RC_SWIZZLE_Z, RC_SWIZZLE_Z, RC_SWIZZLE_Z, RC_SWIZZLE_Z),
diff --git a/src/mesa/drivers/dri/sis/sis_context.c b/src/mesa/drivers/dri/sis/sis_context.c
index f501e7ad2e..346e8c5568 100644
--- a/src/mesa/drivers/dri/sis/sis_context.c
+++ b/src/mesa/drivers/dri/sis/sis_context.c
@@ -83,6 +83,7 @@ static struct dri_extension card_extensions[] =
{ NULL, NULL }
};
+#if 0
static struct dri_extension card_extensions_6326[] =
{
/*{ "GL_ARB_texture_border_clamp", NULL },*/
@@ -90,6 +91,7 @@ static struct dri_extension card_extensions_6326[] =
/*{ "GL_MESA_ycbcr_texture", NULL },*/
{ NULL, NULL }
};
+#endif
static const struct dri_debug_control debug_control[] =
{
diff --git a/src/mesa/glapi/ARB_sync.xml b/src/mesa/glapi/ARB_sync.xml
index 37f474980c..4e4eebac32 100644
--- a/src/mesa/glapi/ARB_sync.xml
+++ b/src/mesa/glapi/ARB_sync.xml
@@ -33,8 +33,10 @@
<enum name="WAIT_FAILED" value="0x911D"/>
<enum name="SYNC_FLUSH_COMMANDS_BIT" value="0x00000001"/>
- <enum name="TIMEOUT_IGNORED" value="0xFFFFFFFFFFFFFFFF"/>
+ <!-- Not really an enum:
+ <enum name="TIMEOUT_IGNORED" value="0xFFFFFFFFFFFFFFFF"/>
+ -->
<function name="FenceSync" offset="assign">
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index f5b77e82a9..fb15a5ba47 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1077,22 +1077,39 @@ _mesa_PopAttrib(void)
_math_matrix_analyse( ctx->ModelviewMatrixStack.Top );
for (i = 0; i < ctx->Const.MaxLights; i++) {
- const struct gl_light *l = &light->Light[i];
+ const struct gl_light *l = &light->Light[i];
_mesa_set_enable(ctx, GL_LIGHT0 + i, l->Enabled);
- _mesa_light(ctx, i, GL_AMBIENT, l->Ambient);
- _mesa_light(ctx, i, GL_DIFFUSE, l->Diffuse);
- _mesa_light(ctx, i, GL_SPECULAR, l->Specular );
- _mesa_light(ctx, i, GL_POSITION, l->EyePosition);
- _mesa_light(ctx, i, GL_SPOT_DIRECTION, l->SpotDirection);
- _mesa_light(ctx, i, GL_SPOT_EXPONENT, &l->SpotExponent);
- _mesa_light(ctx, i, GL_SPOT_CUTOFF, &l->SpotCutoff);
- _mesa_light(ctx, i, GL_CONSTANT_ATTENUATION,
- &l->ConstantAttenuation);
- _mesa_light(ctx, i, GL_LINEAR_ATTENUATION,
- &l->LinearAttenuation);
- _mesa_light(ctx, i, GL_QUADRATIC_ATTENUATION,
- &l->QuadraticAttenuation);
- }
+ _mesa_light(ctx, i, GL_AMBIENT, l->Ambient);
+ _mesa_light(ctx, i, GL_DIFFUSE, l->Diffuse);
+ _mesa_light(ctx, i, GL_SPECULAR, l->Specular );
+ _mesa_light(ctx, i, GL_POSITION, l->EyePosition);
+ _mesa_light(ctx, i, GL_SPOT_DIRECTION, l->SpotDirection);
+ {
+ GLfloat p[4] = { 0 };
+ p[0] = l->SpotExponent;
+ _mesa_light(ctx, i, GL_SPOT_EXPONENT, p);
+ }
+ {
+ GLfloat p[4] = { 0 };
+ p[0] = l->SpotCutoff;
+ _mesa_light(ctx, i, GL_SPOT_CUTOFF, p);
+ }
+ {
+ GLfloat p[4] = { 0 };
+ p[0] = l->ConstantAttenuation;
+ _mesa_light(ctx, i, GL_CONSTANT_ATTENUATION, p);
+ }
+ {
+ GLfloat p[4] = { 0 };
+ p[0] = l->LinearAttenuation;
+ _mesa_light(ctx, i, GL_LINEAR_ATTENUATION, p);
+ }
+ {
+ GLfloat p[4] = { 0 };
+ p[0] = l->QuadraticAttenuation;
+ _mesa_light(ctx, i, GL_QUADRATIC_ATTENUATION, p);
+ }
+ }
/* light model */
_mesa_LightModelfv(GL_LIGHT_MODEL_AMBIENT,
light->Model.Ambient);
diff --git a/src/mesa/main/dispatch.c b/src/mesa/main/dispatch.c
index 97d213e8e1..eb0d1ff8a7 100644
--- a/src/mesa/main/dispatch.c
+++ b/src/mesa/main/dispatch.c
@@ -37,8 +37,6 @@
* \author Brian Paul <brian@precisioninsight.com>
*/
-#ifndef GLX_USE_APPLEGL
-
#include "main/glheader.h"
#include "main/compiler.h"
#include "glapi/glapi.h"
@@ -92,5 +90,3 @@
#include "glapi/glapitemp.h"
#endif /* USE_X86_ASM */
-
-#endif /* !GLX_USE_APPLEGL */
diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index 73d6e6af3e..2273138d23 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -1791,7 +1791,6 @@ LONGSTRING static const char enum_string_table[] =
"GL_TEXTURE_WRAP_S\0"
"GL_TEXTURE_WRAP_T\0"
"GL_TIMEOUT_EXPIRED\0"
- "GL_TIMEOUT_IGNORED\0"
"GL_TIME_ELAPSED_EXT\0"
"GL_TRACK_MATRIX_NV\0"
"GL_TRACK_MATRIX_TRANSFORM_NV\0"
@@ -1923,7 +1922,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_ZOOM_Y\0"
;
-static const enum_elt all_enums[1885] =
+static const enum_elt all_enums[1884] =
{
{ 0, 0x00000600 }, /* GL_2D */
{ 6, 0x00001407 }, /* GL_2_BYTES */
@@ -3680,147 +3679,146 @@ static const enum_elt all_enums[1885] =
{ 37780, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
{ 37798, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
{ 37816, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */
- { 37835, 0xFFFFFFFF }, /* GL_TIMEOUT_IGNORED */
- { 37854, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
- { 37874, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
- { 37893, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- { 37922, 0x00001000 }, /* GL_TRANSFORM_BIT */
- { 37939, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
- { 37965, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
- { 37995, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- { 38027, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- { 38057, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
- { 38091, 0x0000862C }, /* GL_TRANSPOSE_NV */
- { 38107, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- { 38138, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
- { 38173, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- { 38201, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
- { 38233, 0x00000004 }, /* GL_TRIANGLES */
- { 38246, 0x00000006 }, /* GL_TRIANGLE_FAN */
- { 38262, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
- { 38283, 0x00000005 }, /* GL_TRIANGLE_STRIP */
- { 38301, 0x00000001 }, /* GL_TRUE */
- { 38309, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
- { 38329, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
- { 38352, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
- { 38372, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
- { 38393, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
- { 38415, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
- { 38437, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
- { 38457, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
- { 38478, 0x00009118 }, /* GL_UNSIGNALED */
- { 38492, 0x00001401 }, /* GL_UNSIGNED_BYTE */
- { 38509, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- { 38536, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
- { 38559, 0x00001405 }, /* GL_UNSIGNED_INT */
- { 38575, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
- { 38602, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
- { 38623, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */
- { 38648, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
- { 38672, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- { 38703, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
- { 38727, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- { 38755, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
- { 38778, 0x00001403 }, /* GL_UNSIGNED_SHORT */
- { 38796, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- { 38826, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- { 38852, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- { 38882, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- { 38908, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
- { 38932, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- { 38960, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- { 38988, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
- { 39015, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- { 39047, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
- { 39078, 0x00008CA2 }, /* GL_UPPER_LEFT */
- { 39092, 0x00002A20 }, /* GL_V2F */
- { 39099, 0x00002A21 }, /* GL_V3F */
- { 39106, 0x00008B83 }, /* GL_VALIDATE_STATUS */
- { 39125, 0x00001F00 }, /* GL_VENDOR */
- { 39135, 0x00001F02 }, /* GL_VERSION */
- { 39146, 0x00008074 }, /* GL_VERTEX_ARRAY */
- { 39162, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
- { 39186, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
- { 39216, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- { 39247, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
- { 39282, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
- { 39306, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
- { 39327, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
- { 39350, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
- { 39371, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- { 39398, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- { 39426, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- { 39454, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- { 39482, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- { 39510, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- { 39538, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- { 39566, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- { 39593, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- { 39620, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- { 39647, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- { 39674, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- { 39701, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- { 39728, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- { 39755, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- { 39782, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- { 39809, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- { 39847, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
- { 39889, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- { 39920, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
- { 39955, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- { 39989, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
- { 40027, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- { 40058, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
- { 40093, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- { 40121, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
- { 40153, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- { 40183, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
- { 40217, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
- { 40245, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
- { 40277, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
- { 40297, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
- { 40319, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
- { 40348, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
- { 40369, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- { 40398, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
- { 40431, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
- { 40463, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- { 40490, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
- { 40521, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
- { 40551, 0x00008B31 }, /* GL_VERTEX_SHADER */
- { 40568, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
- { 40589, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
- { 40616, 0x00000BA2 }, /* GL_VIEWPORT */
- { 40628, 0x00000800 }, /* GL_VIEWPORT_BIT */
- { 40644, 0x0000911D }, /* GL_WAIT_FAILED */
- { 40659, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
- { 40679, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- { 40710, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
- { 40745, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- { 40773, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- { 40798, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- { 40825, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- { 40850, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
- { 40874, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
- { 40893, 0x000088B9 }, /* GL_WRITE_ONLY */
- { 40907, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
- { 40925, 0x00001506 }, /* GL_XOR */
- { 40932, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
- { 40951, 0x00008757 }, /* GL_YCBCR_MESA */
- { 40965, 0x00000000 }, /* GL_ZERO */
- { 40973, 0x00000D16 }, /* GL_ZOOM_X */
- { 40983, 0x00000D17 }, /* GL_ZOOM_Y */
+ { 37835, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
+ { 37855, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
+ { 37874, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ { 37903, 0x00001000 }, /* GL_TRANSFORM_BIT */
+ { 37920, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
+ { 37946, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
+ { 37976, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ { 38008, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ { 38038, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
+ { 38072, 0x0000862C }, /* GL_TRANSPOSE_NV */
+ { 38088, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ { 38119, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
+ { 38154, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ { 38182, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
+ { 38214, 0x00000004 }, /* GL_TRIANGLES */
+ { 38227, 0x00000006 }, /* GL_TRIANGLE_FAN */
+ { 38243, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
+ { 38264, 0x00000005 }, /* GL_TRIANGLE_STRIP */
+ { 38282, 0x00000001 }, /* GL_TRUE */
+ { 38290, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
+ { 38310, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
+ { 38333, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
+ { 38353, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
+ { 38374, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
+ { 38396, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
+ { 38418, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
+ { 38438, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
+ { 38459, 0x00009118 }, /* GL_UNSIGNALED */
+ { 38473, 0x00001401 }, /* GL_UNSIGNED_BYTE */
+ { 38490, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ { 38517, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
+ { 38540, 0x00001405 }, /* GL_UNSIGNED_INT */
+ { 38556, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
+ { 38583, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
+ { 38604, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */
+ { 38629, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
+ { 38653, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ { 38684, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
+ { 38708, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ { 38736, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
+ { 38759, 0x00001403 }, /* GL_UNSIGNED_SHORT */
+ { 38777, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ { 38807, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ { 38833, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ { 38863, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ { 38889, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
+ { 38913, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ { 38941, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ { 38969, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
+ { 38996, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ { 39028, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
+ { 39059, 0x00008CA2 }, /* GL_UPPER_LEFT */
+ { 39073, 0x00002A20 }, /* GL_V2F */
+ { 39080, 0x00002A21 }, /* GL_V3F */
+ { 39087, 0x00008B83 }, /* GL_VALIDATE_STATUS */
+ { 39106, 0x00001F00 }, /* GL_VENDOR */
+ { 39116, 0x00001F02 }, /* GL_VERSION */
+ { 39127, 0x00008074 }, /* GL_VERTEX_ARRAY */
+ { 39143, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
+ { 39167, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
+ { 39197, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ { 39228, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
+ { 39263, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
+ { 39287, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
+ { 39308, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
+ { 39331, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
+ { 39352, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ { 39379, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ { 39407, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ { 39435, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ { 39463, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ { 39491, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ { 39519, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ { 39547, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ { 39574, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ { 39601, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ { 39628, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ { 39655, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ { 39682, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ { 39709, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ { 39736, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ { 39763, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ { 39790, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ { 39828, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
+ { 39870, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ { 39901, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
+ { 39936, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ { 39970, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
+ { 40008, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ { 40039, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
+ { 40074, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ { 40102, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
+ { 40134, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ { 40164, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
+ { 40198, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ { 40226, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
+ { 40258, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
+ { 40278, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
+ { 40300, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ { 40329, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
+ { 40350, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ { 40379, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
+ { 40412, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
+ { 40444, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ { 40471, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
+ { 40502, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
+ { 40532, 0x00008B31 }, /* GL_VERTEX_SHADER */
+ { 40549, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
+ { 40570, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
+ { 40597, 0x00000BA2 }, /* GL_VIEWPORT */
+ { 40609, 0x00000800 }, /* GL_VIEWPORT_BIT */
+ { 40625, 0x0000911D }, /* GL_WAIT_FAILED */
+ { 40640, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
+ { 40660, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ { 40691, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
+ { 40726, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ { 40754, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ { 40779, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ { 40806, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ { 40831, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
+ { 40855, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
+ { 40874, 0x000088B9 }, /* GL_WRITE_ONLY */
+ { 40888, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
+ { 40906, 0x00001506 }, /* GL_XOR */
+ { 40913, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
+ { 40932, 0x00008757 }, /* GL_YCBCR_MESA */
+ { 40946, 0x00000000 }, /* GL_ZERO */
+ { 40954, 0x00000D16 }, /* GL_ZOOM_X */
+ { 40964, 0x00000D17 }, /* GL_ZOOM_Y */
};
-static const unsigned reduced_enums[1351] =
+static const unsigned reduced_enums[1350] =
{
479, /* GL_FALSE */
701, /* GL_LINES */
703, /* GL_LINE_LOOP */
710, /* GL_LINE_STRIP */
- 1770, /* GL_TRIANGLES */
- 1773, /* GL_TRIANGLE_STRIP */
- 1771, /* GL_TRIANGLE_FAN */
+ 1769, /* GL_TRIANGLES */
+ 1772, /* GL_TRIANGLE_STRIP */
+ 1770, /* GL_TRIANGLE_FAN */
1285, /* GL_QUADS */
1289, /* GL_QUAD_STRIP */
1171, /* GL_POLYGON */
@@ -3954,7 +3952,7 @@ static const unsigned reduced_enums[1351] =
1537, /* GL_STENCIL_WRITEMASK */
853, /* GL_MATRIX_MODE */
1025, /* GL_NORMALIZE */
- 1865, /* GL_VIEWPORT */
+ 1864, /* GL_VIEWPORT */
999, /* GL_MODELVIEW_STACK_DEPTH */
1263, /* GL_PROJECTION_STACK_DEPTH */
1744, /* GL_TEXTURE_STACK_DEPTH */
@@ -4016,12 +4014,12 @@ static const unsigned reduced_enums[1351] =
1117, /* GL_PIXEL_MAP_G_TO_G_SIZE */
1115, /* GL_PIXEL_MAP_B_TO_B_SIZE */
1113, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- 1782, /* GL_UNPACK_SWAP_BYTES */
- 1777, /* GL_UNPACK_LSB_FIRST */
- 1778, /* GL_UNPACK_ROW_LENGTH */
- 1781, /* GL_UNPACK_SKIP_ROWS */
- 1780, /* GL_UNPACK_SKIP_PIXELS */
- 1775, /* GL_UNPACK_ALIGNMENT */
+ 1781, /* GL_UNPACK_SWAP_BYTES */
+ 1776, /* GL_UNPACK_LSB_FIRST */
+ 1777, /* GL_UNPACK_ROW_LENGTH */
+ 1780, /* GL_UNPACK_SKIP_ROWS */
+ 1779, /* GL_UNPACK_SKIP_PIXELS */
+ 1774, /* GL_UNPACK_ALIGNMENT */
1099, /* GL_PACK_SWAP_BYTES */
1094, /* GL_PACK_LSB_FIRST */
1095, /* GL_PACK_ROW_LENGTH */
@@ -4034,8 +4032,8 @@ static const unsigned reduced_enums[1351] =
641, /* GL_INDEX_OFFSET */
1317, /* GL_RED_SCALE */
1315, /* GL_RED_BIAS */
- 1883, /* GL_ZOOM_X */
- 1884, /* GL_ZOOM_Y */
+ 1882, /* GL_ZOOM_X */
+ 1883, /* GL_ZOOM_Y */
603, /* GL_GREEN_SCALE */
601, /* GL_GREEN_BIAS */
93, /* GL_BLUE_SCALE */
@@ -4120,11 +4118,11 @@ static const unsigned reduced_enums[1351] =
244, /* GL_COMPILE */
245, /* GL_COMPILE_AND_EXECUTE */
120, /* GL_BYTE */
- 1784, /* GL_UNSIGNED_BYTE */
+ 1783, /* GL_UNSIGNED_BYTE */
1441, /* GL_SHORT */
- 1796, /* GL_UNSIGNED_SHORT */
+ 1795, /* GL_UNSIGNED_SHORT */
645, /* GL_INT */
- 1787, /* GL_UNSIGNED_INT */
+ 1786, /* GL_UNSIGNED_INT */
489, /* GL_FLOAT */
1, /* GL_2_BYTES */
5, /* GL_3_BYTES */
@@ -4136,7 +4134,7 @@ static const unsigned reduced_enums[1351] =
299, /* GL_COPY */
51, /* GL_AND_INVERTED */
1023, /* GL_NOOP */
- 1879, /* GL_XOR */
+ 1878, /* GL_XOR */
1086, /* GL_OR */
1024, /* GL_NOR */
470, /* GL_EQUIV */
@@ -4180,9 +4178,9 @@ static const unsigned reduced_enums[1351] =
1343, /* GL_REPLACE */
627, /* GL_INCR */
342, /* GL_DECR */
- 1811, /* GL_VENDOR */
+ 1810, /* GL_VENDOR */
1340, /* GL_RENDERER */
- 1812, /* GL_VERSION */
+ 1811, /* GL_VERSION */
474, /* GL_EXTENSIONS */
1391, /* GL_S */
1557, /* GL_T */
@@ -4215,8 +4213,8 @@ static const unsigned reduced_enums[1351] =
1178, /* GL_POLYGON_OFFSET_POINT */
1177, /* GL_POLYGON_OFFSET_LINE */
1301, /* GL_R3_G3_B2 */
- 1808, /* GL_V2F */
- 1809, /* GL_V3F */
+ 1807, /* GL_V2F */
+ 1808, /* GL_V3F */
123, /* GL_C4UB_V2F */
124, /* GL_C4UB_V3F */
121, /* GL_C3F_V3F */
@@ -4289,11 +4287,11 @@ static const unsigned reduced_enums[1351] =
951, /* GL_MINMAX_FORMAT */
953, /* GL_MINMAX_SINK */
1565, /* GL_TABLE_TOO_LARGE_EXT */
- 1786, /* GL_UNSIGNED_BYTE_3_3_2 */
- 1798, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- 1800, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- 1793, /* GL_UNSIGNED_INT_8_8_8_8 */
- 1788, /* GL_UNSIGNED_INT_10_10_10_2 */
+ 1785, /* GL_UNSIGNED_BYTE_3_3_2 */
+ 1797, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ 1799, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ 1792, /* GL_UNSIGNED_INT_8_8_8_8 */
+ 1787, /* GL_UNSIGNED_INT_10_10_10_2 */
1176, /* GL_POLYGON_OFFSET_FILL */
1175, /* GL_POLYGON_OFFSET_FACTOR */
1174, /* GL_POLYGON_OFFSET_BIAS */
@@ -4348,22 +4346,22 @@ static const unsigned reduced_enums[1351] =
1643, /* GL_TEXTURE_BINDING_3D */
1096, /* GL_PACK_SKIP_IMAGES */
1092, /* GL_PACK_IMAGE_HEIGHT */
- 1779, /* GL_UNPACK_SKIP_IMAGES */
- 1776, /* GL_UNPACK_IMAGE_HEIGHT */
+ 1778, /* GL_UNPACK_SKIP_IMAGES */
+ 1775, /* GL_UNPACK_IMAGE_HEIGHT */
1635, /* GL_TEXTURE_3D */
1277, /* GL_PROXY_TEXTURE_3D */
1698, /* GL_TEXTURE_DEPTH */
1751, /* GL_TEXTURE_WRAP_R */
856, /* GL_MAX_3D_TEXTURE_SIZE */
- 1813, /* GL_VERTEX_ARRAY */
+ 1812, /* GL_VERTEX_ARRAY */
1026, /* GL_NORMAL_ARRAY */
148, /* GL_COLOR_ARRAY */
631, /* GL_INDEX_ARRAY */
1676, /* GL_TEXTURE_COORD_ARRAY */
459, /* GL_EDGE_FLAG_ARRAY */
- 1819, /* GL_VERTEX_ARRAY_SIZE */
- 1821, /* GL_VERTEX_ARRAY_TYPE */
- 1820, /* GL_VERTEX_ARRAY_STRIDE */
+ 1818, /* GL_VERTEX_ARRAY_SIZE */
+ 1820, /* GL_VERTEX_ARRAY_TYPE */
+ 1819, /* GL_VERTEX_ARRAY_STRIDE */
1031, /* GL_NORMAL_ARRAY_TYPE */
1030, /* GL_NORMAL_ARRAY_STRIDE */
152, /* GL_COLOR_ARRAY_SIZE */
@@ -4375,7 +4373,7 @@ static const unsigned reduced_enums[1351] =
1682, /* GL_TEXTURE_COORD_ARRAY_TYPE */
1681, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
463, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- 1818, /* GL_VERTEX_ARRAY_POINTER */
+ 1817, /* GL_VERTEX_ARRAY_POINTER */
1029, /* GL_NORMAL_ARRAY_POINTER */
151, /* GL_COLOR_ARRAY_POINTER */
634, /* GL_INDEX_ARRAY_POINTER */
@@ -4475,7 +4473,7 @@ static const unsigned reduced_enums[1351] =
306, /* GL_CULL_VERTEX_EXT */
308, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
307, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- 1876, /* GL_WRAP_BORDER_SUN */
+ 1875, /* GL_WRAP_BORDER_SUN */
1660, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
690, /* GL_LIGHT_MODEL_COLOR_CONTROL */
1444, /* GL_SINGLE_COLOR */
@@ -4493,13 +4491,13 @@ static const unsigned reduced_enums[1351] =
580, /* GL_FRAMEBUFFER_UNDEFINED */
373, /* GL_DEPTH_STENCIL_ATTACHMENT */
630, /* GL_INDEX */
- 1785, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- 1801, /* GL_UNSIGNED_SHORT_5_6_5 */
- 1802, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- 1799, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- 1797, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- 1794, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- 1792, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ 1784, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ 1800, /* GL_UNSIGNED_SHORT_5_6_5 */
+ 1801, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ 1798, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ 1796, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ 1793, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ 1791, /* GL_UNSIGNED_INT_2_10_10_10_REV */
1730, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
1731, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
1729, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
@@ -4570,10 +4568,10 @@ static const unsigned reduced_enums[1351] =
18, /* GL_ACTIVE_TEXTURE */
133, /* GL_CLIENT_ACTIVE_TEXTURE */
934, /* GL_MAX_TEXTURE_UNITS */
- 1763, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- 1766, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- 1768, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- 1760, /* GL_TRANSPOSE_COLOR_MATRIX */
+ 1762, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ 1765, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ 1767, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ 1759, /* GL_TRANSPOSE_COLOR_MATRIX */
1549, /* GL_SUBTRACT */
919, /* GL_MAX_RENDERBUFFER_SIZE */
247, /* GL_COMPRESSED_ALPHA */
@@ -4588,7 +4586,7 @@ static const unsigned reduced_enums[1351] =
1281, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
917, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
372, /* GL_DEPTH_STENCIL */
- 1789, /* GL_UNSIGNED_INT_24_8 */
+ 1788, /* GL_UNSIGNED_INT_24_8 */
930, /* GL_MAX_TEXTURE_LOD_BIAS */
1728, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
931, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
@@ -4641,32 +4639,32 @@ static const unsigned reduced_enums[1351] =
1072, /* GL_OPERAND1_ALPHA */
1078, /* GL_OPERAND2_ALPHA */
1084, /* GL_OPERAND3_ALPHA_NV */
- 1814, /* GL_VERTEX_ARRAY_BINDING */
+ 1813, /* GL_VERTEX_ARRAY_BINDING */
1737, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
1738, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- 1880, /* GL_YCBCR_422_APPLE */
- 1803, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- 1805, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ 1879, /* GL_YCBCR_422_APPLE */
+ 1802, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ 1804, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
1747, /* GL_TEXTURE_STORAGE_HINT_APPLE */
1540, /* GL_STORAGE_PRIVATE_APPLE */
1539, /* GL_STORAGE_CACHED_APPLE */
1541, /* GL_STORAGE_SHARED_APPLE */
1446, /* GL_SLICE_ACCUM_SUN */
1288, /* GL_QUAD_MESH_SUN */
- 1772, /* GL_TRIANGLE_MESH_SUN */
- 1853, /* GL_VERTEX_PROGRAM_ARB */
- 1864, /* GL_VERTEX_STATE_PROGRAM_NV */
- 1840, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- 1846, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- 1848, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- 1850, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ 1771, /* GL_TRIANGLE_MESH_SUN */
+ 1852, /* GL_VERTEX_PROGRAM_ARB */
+ 1863, /* GL_VERTEX_STATE_PROGRAM_NV */
+ 1839, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ 1845, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ 1847, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ 1849, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
334, /* GL_CURRENT_VERTEX_ATTRIB */
1240, /* GL_PROGRAM_LENGTH_ARB */
1254, /* GL_PROGRAM_STRING_ARB */
998, /* GL_MODELVIEW_PROJECTION_NV */
623, /* GL_IDENTITY_NV */
670, /* GL_INVERSE_NV */
- 1765, /* GL_TRANSPOSE_NV */
+ 1764, /* GL_TRANSPOSE_NV */
671, /* GL_INVERSE_TRANSPOSE_NV */
903, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
902, /* GL_MAX_PROGRAM_MATRICES_ARB */
@@ -4680,33 +4678,33 @@ static const unsigned reduced_enums[1351] =
845, /* GL_MATRIX7_NV */
318, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
315, /* GL_CURRENT_MATRIX_ARB */
- 1856, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- 1859, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ 1855, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ 1858, /* GL_VERTEX_PROGRAM_TWO_SIDE */
1252, /* GL_PROGRAM_PARAMETER_NV */
- 1844, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ 1843, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
1256, /* GL_PROGRAM_TARGET_NV */
1253, /* GL_PROGRAM_RESIDENT_NV */
- 1757, /* GL_TRACK_MATRIX_NV */
- 1758, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- 1854, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ 1756, /* GL_TRACK_MATRIX_NV */
+ 1757, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ 1853, /* GL_VERTEX_PROGRAM_BINDING_NV */
1234, /* GL_PROGRAM_ERROR_POSITION_ARB */
356, /* GL_DEPTH_CLAMP */
- 1822, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- 1829, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- 1830, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- 1831, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- 1832, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- 1833, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- 1834, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- 1835, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- 1836, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- 1837, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- 1823, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- 1824, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- 1825, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- 1826, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- 1827, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- 1828, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ 1821, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ 1828, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ 1829, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ 1830, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ 1831, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ 1832, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ 1833, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ 1834, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ 1835, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ 1836, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ 1822, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ 1823, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ 1824, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ 1825, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ 1826, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ 1827, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
757, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
764, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
765, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
@@ -4745,14 +4743,14 @@ static const unsigned reduced_enums[1351] =
269, /* GL_COMPRESSED_TEXTURE_FORMATS */
946, /* GL_MAX_VERTEX_UNITS_ARB */
22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
- 1875, /* GL_WEIGHT_SUM_UNITY_ARB */
- 1852, /* GL_VERTEX_BLEND_ARB */
+ 1874, /* GL_WEIGHT_SUM_UNITY_ARB */
+ 1851, /* GL_VERTEX_BLEND_ARB */
336, /* GL_CURRENT_WEIGHT_ARB */
- 1874, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- 1873, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- 1872, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- 1871, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- 1868, /* GL_WEIGHT_ARRAY_ARB */
+ 1873, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ 1872, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ 1871, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ 1870, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ 1867, /* GL_WEIGHT_ARRAY_ARB */
386, /* GL_DOT3_RGB */
387, /* GL_DOT3_RGBA */
263, /* GL_COMPRESSED_RGB_FXT1_3DFX */
@@ -4797,7 +4795,7 @@ static const unsigned reduced_enums[1351] =
1001, /* GL_MODULATE_ADD_ATI */
1002, /* GL_MODULATE_SIGNED_ADD_ATI */
1003, /* GL_MODULATE_SUBTRACT_ATI */
- 1881, /* GL_YCBCR_MESA */
+ 1880, /* GL_YCBCR_MESA */
1093, /* GL_PACK_INVERT_MESA */
339, /* GL_DEBUG_OBJECT_MESA */
340, /* GL_DEBUG_PRINT_MESA */
@@ -4870,7 +4868,7 @@ static const unsigned reduced_enums[1351] =
1295, /* GL_QUERY_RESULT */
1297, /* GL_QUERY_RESULT_AVAILABLE */
940, /* GL_MAX_VERTEX_ATTRIBS */
- 1842, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ 1841, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
377, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
376, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
926, /* GL_MAX_TEXTURE_COORDS */
@@ -4885,7 +4883,7 @@ static const unsigned reduced_enums[1351] =
464, /* GL_ELEMENT_ARRAY_BUFFER */
54, /* GL_ARRAY_BUFFER_BINDING */
465, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- 1816, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ 1815, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
1027, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
149, /* GL_COLOR_ARRAY_BUFFER_BINDING */
632, /* GL_INDEX_ARRAY_BUFFER_BINDING */
@@ -4893,8 +4891,8 @@ static const unsigned reduced_enums[1351] =
460, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
1420, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
514, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- 1869, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- 1838, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ 1868, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ 1837, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
1239, /* GL_PROGRAM_INSTRUCTIONS_ARB */
898, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
1245, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
@@ -4918,14 +4916,14 @@ static const unsigned reduced_enums[1351] =
899, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
895, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
1260, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- 1762, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ 1761, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
1308, /* GL_READ_ONLY */
- 1877, /* GL_WRITE_ONLY */
+ 1876, /* GL_WRITE_ONLY */
1310, /* GL_READ_WRITE */
102, /* GL_BUFFER_ACCESS */
105, /* GL_BUFFER_MAPPED */
107, /* GL_BUFFER_MAP_POINTER */
- 1756, /* GL_TIME_ELAPSED_EXT */
+ 1755, /* GL_TIME_ELAPSED_EXT */
808, /* GL_MATRIX0_ARB */
820, /* GL_MATRIX1_ARB */
832, /* GL_MATRIX2_ARB */
@@ -4986,7 +4984,7 @@ static const unsigned reduced_enums[1351] =
109, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
104, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
537, /* GL_FRAGMENT_SHADER */
- 1862, /* GL_VERTEX_SHADER */
+ 1861, /* GL_VERTEX_SHADER */
1250, /* GL_PROGRAM_OBJECT_ARB */
1433, /* GL_SHADER_OBJECT_ARB */
882, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
@@ -5024,7 +5022,7 @@ static const unsigned reduced_enums[1351] =
345, /* GL_DELETE_STATUS */
246, /* GL_COMPILE_STATUS */
715, /* GL_LINK_STATUS */
- 1810, /* GL_VALIDATE_STATUS */
+ 1809, /* GL_VALIDATE_STATUS */
644, /* GL_INFO_LOG_LENGTH */
56, /* GL_ATTACHED_SHADERS */
20, /* GL_ACTIVE_UNIFORMS */
@@ -5047,7 +5045,7 @@ static const unsigned reduced_enums[1351] =
1106, /* GL_PALETTE8_RGB5_A1_OES */
626, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
625, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- 1795, /* GL_UNSIGNED_NORMALIZED */
+ 1794, /* GL_UNSIGNED_NORMALIZED */
1632, /* GL_TEXTURE_1D_ARRAY_EXT */
1272, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
1634, /* GL_TEXTURE_2D_ARRAY_EXT */
@@ -5068,7 +5066,7 @@ static const unsigned reduced_enums[1351] =
266, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
1167, /* GL_POINT_SPRITE_COORD_ORIGIN */
723, /* GL_LOWER_LEFT */
- 1807, /* GL_UPPER_LEFT */
+ 1806, /* GL_UPPER_LEFT */
1513, /* GL_STENCIL_BACK_REF */
1514, /* GL_STENCIL_BACK_VALUE_MASK */
1515, /* GL_STENCIL_BACK_WRITEMASK */
@@ -5150,12 +5148,12 @@ static const unsigned reduced_enums[1351] =
1553, /* GL_SYNC_FLAGS */
1552, /* GL_SYNC_FENCE */
1555, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
- 1783, /* GL_UNSIGNALED */
+ 1782, /* GL_UNSIGNALED */
1442, /* GL_SIGNALED */
46, /* GL_ALREADY_SIGNALED */
1754, /* GL_TIMEOUT_EXPIRED */
270, /* GL_CONDITION_SATISFIED */
- 1867, /* GL_WAIT_FAILED */
+ 1866, /* GL_WAIT_FAILED */
471, /* GL_EVAL_BIT */
1302, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
717, /* GL_LIST_BIT */
@@ -5164,7 +5162,6 @@ static const unsigned reduced_enums[1351] =
29, /* GL_ALL_ATTRIB_BITS */
1008, /* GL_MULTISAMPLE_BIT */
30, /* GL_ALL_CLIENT_ATTRIB_BITS */
- 1755, /* GL_TIMEOUT_IGNORED */
};
typedef int (*cfunc)(const void *, const void *);
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index a5ec11dd2a..fc278bb8af 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -3229,6 +3229,7 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
srcFormat == GL_RGBA ||
srcFormat == GL_BGRA ||
srcFormat == GL_ABGR_EXT ||
+ srcFormat == GL_DU8DV8_ATI ||
srcFormat == GL_DUDV_ATI);
ASSERT(srcType == GL_UNSIGNED_BYTE ||
@@ -3344,6 +3345,7 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
aComp = 0;
stride = 4;
break;
+ case GL_DU8DV8_ATI:
case GL_DUDV_ATI:
redIndex = 0;
greenIndex = 1;
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index db4c7a5eda..9e1a889bce 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -1165,6 +1165,7 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
return;
}
+ _mesa_lock_texture(ctx, obj);
switch (pname) {
case GL_TEXTURE_MAG_FILTER:
*params = (GLint) obj->MagFilter;
diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y
index 3f1a350c24..b40b216d65 100644
--- a/src/mesa/shader/program_parse.y
+++ b/src/mesa/shader/program_parse.y
@@ -2297,7 +2297,9 @@ set_dst_reg(struct prog_dst_register *r, gl_register_file file, GLint index)
const GLint maxIndex = 1 << INST_INDEX_BITS;
const GLint minIndex = 0;
ASSERT(index >= minIndex);
+ (void) minIndex;
ASSERT(index <= maxIndex);
+ (void) maxIndex;
ASSERT(file == PROGRAM_TEMPORARY ||
file == PROGRAM_ADDRESS ||
file == PROGRAM_OUTPUT);
@@ -2338,7 +2340,9 @@ set_src_reg_swz(struct asm_src_register *r, gl_register_file file, GLint index,
const GLint minIndex = -(1 << INST_INDEX_BITS);
ASSERT(file < PROGRAM_FILE_MAX);
ASSERT(index >= minIndex);
+ (void) minIndex;
ASSERT(index <= maxIndex);
+ (void) maxIndex;
memset(r, 0, sizeof(*r));
r->Base.File = file;
r->Base.Index = index;
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index b62cfc36af..372a9acdd0 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -4249,14 +4249,15 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper)
if (oper->children[0].type == SLANG_OPER_IDENTIFIER) {
/* Check that var is writeable */
+ const char *varName = (char *) oper->children[0].a_id;
slang_variable *var
= _slang_variable_locate(oper->children[0].locals,
oper->children[0].a_id, GL_TRUE);
if (!var) {
- slang_info_log_error(A->log, "undefined variable '%s'",
- (char *) oper->children[0].a_id);
+ slang_info_log_error(A->log, "undefined variable '%s'", varName);
return NULL;
}
+
if (var->type.qualifier == SLANG_QUAL_CONST ||
var->type.qualifier == SLANG_QUAL_ATTRIBUTE ||
var->type.qualifier == SLANG_QUAL_UNIFORM ||
@@ -4264,7 +4265,7 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper)
A->program->Target == GL_FRAGMENT_PROGRAM_ARB)) {
slang_info_log_error(A->log,
"illegal assignment to read-only variable '%s'",
- (char *) oper->children[0].a_id);
+ varName);
return NULL;
}
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index 494a3a99c8..0102d8a6f7 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -103,6 +103,17 @@ st_bufferobj_subdata(GLcontext *ctx,
ASSERT(size >= 0);
ASSERT(offset + size <= obj->Size);
+ if (!size)
+ return;
+
+ /*
+ * According to ARB_vertex_buffer_object specification, if data is null,
+ * then the contents of the buffer object's data store is undefined. We just
+ * ignore, and leave it unchanged.
+ */
+ if (!data)
+ return;
+
st_cond_flush_pipe_buffer_write(st_context(ctx), st_obj->buffer,
offset, size, data);
}
@@ -125,6 +136,9 @@ st_bufferobj_get_subdata(GLcontext *ctx,
ASSERT(size >= 0);
ASSERT(offset + size <= obj->Size);
+ if (!size)
+ return;
+
st_cond_flush_pipe_buffer_read(st_context(ctx), st_obj->buffer,
offset, size, data);
}
@@ -223,6 +237,13 @@ st_bufferobj_map(GLcontext *ctx, GLenum target, GLenum access,
/**
+ * Dummy data whose's pointer is used for zero length ranges.
+ */
+static long
+st_bufferobj_zero_length_range = 0;
+
+
+/**
* Called via glMapBufferRange().
*/
static void *
@@ -257,14 +278,26 @@ st_bufferobj_map_range(GLcontext *ctx, GLenum target,
assert(offset < obj->Size);
assert(offset + length <= obj->Size);
- obj->Pointer = pipe_buffer_map_range(pipe->screen, st_obj->buffer, offset, length, flags);
+ /*
+ * We go out of way here to hide the degenerate yet valid case of zero
+ * length range from the pipe driver.
+ */
+ if (!length) {
+ obj->Pointer = &st_bufferobj_zero_length_range;
+ }
+ else {
+ obj->Pointer = pipe_buffer_map_range(pipe->screen, st_obj->buffer, offset, length, flags);
+ if (obj->Pointer) {
+ obj->Pointer = (ubyte *) obj->Pointer + offset;
+ }
+ }
+
if (obj->Pointer) {
- obj->Pointer = (ubyte *) obj->Pointer + offset;
obj->Offset = offset;
obj->Length = length;
obj->AccessFlags = access;
}
-
+
return obj->Pointer;
}
@@ -282,6 +315,9 @@ st_bufferobj_flush_mapped_range(GLcontext *ctx, GLenum target,
assert(length >= 0);
assert(offset + length <= obj->Length);
+ if (!length)
+ return;
+
pipe_buffer_flush_mapped_range(pipe->screen, st_obj->buffer,
obj->Offset + offset, length);
}
@@ -296,7 +332,9 @@ st_bufferobj_unmap(GLcontext *ctx, GLenum target, struct gl_buffer_object *obj)
struct pipe_context *pipe = st_context(ctx)->pipe;
struct st_buffer_object *st_obj = st_buffer_object(obj);
- pipe_buffer_unmap(pipe->screen, st_obj->buffer);
+ if(obj->Length)
+ pipe_buffer_unmap(pipe->screen, st_obj->buffer);
+
obj->Pointer = NULL;
obj->Offset = 0;
obj->Length = 0;
@@ -319,6 +357,9 @@ st_copy_buffer_subdata(GLcontext *ctx,
struct st_buffer_object *dstObj = st_buffer_object(dst);
ubyte *srcPtr, *dstPtr;
+ if(!size)
+ return;
+
/* buffer should not already be mapped */
assert(!src->Pointer);
assert(!dst->Pointer);
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 6e1ecb1c50..0cec23f2b3 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -1090,7 +1090,7 @@ st_TexSubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level,
done:
_mesa_unmap_teximage_pbo(ctx, packing);
- if (stImage->pt) {
+ if (stImage->pt && texImage->Data) {
st_texture_image_unmap(ctx->st, stImage);
texImage->Data = NULL;
}
diff --git a/src/mesa/x86/gen_matypes.c b/src/mesa/x86/gen_matypes.c
index 0d7e0f1f98..14cfa910aa 100644
--- a/src/mesa/x86/gen_matypes.c
+++ b/src/mesa/x86/gen_matypes.c
@@ -61,21 +61,11 @@ do { \
printf( "\n" ); \
} while (0)
-#if defined(__BEOS__) || defined(__HAIKU__) || defined(_LP64)
#define OFFSET( s, t, m ) \
- printf( "#define %s\t%ld\n", s, offsetof( t, m ) );
-#else
-#define OFFSET( s, t, m ) \
- printf( "#define %s\t%d\n", s, offsetof( t, m ) );
-#endif
+ printf( "#define %s\t%lu\n", s, (unsigned long) offsetof( t, m ) );
-#if defined(__BEOS__) || defined(__HAIKU__) || defined(_LP64)
-#define SIZEOF( s, t ) \
- printf( "#define %s\t%ld\n", s, sizeof(t) );
-#else
#define SIZEOF( s, t ) \
- printf( "#define %s\t%d\n", s, sizeof(t) );
-#endif
+ printf( "#define %s\t%lu\n", s, (unsigned long) sizeof(t) );
#define DEFINE( s, d ) \
printf( "#define %s\t0x%x\n", s, d );