diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-06-22 20:04:23 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-06-22 20:04:23 +0000 |
commit | 7f992e582712ec939fcc2564ec6138dbaea1154d (patch) | |
tree | 26cca762969e35a78b0e7ce8460c43825fd96ff6 /dist/Mesa | |
parent | d2bab8f8d2852e84d5cfb626567e2d460239ee04 (diff) |
Update to Mesa 7.8.2. Tested by johan@. Thanks.
Diffstat (limited to 'dist/Mesa')
26 files changed, 246 insertions, 78 deletions
diff --git a/dist/Mesa/Makefile b/dist/Mesa/Makefile index c81a2ec2d..84d00382e 100644 --- a/dist/Mesa/Makefile +++ b/dist/Mesa/Makefile @@ -180,7 +180,7 @@ ultrix-gcc: # Rules for making release tarballs -VERSION=7.8.1 +VERSION=7.8.2 DIRECTORY = Mesa-$(VERSION) LIB_NAME = MesaLib-$(VERSION) DEMO_NAME = MesaDemos-$(VERSION) diff --git a/dist/Mesa/configs/default b/dist/Mesa/configs/default index fbd795fe7..f12bec8fa 100644 --- a/dist/Mesa/configs/default +++ b/dist/Mesa/configs/default @@ -10,7 +10,7 @@ CONFIG_NAME = default # Version info MESA_MAJOR=7 MESA_MINOR=8 -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. diff --git a/dist/Mesa/configure.ac b/dist/Mesa/configure.ac index 4e43683df..e711634ee 100644 --- a/dist/Mesa/configure.ac +++ b/dist/Mesa/configure.ac @@ -865,7 +865,7 @@ else fi AC_ARG_ENABLE([gl-osmesa], [AS_HELP_STRING([--enable-gl-osmesa], - [enable OSMesa on libGL @<:@default=enabled for xlib driver@:>@])], + [enable OSMesa with libGL @<:@default=enabled for xlib driver@:>@])], [gl_osmesa="$enableval"], [gl_osmesa="$default_gl_osmesa"]) if test "x$gl_osmesa" = xyes; then @@ -900,8 +900,8 @@ x16|x32) esac AC_SUBST([OSMESA_LIB]) -case "$mesa_driver" in -osmesa) +case "$DRIVER_DIRS" in +*osmesa*) # only link libraries with osmesa if shared if test "$enable_static" = no; then OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS" @@ -911,19 +911,7 @@ osmesa) OSMESA_MESA_DEPS="" OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS" ;; -*) - # Link OSMesa to libGL otherwise - OSMESA_LIB_DEPS="" - # only link libraries with osmesa if shared - if test "$enable_static" = no; then - OSMESA_MESA_DEPS='-l$(GL_LIB)' - else - OSMESA_MESA_DEPS="" - fi - OSMESA_PC_REQ="gl" - ;; esac -OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV" AC_SUBST([OSMESA_LIB_DEPS]) AC_SUBST([OSMESA_MESA_DEPS]) AC_SUBST([OSMESA_PC_REQ]) diff --git a/dist/Mesa/docs/devinfo.html b/dist/Mesa/docs/devinfo.html index df0e72652..2d1c125e8 100644 --- a/dist/Mesa/docs/devinfo.html +++ b/dist/Mesa/docs/devinfo.html @@ -145,7 +145,7 @@ Make sure the values in src/mesa/main/version.h are correct. </p> <p> -Update the docs/news.html file and docs/download.html files. +Update docs/news.html. </p> <p> @@ -208,10 +208,11 @@ sftp USERNAME,mesa3d@web.sourceforge.net <p> Make an announcement on the mailing lists: -<em>m</em><em>e</em><em>s</em><em>a</em><em>3</em><em>d</em><em>-</em><em>d</em><em>e</em><em>v</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>s</em><em>f</em><em>.</em><em>n</em><em>e</em><em>t</em>, -<em>m</em><em>e</em><em>s</em><em>a</em><em>3</em><em>d</em><em>-</em><em>u</em><em>s</em><em>e</em><em>r</em><em>s</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>s</em><em>f</em><em>.</em><em>n</em><em>e</em><em>t</em> + +<em>m</em><em>e</em><em>s</em><em>a</em><em>-</em><em>d</em><em>e</em><em>v</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>f</em><em>r</em><em>e</em><em>e</em><em>d</em><em>e</em><em>s</em><em>k</em><em>t</em><em>o</em><em>p</em><em>.</em><em>o</em><em>r</em><em>g</em>, +<em>m</em><em>e</em><em>s</em><em>a</em><em>-</em><em>u</em><em>s</em><em>e</em><em>r</em><em>s</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>f</em><em>r</em><em>e</em><em>e</em><em>d</em><em>e</em><em>s</em><em>k</em><em>t</em><em>o</em><em>p</em><em>.</em><em>o</em><em>r</em><em>g</em> and -<em>m</em><em>e</em><em>s</em><em>a</em><em>3</em><em>d</em><em>-</em><em>a</em><em>n</em><em>n</em><em>o</em><em>u</em><em>n</em><em>c</em><em>e</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>s</em><em>f</em><em>.</em><em>n</em><em>e</em><em>t</em> +<em>m</em><em>e</em><em>s</em><em>a</em><em>-</em><em>a</em><em>n</em><em>n</em><em>o</em><em>u</em><em>n</em><em>c</em><em>e</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>f</em><em>r</em><em>e</em><em>e</em><em>d</em><em>e</em><em>s</em><em>k</em><em>t</em><em>o</em><em>p</em><em>.</em><em>o</em><em>r</em><em>g</em> </p> diff --git a/dist/Mesa/docs/news.html b/dist/Mesa/docs/news.html index b7731cdaf..92e2a1826 100644 --- a/dist/Mesa/docs/news.html +++ b/dist/Mesa/docs/news.html @@ -11,6 +11,14 @@ <H1>News</H1> +<h2>June 16, 2010</h2> + +<p> +<a href="relnotes-7.8.2.html">Mesa 7.8.2</a> is released. This is a bug-fix +release collecting fixes since the 7.8.1 release. +</p> + + <h2>April 5, 2010</h2> <p> diff --git a/dist/Mesa/docs/relnotes-7.8.2.html b/dist/Mesa/docs/relnotes-7.8.2.html index 2194b651b..4d7758db5 100644 --- a/dist/Mesa/docs/relnotes-7.8.2.html +++ b/dist/Mesa/docs/relnotes-7.8.2.html @@ -8,7 +8,7 @@ <body bgcolor="#eeeeee"> -<H1>Mesa 7.8.2 Release Notes / April, 5, 2010</H1> +<H1>Mesa 7.8.2 Release Notes / (date tbd)</H1> <p> Mesa 7.8.2 is a bug fix release which fixes bugs found since the 7.8.1 release. @@ -26,7 +26,15 @@ for DRI hardware acceleration. <h2>MD5 checksums</h2> <pre> -tbd +c89b63d253605ed40e8ac370d25a833c MesaLib-7.8.2.tar.gz +6be2d343a0089bfd395ce02aaf8adb57 MesaLib-7.8.2.tar.bz2 +a04ad3b06ac5ff3969a003fa7bbf7d5b MesaLib-7.8.2.zip +7c213f92efeb471f0331670d5079d4c0 MesaDemos-7.8.2.tar.gz +757d9e2e06f48b1a52848be9b0307ced MesaDemos-7.8.2.tar.bz2 +8d0e5cfe68b8ebf90265d350ae2c48b1 MesaDemos-7.8.2.zip +b74482e3f44f35ed395c4aada4fd8240 MesaGLUT-7.8.2.tar.gz +a471807b65e49c325808ba4551be93ed MesaGLUT-7.8.2.tar.bz2 +9f190268c42be582ef66e47365ee61e3 MesaGLUT-7.8.2.zip </pre> @@ -43,6 +51,94 @@ tbd <h2>Bug fixes</h2> <ul> <li>Fixed Gallium glDrawPixels(GL_DEPTH_COMPONENT). +<li>Fixed Gallium Cell driver to buildable, runable state +<li>Fixed bad error checking for glFramebufferRenderbuffer(attachment=GL_DEPTH_STENCIL_ATTACHMENT). +<li>Fixed incorrect Z coordinate handling in "meta" glDraw/CopyPixels. + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=23670">Bug + #23670</a>.</li> + +<li>Assorted i965 driver fixes. + Including but not limited to: + <ul> + <li>Fix scissoring when width or height is + 0. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27643">Bug + #27643</a>. + <li>Fix bit allocation for number of color regions for + ARB_draw_buffers.</li> + <li>Set the correct provoking vertex for clipped first-mode + trifans. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=24470">Bug + #24470</a>.</li> + <li>Use <code>R16G16B16A16_FLOAT</code> for 3-component half-float.</li> + <li>Fix assertion for surface tile offset usage on Ironlake.</li> + <li>Fix cube map layouts on Ironlake.</li> + <li>When an RB gets a new region, clear the old from the state + cache. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=24119">Bug + #24119</a>.</li> + <li>Reject shaders with uninlined function calls instead of hanging.</li> + </ul> +</li> + +<li>Assorted i915 driver fixes. Including but not limited to: + <ul> + <li>Fixed texture LOD clamping in i915 driver. + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=24846">Bug + #24846</a>.</li> + <li>Fix off-by-one for drawing rectangle. + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27408">Bug + #27408</a>.</li> + </ul> +</li> + +<li>Fixed hangs in etracer on 830 and 845 + chipsets. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=26557">Bug + #26557</a>.</li> +<li>Fixed tiling of small textures on all Intel drivers.</li> +<li>Fixed crash in Savage driver when using <code>_mesa_CopyTexImage2D</code>. + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27652">Bug + #27652</a>.</li> + +<li>Assorted GLX fixes. Including but not limited to: + <ul> + <li>Fixed <code>__glXInitializeVisualConfigFromTags</code>'s handling of + unrecognized fbconfig tags.</li> + <li>Fixed regression with <code>GLX_USE_GL</code>. + <li>Fixed config chooser logic for 'mask' matching.</li> + <li>Report swap events correctly in direct rendered case (DRI2)</li> + <li>Fixed build with dri2proto which doesn't define + <code>X_DRI2SwapInterval</code>.</li> + <li>Get <code>GLX_SCREEN</code> first in <code>__glXQueryContextInfo</code>. + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=14245">Bug + #14245</a>.</li> + </ul> +</li> + +<li>Assorted GLSL fixes. Including but not limited to: + <ul> + <li>Change variable declared assertion into conditional in GLSL + compiler. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27921">Bug + #27921</a>.</li> + <li>Fix instruction indexing + bugs. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27566">Bug + #27566</a>.</li> + <li>Updated uniform location / offset encoding to be more like + other implementations.</li> + <li>Don't overwrite a driver's shader infolog with generic failure + message.</li> + </ul> +</li> + +<li>Fixed OSMesa build for 16 and 32-bit color channel depth. +<li>Fixed OSMesa build with hidden symbol visibility. libOSMesa no longer links to libGL. + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=28305">Bug + #28305</a>. +<li>Fixed handling of multiple render targets in fixed-function + texture envrionmnent programs.</li> +<li>Fixed conversion errors in <code>signed_rgba8888[rev]</code> texel + fetch.</li> +<li>Don't set srcLevel on <code>GL_TEXTURE_RECTANGLE_ARB</code> targets.</li> +<li>Various build fixes for OpenBSD.</li> +<li>Various build fixes for OS X.</li> +<li>Various build fixes for GCC 3.3.</li> </ul> diff --git a/dist/Mesa/src/gallium/auxiliary/draw/draw_vs_ppc.c b/dist/Mesa/src/gallium/auxiliary/draw/draw_vs_ppc.c index d869eecec..c01082dea 100644 --- a/dist/Mesa/src/gallium/auxiliary/draw/draw_vs_ppc.c +++ b/dist/Mesa/src/gallium/auxiliary/draw/draw_vs_ppc.c @@ -125,7 +125,7 @@ vs_ppc_run_linear( struct draw_vertex_shader *base, */ shader->func(inputs_soa, outputs_soa, temps_soa, (float (*)[4]) shader->base.immediates, - (const float (*)[4])constants[0], + (float (*)[4]) constants[0], ppc_builtin_constants); /* convert (up to) four output verts from SoA back to AoS format */ diff --git a/dist/Mesa/src/gallium/auxiliary/rtasm/rtasm_x86sse.c b/dist/Mesa/src/gallium/auxiliary/rtasm/rtasm_x86sse.c index f675427d9..a5ff5367a 100644 --- a/dist/Mesa/src/gallium/auxiliary/rtasm/rtasm_x86sse.c +++ b/dist/Mesa/src/gallium/auxiliary/rtasm/rtasm_x86sse.c @@ -1757,6 +1757,8 @@ void (*x86_get_func( struct x86_function *p ))(void) #else +void x86sse_dummy( void ); + void x86sse_dummy( void ) { } diff --git a/dist/Mesa/src/gallium/drivers/cell/ppu/cell_context.c b/dist/Mesa/src/gallium/drivers/cell/ppu/cell_context.c index 5bff9869f..b48393511 100644 --- a/dist/Mesa/src/gallium/drivers/cell/ppu/cell_context.c +++ b/dist/Mesa/src/gallium/drivers/cell/ppu/cell_context.c @@ -74,7 +74,7 @@ cell_destroy_context( struct pipe_context *pipe ) static struct draw_context * cell_draw_create(struct cell_context *cell) { - struct draw_context *draw = draw_create(); + struct draw_context *draw = draw_create(&cell->pipe); #if 0 /* broken */ if (getenv("GALLIUM_CELL_VS")) { diff --git a/dist/Mesa/src/gallium/drivers/cell/ppu/cell_fence.c b/dist/Mesa/src/gallium/drivers/cell/ppu/cell_fence.c index e10071529..6ff19f270 100644 --- a/dist/Mesa/src/gallium/drivers/cell/ppu/cell_fence.c +++ b/dist/Mesa/src/gallium/drivers/cell/ppu/cell_fence.c @@ -92,7 +92,6 @@ cell_add_buffer_to_list(struct cell_context *cell, struct cell_buffer_list *list, struct pipe_buffer *buffer) { - struct pipe_screen *ps = cell->pipe.screen; struct cell_buffer_node *node = CALLOC_STRUCT(cell_buffer_node); /* create new list node which references the buffer, insert at head */ if (node) { diff --git a/dist/Mesa/src/gallium/drivers/cell/ppu/cell_pipe_state.c b/dist/Mesa/src/gallium/drivers/cell/ppu/cell_pipe_state.c index 3d8b4409c..74a73b418 100644 --- a/dist/Mesa/src/gallium/drivers/cell/ppu/cell_pipe_state.c +++ b/dist/Mesa/src/gallium/drivers/cell/ppu/cell_pipe_state.c @@ -197,7 +197,7 @@ cell_bind_rasterizer_state(struct pipe_context *pipe, void *rast) struct cell_context *cell = cell_context(pipe); /* pass-through to draw module */ - draw_set_rasterizer_state(cell->draw, rasterizer); + draw_set_rasterizer_state(cell->draw, rasterizer, rast); cell->rasterizer = rasterizer; diff --git a/dist/Mesa/src/glx/glxext.c b/dist/Mesa/src/glx/glxext.c index 82d3a56f3..79285ec71 100644 --- a/dist/Mesa/src/glx/glxext.c +++ b/dist/Mesa/src/glx/glxext.c @@ -584,6 +584,10 @@ __glXInitializeVisualConfigFromTags(__GLcontextModes * config, int count, config->yInverted = *bp++; break; #endif + case GLX_USE_GL: + if (fbconfig_style_tags) + bp++; + break; case None: i = count; break; diff --git a/dist/Mesa/src/mesa/drivers/common/meta.c b/dist/Mesa/src/mesa/drivers/common/meta.c index 3d2183c61..89ca476f9 100644 --- a/dist/Mesa/src/mesa/drivers/common/meta.c +++ b/dist/Mesa/src/mesa/drivers/common/meta.c @@ -813,6 +813,21 @@ _mesa_meta_end(GLcontext *ctx) /** + * Convert Z from a normalized value in the range [0, 1] to an object-space + * Z coordinate in [-1, +1] so that drawing at the new Z position with the + * default/identity ortho projection results in the original Z value. + * Used by the meta-Clear, Draw/CopyPixels and Bitmap functions where the Z + * value comes from the clear value or raster position. + */ +static INLINE GLfloat +invert_z(GLfloat normZ) +{ + GLfloat objZ = 1.0 - 2.0 * normZ; + return objZ; +} + + +/** * One-time init for a temp_texture object. * Choose tex target, compute max tex size, etc. */ @@ -1433,7 +1448,7 @@ _mesa_meta_Clear(GLcontext *ctx, GLbitfield buffers) const GLfloat y0 = (GLfloat) ctx->DrawBuffer->_Ymin; const GLfloat x1 = (GLfloat) ctx->DrawBuffer->_Xmax; const GLfloat y1 = (GLfloat) ctx->DrawBuffer->_Ymax; - const GLfloat z = 1.0 - 2.0 * ctx->Depth.Clear; + const GLfloat z = invert_z(ctx->Depth.Clear); GLuint i; verts[0].x = x0; @@ -1539,7 +1554,7 @@ _mesa_meta_CopyPixels(GLcontext *ctx, GLint srcX, GLint srcY, const GLfloat dstY0 = (GLfloat) dstY; const GLfloat dstX1 = dstX + width * ctx->Pixel.ZoomX; const GLfloat dstY1 = dstY + height * ctx->Pixel.ZoomY; - const GLfloat z = ctx->Current.RasterPos[2]; + const GLfloat z = invert_z(ctx->Current.RasterPos[2]); verts[0].x = dstX0; verts[0].y = dstY0; @@ -1828,7 +1843,7 @@ _mesa_meta_DrawPixels(GLcontext *ctx, const GLfloat y0 = (GLfloat) y; const GLfloat x1 = x + width * ctx->Pixel.ZoomX; const GLfloat y1 = y + height * ctx->Pixel.ZoomY; - const GLfloat z = ctx->Current.RasterPos[2]; + const GLfloat z = invert_z(ctx->Current.RasterPos[2]); verts[0].x = x0; verts[0].y = y0; @@ -2031,7 +2046,7 @@ _mesa_meta_Bitmap(GLcontext *ctx, const GLfloat y0 = (GLfloat) y; const GLfloat x1 = (GLfloat) (x + width); const GLfloat y1 = (GLfloat) (y + height); - const GLfloat z = ctx->Current.RasterPos[2]; + const GLfloat z = invert_z(ctx->Current.RasterPos[2]); GLuint i; verts[0].x = x0; diff --git a/dist/Mesa/src/mesa/drivers/dri/i915/i915_texstate.c b/dist/Mesa/src/mesa/drivers/dri/i915/i915_texstate.c index a1ab8f8b6..815074c2c 100644 --- a/dist/Mesa/src/mesa/drivers/dri/i915/i915_texstate.c +++ b/dist/Mesa/src/mesa/drivers/dri/i915/i915_texstate.c @@ -281,6 +281,7 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3) GLenum ws = tObj->WrapS; GLenum wt = tObj->WrapT; GLenum wr = tObj->WrapR; + float minlod; /* We program 1D textures as 2D textures, so the 2D texcoord could * result in sampling border values if we don't set the T wrap to @@ -321,8 +322,9 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3) (translate_wrap_mode(wt) << SS3_TCY_ADDR_MODE_SHIFT) | (translate_wrap_mode(wr) << SS3_TCZ_ADDR_MODE_SHIFT)); + minlod = MIN2(tObj->MinLod, tObj->_MaxLevel - tObj->BaseLevel); state[I915_TEXREG_SS3] |= (unit << SS3_TEXTUREMAP_INDEX_SHIFT); - state[I915_TEXREG_SS3] |= (U_FIXED(CLAMP(tObj->MinLod, 0.0, 11.0), 4) << + state[I915_TEXREG_SS3] |= (U_FIXED(CLAMP(minlod, 0.0, 11.0), 4) << SS3_MIN_LOD_SHIFT); } diff --git a/dist/Mesa/src/mesa/drivers/dri/i915/i915_vtbl.c b/dist/Mesa/src/mesa/drivers/dri/i915/i915_vtbl.c index 0a93e64b1..b7e38bd6b 100644 --- a/dist/Mesa/src/mesa/drivers/dri/i915/i915_vtbl.c +++ b/dist/Mesa/src/mesa/drivers/dri/i915/i915_vtbl.c @@ -627,8 +627,8 @@ i915_set_draw_region(struct intel_context *intel, state->Buffer[I915_DESTREG_DRAWRECT2] = 0; state->Buffer[I915_DESTREG_DRAWRECT3] = (draw_y << 16) | draw_x; state->Buffer[I915_DESTREG_DRAWRECT4] = - ((ctx->DrawBuffer->Width + draw_x) & 0xffff) | - ((ctx->DrawBuffer->Height + draw_y) << 16); + ((ctx->DrawBuffer->Width + draw_x - 1) & 0xffff) | + ((ctx->DrawBuffer->Height + draw_y - 1) << 16); state->Buffer[I915_DESTREG_DRAWRECT5] = (draw_y << 16) | draw_x; I915_STATECHANGE(i915, I915_UPLOAD_BUFFERS); diff --git a/dist/Mesa/src/mesa/drivers/dri/i965/brw_clip_tri.c b/dist/Mesa/src/mesa/drivers/dri/i965/brw_clip_tri.c index b27fe654c..916a99ea0 100644 --- a/dist/Mesa/src/mesa/drivers/dri/i965/brw_clip_tri.c +++ b/dist/Mesa/src/mesa/drivers/dri/i965/brw_clip_tri.c @@ -177,7 +177,7 @@ void brw_clip_tri_init_vertices( struct brw_clip_compile *c ) void brw_clip_tri_flat_shade( struct brw_clip_compile *c ) { struct brw_compile *p = &c->func; - struct brw_instruction *is_poly; + struct brw_instruction *is_poly, *is_trifan; struct brw_reg tmp0 = c->reg.loopcount; /* handy temporary */ brw_AND(p, tmp0, get_element_ud(c->reg.R0, 2), brw_imm_ud(PRIM_MASK)); @@ -195,8 +195,22 @@ void brw_clip_tri_flat_shade( struct brw_clip_compile *c ) is_poly = brw_ELSE(p, is_poly); { if (c->key.pv_first) { - brw_clip_copy_colors(c, 1, 0); - brw_clip_copy_colors(c, 2, 0); + brw_CMP(p, + vec1(brw_null_reg()), + BRW_CONDITIONAL_EQ, + tmp0, + brw_imm_ud(_3DPRIM_TRIFAN)); + is_trifan = brw_IF(p, BRW_EXECUTE_1); + { + brw_clip_copy_colors(c, 0, 1); + brw_clip_copy_colors(c, 2, 1); + } + is_trifan = brw_ELSE(p, is_trifan); + { + brw_clip_copy_colors(c, 1, 0); + brw_clip_copy_colors(c, 2, 0); + } + brw_ENDIF(p, is_trifan); } else { brw_clip_copy_colors(c, 0, 2); diff --git a/dist/Mesa/src/mesa/drivers/dri/i965/brw_draw_upload.c b/dist/Mesa/src/mesa/drivers/dri/i965/brw_draw_upload.c index 8247faa36..9cbff2486 100644 --- a/dist/Mesa/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/dist/Mesa/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -59,7 +59,7 @@ static GLuint half_float_types[5] = { 0, BRW_SURFACEFORMAT_R16_FLOAT, BRW_SURFACEFORMAT_R16G16_FLOAT, - 0, /* can't seem to render this one */ + BRW_SURFACEFORMAT_R16G16B16A16_FLOAT, BRW_SURFACEFORMAT_R16G16B16A16_FLOAT }; diff --git a/dist/Mesa/src/mesa/drivers/dri/i965/brw_wm.h b/dist/Mesa/src/mesa/drivers/dri/i965/brw_wm.h index 47b764d24..ddd1f909c 100644 --- a/dist/Mesa/src/mesa/drivers/dri/i965/brw_wm.h +++ b/dist/Mesa/src/mesa/drivers/dri/i965/brw_wm.h @@ -67,7 +67,7 @@ struct brw_wm_prog_key { GLuint flat_shade:1; GLuint linear_color:1; /**< linear interpolation vs perspective interp */ GLuint runtime_check_aads_emit:1; - GLuint nr_color_regions:2; + GLuint nr_color_regions:5; GLbitfield proj_attrib_mask; /**< one bit per fragment program attribute */ GLuint shadowtex_mask:16; diff --git a/dist/Mesa/src/mesa/drivers/dri/intel/intel_context.c b/dist/Mesa/src/mesa/drivers/dri/intel/intel_context.c index 66bee9e04..52e127f9a 100644 --- a/dist/Mesa/src/mesa/drivers/dri/intel/intel_context.c +++ b/dist/Mesa/src/mesa/drivers/dri/intel/intel_context.c @@ -610,6 +610,7 @@ intelInitContext(struct intel_context *intel, intel->driContext = driContextPriv; intel->driFd = sPriv->fd; + intel->has_xrgb_textures = GL_TRUE; if (IS_GEN6(intel->intelScreen->deviceID)) { intel->gen = 6; intel->needs_ff_sync = GL_TRUE; @@ -631,6 +632,10 @@ intelInitContext(struct intel_context *intel, } } else { intel->gen = 2; + if (intel->intelScreen->deviceID == PCI_CHIP_I830_M || + intel->intelScreen->deviceID == PCI_CHIP_845_G) { + intel->has_xrgb_textures = GL_FALSE; + } } driParseConfigFiles(&intel->optionCache, &intelScreen->optionCache, diff --git a/dist/Mesa/src/mesa/drivers/dri/intel/intel_context.h b/dist/Mesa/src/mesa/drivers/dri/intel/intel_context.h index 1a24bf6cc..0684feedd 100644 --- a/dist/Mesa/src/mesa/drivers/dri/intel/intel_context.h +++ b/dist/Mesa/src/mesa/drivers/dri/intel/intel_context.h @@ -145,6 +145,7 @@ struct intel_context GLboolean is_g4x; GLboolean is_945; GLboolean has_luminance_srgb; + GLboolean has_xrgb_textures; int urb_size; diff --git a/dist/Mesa/src/mesa/drivers/dri/intel/intel_tex_format.c b/dist/Mesa/src/mesa/drivers/dri/intel/intel_tex_format.c index 7be5231ea..c23424d56 100644 --- a/dist/Mesa/src/mesa/drivers/dri/intel/intel_tex_format.c +++ b/dist/Mesa/src/mesa/drivers/dri/intel/intel_tex_format.c @@ -49,7 +49,14 @@ intelChooseTextureFormat(GLcontext * ctx, GLint internalFormat, if (format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5) { return MESA_FORMAT_RGB565; } - return do32bpt ? MESA_FORMAT_XRGB8888 : MESA_FORMAT_RGB565; + if (do32bpt) { + if (intel->has_xrgb_textures) + return MESA_FORMAT_XRGB8888; + else + return MESA_FORMAT_ARGB8888; + } else { + return MESA_FORMAT_RGB565; + } case GL_RGBA8: case GL_RGB10_A2: @@ -68,7 +75,10 @@ intelChooseTextureFormat(GLcontext * ctx, GLint internalFormat, case GL_RGB10: case GL_RGB12: case GL_RGB16: - return MESA_FORMAT_XRGB8888; + if (intel->has_xrgb_textures) + return MESA_FORMAT_XRGB8888; + else + return MESA_FORMAT_ARGB8888; case GL_RGB5: case GL_RGB4: diff --git a/dist/Mesa/src/mesa/drivers/osmesa/Makefile b/dist/Mesa/src/mesa/drivers/osmesa/Makefile index 9010bbd13..951702ee8 100644 --- a/dist/Mesa/src/mesa/drivers/osmesa/Makefile +++ b/dist/Mesa/src/mesa/drivers/osmesa/Makefile @@ -19,17 +19,11 @@ 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 \ $(TOP)/src/glsl/cl/libglslcl.a \ $(TOP)/src/glsl/pp/libglslpp.a -else -CORE_MESA = -endif - .c.o: $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ diff --git a/dist/Mesa/src/mesa/main/fbobject.c b/dist/Mesa/src/mesa/main/fbobject.c index 14c533e0d..cc20f7479 100644 --- a/dist/Mesa/src/mesa/main/fbobject.c +++ b/dist/Mesa/src/mesa/main/fbobject.c @@ -1766,10 +1766,10 @@ _mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment, rb = NULL; } - if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) { + if (attachment == GL_DEPTH_STENCIL_ATTACHMENT && + rb && rb->Format != MESA_FORMAT_NONE) { /* make sure the renderbuffer is a depth/stencil format */ - const GLenum baseFormat = - _mesa_get_format_base_format(att->Renderbuffer->Format); + const GLenum baseFormat = _mesa_get_format_base_format(rb->Format); if (baseFormat != GL_DEPTH_STENCIL) { _mesa_error(ctx, GL_INVALID_OPERATION, "glFramebufferRenderbufferEXT(renderbuffer" diff --git a/dist/Mesa/src/mesa/main/version.h b/dist/Mesa/src/mesa/main/version.h index cd760beba..9955be24a 100644 --- a/dist/Mesa/src/mesa/main/version.h +++ b/dist/Mesa/src/mesa/main/version.h @@ -34,8 +34,8 @@ /* Mesa version */ #define MESA_MAJOR 7 #define MESA_MINOR 8 -#define MESA_PATCH 1 -#define MESA_VERSION_STRING "7.8.1" +#define MESA_PATCH 2 +#define MESA_VERSION_STRING "7.8.2" /* To make version comparison easy */ #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) diff --git a/dist/Mesa/src/mesa/shader/shader_api.c b/dist/Mesa/src/mesa/shader/shader_api.c index 940fe2d03..5e87bb405 100644 --- a/dist/Mesa/src/mesa/shader/shader_api.c +++ b/dist/Mesa/src/mesa/shader/shader_api.c @@ -1260,6 +1260,54 @@ lookup_uniform_parameter(GLcontext *ctx, GLuint program, GLint location, /** + * GLGL uniform arrays and structs require special handling. + * + * The GL_ARB_shader_objects spec says that if you use + * glGetUniformLocation to get the location of an array, you CANNOT + * access other elements of the array by adding an offset to the + * returned location. For example, you must call + * glGetUniformLocation("foo[16]") if you want to set the 16th element + * of the array with glUniform(). + * + * HOWEVER, some other OpenGL drivers allow accessing array elements + * by adding an offset to the returned array location. And some apps + * seem to depend on that behaviour. + * + * Mesa's gl_uniform_list doesn't directly support this since each + * entry in the list describes one uniform variable, not one uniform + * element. We could insert dummy entries in the list for each array + * element after [0] but that causes complications elsewhere. + * + * We solve this problem by encoding two values in the location that's + * returned by glGetUniformLocation(): + * a) index into gl_uniform_list::Uniforms[] for the uniform + * b) an array/field offset (0 for simple types) + * + * These two values are encoded in the high and low halves of a GLint. + * By putting the uniform number in the high part and the offset in the + * low part, we can support the unofficial ability to index into arrays + * by adding offsets to the location value. + */ +static void +merge_location_offset(GLint *location, GLint offset) +{ + *location = (*location << 16) | offset; +} + + +/** + * Seperate the uniform location and parameter offset. See above. + */ +static void +split_location_offset(GLint *location, GLint *offset) +{ + *offset = *location & 0xffff; + *location = *location >> 16; +} + + + +/** * Called via ctx->Driver.GetUniformfv(). */ static void @@ -1268,6 +1316,9 @@ _mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location, { struct gl_program *prog; GLint paramPos; + GLint offset; + + split_location_offset(&location, &offset); lookup_uniform_parameter(ctx, program, location, &prog, ¶mPos); @@ -1298,7 +1349,10 @@ _mesa_get_uniformiv(GLcontext *ctx, GLuint program, GLint location, { struct gl_program *prog; GLint paramPos; + GLint offset; + split_location_offset(&location, &offset); + lookup_uniform_parameter(ctx, program, location, &prog, ¶mPos); if (prog) { @@ -1319,31 +1373,6 @@ _mesa_get_uniformiv(GLcontext *ctx, GLuint program, GLint location, /** - * The value returned by GetUniformLocation actually encodes two things: - * 1. the index into the prog->Uniforms[] array for the uniform - * 2. an offset in the prog->ParameterValues[] array for specifying array - * elements or structure fields. - * This function merges those two values. - */ -static void -merge_location_offset(GLint *location, GLint offset) -{ - *location = *location | (offset << 16); -} - - -/** - * Seperate the uniform location and parameter offset. See above. - */ -static void -split_location_offset(GLint *location, GLint *offset) -{ - *offset = (*location >> 16); - *location = *location & 0xffff; -} - - -/** * Called via ctx->Driver.GetUniformLocation(). * * The return value will encode two values, the uniform location and an diff --git a/dist/Mesa/src/mesa/state_tracker/st_mesa_to_tgsi.c b/dist/Mesa/src/mesa/state_tracker/st_mesa_to_tgsi.c index 807d21a71..d7ef57e2d 100644 --- a/dist/Mesa/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/dist/Mesa/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -154,7 +154,7 @@ dst_register( struct st_translate *t, return t->temps[index]; case PROGRAM_OUTPUT: - if (index == t->psizoutindex) + if (index == VERT_RESULT_PSIZ) t->prevInstWrotePsiz = GL_TRUE; return t->outputs[t->outputMapping[index]]; |