Compare commits
46 Commits
mesa-7.4.1
...
mesa_7_4_3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d387a35ff | ||
|
|
2ae6859215 | ||
|
|
afe0ca1f3f | ||
|
|
6b782231d0 | ||
|
|
2b890c9818 | ||
|
|
e0b13e15f1 | ||
|
|
420c74b870 | ||
|
|
a64f994a3a | ||
|
|
c568446dc6 | ||
|
|
acbf9c6f3c | ||
|
|
3b842feead | ||
|
|
6d62b8d5c1 | ||
|
|
02659868e8 | ||
|
|
457f4efab0 | ||
|
|
0269eb5e3f | ||
|
|
b7d9be69b2 | ||
|
|
7b8b856c97 | ||
|
|
24bffc4cc2 | ||
|
|
586341afd9 | ||
|
|
1e4334f623 | ||
|
|
8861577fd1 | ||
|
|
cf997e0d2e | ||
|
|
506d340363 | ||
|
|
9dbe32f5eb | ||
|
|
9adca8814d | ||
|
|
8125c5ce92 | ||
|
|
ba3f8dc0aa | ||
|
|
85cf1675d4 | ||
|
|
3aeace2928 | ||
|
|
0edb61afef | ||
|
|
accffe2b73 | ||
|
|
35f5222ae0 | ||
|
|
1096a6c579 | ||
|
|
1eb59f49a4 | ||
|
|
63d1e89138 | ||
|
|
3ed7e9bfcc | ||
|
|
46a2aad2cf | ||
|
|
b5eafa2d51 | ||
|
|
d1fcb4a263 | ||
|
|
da709f163f | ||
|
|
3a1bcbe579 | ||
|
|
ec863602f2 | ||
|
|
2ff47b80f5 | ||
|
|
63cde0ea0e | ||
|
|
c521d4629b | ||
|
|
e9d5569bf3 |
2
Makefile
2
Makefile
@@ -178,7 +178,7 @@ ultrix-gcc:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
VERSION=7.4.1
|
||||
VERSION=7.4.3
|
||||
DIRECTORY = Mesa-$(VERSION)
|
||||
LIB_NAME = MesaLib-$(VERSION)
|
||||
DEMO_NAME = MesaDemos-$(VERSION)
|
||||
|
||||
@@ -10,7 +10,7 @@ CONFIG_NAME = default
|
||||
# Version info
|
||||
MESA_MAJOR=7
|
||||
MESA_MINOR=4
|
||||
MESA_TINY=1
|
||||
MESA_TINY=2
|
||||
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
|
||||
|
||||
# external projects. This should be useless now that we use libdrm.
|
||||
|
||||
@@ -786,12 +786,12 @@ case "$mesa_driver" in
|
||||
osmesa)
|
||||
# only link libraries with osmesa if shared
|
||||
if test "$enable_static" = no; then
|
||||
OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS"
|
||||
OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS"
|
||||
else
|
||||
OSMESA_LIB_DEPS=""
|
||||
fi
|
||||
OSMESA_MESA_DEPS=""
|
||||
OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS"
|
||||
OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS"
|
||||
;;
|
||||
*)
|
||||
# Link OSMesa to libGL otherwise
|
||||
@@ -805,9 +805,6 @@ osmesa)
|
||||
OSMESA_PC_REQ="gl"
|
||||
;;
|
||||
esac
|
||||
if test "$enable_static" = no; then
|
||||
OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS"
|
||||
fi
|
||||
OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV"
|
||||
AC_SUBST([OSMESA_LIB_DEPS])
|
||||
AC_SUBST([OSMESA_MESA_DEPS])
|
||||
|
||||
@@ -9,9 +9,7 @@
|
||||
<H1>Downloading</H1>
|
||||
|
||||
<p>
|
||||
Current stable release: <b>7.4.1</b>
|
||||
<br>
|
||||
Last unstable/development release: <b>7.3</b>
|
||||
Current stable release: <b>7.4.3</b>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
<H1>News</H1>
|
||||
|
||||
|
||||
<h2>June 19, 2009</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.4.3.html">Mesa 7.4.3</a> is released.
|
||||
This is a stable release fixing bugs since the 7.4.2 release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>May 15, 2009</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.4.2.html">Mesa 7.4.2</a> is released.
|
||||
This is a stable release fixing bugs since the 7.4.1 release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>April 18, 2009</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.4.1.html">Mesa 7.4.1</a> is released.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.4.2 Release Notes / TBD</H1>
|
||||
<H1>Mesa 7.4.2 Release Notes / May 15, 2009</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.4.2 is a stable development release fixing bugs since the 7.4.1 release.
|
||||
@@ -26,7 +26,15 @@ for DRI hardware acceleration.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
tbd
|
||||
172f5193154dad731387f97bd44ab68f MesaLib-7.4.2.tar.gz
|
||||
b10a76e32bde4645cfc34ea0416d7d8b MesaLib-7.4.2.tar.bz2
|
||||
cc6dfc2efd424cc342b84e6bcd78ce5d MesaLib-7.4.2.zip
|
||||
182a7e78aa7a480b3650a5c956dbddd1 MesaDemos-7.4.2.tar.gz
|
||||
bf559a0485667a3bfa4513a23501579b MesaDemos-7.4.2.tar.bz2
|
||||
5379e622b65e8c22022dba34aeb6f4f9 MesaDemos-7.4.2.zip
|
||||
7cc43c1c35bf6a279a16e063dea3b8c5 MesaGLUT-7.4.2.tar.gz
|
||||
e0dfc44d537904a030861e5b3c760c11 MesaGLUT-7.4.2.tar.bz2
|
||||
4a6cf5bbbac190d6ba97448b3098b7f4 MesaGLUT-7.4.2.zip
|
||||
</pre>
|
||||
|
||||
|
||||
@@ -35,6 +43,10 @@ tbd
|
||||
<li>Fixed segfault when rendering to front buffer with DRI 1.
|
||||
<li>Fixed swrast texture rectangle bug when wrap mode = GL_CLAMP_TO_BORDER and
|
||||
filter mode = GL_LINEAR. (bug 21461)
|
||||
<li>Fixed texture object mem leak during context destruction.
|
||||
<li>Fixed a state validation bug in glCopyTex[Sub]Image()
|
||||
<li>Fixed some i965 GLSL bugs.
|
||||
<li>Fixed an R300 driver texture object bad memory reference.
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
70
docs/relnotes-7.4.3.html
Normal file
70
docs/relnotes-7.4.3.html
Normal file
@@ -0,0 +1,70 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.4.3 Release Notes / 19 June 2009</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.4.3 is a stable development release fixing bugs since the 7.4.2 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.4.3 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>
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Fixed texture object reference counting bug (bug 21756)
|
||||
<li>Allow depth/stencil textures to be attached to GL_STENCIL_ATTACHMENT point
|
||||
(SF bug 2793846)
|
||||
<li>Added missing glGet case for GL_VERTEX_ARRAY_BINDING_APPLE
|
||||
<li>Fixed some OSMesa build issues
|
||||
<li>Fixed a vertex buffer object crash
|
||||
<li>Fixed broken glTexImage3D() when image type = GL_BITMAP
|
||||
<li>Fixed some GLSL preprocessor bugs
|
||||
<li>Fixed framebuffer mem leak in i945/i965 DRI drivers
|
||||
<li>Fixed texture coordinate repeat bug in swrast (bug 21872)
|
||||
<li>Fixed incorrect viewport clamping (lower bound is zero, not one)
|
||||
<li>GLX fix for glean's makeCurrent test case
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h2>Driver Status</h2>
|
||||
|
||||
<pre>
|
||||
Driver Status
|
||||
---------------------- ----------------------
|
||||
DRI drivers varies with the driver
|
||||
XMesa/GLX (on Xlib) implements OpenGL 2.1
|
||||
OSMesa (off-screen) implements OpenGL 2.1
|
||||
Windows/Win32 implements OpenGL 2.1
|
||||
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
|
||||
SVGA unsupported
|
||||
Wind River UGL unsupported
|
||||
DJGPP unsupported
|
||||
GGI unsupported
|
||||
BeOS unsupported
|
||||
Allegro unsupported
|
||||
D3D unsupported
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -20,6 +20,7 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="relnotes-7.4.3.html">7.4.3 release notes</A>
|
||||
<LI><A HREF="relnotes-7.4.2.html">7.4.2 release notes</A>
|
||||
<LI><A HREF="relnotes-7.4.1.html">7.4.1 release notes</A>
|
||||
<LI><A HREF="relnotes-7.4.html">7.4 release notes</A>
|
||||
|
||||
@@ -271,9 +271,24 @@ CreateProgram(const char *vertProgFile, const char *fragProgFile,
|
||||
|
||||
InitUniforms(program, uniforms);
|
||||
|
||||
VertCoord_attr = glGetAttribLocation_func(program, "VertCoord");
|
||||
if (VertCoord_attr > 0) {
|
||||
/* We want the VertCoord attrib to have position zero so that
|
||||
* the call to glVertexAttrib(0, xyz) triggers vertex processing.
|
||||
* Otherwise, if TexCoord0 or TexCoord1 gets position 0 we'd have
|
||||
* to set that attribute last (which is a PITA to manage).
|
||||
*/
|
||||
glBindAttribLocation_func(program, 0, "VertCoord");
|
||||
/* re-link */
|
||||
glLinkProgram_func(program);
|
||||
/* VertCoord_attr should be zero now */
|
||||
VertCoord_attr = glGetAttribLocation_func(program, "VertCoord");
|
||||
assert(VertCoord_attr == 0);
|
||||
}
|
||||
|
||||
TexCoord0_attr = glGetAttribLocation_func(program, "TexCoord0");
|
||||
TexCoord1_attr = glGetAttribLocation_func(program, "TexCoord1");
|
||||
VertCoord_attr = glGetAttribLocation_func(program, "VertCoord");
|
||||
|
||||
printf("TexCoord0_attr = %d\n", TexCoord0_attr);
|
||||
printf("TexCoord1_attr = %d\n", TexCoord1_attr);
|
||||
printf("VertCoord_attr = %d\n", VertCoord_attr);
|
||||
|
||||
@@ -600,7 +600,7 @@ static __GLXDRIscreen *driCreateScreen(__GLXscreenConfigs *psc, int screen,
|
||||
char *driverName;
|
||||
int i;
|
||||
|
||||
psp = Xmalloc(sizeof *psp);
|
||||
psp = Xcalloc(1, sizeof *psp);
|
||||
if (psp == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@ driCreateScreen(__GLXscreenConfigs * psc, int screen,
|
||||
const char *driverName = "swrast";
|
||||
int i;
|
||||
|
||||
psp = Xmalloc(sizeof *psp);
|
||||
psp = Xcalloc(1, sizeof *psp);
|
||||
if (psp == NULL)
|
||||
return NULL;
|
||||
|
||||
@@ -405,6 +405,8 @@ driCreateScreen(__GLXscreenConfigs * psc, int screen,
|
||||
psp->createContext = driCreateContext;
|
||||
psp->createDrawable = driCreateDrawable;
|
||||
psp->swapBuffers = driSwapBuffers;
|
||||
psp->waitX = NULL;
|
||||
psp->waitGL = NULL;
|
||||
|
||||
return psp;
|
||||
|
||||
|
||||
@@ -429,7 +429,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
|
||||
&dummy_reply);
|
||||
}
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
else if (oldGC->driContext) {
|
||||
else if (oldGC->driContext && oldGC != gc) {
|
||||
oldGC->driContext->unbindContext(oldGC->driContext);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -119,6 +119,9 @@ static int driUnbindContext(__DRIcontext *pcp)
|
||||
pdp = pcp->driDrawablePriv;
|
||||
prp = pcp->driReadablePriv;
|
||||
|
||||
/* already unbound */
|
||||
if (!pdp && !prp)
|
||||
return GL_TRUE;
|
||||
/* Let driver unbind drawable from context */
|
||||
(*psp->DriverAPI.UnbindContext)(pcp);
|
||||
|
||||
@@ -143,9 +146,10 @@ static int driUnbindContext(__DRIcontext *pcp)
|
||||
* window we can determine the last context bound to the window and
|
||||
* use that context's lock. (BrianP, 2-Dec-2000)
|
||||
*/
|
||||
pcp->driDrawablePriv = pcp->driReadablePriv = NULL;
|
||||
|
||||
#if 0
|
||||
/* Unbind the drawable */
|
||||
pcp->driDrawablePriv = NULL;
|
||||
pdp->driContextPriv = &psp->dummyContextPriv;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -43,10 +43,11 @@ static void upload_sf_vp(struct brw_context *brw)
|
||||
const GLfloat depth_scale = 1.0F / ctx->DrawBuffer->_DepthMaxF;
|
||||
struct brw_sf_viewport sfv;
|
||||
GLfloat y_scale, y_bias;
|
||||
const GLboolean render_to_fbo = (ctx->DrawBuffer->Name != 0);
|
||||
|
||||
memset(&sfv, 0, sizeof(sfv));
|
||||
|
||||
if (intel_rendering_to_texture(ctx)) {
|
||||
if (render_to_fbo) {
|
||||
y_scale = 1.0;
|
||||
y_bias = 0;
|
||||
}
|
||||
@@ -75,7 +76,7 @@ static void upload_sf_vp(struct brw_context *brw)
|
||||
* Note that the hardware's coordinates are inclusive, while Mesa's min is
|
||||
* inclusive but max is exclusive.
|
||||
*/
|
||||
if (intel_rendering_to_texture(ctx)) {
|
||||
if (render_to_fbo) {
|
||||
/* texmemory: Y=0=bottom */
|
||||
sfv.scissor.xmin = ctx->DrawBuffer->_Xmin;
|
||||
sfv.scissor.xmax = ctx->DrawBuffer->_Xmax - 1;
|
||||
@@ -114,7 +115,7 @@ struct brw_sf_unit_key {
|
||||
GLboolean scissor, line_smooth, point_sprite, point_attenuated;
|
||||
float line_width;
|
||||
float point_size;
|
||||
GLboolean render_to_texture;
|
||||
GLboolean render_to_fbo;
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -147,7 +148,7 @@ sf_unit_populate_key(struct brw_context *brw, struct brw_sf_unit_key *key)
|
||||
key->point_size = ctx->Point.Size;
|
||||
key->point_attenuated = ctx->Point._Attenuated;
|
||||
|
||||
key->render_to_texture = intel_rendering_to_texture(&brw->intel.ctx);
|
||||
key->render_to_fbo = brw->intel.ctx.DrawBuffer->Name != 0;
|
||||
}
|
||||
|
||||
static dri_bo *
|
||||
@@ -194,10 +195,10 @@ sf_unit_create_from_key(struct brw_context *brw, struct brw_sf_unit_key *key,
|
||||
else
|
||||
sf.sf5.front_winding = BRW_FRONTWINDING_CW;
|
||||
|
||||
/* The viewport is inverted for rendering to texture, and that inverts
|
||||
/* The viewport is inverted for rendering to a FBO, and that inverts
|
||||
* polygon front/back orientation.
|
||||
*/
|
||||
sf.sf5.front_winding ^= key->render_to_texture;
|
||||
sf.sf5.front_winding ^= key->render_to_fbo;
|
||||
|
||||
switch (key->cull_face) {
|
||||
case GL_FRONT:
|
||||
|
||||
@@ -385,7 +385,31 @@ intelCreateBuffer(__DRIscreenPrivate * driScrnPriv,
|
||||
static void
|
||||
intelDestroyBuffer(__DRIdrawablePrivate * driDrawPriv)
|
||||
{
|
||||
_mesa_unreference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)));
|
||||
struct intel_framebuffer *intel_fb = driDrawPriv->driverPrivate;
|
||||
struct intel_renderbuffer *depth_rb;
|
||||
struct intel_renderbuffer *stencil_rb;
|
||||
|
||||
if (intel_fb) {
|
||||
if (intel_fb->color_rb[0]) {
|
||||
intel_renderbuffer_set_region(intel_fb->color_rb[0], NULL);
|
||||
}
|
||||
|
||||
if (intel_fb->color_rb[1]) {
|
||||
intel_renderbuffer_set_region(intel_fb->color_rb[1], NULL);
|
||||
}
|
||||
|
||||
depth_rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_DEPTH);
|
||||
if (depth_rb) {
|
||||
intel_renderbuffer_set_region(depth_rb, NULL);
|
||||
}
|
||||
|
||||
stencil_rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_STENCIL);
|
||||
if (stencil_rb) {
|
||||
intel_renderbuffer_set_region(stencil_rb, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
_mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -19,11 +19,12 @@ INCLUDE_DIRS = \
|
||||
-I$(TOP)/src/mesa \
|
||||
-I$(TOP)/src/mesa/main
|
||||
|
||||
# Standalone osmesa needs to be linked with core Mesa APIs
|
||||
ifeq ($(DRIVER_DIRS), osmesa)
|
||||
CORE_MESA = $(TOP)/src/mesa/libmesa.a $(TOP)/src/mesa/libglapi.a
|
||||
|
||||
|
||||
.PHONY: osmesa8
|
||||
.PHONY: osmesa16
|
||||
else
|
||||
CORE_MESA =
|
||||
endif
|
||||
|
||||
|
||||
.c.o:
|
||||
@@ -31,31 +32,12 @@ CORE_MESA = $(TOP)/src/mesa/libmesa.a $(TOP)/src/mesa/libglapi.a
|
||||
|
||||
|
||||
default: $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
|
||||
@ if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
|
||||
$(MAKE) osmesa16 ; \
|
||||
else \
|
||||
$(MAKE) osmesa8 ; \
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# The normal libOSMesa is used in conjuction with libGL
|
||||
osmesa8: $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
|
||||
|
||||
$(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OBJECTS)
|
||||
$(MKLIB) -o $(OSMESA_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
|
||||
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
|
||||
-id $(INSTALL_LIB_DIR)/lib$(OSMESA_LIB).$(MESA_MAJOR).dylib \
|
||||
$(OSMESA_LIB_DEPS) $(OBJECTS)
|
||||
|
||||
|
||||
|
||||
|
||||
# The libOSMesa16/libOSMesa32 libraries do not use libGL but rather are built
|
||||
# with all the other Mesa sources (compiled with -DCHAN_BITS=16/32
|
||||
osmesa16: $(OBJECTS) $(CORE_MESA)
|
||||
# libOSMesa can be used in conjuction with libGL or with all other Mesa
|
||||
# sources. We can also build libOSMesa16/libOSMesa32 by setting
|
||||
# -DCHAN_BITS=16/32.
|
||||
$(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OBJECTS) $(CORE_MESA)
|
||||
$(MKLIB) -o $(OSMESA_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
|
||||
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
|
||||
|
||||
@@ -2218,7 +2218,7 @@ Fake_glXCreatePixmap( Display *dpy, GLXFBConfig config, Pixmap pixmap,
|
||||
if (!dpy || !config || !pixmap)
|
||||
return 0;
|
||||
|
||||
for (attr = attribList; *attr; attr++) {
|
||||
for (attr = attribList; attr && *attr; attr++) {
|
||||
switch (*attr) {
|
||||
case GLX_TEXTURE_FORMAT_EXT:
|
||||
attr++;
|
||||
|
||||
@@ -1549,6 +1549,24 @@ initialize_framebuffer_size(GLcontext *ctx, GLframebuffer *fb)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if the viewport/scissor size has not yet been initialized.
|
||||
* Initialize the size if the given width and height are non-zero.
|
||||
*/
|
||||
void
|
||||
_mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height)
|
||||
{
|
||||
if (!ctx->ViewportInitialized && width > 0 && height > 0) {
|
||||
/* Note: set flag here, before calling _mesa_set_viewport(), to prevent
|
||||
* potential infinite recursion.
|
||||
*/
|
||||
ctx->ViewportInitialized = GL_TRUE;
|
||||
_mesa_set_viewport(ctx, 0, 0, width, height);
|
||||
_mesa_set_scissor(ctx, 0, 0, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Bind the given context to the given drawBuffer and readBuffer and
|
||||
* make it the current context for the calling thread.
|
||||
@@ -1651,25 +1669,24 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
|
||||
ASSERT(drawBuffer->Height > 0);
|
||||
#endif
|
||||
|
||||
if (newCtx->FirstTimeCurrent) {
|
||||
/* set initial viewport and scissor size now */
|
||||
_mesa_set_viewport(newCtx, 0, 0,
|
||||
drawBuffer->Width, drawBuffer->Height);
|
||||
_mesa_set_scissor(newCtx, 0, 0,
|
||||
drawBuffer->Width, drawBuffer->Height );
|
||||
check_context_limits(newCtx);
|
||||
if (drawBuffer) {
|
||||
_mesa_check_init_viewport(newCtx,
|
||||
drawBuffer->Width, drawBuffer->Height);
|
||||
}
|
||||
}
|
||||
|
||||
/* We can use this to help debug user's problems. Tell them to set
|
||||
* the MESA_INFO env variable before running their app. Then the
|
||||
* first time each context is made current we'll print some useful
|
||||
* information.
|
||||
*/
|
||||
if (newCtx->FirstTimeCurrent) {
|
||||
check_context_limits(newCtx);
|
||||
|
||||
/* We can use this to help debug user's problems. Tell them to set
|
||||
* the MESA_INFO env variable before running their app. Then the
|
||||
* first time each context is made current we'll print some useful
|
||||
* information.
|
||||
*/
|
||||
if (_mesa_getenv("MESA_INFO")) {
|
||||
_mesa_print_info();
|
||||
}
|
||||
|
||||
newCtx->FirstTimeCurrent = GL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,6 +132,9 @@ extern void
|
||||
_mesa_make_current( GLcontext *ctx, GLframebuffer *drawBuffer,
|
||||
GLframebuffer *readBuffer );
|
||||
|
||||
extern void
|
||||
_mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height);
|
||||
|
||||
extern GLboolean
|
||||
_mesa_share_state(GLcontext *ctx, GLcontext *ctxToShare);
|
||||
|
||||
|
||||
@@ -323,6 +323,7 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
|
||||
/* OK */
|
||||
}
|
||||
else if (ctx->Extensions.EXT_packed_depth_stencil &&
|
||||
ctx->Extensions.ARB_depth_texture &&
|
||||
texImage->TexFormat->BaseFormat == GL_DEPTH_STENCIL_EXT) {
|
||||
/* OK */
|
||||
}
|
||||
@@ -332,9 +333,18 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* no such thing as stencil textures */
|
||||
att->Complete = GL_FALSE;
|
||||
return;
|
||||
ASSERT(format == GL_STENCIL);
|
||||
ASSERT(att->Renderbuffer->StencilBits);
|
||||
if (ctx->Extensions.EXT_packed_depth_stencil &&
|
||||
ctx->Extensions.ARB_depth_texture &&
|
||||
att->Renderbuffer->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
|
||||
/* OK */
|
||||
}
|
||||
else {
|
||||
/* no such thing as stencil-only textures */
|
||||
att->Complete = GL_FALSE;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (att->Type == GL_RENDERBUFFER_EXT) {
|
||||
|
||||
@@ -1905,6 +1905,10 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
|
||||
CHECK_EXT1(ARB_shader_objects, "GetBooleanv");
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0);
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_BINDING_APPLE:
|
||||
CHECK_EXT1(APPLE_vertex_array_object, "GetBooleanv");
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Name);
|
||||
break;
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
|
||||
}
|
||||
@@ -3753,6 +3757,10 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
|
||||
CHECK_EXT1(ARB_shader_objects, "GetFloatv");
|
||||
params[0] = (GLfloat)(ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0);
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_BINDING_APPLE:
|
||||
CHECK_EXT1(APPLE_vertex_array_object, "GetFloatv");
|
||||
params[0] = (GLfloat)(ctx->Array.ArrayObj->Name);
|
||||
break;
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
|
||||
}
|
||||
@@ -5601,6 +5609,10 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
|
||||
CHECK_EXT1(ARB_shader_objects, "GetIntegerv");
|
||||
params[0] = ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0;
|
||||
break;
|
||||
case GL_VERTEX_ARRAY_BINDING_APPLE:
|
||||
CHECK_EXT1(APPLE_vertex_array_object, "GetIntegerv");
|
||||
params[0] = ctx->Array.ArrayObj->Name;
|
||||
break;
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
|
||||
}
|
||||
|
||||
@@ -1009,7 +1009,10 @@ StateVars = [
|
||||
# close enough for now.
|
||||
( "GL_CURRENT_PROGRAM", GLint,
|
||||
["ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0"],
|
||||
"", ["ARB_shader_objects"] )
|
||||
"", ["ARB_shader_objects"] ),
|
||||
|
||||
( "GL_VERTEX_ARRAY_BINDING_APPLE", GLint, ["ctx->Array.ArrayObj->Name"], "",
|
||||
["APPLE_vertex_array_object"] ),
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 7.1
|
||||
* Version: 7.5
|
||||
*
|
||||
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 2009 VMware, Inc. 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"),
|
||||
@@ -738,12 +739,20 @@ _mesa_image_image_stride( const struct gl_pixelstore_attrib *packing,
|
||||
GLint width, GLint height,
|
||||
GLenum format, GLenum type )
|
||||
{
|
||||
ASSERT(packing);
|
||||
ASSERT(type != GL_BITMAP);
|
||||
GLint bytesPerRow, bytesPerImage, remainder;
|
||||
|
||||
{
|
||||
ASSERT(packing);
|
||||
|
||||
if (type == GL_BITMAP) {
|
||||
if (packing->RowLength == 0) {
|
||||
bytesPerRow = (width + 7) / 8;
|
||||
}
|
||||
else {
|
||||
bytesPerRow = (packing->RowLength + 7) / 8;
|
||||
}
|
||||
}
|
||||
else {
|
||||
const GLint bytesPerPixel = _mesa_bytes_per_pixel(format, type);
|
||||
GLint bytesPerRow, bytesPerImage, remainder;
|
||||
|
||||
if (bytesPerPixel <= 0)
|
||||
return -1; /* error */
|
||||
@@ -753,17 +762,18 @@ _mesa_image_image_stride( const struct gl_pixelstore_attrib *packing,
|
||||
else {
|
||||
bytesPerRow = bytesPerPixel * packing->RowLength;
|
||||
}
|
||||
remainder = bytesPerRow % packing->Alignment;
|
||||
if (remainder > 0)
|
||||
bytesPerRow += (packing->Alignment - remainder);
|
||||
|
||||
if (packing->ImageHeight == 0)
|
||||
bytesPerImage = bytesPerRow * height;
|
||||
else
|
||||
bytesPerImage = bytesPerRow * packing->ImageHeight;
|
||||
|
||||
return bytesPerImage;
|
||||
}
|
||||
|
||||
remainder = bytesPerRow % packing->Alignment;
|
||||
if (remainder > 0)
|
||||
bytesPerRow += (packing->Alignment - remainder);
|
||||
|
||||
if (packing->ImageHeight == 0)
|
||||
bytesPerImage = bytesPerRow * height;
|
||||
else
|
||||
bytesPerImage = bytesPerRow * packing->ImageHeight;
|
||||
|
||||
return bytesPerImage;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -580,8 +580,8 @@ _mesa_set_viewport( GLcontext *ctx, GLint x, GLint y,
|
||||
}
|
||||
|
||||
/* clamp width and height to the implementation dependent range */
|
||||
width = CLAMP(width, 1, (GLsizei) ctx->Const.MaxViewportWidth);
|
||||
height = CLAMP(height, 1, (GLsizei) ctx->Const.MaxViewportHeight);
|
||||
width = MIN2(width, (GLsizei) ctx->Const.MaxViewportWidth);
|
||||
height = MIN2(height, (GLsizei) ctx->Const.MaxViewportHeight);
|
||||
|
||||
ctx->Viewport.X = x;
|
||||
ctx->Viewport.Width = width;
|
||||
|
||||
@@ -3063,6 +3063,8 @@ struct __GLcontextRec
|
||||
GLenum RenderMode; /**< either GL_RENDER, GL_SELECT, GL_FEEDBACK */
|
||||
GLbitfield NewState; /**< bitwise-or of _NEW_* flags */
|
||||
|
||||
GLboolean ViewportInitialized; /**< has viewport size been initialized? */
|
||||
|
||||
/** \name Derived state */
|
||||
/*@{*/
|
||||
/** Bitwise-or of DD_* flags. Note that this bitfield may be used before
|
||||
|
||||
@@ -157,7 +157,7 @@ update_arrays( GLcontext *ctx )
|
||||
|
||||
/* 16..31 */
|
||||
if (ctx->VertexProgram._Current) {
|
||||
for (i = VERT_ATTRIB_GENERIC0; i < VERT_ATTRIB_MAX; i++) {
|
||||
for (i = 0; i < Elements(ctx->Array.ArrayObj->VertexAttrib); i++) {
|
||||
if (ctx->Array.ArrayObj->VertexAttrib[i].Enabled) {
|
||||
min = MIN2(min, ctx->Array.ArrayObj->VertexAttrib[i]._MaxElement);
|
||||
}
|
||||
|
||||
@@ -507,6 +507,7 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att)
|
||||
trb->Base.BlueBits = trb->TexImage->TexFormat->BlueBits;
|
||||
trb->Base.AlphaBits = trb->TexImage->TexFormat->AlphaBits;
|
||||
trb->Base.DepthBits = trb->TexImage->TexFormat->DepthBits;
|
||||
trb->Base.StencilBits = trb->TexImage->TexFormat->StencilBits;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -429,7 +429,7 @@ texture_override(GLcontext *ctx,
|
||||
}
|
||||
if (texObj->_Complete) {
|
||||
texUnit->_ReallyEnabled = textureBit;
|
||||
texUnit->_Current = texObj;
|
||||
_mesa_reference_texobj(&texUnit->_Current, texObj);
|
||||
update_texture_compare_function(ctx, texObj);
|
||||
}
|
||||
}
|
||||
@@ -485,7 +485,6 @@ update_texture_state( GLcontext *ctx )
|
||||
GLbitfield enableBits;
|
||||
GLuint tex;
|
||||
|
||||
texUnit->_Current = NULL;
|
||||
texUnit->_ReallyEnabled = 0;
|
||||
texUnit->_GenFlags = 0;
|
||||
|
||||
@@ -802,6 +801,9 @@ _mesa_free_texture_data(GLcontext *ctx)
|
||||
/* unreference current textures */
|
||||
for (u = 0; u < MAX_TEXTURE_IMAGE_UNITS; u++) {
|
||||
struct gl_texture_unit *unit = ctx->Texture.Unit + u;
|
||||
/* The _Current texture could account for another reference */
|
||||
_mesa_reference_texobj(&ctx->Texture.Unit[u]._Current, NULL);
|
||||
|
||||
for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) {
|
||||
_mesa_reference_texobj(&unit->CurrentTex[tgt], NULL);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 7.4.1
|
||||
* Version: 7.4.3
|
||||
*
|
||||
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 2009 VMware, Inc. 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"),
|
||||
@@ -30,8 +31,8 @@
|
||||
/* Mesa version */
|
||||
#define MESA_MAJOR 7
|
||||
#define MESA_MINOR 4
|
||||
#define MESA_PATCH 0
|
||||
#define MESA_VERSION_STRING "7.4.1"
|
||||
#define MESA_PATCH 3
|
||||
#define MESA_VERSION_STRING "7.4.3"
|
||||
|
||||
/* To make version comparison easy */
|
||||
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
|
||||
@@ -249,6 +249,11 @@ link_uniform_vars(GLcontext *ctx,
|
||||
_mesa_append_uniform(shProg->Uniforms, p->Name, prog->Target, i);
|
||||
if (uniform)
|
||||
uniform->Initialized = p->Initialized;
|
||||
|
||||
/* Add the flag indicating that the program is dependent on constant
|
||||
* state.
|
||||
*/
|
||||
prog->Parameters->StateFlags |= _NEW_PROGRAM;
|
||||
}
|
||||
|
||||
/* The samplerMap[] table we build here is used to remap/re-index
|
||||
|
||||
@@ -1041,11 +1041,11 @@ preprocess_source (slang_string *output, const char *source,
|
||||
|
||||
/* Parse optional macro parameters. */
|
||||
while (prod[i++] != PARAM_END) {
|
||||
if (state.cond.top->effective) {
|
||||
pp_symbol *param;
|
||||
pp_symbol *param;
|
||||
|
||||
id = (const char *) (&prod[i]);
|
||||
idlen = _mesa_strlen (id);
|
||||
id = (const char *) (&prod[i]);
|
||||
idlen = _mesa_strlen (id);
|
||||
if (state.cond.top->effective) {
|
||||
pp_annotate (output, "%s, ", id);
|
||||
param = pp_symbols_push (&symbol->parameters);
|
||||
if (param == NULL)
|
||||
@@ -1059,8 +1059,23 @@ preprocess_source (slang_string *output, const char *source,
|
||||
id = (const char *) (&prod[i]);
|
||||
idlen = _mesa_strlen (id);
|
||||
if (state.cond.top->effective) {
|
||||
slang_string replacement;
|
||||
expand_state es;
|
||||
|
||||
pp_annotate (output, ") %s", id);
|
||||
slang_string_pushs (&symbol->replacement, id, idlen);
|
||||
|
||||
slang_string_init(&replacement);
|
||||
slang_string_pushs(&replacement, id, idlen);
|
||||
|
||||
/* Expand macro replacement. */
|
||||
es.output = &symbol->replacement;
|
||||
es.input = slang_string_cstr(&replacement);
|
||||
es.state = &state;
|
||||
if (!expand(&es, &state.symbols)) {
|
||||
slang_string_free(&replacement);
|
||||
goto error;
|
||||
}
|
||||
slang_string_free(&replacement);
|
||||
}
|
||||
i += idlen + 1;
|
||||
}
|
||||
@@ -1291,6 +1306,45 @@ error:
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove the continuation characters from the input string.
|
||||
* This is the very first step in preprocessing and is effective
|
||||
* even inside comment blocks.
|
||||
* If there is a whitespace between a backslash and a newline,
|
||||
* this is not considered as a line continuation.
|
||||
* \return GL_TRUE for success, GL_FALSE otherwise.
|
||||
*/
|
||||
static GLboolean
|
||||
_slang_preprocess_backslashes(slang_string *output,
|
||||
const char *input)
|
||||
{
|
||||
while (*input) {
|
||||
if (input[0] == '\\') {
|
||||
/* If a newline follows, eat the backslash and the newline. */
|
||||
if (input[1] == '\r') {
|
||||
if (input[2] == '\n') {
|
||||
input += 3;
|
||||
} else {
|
||||
input += 2;
|
||||
}
|
||||
} else if (input[1] == '\n') {
|
||||
if (input[2] == '\r') {
|
||||
input += 3;
|
||||
} else {
|
||||
input += 2;
|
||||
}
|
||||
} else {
|
||||
/* Leave the backslash alone. */
|
||||
slang_string_pushc(output, *input++);
|
||||
}
|
||||
} else {
|
||||
slang_string_pushc(output, *input++);
|
||||
}
|
||||
}
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Run preprocessor on source code.
|
||||
* \param extensions indicates which GL extensions are enabled
|
||||
@@ -1308,6 +1362,7 @@ _slang_preprocess_directives(slang_string *output,
|
||||
{
|
||||
grammar pid, eid;
|
||||
GLboolean success;
|
||||
slang_string without_backslashes;
|
||||
|
||||
pid = grammar_load_from_text ((const byte *) (slang_pp_directives_syn));
|
||||
if (pid == 0) {
|
||||
@@ -1320,9 +1375,36 @@ _slang_preprocess_directives(slang_string *output,
|
||||
grammar_destroy (pid);
|
||||
return GL_FALSE;
|
||||
}
|
||||
success = preprocess_source (output, input, pid, eid, elog, extensions, pragmas);
|
||||
|
||||
slang_string_init(&without_backslashes);
|
||||
success = _slang_preprocess_backslashes(&without_backslashes, input);
|
||||
|
||||
if (0) {
|
||||
_mesa_printf("Pre-processed shader:\n");
|
||||
_mesa_printf("%s", slang_string_cstr(&without_backslashes));
|
||||
_mesa_printf("----------------------\n");
|
||||
}
|
||||
|
||||
if (success) {
|
||||
success = preprocess_source(output,
|
||||
slang_string_cstr(&without_backslashes),
|
||||
pid,
|
||||
eid,
|
||||
elog,
|
||||
extensions,
|
||||
pragmas);
|
||||
}
|
||||
|
||||
slang_string_free(&without_backslashes);
|
||||
grammar_destroy (eid);
|
||||
grammar_destroy (pid);
|
||||
|
||||
if (0) {
|
||||
_mesa_printf("Post-processed shader:\n");
|
||||
_mesa_printf("%s", slang_string_cstr(output));
|
||||
_mesa_printf("----------------------\n");
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ lerp_rgba_3d(GLchan result[4], GLfloat a, GLfloat b, GLfloat c,
|
||||
* If A is a signed integer, A % B doesn't give the right value for A < 0
|
||||
* (in terms of texture repeat). Just casting to unsigned fixes that.
|
||||
*/
|
||||
#define REMAINDER(A, B) ((unsigned) (A) % (unsigned) (B))
|
||||
#define REMAINDER(A, B) (((A) + (B) * 1024) % (B))
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -114,8 +114,11 @@ static void bind_array_obj( GLcontext *ctx )
|
||||
for (i = 0; i < 8; i++)
|
||||
exec->array.legacy_array[VERT_ATTRIB_TEX0 + i] = &ctx->Array.ArrayObj->TexCoord[i];
|
||||
|
||||
for (i = 0; i < VERT_ATTRIB_MAX; i++)
|
||||
for (i = 0; i < MAX_VERTEX_ATTRIBS; i++) {
|
||||
assert(i < Elements(ctx->Array.ArrayObj->VertexAttrib));
|
||||
assert(i < Elements(exec->array.generic_array));
|
||||
exec->array.generic_array[i] = &ctx->Array.ArrayObj->VertexAttrib[i];
|
||||
}
|
||||
|
||||
exec->array.array_obj = ctx->Array.ArrayObj->Name;
|
||||
}
|
||||
|
||||
@@ -184,6 +184,7 @@ static void vbo_exec_bind_arrays( GLcontext *ctx )
|
||||
(ctx->VertexProgram._Current->Base.InputsRead & VERT_BIT_GENERIC0)) {
|
||||
exec->vtx.inputs[16] = exec->vtx.inputs[0];
|
||||
exec->vtx.attrsz[16] = exec->vtx.attrsz[0];
|
||||
exec->vtx.attrptr[16] = exec->vtx.attrptr[0];
|
||||
exec->vtx.attrsz[0] = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user