Compare commits
72 Commits
intel_2009
...
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 | ||
|
|
6337525497 | ||
|
|
7541c3806a | ||
|
|
a1ce4efefb | ||
|
|
656cd707db | ||
|
|
ce7f78694d | ||
|
|
fd95e8ee33 | ||
|
|
d2b8c41b7a | ||
|
|
bfd6bb31a6 | ||
|
|
c3e7fc394f | ||
|
|
dd56897b27 | ||
|
|
e8807a14a6 | ||
|
|
c38397866d | ||
|
|
dce84002c2 | ||
|
|
c490349825 | ||
|
|
f62d45fd0d | ||
|
|
b2dfc29a82 | ||
|
|
7c1e61f41c | ||
|
|
5654197d12 | ||
|
|
87cb55e9c6 | ||
|
|
e7d499f935 | ||
|
|
51e7600d77 | ||
|
|
69b17abd6b | ||
|
|
a975da7aca | ||
|
|
ecf47b5046 | ||
|
|
fed8dc53ad | ||
|
|
1f462e26c0 |
8
Makefile
8
Makefile
@@ -35,6 +35,8 @@ realclean: clean
|
||||
-name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
|
||||
|
||||
|
||||
distclean: realclean
|
||||
|
||||
|
||||
install:
|
||||
@for dir in $(SUBDIRS) ; do \
|
||||
@@ -48,7 +50,9 @@ install:
|
||||
linux-directfb-install:
|
||||
cd src/mesa/drivers/directfb && $(MAKE) install
|
||||
|
||||
.PHONY: default doxygen clean realclean install linux-directfb-install
|
||||
|
||||
.PHONY: default doxygen clean realclean distclean install linux-directfb-install
|
||||
|
||||
|
||||
# If there's no current configuration file
|
||||
$(TOP)/configs/current:
|
||||
@@ -174,7 +178,7 @@ ultrix-gcc:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
VERSION=7.4
|
||||
VERSION=7.4.3
|
||||
DIRECTORY = Mesa-$(VERSION)
|
||||
LIB_NAME = MesaLib-$(VERSION)
|
||||
DEMO_NAME = MesaDemos-$(VERSION)
|
||||
|
||||
@@ -9,8 +9,8 @@ CONFIG_NAME = default
|
||||
|
||||
# Version info
|
||||
MESA_MAJOR=7
|
||||
MESA_MINOR=3
|
||||
MESA_TINY=0
|
||||
MESA_MINOR=4
|
||||
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</b>
|
||||
<br>
|
||||
Last unstable/development release: <b>7.3</b>
|
||||
Current stable release: <b>7.4.3</b>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -11,6 +11,27 @@
|
||||
<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.
|
||||
This is a stable release fixing bugs since the 7.4 release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>March 27, 2009</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.4.html">Mesa 7.4</a> is released.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.4.1 Release Notes / (date TBD)</H1>
|
||||
<H1>Mesa 7.4.1 Release Notes / 18 April 2009</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.4.1 is a stable development release fixing bugs since the 7.4 release.
|
||||
@@ -20,21 +20,24 @@ 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 ardware acceleration.
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
tbd
|
||||
0c3a72f3295a53a134c04bd7d209ea62 MesaLib-7.4.1.tar.gz
|
||||
423260578b653818ba66c2fcbde6d7ad MesaLib-7.4.1.tar.bz2
|
||||
84f78b154d4bd5c3ecc42eeff2e56676 MesaLib-7.4.1.zip
|
||||
aa0ad323e59d6d10ff33ac0dde462a60 MesaDemos-7.4.1.tar.gz
|
||||
1e169fb6abc2b45613f1c98a82dfe690 MesaDemos-7.4.1.tar.bz2
|
||||
294e42be2d74176596c994ec23322fcf MesaDemos-7.4.1.zip
|
||||
92373bfa48e7b68dddf356e86b0e5699 MesaGLUT-7.4.1.tar.gz
|
||||
336f3824b578b072211e0beecf4f04f4 MesaGLUT-7.4.1.tar.bz2
|
||||
20751388d8ef16b42d25d9e3d705d101 MesaGLUT-7.4.1.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Fixed a two-sided lighting bug in fixed-function-to-GPU code generation
|
||||
@@ -48,10 +51,7 @@ tbd
|
||||
<li>Fixed potential deadlock in object hash functions
|
||||
<li>Fix a couple bugs surrounding front-buffer rendering with DRI2, but this
|
||||
is not quite complete.
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>Fixed glPopAttrib() bug when restoring user clip planes
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
74
docs/relnotes-7.4.2.html
Normal file
74
docs/relnotes-7.4.2.html
Normal file
@@ -0,0 +1,74 @@
|
||||
<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.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.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.4.2 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>
|
||||
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>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
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,7 +20,7 @@ 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 ardware acceleration.
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ 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>
|
||||
<LI><A HREF="relnotes-7.3.html">7.3 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);
|
||||
|
||||
@@ -103,7 +103,7 @@ static void PrintColorStrings( void )
|
||||
{
|
||||
GLubyte ubbuf[3];
|
||||
int i, xleft, xright;
|
||||
char colorString[18];
|
||||
char colorString[100];
|
||||
|
||||
xleft = 5 + windW/4;
|
||||
xright = 5 + windW/2;
|
||||
|
||||
@@ -385,6 +385,10 @@ draw( Display *dpy, Window win )
|
||||
} else
|
||||
do_draw();
|
||||
|
||||
glDeleteLists(gear1, 1);
|
||||
glDeleteLists(gear2, 1);
|
||||
glDeleteLists(gear3, 1);
|
||||
|
||||
glXSwapBuffers(dpy, win);
|
||||
glXDestroyContext(dpy, ctx);
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -310,6 +310,7 @@ brw_update_region_surface(struct brw_context *brw, struct intel_region *region,
|
||||
GLubyte color_mask[4];
|
||||
GLboolean color_blend;
|
||||
uint32_t tiling;
|
||||
uint32_t draw_offset;
|
||||
} key;
|
||||
|
||||
memset(&key, 0, sizeof(key));
|
||||
@@ -326,6 +327,7 @@ brw_update_region_surface(struct brw_context *brw, struct intel_region *region,
|
||||
key.width = region->pitch; /* XXX: not really! */
|
||||
key.height = region->height;
|
||||
key.cpp = region->cpp;
|
||||
key.draw_offset = region->draw_offset; /* cur 3d or cube face offset */
|
||||
} else {
|
||||
key.surface_type = BRW_SURFACE_NULL;
|
||||
key.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
|
||||
@@ -333,6 +335,7 @@ brw_update_region_surface(struct brw_context *brw, struct intel_region *region,
|
||||
key.width = 1;
|
||||
key.height = 1;
|
||||
key.cpp = 4;
|
||||
key.draw_offset = 0;
|
||||
}
|
||||
memcpy(key.color_mask, ctx->Color.ColorMask,
|
||||
sizeof(key.color_mask));
|
||||
@@ -354,8 +357,9 @@ brw_update_region_surface(struct brw_context *brw, struct intel_region *region,
|
||||
|
||||
surf.ss0.surface_format = key.surface_format;
|
||||
surf.ss0.surface_type = key.surface_type;
|
||||
surf.ss1.base_addr = key.draw_offset;
|
||||
if (region_bo != NULL)
|
||||
surf.ss1.base_addr = region_bo->offset; /* reloc */
|
||||
surf.ss1.base_addr += region_bo->offset; /* reloc */
|
||||
|
||||
surf.ss2.width = key.width - 1;
|
||||
surf.ss2.height = key.height - 1;
|
||||
@@ -380,12 +384,12 @@ brw_update_region_surface(struct brw_context *brw, struct intel_region *region,
|
||||
* them both. We might be able to figure out from other state
|
||||
* a more restrictive relocation to emit.
|
||||
*/
|
||||
dri_bo_emit_reloc(brw->wm.surf_bo[unit],
|
||||
I915_GEM_DOMAIN_RENDER,
|
||||
I915_GEM_DOMAIN_RENDER,
|
||||
0,
|
||||
offsetof(struct brw_surface_state, ss1),
|
||||
region_bo);
|
||||
drm_intel_bo_emit_reloc(brw->wm.surf_bo[unit],
|
||||
offsetof(struct brw_surface_state, ss1),
|
||||
region_bo,
|
||||
key.draw_offset,
|
||||
I915_GEM_DOMAIN_RENDER,
|
||||
I915_GEM_DOMAIN_RENDER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@ intel_clear_tris(GLcontext *ctx, GLbitfield mask)
|
||||
GL_CURRENT_BIT |
|
||||
GL_DEPTH_BUFFER_BIT |
|
||||
GL_ENABLE_BIT |
|
||||
GL_POLYGON_BIT |
|
||||
GL_STENCIL_BUFFER_BIT |
|
||||
GL_TRANSFORM_BIT |
|
||||
GL_CURRENT_BIT);
|
||||
@@ -114,6 +115,7 @@ intel_clear_tris(GLcontext *ctx, GLbitfield mask)
|
||||
_mesa_Disable(GL_CLIP_PLANE3);
|
||||
_mesa_Disable(GL_CLIP_PLANE4);
|
||||
_mesa_Disable(GL_CLIP_PLANE5);
|
||||
_mesa_PolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
if (ctx->Extensions.ARB_fragment_program && ctx->FragmentProgram.Enabled) {
|
||||
saved_fp_enable = GL_TRUE;
|
||||
_mesa_Disable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
@@ -146,6 +148,11 @@ intel_clear_tris(GLcontext *ctx, GLbitfield mask)
|
||||
}
|
||||
}
|
||||
|
||||
#if FEATURE_ARB_vertex_buffer_object
|
||||
_mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
|
||||
_mesa_BindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
|
||||
#endif
|
||||
|
||||
intel_meta_set_passthrough_transform(intel);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
||||
@@ -97,7 +97,7 @@ int INTEL_DEBUG = (0);
|
||||
|
||||
#include "extension_helper.h"
|
||||
|
||||
#define DRIVER_DATE "20090415 2009Q1 RC3"
|
||||
#define DRIVER_DATE "20090418 2009Q1"
|
||||
#define DRIVER_DATE_GEM "GEM " DRIVER_DATE
|
||||
|
||||
static const GLubyte *
|
||||
@@ -534,7 +534,8 @@ intel_flush(GLcontext *ctx, GLboolean needs_mi_flush)
|
||||
if ((ctx->DrawBuffer->Name == 0) && intel->front_buffer_dirty) {
|
||||
__DRIscreen *const screen = intel->intelScreen->driScrnPriv;
|
||||
|
||||
if ((screen->dri2.loader->base.version >= 2)
|
||||
if (screen->dri2.loader
|
||||
&& (screen->dri2.loader->base.version >= 2)
|
||||
&& (screen->dri2.loader->flushFrontBuffer != NULL)) {
|
||||
(*screen->dri2.loader->flushFrontBuffer)(intel->driDrawable,
|
||||
intel->driDrawable->loaderPrivate);
|
||||
|
||||
@@ -183,7 +183,7 @@ intel_meta_set_passthrough_transform(struct intel_context *intel)
|
||||
intel->meta.saved_vp_height = ctx->Viewport.Height;
|
||||
intel->meta.saved_matrix_mode = ctx->Transform.MatrixMode;
|
||||
|
||||
/* _mesa_Viewport(0, 0, ctx->DrawBuffer->Width, ctx->DrawBuffer->Height);*/
|
||||
_mesa_Viewport(0, 0, ctx->DrawBuffer->Width, ctx->DrawBuffer->Height);
|
||||
|
||||
_mesa_MatrixMode(GL_PROJECTION);
|
||||
_mesa_PushMatrix();
|
||||
@@ -205,8 +205,8 @@ intel_meta_restore_transform(struct intel_context *intel)
|
||||
|
||||
_mesa_MatrixMode(intel->meta.saved_matrix_mode);
|
||||
|
||||
/* _mesa_Viewport(intel->meta.saved_vp_x, intel->meta.saved_vp_y,
|
||||
intel->meta.saved_vp_width, intel->meta.saved_vp_height);*/
|
||||
_mesa_Viewport(intel->meta.saved_vp_x, intel->meta.saved_vp_y,
|
||||
intel->meta.saved_vp_width, intel->meta.saved_vp_height);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ struct r300_tex_obj {
|
||||
};
|
||||
|
||||
struct r300_texture_env_state {
|
||||
r300TexObjPtr texobj;
|
||||
struct gl_texture_object *texobj;
|
||||
GLenum format;
|
||||
GLenum envMode;
|
||||
};
|
||||
|
||||
@@ -1487,7 +1487,7 @@ static void r300SetupTextures(GLcontext * ctx)
|
||||
#endif
|
||||
tmu_mappings[i] = hw_tmu;
|
||||
|
||||
t = r300->state.texture.unit[i].texobj;
|
||||
t = (r300TexObjPtr) r300->state.texture.unit[i].texobj->DriverData;
|
||||
/* XXX questionable fix for bug 9170: */
|
||||
if (!t)
|
||||
continue;
|
||||
|
||||
@@ -44,6 +44,7 @@ SOFTWARE.
|
||||
#include "main/colormac.h"
|
||||
#include "main/macros.h"
|
||||
#include "main/simple_list.h"
|
||||
#include "main/texobj.h"
|
||||
#include "radeon_reg.h" /* gets definition for usleep */
|
||||
#include "r300_context.h"
|
||||
#include "r300_state.h"
|
||||
@@ -71,8 +72,8 @@ void r300DestroyTexObj(r300ContextPtr rmesa, r300TexObjPtr t)
|
||||
}
|
||||
|
||||
for (i = 0; i < rmesa->radeon.glCtx->Const.MaxTextureUnits; i++) {
|
||||
if (rmesa->state.texture.unit[i].texobj == t) {
|
||||
rmesa->state.texture.unit[i].texobj = NULL;
|
||||
if (rmesa->state.texture.unit[i].texobj == t->base.tObj) {
|
||||
_mesa_reference_texobj(&rmesa->state.texture.unit[i].texobj, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -567,19 +567,20 @@ static GLboolean r300UpdateTexture(GLcontext * ctx, int unit)
|
||||
/* Update state if this is a different texture object to last
|
||||
* time.
|
||||
*/
|
||||
if (rmesa->state.texture.unit[unit].texobj != t) {
|
||||
if (rmesa->state.texture.unit[unit].texobj != tObj) {
|
||||
if (rmesa->state.texture.unit[unit].texobj != NULL) {
|
||||
r300TexObjPtr t_old = (r300TexObjPtr) rmesa->state.texture.unit[unit].texobj->DriverData;
|
||||
|
||||
/* The old texture is no longer bound to this texture unit.
|
||||
* Mark it as such.
|
||||
*/
|
||||
|
||||
rmesa->state.texture.unit[unit].texobj->base.bound &=
|
||||
~(1 << unit);
|
||||
t_old->base.bound &= ~(1 << unit);
|
||||
}
|
||||
|
||||
rmesa->state.texture.unit[unit].texobj = t;
|
||||
_mesa_reference_texobj(&rmesa->state.texture.unit[unit].texobj, tObj);
|
||||
t->base.bound |= (1 << unit);
|
||||
driUpdateTextureLRU((driTextureObject *) t); /* XXX: should be locked! */
|
||||
driUpdateTextureLRU(&t->base); /* XXX: should be locked! */
|
||||
}
|
||||
|
||||
return !t->border_fallback;
|
||||
|
||||
@@ -554,11 +554,8 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
|
||||
screen->chip_family = CHIP_FAMILY_RS300;
|
||||
break;
|
||||
|
||||
/* 9500 with 1 pipe verified by: Reid Linnemann <lreid@cs.okstate.edu> */
|
||||
|
||||
case PCI_CHIP_R300_AD:
|
||||
screen->chip_family = CHIP_FAMILY_RV350;
|
||||
screen->chip_flags = RADEON_CHIPSET_TCL;
|
||||
break;
|
||||
case PCI_CHIP_R300_AE:
|
||||
case PCI_CHIP_R300_AF:
|
||||
case PCI_CHIP_R300_AG:
|
||||
@@ -886,6 +883,18 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
|
||||
} else {
|
||||
screen->num_gb_pipes = temp;
|
||||
}
|
||||
|
||||
/* pipe overrides */
|
||||
switch (dri_priv->deviceID) {
|
||||
case PCI_CHIP_R300_AD: /* 9500 with 1 quadpipe verified by: Reid Linnemann <lreid@cs.okstate.edu> */
|
||||
case PCI_CHIP_RV410_5E4C: /* RV410 SE only have 1 quadpipe */
|
||||
case PCI_CHIP_RV410_5E4F: /* RV410 SE only have 1 quadpipe */
|
||||
screen->num_gb_pipes = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( sPriv->drm_version.minor >= 10 ) {
|
||||
|
||||
@@ -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++;
|
||||
|
||||
@@ -1176,7 +1176,7 @@ _mesa_PopAttrib(void)
|
||||
|
||||
/* restore clip planes */
|
||||
for (i = 0; i < MAX_CLIP_PLANES; i++) {
|
||||
const GLuint mask = 1 << 1;
|
||||
const GLuint mask = 1 << i;
|
||||
const GLfloat *eyePlane = xform->EyeUserPlane[i];
|
||||
COPY_4V(ctx->Transform.EyeUserPlane[i], eyePlane);
|
||||
if (xform->ClipPlanesEnabled & mask) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -49,6 +49,17 @@
|
||||
#include "mtypes.h"
|
||||
|
||||
|
||||
/**
|
||||
* State changes which we care about for glCopyTex[Sub]Image() calls.
|
||||
* In particular, we care about pixel transfer state and buffer state
|
||||
* (such as glReadBuffer to make sure we read from the right renderbuffer).
|
||||
*/
|
||||
#define NEW_COPY_TEX_STATE (_IMAGE_NEW_TRANSFER_STATE | \
|
||||
_NEW_BUFFERS | \
|
||||
_NEW_PIXEL)
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* We allocate texture memory on 512-byte boundaries so we can use MMX/SSE
|
||||
* elsewhere.
|
||||
@@ -2918,7 +2929,7 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
|
||||
if (ctx->NewState & NEW_COPY_TEX_STATE)
|
||||
_mesa_update_state(ctx);
|
||||
|
||||
#if FEATURE_convolve
|
||||
@@ -2983,7 +2994,7 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
|
||||
if (ctx->NewState & NEW_COPY_TEX_STATE)
|
||||
_mesa_update_state(ctx);
|
||||
|
||||
#if FEATURE_convolve
|
||||
@@ -3051,7 +3062,7 @@ _mesa_CopyTexSubImage1D( GLenum target, GLint level,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
|
||||
if (ctx->NewState & NEW_COPY_TEX_STATE)
|
||||
_mesa_update_state(ctx);
|
||||
|
||||
if (copytexsubimage_error_check1(ctx, 1, target, level))
|
||||
@@ -3106,7 +3117,7 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
|
||||
if (ctx->NewState & NEW_COPY_TEX_STATE)
|
||||
_mesa_update_state(ctx);
|
||||
|
||||
if (copytexsubimage_error_check1(ctx, 2, target, level))
|
||||
@@ -3161,7 +3172,7 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
|
||||
if (ctx->NewState & NEW_COPY_TEX_STATE)
|
||||
_mesa_update_state(ctx);
|
||||
|
||||
if (copytexsubimage_error_check1(ctx, 3, target, level))
|
||||
|
||||
@@ -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
|
||||
* 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"
|
||||
#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))
|
||||
|
||||
@@ -1496,10 +1496,16 @@ generic_attrib_check(struct var_cache *vc_head)
|
||||
curr = vc_head;
|
||||
while (curr) {
|
||||
if (curr->type == vt_attrib) {
|
||||
if (curr->attrib_is_generic)
|
||||
genericAttrib[ curr->attrib_binding ] = GL_TRUE;
|
||||
else
|
||||
if (curr->attrib_is_generic) {
|
||||
GLuint attr = (curr->attrib_binding == 0)
|
||||
? 0 : (curr->attrib_binding - VERT_ATTRIB_GENERIC0);
|
||||
assert(attr < MAX_VERTEX_PROGRAM_ATTRIBS);
|
||||
genericAttrib[attr] = GL_TRUE;
|
||||
}
|
||||
else {
|
||||
assert(curr->attrib_binding < MAX_VERTEX_PROGRAM_ATTRIBS);
|
||||
explicitAttrib[ curr->attrib_binding ] = GL_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
curr = curr->next;
|
||||
|
||||
@@ -296,6 +296,7 @@ _mesa_new_program(GLcontext *ctx, GLenum target, GLuint id)
|
||||
struct gl_program *prog;
|
||||
switch (target) {
|
||||
case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */
|
||||
case GL_VERTEX_STATE_PROGRAM_NV:
|
||||
prog = _mesa_init_vertex_program(ctx, CALLOC_STRUCT(gl_vertex_program),
|
||||
target, id );
|
||||
break;
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
/**
|
||||
@@ -2061,6 +2061,7 @@ clamp_rect_coord_linear(GLenum wrapMode, GLfloat coord, GLint max,
|
||||
fcol -= 0.5F;
|
||||
i0 = IFLOOR(fcol);
|
||||
i1 = i0 + 1;
|
||||
break;
|
||||
default:
|
||||
_mesa_problem(NULL, "bad wrapMode in clamp_rect_coord_linear");
|
||||
i0 = i1 = 0;
|
||||
|
||||
@@ -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