mesa: Changes to 'upstream-unstable'
Makefile | 8 +++---
configs/default | 2 -
docs/relnotes-7.0.4.html | 2 +
src/glu/sgi/libutil/quad.c | 4 +--
src/mesa/Makefile | 3 +-
src/mesa/drivers/dri/i965/intel_batchbuffer.h | 2 -
src/mesa/drivers/glide/fxddspan.c | 3 ++
src/mesa/drivers/glide/fxddtex.c | 4 +--
src/mesa/drivers/glide/fxg.c | 14 +++++++++++
src/mesa/drivers/glide/fxsetup.c | 3 +-
src/mesa/drivers/glide/fxtris.c | 17 +++++++------
src/mesa/drivers/glide/fxvbtmp.h | 5 +++
src/mesa/drivers/x11/xm_glide.c | 3 +-
src/mesa/main/version.h | 6 ++--
src/mesa/shader/slang/slang_emit.c | 2 -
src/mesa/sources | 3 +-
src/mesa/swrast/s_context.c | 2 +
src/mesa/swrast/s_context.h | 1
src/mesa/swrast/s_zoom.c | 33 ++++++++++++++++----------
src/mesa/x86/Makefile | 2 -
20 files changed, 80 insertions(+), 39 deletions(-)
New commits:
commit 718724deeb23099ee74ee3a3dc23d2447d004f02
Author: Wilfried Holzke <sf@holzke.net>
Date: Tue Jun 17 10:03:03 2008 -0600
assorted glide driver fixes/updates
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index d0c19f5..a4f7488 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -89,7 +89,8 @@ fbdev: $(CORE_OBJECTS) $(FBDEV_DRIVER_OBJECTS) $(COMMON_DRIVER_OBJECTS)
# Stand-alone Mesa libGL and libOSMesa
STAND_ALONE_DRIVER_SOURCES = \
$(COMMON_DRIVER_SOURCES) \
- $(X11_DRIVER_SOURCES)
+ $(X11_DRIVER_SOURCES) \
+ $(GLIDE_DRIVER_SOURCES)
STAND_ALONE_DRIVER_OBJECTS = $(STAND_ALONE_DRIVER_SOURCES:.c=.o)
diff --git a/src/mesa/drivers/glide/fxddspan.c b/src/mesa/drivers/glide/fxddspan.c
index 3ea9f73..a5b4e83 100644
--- a/src/mesa/drivers/glide/fxddspan.c
+++ b/src/mesa/drivers/glide/fxddspan.c
@@ -549,6 +549,7 @@ void
fxSetupDDSpanPointers(GLcontext * ctx)
{
struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx );
+#if 0
fxMesaContext fxMesa = FX_CONTEXT(ctx);
switch (fxMesa->colDepth) {
@@ -602,6 +603,8 @@ fxSetupDDSpanPointers(GLcontext * ctx)
swdd->WriteStencilPixels = fxWriteStencilPixels;
swdd->ReadStencilPixels = fxReadStencilPixels;
}
+#endif
+
#if 0
swdd->WriteCI8Span = NULL;
swdd->WriteCI32Span = NULL;
diff --git a/src/mesa/drivers/glide/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c
index cb2c855..aed72ca 100644
--- a/src/mesa/drivers/glide/fxddtex.c
+++ b/src/mesa/drivers/glide/fxddtex.c
@@ -504,7 +504,7 @@ fxDDIsTextureResident(GLcontext *ctx, struct gl_texture_object *tObj)
static GrTexTable_t
convertPalette(const fxMesaContext fxMesa, FxU32 data[256], const struct gl_color_table *table)
{
- const GLubyte *tableUB = (const GLubyte *) table->Table;
+ const GLubyte *tableUB = (const GLubyte *) table->TableUB;
GLint width = table->Size;
FxU32 r, g, b, a;
GLint i;
@@ -580,7 +580,7 @@ fxDDTexPalette(GLcontext * ctx, struct gl_texture_object *tObj)
tObj->Name, (GLuint) tObj->DriverData);
}
/* This might be a proxy texture. */
- if (!tObj->Palette.Table)
+ if (!tObj->Palette.TableUB) /* TODO: is that ok or should it be TableF? */
return;
if (!tObj->DriverData)
tObj->DriverData = fxAllocTexObjData(fxMesa);
diff --git a/src/mesa/drivers/glide/fxg.c b/src/mesa/drivers/glide/fxg.c
index afb9441..dc0517b 100644
--- a/src/mesa/drivers/glide/fxg.c
+++ b/src/mesa/drivers/glide/fxg.c
@@ -2306,4 +2306,18 @@ void tdfx_hook_glide (struct tdfx_glide *Glide, int pointcast)
#undef GET_EXT_ADDR
}
+#else
+
+/*
+ * Need this to provide at least one external definition.
+ */
+
+extern int gl_fxg_dummy_function(void);
+int
+gl_fxg_dummy_function(void)
+{
+ return 0;
+}
+
+
#endif /* FX */
diff --git a/src/mesa/drivers/glide/fxsetup.c b/src/mesa/drivers/glide/fxsetup.c
index 240e5e0..8c004db 100644
--- a/src/mesa/drivers/glide/fxsetup.c
+++ b/src/mesa/drivers/glide/fxsetup.c
@@ -154,7 +154,8 @@ fxTexValidate(GLcontext * ctx, struct gl_texture_object *tObj)
}
}
- ti->baseLevelInternalFormat = tObj->Image[0][minl]->Format;
+ /* TODO: right format? */
+ ti->baseLevelInternalFormat = tObj->Image[0][minl]->_BaseFormat;
ti->validated = GL_TRUE;
diff --git a/src/mesa/drivers/glide/fxtris.c b/src/mesa/drivers/glide/fxtris.c
index 0b9b3be..6b219b4 100644
--- a/src/mesa/drivers/glide/fxtris.c
+++ b/src/mesa/drivers/glide/fxtris.c
@@ -177,22 +177,23 @@ fx_translate_vertex( GLcontext *ctx, const GrVertex *src, SWvertex *dst)
dst->specular[2] = src->g1;
#endif /* !FX_PACKEDCOLOR */
- dst->texcoord[ts0][0] = fxMesa->inv_s0scale * src->tmuvtx[0].sow * w;
- dst->texcoord[ts0][1] = fxMesa->inv_t0scale * src->tmuvtx[0].tow * w;
+ /* TODO: changed "texcoord" to "attrib" */
+ dst->attrib[ts0][0] = fxMesa->inv_s0scale * src->tmuvtx[0].sow * w;
+ dst->attrib[ts0][1] = fxMesa->inv_t0scale * src->tmuvtx[0].tow * w;
if (fxMesa->stw_hint_state & GR_STWHINT_W_DIFF_TMU0)
- dst->texcoord[ts0][3] = src->tmuvtx[0].oow * w;
+ dst->attrib[ts0][3] = src->tmuvtx[0].oow * w;
else
- dst->texcoord[ts0][3] = 1.0F;
+ dst->attrib[ts0][3] = 1.0F;
if (fxMesa->SetupIndex & SETUP_TMU1) {
- dst->texcoord[ts1][0] = fxMesa->inv_s1scale * src->tmuvtx[1].sow * w;
- dst->texcoord[ts1][1] = fxMesa->inv_t1scale * src->tmuvtx[1].tow * w;
+ dst->attrib[ts1][0] = fxMesa->inv_s1scale * src->tmuvtx[1].sow * w;
+ dst->attrib[ts1][1] = fxMesa->inv_t1scale * src->tmuvtx[1].tow * w;
if (fxMesa->stw_hint_state & GR_STWHINT_W_DIFF_TMU1)
- dst->texcoord[ts1][3] = src->tmuvtx[1].oow * w;
+ dst->attrib[ts1][3] = src->tmuvtx[1].oow * w;
else
- dst->texcoord[ts1][3] = 1.0F;
+ dst->attrib[ts1][3] = 1.0F;
}
dst->pointSize = src->psize;
diff --git a/src/mesa/drivers/glide/fxvbtmp.h b/src/mesa/drivers/glide/fxvbtmp.h
index f7970c7..c1bba27 100644
--- a/src/mesa/drivers/glide/fxvbtmp.h
+++ b/src/mesa/drivers/glide/fxvbtmp.h
@@ -57,8 +57,13 @@ static void TAG(emit)( GLcontext *ctx,
int i;
if (IND & SETUP_PSIZ) {
+ /*
psize = VB->PointSizePtr->data;
psize_stride = VB->PointSizePtr->stride;
+ */
+ /* TODO: fix this! */
+ psize = 0;
+ psize_stride = 0;
}
if (IND & SETUP_TMU0) {
diff --git a/src/mesa/drivers/x11/xm_glide.c b/src/mesa/drivers/x11/xm_glide.c
index ae4f428..cbd69b0 100644
--- a/src/mesa/drivers/x11/xm_glide.c
+++ b/src/mesa/drivers/x11/xm_glide.c
@@ -64,7 +64,8 @@ FXcreateContext(XMesaVisual v, XMesaWindow w, XMesaContext c, XMesaBuffer b)
attribs[numAttribs++] = FXMESA_NONE;
/* [dBorca] we should take an envvar for `fxMesaSelectCurrentBoard'!!! */
- hw = fxMesaSelectCurrentBoard(0);
+/* hw = fxMesaSelectCurrentBoard(0); */
+ hw = GR_SSTTYPE_Voodoo2;
/* if these fail, there's a new bug somewhere */
ASSERT(b->mesa_buffer.Width > 0);
diff --git a/src/mesa/sources b/src/mesa/sources
index dbfc01d..8456204 100644
--- a/src/mesa/sources
+++ b/src/mesa/sources
@@ -258,7 +258,6 @@ OSMESA_DRIVER_SOURCES = \
GLIDE_DRIVER_SOURCES = \
drivers/glide/fxapi.c \
drivers/glide/fxdd.c \
- drivers/glide/fxddspan.c \
drivers/glide/fxddtex.c \
drivers/glide/fxsetup.c \
drivers/glide/fxtexman.c \
@@ -267,6 +266,8 @@ GLIDE_DRIVER_SOURCES = \
drivers/glide/fxglidew.c \
drivers/glide/fxg.c
+# drivers/fxddspan.c
+
SVGA_DRIVER_SOURCES = \
drivers/svga/svgamesa.c \
drivers/svga/svgamesa8.c \
commit 85c325c36c3832c08a5320a66e6bff107ed66cd3
Author: Brian Paul <brian.paul@tungstengraphics.com>
Date: Tue Jun 17 10:02:10 2008 -0600
add hyphen to rm command
diff --git a/src/mesa/x86/Makefile b/src/mesa/x86/Makefile
index 3c6a6b1..dc8c7f3 100644
--- a/src/mesa/x86/Makefile
+++ b/src/mesa/x86/Makefile
@@ -17,7 +17,7 @@ INCLUDE_DIRS = \
default: gen_matypes matypes.h
clean:
- rm -f matypes.h gen_matypes
+ -rm -f matypes.h gen_matypes
gen_matypes: gen_matypes.c
commit 7e6d99f5ecd9225257c77df36cbac21661fa3930
Author: Brian Paul <brian.paul@tungstengraphics.com>
Date: Tue Jun 17 09:01:40 2008 -0600
glu: silence warnings
diff --git a/src/glu/sgi/libutil/quad.c b/src/glu/sgi/libutil/quad.c
index e604539..1ae7442 100644
--- a/src/glu/sgi/libutil/quad.c
+++ b/src/glu/sgi/libutil/quad.c
@@ -713,8 +713,8 @@ gluSphere(GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks)
GLfloat cosCache3b[CACHE_SIZE];
GLfloat angle;
GLfloat zLow, zHigh;
- GLfloat sintemp1, sintemp2, sintemp3 = 0.0, sintemp4 = 0.0;
- GLfloat costemp1, costemp2 = 0.0, costemp3 = 0.0, costemp4 = 0.0;
+ GLfloat sintemp1 = 0.0, sintemp2 = 0.0, sintemp3 = 0.0, sintemp4 = 0.0;
+ GLfloat costemp1 = 0.0, costemp2 = 0.0, costemp3 = 0.0, costemp4 = 0.0;
GLboolean needCache2, needCache3;
GLint start, finish;
commit 6ce6dc961b3fcb8b687d79565adf793d81aac37d
Author: Brian Paul <brian.paul@tungstengraphics.com>
Date: Mon Jun 16 10:18:53 2008 -0600
bump version to 7.0.4
diff --git a/Makefile b/Makefile
index a010e42..9d3c8f2 100644
--- a/Makefile
+++ b/Makefile
@@ -172,10 +172,10 @@ ultrix-gcc:
# Rules for making release tarballs
-DIRECTORY = Mesa-7.0.3
-LIB_NAME = MesaLib-7.0.3
-DEMO_NAME = MesaDemos-7.0.3
-GLUT_NAME = MesaGLUT-7.0.3
+DIRECTORY = Mesa-7.0.4
+LIB_NAME = MesaLib-7.0.4
+DEMO_NAME = MesaDemos-7.0.4
+GLUT_NAME = MesaGLUT-7.0.4
MAIN_FILES = \
$(DIRECTORY)/Makefile* \
diff --git a/configs/default b/configs/default
index eb2eb8b..1badafd 100644
--- a/configs/default
+++ b/configs/default
@@ -10,7 +10,7 @@ CONFIG_NAME = default
# Version info
MESA_MAJOR=7
MESA_MINOR=0
-MESA_TINY=3
+MESA_TINY=4
# external projects. This should be useless now that we use libdrm.
DRM_SOURCE_PATH=$(TOP)/../drm
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index 0bf7557..5017198 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 7.0.3
+ * Version: 7.0.4
*
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
*
@@ -30,8 +30,8 @@
/* Mesa version */
#define MESA_MAJOR 7
#define MESA_MINOR 0
-#define MESA_PATCH 3
-#define MESA_VERSION_STRING "7.0.3"
+#define MESA_PATCH 4
+#define MESA_VERSION_STRING "7.0.4"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
commit 186883611edfd867f7ebafd06aa61ac575bec0f8
Author: Brian Paul <brian.paul@tungstengraphics.com>
Date: Mon Jun 16 10:18:02 2008 -0600
fix glPixelZoom stack over flow on Windows
diff --git a/docs/relnotes-7.0.4.html b/docs/relnotes-7.0.4.html
index 2004d01..1ea2306 100644
--- a/docs/relnotes-7.0.4.html
+++ b/docs/relnotes-7.0.4.html
@@ -28,6 +28,7 @@ Mesa 7.0.4 is a stable release with bug fixes since version 7.0.3.
<li>Fixed potential crash in AA/smoothed triangle rendering when using a fragment shader
<li>Fixed glDrawElement + VBO segfault (bug 16156)
<li>Fixed GLSL linker bug causing generic vertex attributes to get aliased
+<li>Fixed stack overflow when using glPixelZoom on Windows
</ul>
<h2>Changes</h2>
commit 48b3c59cb93a430f7254b58d33eb5c01782ca836
Author: Brian Paul <brian.paul@tungstengraphics.com>
Date: Mon Jun 16 10:17:17 2008 -0600
mesa: allocate pixel zoom arrays on heap, not stack
Fixes stack overflow on Windows.
cherry-picked from master
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index 9b9b73f..af84ff6 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -833,6 +833,8 @@ _swrast_DestroyContext( GLcontext *ctx )
}
FREE( swrast->SpanArrays );
+ if (swrast->ZoomedArrays)
+ FREE( swrast->ZoomedArrays );
FREE( swrast->TexelBuffer );
FREE( swrast );
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index 58841ad..5de0800 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -205,6 +205,7 @@ typedef struct
* on some systems.
*/
SWspanarrays *SpanArrays;
+ SWspanarrays *ZoomedArrays; /**< For pixel zooming */
/**
* Used to buffer N GL_POINTS, instead of rendering one by one.
diff --git a/src/mesa/swrast/s_zoom.c b/src/mesa/swrast/s_zoom.c
index 0908265..c7b5589 100644
--- a/src/mesa/swrast/s_zoom.c
+++ b/src/mesa/swrast/s_zoom.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.2
+ * Version: 7.1
*
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -130,8 +130,8 @@ static void
zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span,
const GLvoid *src, GLenum format )
{
+ SWcontext *swrast = SWRAST_CONTEXT(ctx);
SWspan zoomed;
- SWspanarrays zoomed_arrays; /* this is big! */
GLint x0, x1, y0, y1;
GLint zoomedWidth;
@@ -140,6 +140,13 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span,
return; /* totally clipped */
}
+ if (!swrast->ZoomedArrays) {
+ /* allocate on demand */
+ swrast->ZoomedArrays = (SWspanarrays *) CALLOC(sizeof(SWspanarrays));
+ if (!swrast->ZoomedArrays)
+ return;
+ }
+
zoomedWidth = x1 - x0;
ASSERT(zoomedWidth > 0);
ASSERT(zoomedWidth <= MAX_WIDTH);
@@ -151,22 +158,24 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span,
INIT_SPAN(zoomed, GL_BITMAP, 0, 0, 0);
zoomed.x = x0;
zoomed.end = zoomedWidth;
- zoomed.array = &zoomed_arrays;
- zoomed_arrays.ChanType = span->array->ChanType;
+ zoomed.array = swrast->ZoomedArrays;
+ zoomed.array->ChanType = span->array->ChanType;
/* XXX temporary */
#if CHAN_TYPE == GL_UNSIGNED_BYTE
- zoomed_arrays.rgba = zoomed_arrays.color.sz1.rgba;
- zoomed_arrays.spec = zoomed_arrays.color.sz1.spec;
+ zoomed.array->rgba = zoomed.array->color.sz1.rgba;
+ zoomed.array->spec = zoomed.array->color.sz1.spec;
#elif CHAN_TYPE == GL_UNSIGNED_SHORT
- zoomed_arrays.rgba = zoomed_arrays.color.sz2.rgba;
- zoomed_arrays.spec = zoomed_arrays.color.sz2.spec;
+ zoomed.array->rgba = zoomed.array->color.sz2.rgba;
+ zoomed.array->spec = zoomed.array->color.sz2.spec;
#else
- zoomed_arrays.rgba = zoomed_arrays.attribs[FRAG_ATTRIB_COL0];
- zoomed_arrays.spec = zoomed_arrays.attribs[FRAG_ATTRIB_COL1];
+ zoomed.array->rgba = zoomed.array->attribs[FRAG_ATTRIB_COL0];
+ zoomed.array->spec = zoomed.array->attribs[FRAG_ATTRIB_COL1];
#endif
+ COPY_4V(zoomed.attrStart[FRAG_ATTRIB_WPOS], span->attrStart[FRAG_ATTRIB_WPOS]);
+ COPY_4V(zoomed.attrStepX[FRAG_ATTRIB_WPOS], span->attrStepX[FRAG_ATTRIB_WPOS]);
+ COPY_4V(zoomed.attrStepY[FRAG_ATTRIB_WPOS], span->attrStepY[FRAG_ATTRIB_WPOS]);
- /* copy fog interp info */
zoomed.attrStart[FRAG_ATTRIB_FOGC][0] = span->attrStart[FRAG_ATTRIB_FOGC][0];
zoomed.attrStepX[FRAG_ATTRIB_FOGC][0] = span->attrStepX[FRAG_ATTRIB_FOGC][0];
zoomed.attrStepY[FRAG_ATTRIB_FOGC][0] = span->attrStepY[FRAG_ATTRIB_FOGC][0];
commit 04b9d5bc2357783043f980757d2f49224c436043
Author: Brian Paul <brian.paul@tungstengraphics.com>
Date: Mon Jun 16 10:15:47 2008 -0600
Fix _mesa_new_program() recursive call regression
This was introduced by the "i965 GLSL merge" from master (ce7a9efb095472479242d465882c7fbaef81e822)
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index 9c307c6..a7da7c1 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -79,7 +79,7 @@ new_subroutine(slang_emit_info *emitInfo, GLuint *id)
_mesa_realloc(emitInfo->Subroutines,
n * sizeof(struct gl_program),
(n + 1) * sizeof(struct gl_program));
- emitInfo->Subroutines[n] = _mesa_new_program(ctx, emitInfo->prog->Target, 0);
+ emitInfo->Subroutines[n] = ctx->Driver.NewProgram(ctx, emitInfo->prog->Target, 0);
emitInfo->Subroutines[n]->Parameters = emitInfo->prog->Parameters;
emitInfo->NumSubroutines++;
*id = n;
commit 91707e9020f37558901e1d8d83d33f9df3cf6715
Author: Brian Paul <brian.paul@tungstengraphics.com>
Date: Wed Jun 4 14:45:34 2008 -0600
fix GLSL generic vertex attrib linking bug
diff --git a/docs/relnotes-7.0.4.html b/docs/relnotes-7.0.4.html
index 27fbf17..2004d01 100644
--- a/docs/relnotes-7.0.4.html
+++ b/docs/relnotes-7.0.4.html
@@ -27,6 +27,7 @@ Mesa 7.0.4 is a stable release with bug fixes since version 7.0.3.
<li>Fixed a per-vertex glMaterial bug which could cause bad lighting
<li>Fixed potential crash in AA/smoothed triangle rendering when using a fragment shader
<li>Fixed glDrawElement + VBO segfault (bug 16156)
+<li>Fixed GLSL linker bug causing generic vertex attributes to get aliased
</ul>
<h2>Changes</h2>
commit 82a0e82232d61a75fee39d50333016d78938450f
Author: Xiang, Haihao <haihao.xiang@intel.com>
Date: Fri Jun 13 13:48:17 2008 +0800
i965: fix intel_batchbuffer_space. (bug#14709)
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.h b/src/mesa/drivers/dri/i965/intel_batchbuffer.h
index 25e0a65..b794772 100644
--- a/src/mesa/drivers/dri/i965/intel_batchbuffer.h
+++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.h
@@ -84,7 +84,7 @@ void intel_batchbuffer_release_space(struct intel_batchbuffer *batch,
static inline GLuint
intel_batchbuffer_space( struct intel_batchbuffer *batch )
{
- return (BATCH_SZ - BATCH_RESERVED) - (batch->ptr - (batch->map + batch->offset));
+ return (BATCH_SZ - BATCH_RESERVED) - (batch->ptr - batch->map);
}
Reply to: