1 diff --git a/docs/devinfo.html b/docs/devinfo.html
2 index df0e726..2d1c125 100644
3 --- a/docs/devinfo.html
4 +++ b/docs/devinfo.html
5 @@ -145,7 +145,7 @@ Make sure the values in src/mesa/main/version.h are correct.
9 -Update the docs/news.html file and docs/download.html files.
10 +Update docs/news.html.
14 @@ -208,10 +208,11 @@ sftp USERNAME,mesa3d@web.sourceforge.net
17 Make an announcement on the mailing lists:
18 -<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>,
19 -<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>
21 +<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>,
22 +<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>
24 -<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>
25 +<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>
29 diff --git a/docs/news.html b/docs/news.html
30 index b3fb8b5..72d38ee 100644
37 +<h2>October 4, 2010</h2>
40 +<a href="relnotes-7.9.html">Mesa 7.9</a> (final) is released. This is a new
45 <h2>September 27, 2010</h2>
48 -<a href="relnotes-7.9.0.html">Mesa 7.9.0-rc1</a> is released. This is a
49 +<a href="relnotes-7.9.html">Mesa 7.9.0-rc1</a> is released. This is a
50 release candidate for the 7.9 development release.
53 diff --git a/docs/relnotes-7.8.2.html b/docs/relnotes-7.8.2.html
54 index e1b0f2d..1393b2e 100644
55 --- a/docs/relnotes-7.8.2.html
56 +++ b/docs/relnotes-7.8.2.html
57 @@ -26,7 +26,15 @@ for DRI hardware acceleration.
59 <h2>MD5 checksums</h2>
62 +c89b63d253605ed40e8ac370d25a833c MesaLib-7.8.2.tar.gz
63 +6be2d343a0089bfd395ce02aaf8adb57 MesaLib-7.8.2.tar.bz2
64 +a04ad3b06ac5ff3969a003fa7bbf7d5b MesaLib-7.8.2.zip
65 +7c213f92efeb471f0331670d5079d4c0 MesaDemos-7.8.2.tar.gz
66 +757d9e2e06f48b1a52848be9b0307ced MesaDemos-7.8.2.tar.bz2
67 +8d0e5cfe68b8ebf90265d350ae2c48b1 MesaDemos-7.8.2.zip
68 +b74482e3f44f35ed395c4aada4fd8240 MesaGLUT-7.8.2.tar.gz
69 +a471807b65e49c325808ba4551be93ed MesaGLUT-7.8.2.tar.bz2
70 +9f190268c42be582ef66e47365ee61e3 MesaGLUT-7.8.2.zip
74 @@ -44,10 +52,95 @@ tbd
76 <li>Fixed Gallium glDrawPixels(GL_DEPTH_COMPONENT).
77 <li>Fixed Gallium Cell driver to buildable, runable state
78 +<li>Fixed bad error checking for glFramebufferRenderbuffer(attachment=GL_DEPTH_STENCIL_ATTACHMENT).
79 +<li>Fixed incorrect Z coordinate handling in "meta" glDraw/CopyPixels.
80 + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=23670">Bug
83 +<li>Assorted i965 driver fixes.
84 + Including but not limited to:
86 + <li>Fix scissoring when width or height is
87 + 0. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27643">Bug
89 + <li>Fix bit allocation for number of color regions for
90 + ARB_draw_buffers.</li>
91 + <li>Set the correct provoking vertex for clipped first-mode
92 + trifans. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=24470">Bug
94 + <li>Use <code>R16G16B16A16_FLOAT</code> for 3-component half-float.</li>
95 + <li>Fix assertion for surface tile offset usage on Ironlake.</li>
96 + <li>Fix cube map layouts on Ironlake.</li>
97 + <li>When an RB gets a new region, clear the old from the state
98 + cache. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=24119">Bug
100 + <li>Reject shaders with uninlined function calls instead of hanging.</li>
104 +<li>Assorted i915 driver fixes. Including but not limited to:
106 + <li>Fixed texture LOD clamping in i915 driver.
107 + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=24846">Bug
109 + <li>Fix off-by-one for drawing rectangle.
110 + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27408">Bug
115 +<li>Fixed hangs in etracer on 830 and 845
116 + chipsets. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=26557">Bug
118 +<li>Fixed tiling of small textures on all Intel drivers.</li>
119 +<li>Fixed crash in Savage driver when using <code>_mesa_CopyTexImage2D</code>.
120 + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27652">Bug
123 +<li>Assorted GLX fixes. Including but not limited to:
125 + <li>Fixed <code>__glXInitializeVisualConfigFromTags</code>'s handling of
126 + unrecognized fbconfig tags.</li>
127 + <li>Fixed regression with <code>GLX_USE_GL</code>.
128 + <li>Fixed config chooser logic for 'mask' matching.</li>
129 + <li>Report swap events correctly in direct rendered case (DRI2)</li>
130 + <li>Fixed build with dri2proto which doesn't define
131 + <code>X_DRI2SwapInterval</code>.</li>
132 + <li>Get <code>GLX_SCREEN</code> first in <code>__glXQueryContextInfo</code>.
133 + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=14245">Bug
138 +<li>Assorted GLSL fixes. Including but not limited to:
140 + <li>Change variable declared assertion into conditional in GLSL
141 + compiler. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27921">Bug
143 + <li>Fix instruction indexing
144 + bugs. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27566">Bug
146 + <li>Updated uniform location / offset encoding to be more like
147 + other implementations.</li>
148 + <li>Don't overwrite a driver's shader infolog with generic failure
153 +<li>Fixed OSMesa build for 16 and 32-bit color channel depth.
154 +<li>Fixed OSMesa build with hidden symbol visibility. libOSMesa no longer links to libGL.
155 + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=28305">Bug
157 +<li>Fixed handling of multiple render targets in fixed-function
158 + texture envrionmnent programs.</li>
159 +<li>Fixed conversion errors in <code>signed_rgba8888[rev]</code> texel
161 +<li>Don't set srcLevel on <code>GL_TEXTURE_RECTANGLE_ARB</code> targets.</li>
162 +<li>Various build fixes for OpenBSD.</li>
163 +<li>Various build fixes for OS X.</li>
164 +<li>Various build fixes for GCC 3.3.</li>
172 diff --git a/docs/relnotes-7.8.3.html b/docs/relnotes-7.8.3.html
174 index 0000000..1e9f433
176 +++ b/docs/relnotes-7.8.3.html
180 +<TITLE>Mesa Release Notes</TITLE>
182 +<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
186 +<body bgcolor="#eeeeee">
188 +<H1>Mesa 7.8.3 Release Notes / (date tbd)</H1>
191 +Mesa 7.8.3 is a bug fix release which fixes bugs found since the 7.8.2 release.
194 +Mesa 7.8.3 implements the OpenGL 2.1 API, but the version reported by
195 +glGetString(GL_VERSION) depends on the particular driver being used.
196 +Some drivers don't support all the features required in OpenGL 2.1.
199 +See the <a href="install.html">Compiling/Installing page</a> for prerequisites
200 +for DRI hardware acceleration.
204 +<h2>MD5 checksums</h2>
206 +x MesaLib-7.8.3.tar.gz
207 +x MesaLib-7.8.3.tar.bz2
209 +x MesaDemos-7.8.3.tar.gz
210 +x MesaDemos-7.8.3.tar.bz2
211 +x MesaDemos-7.8.3.zip
212 +x MesaGLUT-7.8.3.tar.gz
213 +x MesaGLUT-7.8.3.tar.bz2
214 +x MesaGLUT-7.8.3.zip
218 +<h2>New features</h2>
224 +<li>The radeon driver should use less memory when searching for a valid mip
231 +<li>Fix unsupported FB with D24S8 (bug
232 + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=23670">29116</a>)</li>
233 +<li>Fix ReadPixels crash when reading depth/stencil from an FBO</li>
234 +<li>Fixed a bug rendering to 16-bit buffers using swrast.</li>
235 +<li>Fixed a state tracker/TGSI bug that caused crashes when using Windows'
236 + memory debugging features.</li>
237 +<li>Fixed an issue rendering to 32-bit channels with swrast (bug
238 + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=29487">29487</a>)</li>
239 +<li>GLSL: fix indirect <TT>gl_TextureMatrix</TT> addressing (bug
240 + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=28967">28967</a>)</li>
241 +<li>GLSL: fix for bug
242 + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27216">27216</a></li>
243 +<li>GLSL: fix zw fragcoord entries in some cases (bug
244 + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=29183">29183</a>)</li>
245 +<li>Fix texture env generation in some cases (bug
246 + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=28169">28169</a>)</li>
247 +<li>osmesa: a fix for calling <TT>OSMesaMakeCurrent</TT> twice was applied (bug
248 + <a href="https://bugs.freedesktop.org/show_bug.cgi?id=10966">10966</a></li>
249 +<li>A bug was fixed which could cause Mesa to ignore the
250 + <TT>MESA_EXTENSION_OVERRIDE</TT> environment variable.</li>
251 +<li>A bug related to specular highlights on backfaces was fixed.</li>
252 +<li>A radeon-specific issue with <TT>glCopyTex(Sub)Image</TT> was
254 +<li>radeon/wine: flush command stream in more cases, fixing wine d3d9
256 +<li>r600: fix sin+cos normalization.</li>
257 +<li>r600: (properly) ignore <TT>GL_COORD_REPLACE</TT> when point sprites are
259 +<li>radeon: avoid flushing when the context is not current.</li>
260 +<li>r300c: a bug affecting unaligned BOs was fixed.</li>
261 +<li>r300c: a hardlock caused by ARB_half_float_vertex incorrectly advertised on some chipsets.</li>
267 diff --git a/docs/relnotes-7.9.html b/docs/relnotes-7.9.html
268 index b09fb1d..fe1fd5e 100644
269 --- a/docs/relnotes-7.9.html
270 +++ b/docs/relnotes-7.9.html
271 @@ -28,12 +28,12 @@ for DRI hardware acceleration.
273 <h2>MD5 checksums</h2>
275 -f1f01a7baec255f13e9468fb4b05922a MesaLib-7.9-rc1.tar.gz
276 -7ffbda3b7056c60b8f87e3082d853af1 MesaLib-7.9-rc1.tar.bz2
277 -9d4650df4e5b530178d6fde840f76664 MesaLib-7.9-rc1.zip
278 -a81c2e7a0c7832e67c768d6f209f2c8f MesaGLUT-7.9-rc1.tar.gz
279 -b4c1c2f0b47a07be10fa2dd42e6a63d7 MesaGLUT-7.9-rc1.tar.bz2
280 -c9dd7419a19bcb24a1fe556ec2e78451 MesaGLUT-7.9-rc1.zip
281 +ed65ab425b25895c7f473d0a5e6e64f8 MesaLib-7.9.tar.gz
282 +82c740c49d572baa6da2b1a1eee90bca MesaLib-7.9.tar.bz2
283 +cd2b6ecec759b0457475e94bbb38fedb MesaLib-7.9.zip
284 +7b54af9fb9b1f6a1a65db2520f50848f MesaGLUT-7.9.tar.gz
285 +20d07419d1929f833fdb36bced290ad5 MesaGLUT-7.9.tar.bz2
286 +62a7edecd7c92675cd6029b05217eb0a MesaGLUT-7.9.zip
290 diff --git a/docs/relnotes.html b/docs/relnotes.html
291 index 47e7f80..4487af9 100644
292 --- a/docs/relnotes.html
293 +++ b/docs/relnotes.html
294 @@ -14,6 +14,7 @@ The release notes summarize what's new or changed in each Mesa release.
297 <LI><A HREF="relnotes-7.9.html">7.9 release notes</A>
298 +<LI><A HREF="relnotes-7.8.3.html">7.8.3 release notes</A>
299 <LI><A HREF="relnotes-7.8.2.html">7.8.2 release notes</A>
300 <LI><A HREF="relnotes-7.8.1.html">7.8.1 release notes</A>
301 <LI><A HREF="relnotes-7.8.html">7.8 release notes</A>
302 diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_api.c b/src/gallium/state_trackers/egl/common/egl_g3d_api.c
303 index c0164da..3bde397 100644
304 --- a/src/gallium/state_trackers/egl/common/egl_g3d_api.c
305 +++ b/src/gallium/state_trackers/egl/common/egl_g3d_api.c
306 @@ -609,8 +609,10 @@ egl_g3d_wait_client(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx)
308 gctx->stctxi->flush(gctx->stctxi,
309 PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
310 - screen->fence_finish(screen, fence, 0);
311 - screen->fence_reference(screen, &fence, NULL);
313 + screen->fence_finish(screen, fence, 0);
314 + screen->fence_reference(screen, &fence, NULL);
319 diff --git a/src/gallium/state_trackers/vega/vg_manager.c b/src/gallium/state_trackers/vega/vg_manager.c
320 index e799674..232deef 100644
321 --- a/src/gallium/state_trackers/vega/vg_manager.c
322 +++ b/src/gallium/state_trackers/vega/vg_manager.c
323 @@ -352,7 +352,7 @@ vg_api_create_context(struct st_api *stapi, struct st_manager *smapi,
326 /* only 1.0 is supported */
327 - if (attribs->major != 1 || attribs->minor > 0)
328 + if (attribs->major > 1 || (attribs->major == 1 && attribs->minor > 0))
331 pipe = smapi->screen->context_create(smapi->screen, NULL);
332 diff --git a/src/gallium/state_trackers/xorg/Makefile b/src/gallium/state_trackers/xorg/Makefile
333 index cb2c3ae..7a44d28 100644
334 --- a/src/gallium/state_trackers/xorg/Makefile
335 +++ b/src/gallium/state_trackers/xorg/Makefile
336 @@ -10,7 +10,7 @@ LIBRARY_INCLUDES = \
337 $(shell pkg-config libkms --atleast-version=1.0 \
338 && echo "-DHAVE_LIBKMS") \
339 $(shell pkg-config libkms --silence-errors --cflags-only-I) \
340 - $(shell pkg-config --cflags-only-I pixman-1 xorg-server libdrm xproto) \
341 + $(shell pkg-config --cflags-only-I pixman-1 xorg-server libdrm xproto dri2proto) \
342 -I$(TOP)/src/gallium/include \
343 -I$(TOP)/src/gallium/auxiliary \
345 diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
346 index 26a907f..80af82d 100644
347 --- a/src/gallium/state_trackers/xorg/xorg_crtc.c
348 +++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
349 @@ -234,6 +234,10 @@ crtc_load_cursor_argb_ga3d(xf86CrtcPtr crtc, CARD32 * image)
350 64, 64, (void*)image, 64 * 4, 0, 0);
351 ms->ctx->transfer_unmap(ms->ctx, transfer);
352 ms->ctx->transfer_destroy(ms->ctx, transfer);
354 + if (crtc->cursor_shown)
355 + drmModeSetCursor(ms->fd, crtcp->drm_crtc->crtc_id,
356 + crtcp->cursor_handle, 64, 64);
360 @@ -271,6 +275,10 @@ crtc_load_cursor_argb_kms(xf86CrtcPtr crtc, CARD32 * image)
361 memcpy(ptr, image, 64*64*4);
362 kms_bo_unmap(crtcp->cursor_bo);
364 + if (crtc->cursor_shown)
365 + drmModeSetCursor(ms->fd, crtcp->drm_crtc->crtc_id,
366 + crtcp->cursor_handle, 64, 64);
371 @@ -353,7 +361,7 @@ crtc_destroy(xf86CrtcPtr crtc)
373 drmModeFreeCrtc(crtcp->drm_crtc);
377 crtc->driver_private = NULL;
380 @@ -401,7 +409,7 @@ xorg_crtc_init(ScrnInfoPtr pScrn)
384 - crtcp = xcalloc(1, sizeof(struct crtc_private));
385 + crtcp = calloc(1, sizeof(struct crtc_private));
387 xf86CrtcDestroy(crtc);
389 diff --git a/src/gallium/state_trackers/xorg/xorg_dri2.c b/src/gallium/state_trackers/xorg/xorg_dri2.c
390 index 704aed6..b723a8e 100644
391 --- a/src/gallium/state_trackers/xorg/xorg_dri2.c
392 +++ b/src/gallium/state_trackers/xorg/xorg_dri2.c
393 @@ -201,11 +201,11 @@ dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment, unsigned int form
394 DRI2Buffer2Ptr buffer;
395 BufferPrivatePtr private;
397 - buffer = xcalloc(1, sizeof *buffer);
398 + buffer = calloc(1, sizeof *buffer);
402 - private = xcalloc(1, sizeof *private);
403 + private = calloc(1, sizeof *private);
407 @@ -217,9 +217,9 @@ dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment, unsigned int form
408 if (dri2_do_create_buffer(pDraw, (DRI2BufferPtr)buffer, format))
419 @@ -229,8 +229,8 @@ dri2_destroy_buffer(DrawablePtr pDraw, DRI2Buffer2Ptr buffer)
420 /* So far it is safe to downcast a DRI2Buffer2Ptr to DRI2BufferPtr */
421 dri2_do_destroy_buffer(pDraw, (DRI2BufferPtr)buffer);
423 - xfree(buffer->driverPrivate);
425 + free(buffer->driverPrivate);
429 #endif /* DRI2INFOREC_VERSION >= 2 */
430 @@ -244,11 +244,11 @@ dri2_create_buffers(DrawablePtr pDraw, unsigned int *attachments, int count)
431 DRI2BufferPtr buffers;
434 - buffers = xcalloc(count, sizeof *buffers);
435 + buffers = calloc(count, sizeof *buffers);
439 - privates = xcalloc(count, sizeof *privates);
440 + privates = calloc(count, sizeof *privates);
444 @@ -263,9 +263,9 @@ dri2_create_buffers(DrawablePtr pDraw, unsigned int *attachments, int count)
456 @@ -280,8 +280,8 @@ dri2_destroy_buffers(DrawablePtr pDraw, DRI2BufferPtr buffers, int count)
460 - xfree(buffers[0].driverPrivate);
462 + free(buffers[0].driverPrivate);
467 diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
468 index e10ff2f..1ec772d 100644
469 --- a/src/gallium/state_trackers/xorg/xorg_driver.c
470 +++ b/src/gallium/state_trackers/xorg/xorg_driver.c
472 #include "miscstruct.h"
473 #include "dixstruct.h"
475 +#include "xorgVersion.h"
476 #ifndef XSERVER_LIBPCIACCESS
477 #error "libpciaccess needed"
479 @@ -122,7 +123,7 @@ xorg_tracker_set_functions(ScrnInfoPtr scrn)
481 xorg_tracker_have_modesetting(ScrnInfoPtr pScrn, struct pci_device *device)
483 - char *BusID = xalloc(64);
484 + char *BusID = malloc(64);
485 sprintf(BusID, "pci:%04x:%02x:%02x.%d",
486 device->domain, device->bus,
487 device->dev, device->func);
488 @@ -130,14 +131,14 @@ xorg_tracker_have_modesetting(ScrnInfoPtr pScrn, struct pci_device *device)
489 if (drmCheckModesettingSupported(BusID)) {
490 xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
491 "Drm modesetting not supported %s\n", BusID);
497 xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
498 "Drm modesetting supported on %s\n", BusID);
505 @@ -174,7 +175,7 @@ drv_free_rec(ScrnInfoPtr pScrn)
506 if (!pScrn->driverPrivate)
509 - xfree(pScrn->driverPrivate);
510 + free(pScrn->driverPrivate);
512 pScrn->driverPrivate = NULL;
514 @@ -274,7 +275,7 @@ drv_init_drm(ScrnInfoPtr pScrn)
518 - BusID = xalloc(64);
519 + BusID = malloc(64);
520 sprintf(BusID, "PCI:%d:%d:%d",
521 ((ms->PciInfo->domain << 8) | ms->PciInfo->bus),
522 ms->PciInfo->dev, ms->PciInfo->func
523 @@ -283,7 +284,7 @@ drv_init_drm(ScrnInfoPtr pScrn)
525 ms->fd = drmOpen(driver_descriptor.driver_name, BusID);
532 @@ -369,6 +370,7 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags)
533 ms = modesettingPTR(pScrn);
538 pScrn->displayWidth = 640; /* default it */
540 @@ -402,19 +404,6 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags)
541 if (!drv_init_drm(pScrn))
544 - use3D = cust ? !cust->no_3d : TRUE;
545 - ms->from_3D = xf86GetOptValBool(ms->Options, OPTION_3D_ACCEL,
547 - X_CONFIG : X_PROBED;
551 - if (!drv_init_resource_management(pScrn)) {
552 - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Could not init "
553 - "Gallium3D or libKMS.");
557 pScrn->monitor = pScrn->confScreen->monitor;
558 pScrn->progClock = TRUE;
560 @@ -444,11 +433,24 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags)
562 /* Process the options */
563 xf86CollectOptions(pScrn, NULL);
564 - if (!(ms->Options = xalloc(sizeof(drv_options))))
565 + if (!(ms->Options = malloc(sizeof(drv_options))))
567 memcpy(ms->Options, drv_options, sizeof(drv_options));
568 xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, ms->Options);
570 + use3D = cust ? !cust->no_3d : TRUE;
571 + ms->from_3D = xf86GetOptValBool(ms->Options, OPTION_3D_ACCEL,
573 + X_CONFIG : X_PROBED;
577 + if (!drv_init_resource_management(pScrn)) {
578 + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Could not init "
579 + "Gallium3D or libKMS.");
583 /* Allocate an xf86CrtcConfig */
584 xf86CrtcConfigInit(pScrn, &crtc_config_funcs);
585 xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
586 @@ -791,7 +793,9 @@ drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
588 xf86_cursors_init(pScreen, 64, 64,
589 HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 |
590 - HARDWARE_CURSOR_ARGB);
591 + HARDWARE_CURSOR_ARGB |
592 + ((cust && cust->unhidden_hw_cursor_update) ?
593 + HARDWARE_CURSOR_UPDATE_UNHIDDEN : 0));
595 /* Must force it before EnterVT, so we are in control of VT and
596 * later memory should be bound when allocating, e.g rotate_mem */
597 @@ -862,8 +866,10 @@ drv_leave_vt(int scrnIndex, int flags)
601 - drmModeRmFB(ms->fd, ms->fb_id);
603 + if (ms->fb_id != -1) {
604 + drmModeRmFB(ms->fd, ms->fb_id);
610 @@ -944,7 +950,6 @@ drv_close_screen(int scrnIndex, ScreenPtr pScreen)
614 - drmModeRmFB(ms->fd, ms->fb_id);
615 ms->destroy_front_buffer(pScrn);
618 @@ -1178,6 +1183,8 @@ drv_bind_front_buffer_kms(ScrnInfoPtr pScrn)
622 +#if (XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 9, 99, 1, 0))
624 /* This a hack to work around EnableDisableFBAccess setting the pointer
625 * the real fix would be to replace pScrn->EnableDisableFBAccess hook
626 * and set the rootPixmap->devPrivate.ptr to something valid before that.
627 @@ -1187,6 +1194,8 @@ drv_bind_front_buffer_kms(ScrnInfoPtr pScrn)
629 pScrn->pixmapPrivate.ptr = ptr;
636 diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
637 index 6b2c80f..0e5693d 100644
638 --- a/src/gallium/state_trackers/xorg/xorg_exa.c
639 +++ b/src/gallium/state_trackers/xorg/xorg_exa.c
640 @@ -720,7 +720,7 @@ ExaCreatePixmap(ScreenPtr pScreen, int size, int align)
642 struct exa_pixmap_priv *priv;
644 - priv = xcalloc(1, sizeof(struct exa_pixmap_priv));
645 + priv = calloc(1, sizeof(struct exa_pixmap_priv));
649 @@ -737,7 +737,7 @@ ExaDestroyPixmap(ScreenPtr pScreen, void *dPriv)
651 pipe_resource_reference(&priv->tex, NULL);
658 @@ -975,7 +975,7 @@ xorg_exa_close(ScrnInfoPtr pScrn)
661 exaDriverFini(pScrn->pScreen);
667 @@ -987,7 +987,7 @@ xorg_exa_init(ScrnInfoPtr pScrn, Bool accel)
669 CustomizerPtr cust = ms->cust;
671 - exa = xcalloc(1, sizeof(struct exa_context));
672 + exa = calloc(1, sizeof(struct exa_context));
676 diff --git a/src/gallium/state_trackers/xorg/xorg_output.c b/src/gallium/state_trackers/xorg/xorg_output.c
677 index 61206ed..5555b51 100644
678 --- a/src/gallium/state_trackers/xorg/xorg_output.c
679 +++ b/src/gallium/state_trackers/xorg/xorg_output.c
680 @@ -128,7 +128,7 @@ output_get_modes(xf86OutputPtr output)
681 for (i = 0; i < drm_connector->count_modes; i++) {
682 drm_mode = &drm_connector->modes[i];
684 - mode = xcalloc(1, sizeof(DisplayModeRec));
685 + mode = calloc(1, sizeof(DisplayModeRec));
688 mode->Clock = drm_mode->clock;
689 @@ -195,7 +195,7 @@ output_destroy(xf86OutputPtr output)
691 struct output_private *priv = output->driver_private;
692 drmModeFreeConnector(priv->drm_connector);
695 output->driver_private = NULL;
698 @@ -262,14 +262,14 @@ xorg_output_init(ScrnInfoPtr pScrn)
699 drm_connector->connector_type_id);
702 - priv = xcalloc(sizeof(*priv), 1);
703 + priv = calloc(sizeof(*priv), 1);
708 output = xf86OutputCreate(pScrn, &output_funcs, name);
715 diff --git a/src/gallium/state_trackers/xorg/xorg_tracker.h b/src/gallium/state_trackers/xorg/xorg_tracker.h
716 index be1a9fd..a3fb5e5 100644
717 --- a/src/gallium/state_trackers/xorg/xorg_tracker.h
718 +++ b/src/gallium/state_trackers/xorg/xorg_tracker.h
719 @@ -76,6 +76,7 @@ typedef struct _CustomizerRec
720 Bool dirty_throttling;
721 Bool swap_throttling;
723 + Bool unhidden_hw_cursor_update;
724 Bool (*winsys_pre_init) (struct _CustomizerRec *cust, int fd);
725 Bool (*winsys_screen_init)(struct _CustomizerRec *cust);
726 Bool (*winsys_screen_close)(struct _CustomizerRec *cust);
727 diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c b/src/gallium/state_trackers/xorg/xorg_xv.c
728 index f98bd93..f64959f 100644
729 --- a/src/gallium/state_trackers/xorg/xorg_xv.c
730 +++ b/src/gallium/state_trackers/xorg/xorg_xv.c
731 @@ -536,8 +536,10 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id,
732 dst_surf = xorg_gpu_surface(pPriv->r->pipe->screen, dst);
733 hdtv = ((src_w >= RES_720P_X) && (src_h >= RES_720P_Y));
736 REGION_TRANSLATE(pScrn->pScreen, dstRegion, -pPixmap->screen_x,
740 dxo = dstRegion->extents.x1;
741 dyo = dstRegion->extents.y1;
742 @@ -562,11 +564,16 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id,
743 int box_y2 = pbox->y2;
744 float diff_x = (float)src_w / (float)dst_w;
745 float diff_y = (float)src_h / (float)dst_h;
746 - float offset_x = box_x1 - dstX + pPixmap->screen_x;
747 - float offset_y = box_y1 - dstY + pPixmap->screen_y;
748 + float offset_x = box_x1 - dstX;
749 + float offset_y = box_y1 - dstY;
754 + offset_x += pPixmap->screen_x;
755 + offset_y += pPixmap->screen_y;
761 diff --git a/src/gallium/targets/Makefile.xorg b/src/gallium/targets/Makefile.xorg
762 index 762c905..87eedd7 100644
763 --- a/src/gallium/targets/Makefile.xorg
764 +++ b/src/gallium/targets/Makefile.xorg
765 @@ -29,7 +29,7 @@ INCLUDES = \
766 LIBNAME_STAGING = $(TOP)/$(LIB_DIR)/gallium/$(TARGET)
768 ifeq ($(MESA_LLVM),1)
771 LDFLAGS += $(LLVM_LDFLAGS)
773 DRIVER_PIPES += $(TOP)/src/gallium/drivers/llvmpipe/libllvmpipe.a
774 @@ -42,7 +42,7 @@ endif
775 default: depend $(TOP)/$(LIB_DIR)/gallium $(LIBNAME) $(LIBNAME_STAGING)
777 $(LIBNAME): $(OBJECTS) Makefile ../Makefile.xorg $(LIBS) $(DRIVER_PIPES)
778 - $(MKLIB) -noprefix -o $@ $(LDFLAGS) $(OBJECTS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $(DRIVER_LINKS)
779 + $(MKLIB) -linker $(CC) -noprefix -o $@ $(LDFLAGS) $(OBJECTS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $(DRIVER_LINKS)
781 depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS) $(GENERATED_SOURCES)
783 diff --git a/src/gallium/targets/egl/Makefile b/src/gallium/targets/egl/Makefile
784 index 47c24ce..38e60db 100644
785 --- a/src/gallium/targets/egl/Makefile
786 +++ b/src/gallium/targets/egl/Makefile
787 @@ -24,7 +24,9 @@ common_CPPFLAGS := \
788 -I$(TOP)/src/gallium/auxiliary \
789 -I$(TOP)/src/gallium/drivers \
790 -I$(TOP)/src/gallium/include \
791 - -I$(TOP)/src/gallium/winsys
792 + -I$(TOP)/src/gallium/winsys \
797 $(TOP)/src/gallium/drivers/identity/libidentity.a \
798 @@ -41,11 +43,11 @@ egl_SYS := -lm $(DLOPEN_LIBS) -L$(TOP)/$(LIB_DIR) -lEGL
799 egl_LIBS := $(TOP)/src/gallium/state_trackers/egl/libegl.a
801 ifneq ($(findstring x11, $(EGL_PLATFORMS)),)
802 -egl_SYS += -lX11 -lXext -lXfixes
803 +egl_SYS += -lX11 -lXext -lXfixes $(LIBDRM_LIB)
804 egl_LIBS += $(TOP)/src/gallium/winsys/sw/xlib/libws_xlib.a
806 -ifneq ($(findstring kms, $(EGL_PLATFORMS)),)
808 +ifneq ($(findstring drm, $(EGL_PLATFORMS)),)
809 +egl_SYS += $(LIBDRM_LIB)
811 ifneq ($(findstring fbdev, $(EGL_PLATFORMS)),)
812 egl_LIBS += $(TOP)/src/gallium/winsys/sw/fbdev/libfbdev.a
813 diff --git a/src/gallium/targets/egl/pipe_i965.c b/src/gallium/targets/egl/pipe_i965.c
814 index 43bf646..36b03b3 100644
815 --- a/src/gallium/targets/egl/pipe_i965.c
816 +++ b/src/gallium/targets/egl/pipe_i965.c
819 #include "target-helpers/inline_wrapper_sw_helper.h"
820 #include "target-helpers/inline_debug_helper.h"
821 +#include "target-helpers/inline_wrapper_sw_helper.h"
822 #include "state_tracker/drm_driver.h"
823 #include "i965/drm/i965_drm_public.h"
824 #include "i965/brw_public.h"
825 diff --git a/src/gallium/targets/xorg-vmwgfx/vmw_ctrl.c b/src/gallium/targets/xorg-vmwgfx/vmw_ctrl.c
826 index 237b308..9b422e6 100644
827 --- a/src/gallium/targets/xorg-vmwgfx/vmw_ctrl.c
828 +++ b/src/gallium/targets/xorg-vmwgfx/vmw_ctrl.c
830 * allows X clients to communicate with the driver.
833 +#include <xorg-server.h>
834 #include "dixstruct.h"
835 #include "extnsionst.h"
837 @@ -211,7 +212,7 @@ VMwareCtrlDoSetTopology(ScrnInfoPtr pScrn,
838 struct vmw_customizer *vmw = vmw_customizer(xorg_customizer(pScrn));
841 - rects = xcalloc(number, sizeof(*rects));
842 + rects = calloc(number, sizeof(*rects));
846 @@ -224,7 +225,7 @@ VMwareCtrlDoSetTopology(ScrnInfoPtr pScrn,
848 vmw_ioctl_update_layout(vmw, number, rects);
855 diff --git a/src/gallium/targets/xorg-vmwgfx/vmw_ioctl.c b/src/gallium/targets/xorg-vmwgfx/vmw_ioctl.c
856 index 7c799b5..7625d2f 100644
857 --- a/src/gallium/targets/xorg-vmwgfx/vmw_ioctl.c
858 +++ b/src/gallium/targets/xorg-vmwgfx/vmw_ioctl.c
859 @@ -165,7 +165,7 @@ vmw_ioctl_buffer_create(struct vmw_customizer *vmw, uint32_t size, unsigned *han
860 struct drm_vmw_dmabuf_rep *rep = &arg.rep;
863 - buf = xcalloc(1, sizeof(*buf));
864 + buf = calloc(1, sizeof(*buf));
868 @@ -192,7 +192,7 @@ vmw_ioctl_buffer_create(struct vmw_customizer *vmw, uint32_t size, unsigned *han
877 @@ -211,7 +211,7 @@ vmw_ioctl_buffer_destroy(struct vmw_customizer *vmw, struct vmw_dma_buffer *buf)
878 arg.handle = buf->handle;
879 drmCommandWrite(vmw->fd, DRM_VMW_UNREF_DMABUF, &arg, sizeof(arg));
886 diff --git a/src/gallium/targets/xorg-vmwgfx/vmw_screen.c b/src/gallium/targets/xorg-vmwgfx/vmw_screen.c
887 index 8173908..7662203 100644
888 --- a/src/gallium/targets/xorg-vmwgfx/vmw_screen.c
889 +++ b/src/gallium/targets/xorg-vmwgfx/vmw_screen.c
890 @@ -245,6 +245,7 @@ vmw_screen_pre_init(ScrnInfoPtr pScrn, int flags)
891 cust->winsys_enter_vt = vmw_screen_enter_vt;
892 cust->winsys_leave_vt = vmw_screen_leave_vt;
894 + cust->unhidden_hw_cursor_update = TRUE;
897 pScrn->driverPrivate = cust;
898 diff --git a/src/gallium/targets/xorg-vmwgfx/vmw_video.c b/src/gallium/targets/xorg-vmwgfx/vmw_video.c
899 index eced60d..94465e5 100644
900 --- a/src/gallium/targets/xorg-vmwgfx/vmw_video.c
901 +++ b/src/gallium/targets/xorg-vmwgfx/vmw_video.c
902 @@ -300,7 +300,7 @@ vmw_video_init(struct vmw_customizer *vmw)
904 overlayAdaptors = &newAdaptor;
906 - newAdaptors = xalloc((numAdaptors + 1) *
907 + newAdaptors = malloc((numAdaptors + 1) *
908 sizeof(XF86VideoAdaptorPtr*));
910 xf86XVFreeVideoAdaptorRec(newAdaptor);
911 @@ -320,7 +320,7 @@ vmw_video_init(struct vmw_customizer *vmw)
915 - xfree(newAdaptors);
919 debug_printf("Initialized VMware Xv extension successfully\n");
920 @@ -438,7 +438,7 @@ vmw_video_init_adaptor(ScrnInfoPtr pScrn, struct vmw_customizer *vmw)
924 - video = xcalloc(1, sizeof(*video));
925 + video = calloc(1, sizeof(*video));
927 debug_printf("Not enough memory.\n");
928 xf86XVFreeVideoAdaptorRec(adaptor);
929 @@ -742,7 +742,7 @@ vmw_video_buffer_alloc(struct vmw_customizer *vmw, int size,
933 - out->extra_data = xcalloc(1, size);
934 + out->extra_data = calloc(1, size);
936 debug_printf("\t\t%s: allocated buffer %p of size %i\n", __func__, out, size);
938 @@ -773,7 +773,7 @@ vmw_video_buffer_free(struct vmw_customizer *vmw,
942 - xfree(out->extra_data);
943 + free(out->extra_data);
944 vmw_ioctl_buffer_unmap(vmw, out->buf);
945 vmw_ioctl_buffer_destroy(vmw, out->buf);
947 diff --git a/src/mesa/Makefile b/src/mesa/Makefile
948 index c41c38c..7a6936e 100644
949 --- a/src/mesa/Makefile
950 +++ b/src/mesa/Makefile
951 @@ -34,7 +34,7 @@ ES1_CPPFLAGS := -DFEATURE_ES1=1 $(DEFINES)
952 ES2_CPPFLAGS := -DFEATURE_ES2=1 $(DEFINES)
954 # append include dirs
955 -MESA_CPPFLAGS += $(INCLUDE_DIRS)
956 +MESA_CPPFLAGS += $(INCLUDE_DIRS) $(TALLOC_CFLAGS)
957 ES1_CPPFLAGS += -I$(TOP)/src/mapi/es1api $(INCLUDE_DIRS)
958 ES2_CPPFLAGS += -I$(TOP)/src/mapi/es2api $(INCLUDE_DIRS)
960 diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c
961 index dbf4ad4..160e7e7 100644
962 --- a/src/mesa/drivers/dri/r200/r200_swtcl.c
963 +++ b/src/mesa/drivers/dri/r200/r200_swtcl.c
964 @@ -319,10 +319,9 @@ static INLINE GLuint reduced_hw_prim( GLcontext *ctx, GLuint prim)
968 - return (ctx->Point.PointSprite ||
969 - ((ctx->_TriangleCaps & (DD_POINT_SIZE | DD_POINT_ATTEN)) &&
970 - !(ctx->_TriangleCaps & (DD_POINT_SMOOTH)))) ?
971 - R200_VF_PRIM_POINT_SPRITES : R200_VF_PRIM_POINTS;
972 + return (((R200_CONTEXT(ctx))->radeon.radeonScreen->drmSupportsPointSprites &&
973 + !(ctx->_TriangleCaps & DD_POINT_SMOOTH)) ?
974 + R200_VF_PRIM_POINT_SPRITES : R200_VF_PRIM_POINTS);
978 @@ -613,6 +612,9 @@ static void r200RasterPrimitive( GLcontext *ctx, GLuint hwprim )
979 r200ContextPtr rmesa = R200_CONTEXT(ctx);
981 radeon_prepare_render(&rmesa->radeon);
982 + if (rmesa->radeon.NewGLState)
983 + r200ValidateState( ctx );
986 if (rmesa->radeon.swtcl.hw_primitive != hwprim) {
987 /* need to disable perspective-correct texturing for point sprites */
988 diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c
989 index 4ae0f30..2743997 100644
990 --- a/src/mesa/drivers/dri/r200/r200_tcl.c
991 +++ b/src/mesa/drivers/dri/r200/r200_tcl.c
992 @@ -68,9 +68,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
996 -#define HW_POINTS ((ctx->Point.PointSprite || \
997 - ((ctx->_TriangleCaps & (DD_POINT_SIZE | DD_POINT_ATTEN)) && \
998 - !(ctx->_TriangleCaps & (DD_POINT_SMOOTH)))) ? \
999 +#define HW_POINTS (((R200_CONTEXT(ctx))->radeon.radeonScreen->drmSupportsPointSprites && \
1000 + !(ctx->_TriangleCaps & DD_POINT_SMOOTH)) ? \
1001 R200_VF_PRIM_POINT_SPRITES : R200_VF_PRIM_POINTS)
1002 #define HW_LINES R200_VF_PRIM_LINES
1003 #define HW_LINE_LOOP 0
1004 @@ -265,6 +264,8 @@ void r200TclPrimitive( GLcontext *ctx,
1005 GLuint newprim = hw_prim | R200_VF_TCL_OUTPUT_VTX_ENABLE;
1007 radeon_prepare_render(&rmesa->radeon);
1008 + if (rmesa->radeon.NewGLState)
1009 + r200ValidateState( ctx );
1011 if (newprim != rmesa->tcl.hw_primitive ||
1012 !discrete_prim[hw_prim&0xf]) {
1013 diff --git a/src/mesa/drivers/dri/r300/r300_draw.c b/src/mesa/drivers/dri/r300/r300_draw.c
1014 index 5ae9f49..767778b 100644
1015 --- a/src/mesa/drivers/dri/r300/r300_draw.c
1016 +++ b/src/mesa/drivers/dri/r300/r300_draw.c
1017 @@ -717,6 +717,10 @@ static void r300DrawPrims(GLcontext *ctx,
1021 + struct r300_context *r300 = R300_CONTEXT(ctx);
1022 + radeonContextPtr radeon = &r300->radeon;
1024 + radeon_prepare_render(radeon);
1026 /* This check should get folded into just the places that
1027 * min/max index are really needed.
1028 diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
1029 index cf89ab7..bb8f914 100644
1030 --- a/src/mesa/drivers/dri/r300/r300_render.c
1031 +++ b/src/mesa/drivers/dri/r300/r300_render.c
1032 @@ -327,8 +327,6 @@ void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim)
1033 BATCH_LOCALS(&rmesa->radeon);
1034 int type, num_verts;
1036 - radeon_prepare_render(&rmesa->radeon);
1038 type = r300PrimitiveType(rmesa, prim);
1039 num_verts = r300NumVerts(rmesa, end - start, prim);
1041 diff --git a/src/mesa/drivers/dri/r600/evergreen_render.c b/src/mesa/drivers/dri/r600/evergreen_render.c
1042 index 27089bf..1fa53d7 100644
1043 --- a/src/mesa/drivers/dri/r600/evergreen_render.c
1044 +++ b/src/mesa/drivers/dri/r600/evergreen_render.c
1045 @@ -909,6 +909,10 @@ static void evergreenDrawPrims(GLcontext *ctx,
1047 GLboolean retval = GL_FALSE;
1049 + context_t *context = EVERGREEN_CONTEXT(ctx);
1050 + radeonContextPtr radeon = &context->radeon;
1051 + radeon_prepare_render(radeon);
1053 /* This check should get folded into just the places that
1054 * min/max index are really needed.
1056 diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c
1057 index 85e4988..d4c7864 100644
1058 --- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
1059 +++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
1060 @@ -251,9 +251,9 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
1061 radeon->texture_rect_row_align = 512;
1062 radeon->texture_compressed_row_align = 512;
1064 - radeon->texture_row_align = 256;
1065 - radeon->texture_rect_row_align = 256;
1066 - radeon->texture_compressed_row_align = 256;
1067 + radeon->texture_row_align = radeon->radeonScreen->group_bytes;
1068 + radeon->texture_rect_row_align = radeon->radeonScreen->group_bytes;
1069 + radeon->texture_compressed_row_align = radeon->radeonScreen->group_bytes;
1071 } else if (IS_R200_CLASS(radeon->radeonScreen) ||
1072 IS_R100_CLASS(radeon->radeonScreen)) {
1073 @@ -521,6 +521,7 @@ void radeon_prepare_render(radeonContextPtr radeon)
1074 __DRIcontext *driContext = radeon->dri.context;
1075 __DRIdrawable *drawable;
1076 __DRIscreen *screen;
1077 + struct radeon_framebuffer *draw;
1079 screen = driContext->driScreenPriv;
1080 if (!screen->dri2.loader)
1081 @@ -531,9 +532,10 @@ void radeon_prepare_render(radeonContextPtr radeon)
1082 if (drawable->lastStamp != drawable->dri2.stamp)
1083 radeon_update_renderbuffers(driContext, drawable, GL_FALSE);
1085 - /* Intel driver does the equivalent of this, no clue if it is needed:
1086 - * radeon_draw_buffer(radeon->glCtx, &(drawable->driverPrivate)->base);
1088 + /* Intel driver does the equivalent of this, no clue if it is needed:*/
1089 + draw = drawable->driverPrivate;
1090 + radeon_draw_buffer(radeon->glCtx, &draw->base);
1092 driContext->dri2.draw_stamp = drawable->dri2.stamp;
1095 @@ -738,10 +740,9 @@ radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable,
1100 fprintf(stderr, "failed to attach %s %d\n",
1101 regname, buffers[i].name);
1106 ret = radeon_bo_get_tiling(bo, &tiling_flags, &pitch);
1107 diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
1108 index 2ea77e5..0ca052d 100644
1109 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c
1110 +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
1111 @@ -1138,6 +1138,8 @@ radeonCreateScreen( __DRIscreen *sPriv )
1113 screen->chip_flags |= RADEON_CLASS_R600;
1115 + /* set group bytes for r6xx+ */
1116 + screen->group_bytes = 256;
1117 screen->cpp = dri_priv->bpp / 8;
1118 screen->AGPMode = dri_priv->AGPMode;
1120 @@ -1382,7 +1384,8 @@ radeonCreateScreen2(__DRIscreen *sPriv)
1122 screen->chip_flags |= RADEON_CLASS_R600;
1124 - /* r6xx+ tiling */
1125 + /* r6xx+ tiling, default to 256 group bytes */
1126 + screen->group_bytes = 256;
1127 if (IS_R600_CLASS(screen) && (sPriv->drm_version.minor >= 6)) {
1128 ret = radeonGetParam(sPriv, RADEON_INFO_TILE_CONFIG, &temp);
1130 diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
1131 index 29defe7..0a81843 100644
1132 --- a/src/mesa/drivers/dri/radeon/radeon_swtcl.c
1133 +++ b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
1134 @@ -412,6 +412,8 @@ static GLboolean radeon_run_render( GLcontext *ctx,
1137 radeon_prepare_render(&rmesa->radeon);
1138 + if (rmesa->radeon.NewGLState)
1139 + radeonValidateState( ctx );
1141 tnl->Driver.Render.Start( ctx );
1143 diff --git a/src/mesa/drivers/dri/radeon/radeon_tcl.c b/src/mesa/drivers/dri/radeon/radeon_tcl.c
1144 index 5e1718f..ded3ebe 100644
1145 --- a/src/mesa/drivers/dri/radeon/radeon_tcl.c
1146 +++ b/src/mesa/drivers/dri/radeon/radeon_tcl.c
1147 @@ -253,6 +253,8 @@ void radeonTclPrimitive( GLcontext *ctx,
1148 GLuint newprim = hw_prim | RADEON_CP_VC_CNTL_TCL_ENABLE;
1150 radeon_prepare_render(&rmesa->radeon);
1151 + if (rmesa->radeon.NewGLState)
1152 + radeonValidateState( ctx );
1154 if (newprim != rmesa->tcl.hw_primitive ||
1155 !discrete_prim[hw_prim&0xf]) {
1156 diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
1157 index 3d1a4c4..d07892f 100644
1158 --- a/src/mesa/main/mipmap.c
1159 +++ b/src/mesa/main/mipmap.c
1160 @@ -606,7 +606,7 @@ do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth,
1164 - if ((datatype == GL_BYTE) && (comps == 4)) {
1165 + else if ((datatype == GL_BYTE) && (comps == 4)) {
1166 DECLARE_ROW_POINTERS(GLbyte, 4);
1168 for (i = j = 0, k = k0; i < (GLuint) dstWidth;
1169 diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
1170 index 66e32b4..cd418a0 100644
1171 --- a/src/mesa/state_tracker/st_manager.c
1172 +++ b/src/mesa/state_tracker/st_manager.c
1173 @@ -486,9 +486,18 @@ st_context_notify_invalid_framebuffer(struct st_context_iface *stctxi,
1174 stfb = st_ws_framebuffer(st->ctx->WinSysDrawBuffer);
1175 if (!stfb || stfb->iface != stfbi)
1176 stfb = st_ws_framebuffer(st->ctx->WinSysReadBuffer);
1177 - assert(stfb && stfb->iface == stfbi);
1179 - p_atomic_set(&stfb->revalidate, TRUE);
1180 + if (stfb && stfb->iface == stfbi) {
1181 + p_atomic_set(&stfb->revalidate, TRUE);
1184 + /* This function is probably getting called when we've detected a
1185 + * change in a window's size but the currently bound context is
1186 + * not bound to that window.
1187 + * If the st_framebuffer_iface structure had a pointer to the
1188 + * corresponding st_framebuffer we'd be able to handle this.
1194 diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
1195 index 3fc554c..198f0e2 100644
1196 --- a/src/mesa/swrast/s_texfilter.c
1197 +++ b/src/mesa/swrast/s_texfilter.c
1198 @@ -2972,11 +2972,16 @@ choose_depth_texture_level(const struct gl_texture_object *tObj, GLfloat lambda)
1202 - lambda = CLAMP(lambda, tObj->MinLod, tObj->MaxLod);
1204 - level = (GLint) lambda;
1206 - level = CLAMP(level, tObj->BaseLevel, tObj->_MaxLevel);
1207 + if (tObj->MinFilter == GL_NEAREST || tObj->MinFilter == GL_LINEAR) {
1208 + /* no mipmapping - use base level */
1209 + level = tObj->BaseLevel;
1212 + /* choose mipmap level */
1213 + lambda = CLAMP(lambda, tObj->MinLod, tObj->MaxLod);
1214 + level = (GLint) lambda;
1215 + level = CLAMP(level, tObj->BaseLevel, tObj->_MaxLevel);