]> git.pld-linux.org Git - packages/Mesa.git/blame - Mesa-git.patch
- rel 4; update fixes from 7.9 branch
[packages/Mesa.git] / Mesa-git.patch
CommitLineData
9caf779f
AM
1diff --git a/docs/devinfo.html b/docs/devinfo.html
2index 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.
6 </p>
7
8 <p>
9-Update the docs/news.html file and docs/download.html files.
10+Update docs/news.html.
11 </p>
12
13 <p>
14@@ -208,10 +208,11 @@ sftp USERNAME,mesa3d@web.sourceforge.net
15
16 <p>
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>
20+
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>
23 and
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>
26 </p>
27
28
29diff --git a/docs/news.html b/docs/news.html
30index b3fb8b5..72d38ee 100644
31--- a/docs/news.html
32+++ b/docs/news.html
33@@ -11,10 +11,18 @@
34 <H1>News</H1>
35
36
37+<h2>October 4, 2010</h2>
38+
39+<p>
40+<a href="relnotes-7.9.html">Mesa 7.9</a> (final) is released. This is a new
41+development release.
42+</p>
43+
44+
45 <h2>September 27, 2010</h2>
46
47 <p>
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.
51 </p>
52
53diff --git a/docs/relnotes-7.8.2.html b/docs/relnotes-7.8.2.html
54index 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.
58
59 <h2>MD5 checksums</h2>
60 <pre>
61-tbd
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
71 </pre>
72
73
74@@ -44,10 +52,95 @@ tbd
75 <ul>
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
81+ #23670</a>.</li>
82+
83+<li>Assorted i965 driver fixes.
84+ Including but not limited to:
85+ <ul>
86+ <li>Fix scissoring when width or height is
87+ 0. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27643">Bug
88+ #27643</a>.
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
93+ #24470</a>.</li>
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
99+ #24119</a>.</li>
100+ <li>Reject shaders with uninlined function calls instead of hanging.</li>
101+ </ul>
102+</li>
103+
104+<li>Assorted i915 driver fixes. Including but not limited to:
105+ <ul>
106+ <li>Fixed texture LOD clamping in i915 driver.
107+ <a href="https://bugs.freedesktop.org/show_bug.cgi?id=24846">Bug
108+ #24846</a>.</li>
109+ <li>Fix off-by-one for drawing rectangle.
110+ <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27408">Bug
111+ #27408</a>.</li>
112+ </ul>
113+</li>
114+
115+<li>Fixed hangs in etracer on 830 and 845
116+ chipsets. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=26557">Bug
117+ #26557</a>.</li>
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
121+ #27652</a>.</li>
122+
123+<li>Assorted GLX fixes. Including but not limited to:
124+ <ul>
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
134+ #14245</a>.</li>
135+ </ul>
136+</li>
137+
138+<li>Assorted GLSL fixes. Including but not limited to:
139+ <ul>
140+ <li>Change variable declared assertion into conditional in GLSL
141+ compiler. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27921">Bug
142+ #27921</a>.</li>
143+ <li>Fix instruction indexing
144+ bugs. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=27566">Bug
145+ #27566</a>.</li>
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
149+ message.</li>
150+ </ul>
151+</li>
152+
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
156+ #28305</a>.
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
160+ fetch.</li>
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>
165 </ul>
166
167
168-<h2>Changes</h2>
169-<p>None.</p>
170 </body>
171 </html>
172diff --git a/docs/relnotes-7.8.3.html b/docs/relnotes-7.8.3.html
173new file mode 100644
174index 0000000..1e9f433
175--- /dev/null
176+++ b/docs/relnotes-7.8.3.html
177@@ -0,0 +1,89 @@
178+<HTML>
179+
180+<TITLE>Mesa Release Notes</TITLE>
181+
182+<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
183+
184+<BODY>
185+
186+<body bgcolor="#eeeeee">
187+
188+<H1>Mesa 7.8.3 Release Notes / (date tbd)</H1>
189+
190+<p>
191+Mesa 7.8.3 is a bug fix release which fixes bugs found since the 7.8.2 release.
192+</p>
193+<p>
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.
197+</p>
198+<p>
199+See the <a href="install.html">Compiling/Installing page</a> for prerequisites
200+for DRI hardware acceleration.
201+</p>
202+
203+
204+<h2>MD5 checksums</h2>
205+<pre>
206+x MesaLib-7.8.3.tar.gz
207+x MesaLib-7.8.3.tar.bz2
208+x MesaLib-7.8.3.zip
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
215+</pre>
216+
217+
218+<h2>New features</h2>
219+<p>None.</p>
220+
221+
222+<h2>Changes</h2>
223+<ul>
224+<li>The radeon driver should use less memory when searching for a valid mip
225+image.</li>
226+</ul>
227+
228+
229+<h2>Bug fixes</h2>
230+<ul>
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
253+ corrected.</li>
254+<li>radeon/wine: flush command stream in more cases, fixing wine d3d9
255+ tests.</li>
256+<li>r600: fix sin+cos normalization.</li>
257+<li>r600: (properly) ignore <TT>GL_COORD_REPLACE</TT> when point sprites are
258+ disabled.</li>
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>
262+</ul>
263+
264+
265+</body>
266+</html>
267diff --git a/docs/relnotes-7.9.html b/docs/relnotes-7.9.html
268index 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.
272
273 <h2>MD5 checksums</h2>
274 <pre>
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
287 </pre>
288
289
290diff --git a/docs/relnotes.html b/docs/relnotes.html
291index 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.
295
296 <UL>
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>
302diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_api.c b/src/gallium/state_trackers/egl/common/egl_g3d_api.c
303index 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)
307
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);
312+ if (fence) {
313+ screen->fence_finish(screen, fence, 0);
314+ screen->fence_reference(screen, &fence, NULL);
315+ }
316
317 return EGL_TRUE;
318 }
319diff --git a/src/gallium/state_trackers/vega/vg_manager.c b/src/gallium/state_trackers/vega/vg_manager.c
320index 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,
324 return NULL;
325
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))
329 return NULL;
330
331 pipe = smapi->screen->context_create(smapi->screen, NULL);
7959a51a
AM
332diff --git a/src/gallium/state_trackers/xorg/Makefile b/src/gallium/state_trackers/xorg/Makefile
333index 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 \
344 -I$(TOP)/include \
9caf779f 345diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
7959a51a 346index 26a907f..80af82d 100644
9caf779f
AM
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);
353+
354+ if (crtc->cursor_shown)
355+ drmModeSetCursor(ms->fd, crtcp->drm_crtc->crtc_id,
356+ crtcp->cursor_handle, 64, 64);
357 }
358
359 #if HAVE_LIBKMS
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);
363
364+ if (crtc->cursor_shown)
365+ drmModeSetCursor(ms->fd, crtcp->drm_crtc->crtc_id,
366+ crtcp->cursor_handle, 64, 64);
367+
368 return;
369
370 err_bo_destroy:
7959a51a
AM
371@@ -353,7 +361,7 @@ crtc_destroy(xf86CrtcPtr crtc)
372
373 drmModeFreeCrtc(crtcp->drm_crtc);
374
375- xfree(crtcp);
376+ free(crtcp);
377 crtc->driver_private = NULL;
378 }
379
380@@ -401,7 +409,7 @@ xorg_crtc_init(ScrnInfoPtr pScrn)
381 if (crtc == NULL)
382 goto out;
383
384- crtcp = xcalloc(1, sizeof(struct crtc_private));
385+ crtcp = calloc(1, sizeof(struct crtc_private));
386 if (!crtcp) {
387 xf86CrtcDestroy(crtc);
388 goto out;
389diff --git a/src/gallium/state_trackers/xorg/xorg_dri2.c b/src/gallium/state_trackers/xorg/xorg_dri2.c
390index 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;
396
397- buffer = xcalloc(1, sizeof *buffer);
398+ buffer = calloc(1, sizeof *buffer);
399 if (!buffer)
400 return NULL;
401
402- private = xcalloc(1, sizeof *private);
403+ private = calloc(1, sizeof *private);
404 if (!private) {
405 goto fail;
406 }
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))
409 return buffer;
410
411- xfree(private);
412+ free(private);
413 fail:
414- xfree(buffer);
415+ free(buffer);
416 return NULL;
417 }
418
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);
422
423- xfree(buffer->driverPrivate);
424- xfree(buffer);
425+ free(buffer->driverPrivate);
426+ free(buffer);
427 }
428
429 #endif /* DRI2INFOREC_VERSION >= 2 */
430@@ -244,11 +244,11 @@ dri2_create_buffers(DrawablePtr pDraw, unsigned int *attachments, int count)
431 DRI2BufferPtr buffers;
432 int i;
433
434- buffers = xcalloc(count, sizeof *buffers);
435+ buffers = calloc(count, sizeof *buffers);
436 if (!buffers)
437 goto fail_buffers;
438
439- privates = xcalloc(count, sizeof *privates);
440+ privates = calloc(count, sizeof *privates);
441 if (!privates)
442 goto fail_privates;
443
444@@ -263,9 +263,9 @@ dri2_create_buffers(DrawablePtr pDraw, unsigned int *attachments, int count)
445 return buffers;
446
447 fail:
448- xfree(privates);
449+ free(privates);
450 fail_privates:
451- xfree(buffers);
452+ free(buffers);
453 fail_buffers:
454 return NULL;
455 }
456@@ -280,8 +280,8 @@ dri2_destroy_buffers(DrawablePtr pDraw, DRI2BufferPtr buffers, int count)
457 }
458
459 if (buffers) {
460- xfree(buffers[0].driverPrivate);
461- xfree(buffers);
462+ free(buffers[0].driverPrivate);
463+ free(buffers);
464 }
465 }
466
9caf779f 467diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
7959a51a 468index e10ff2f..1ec772d 100644
9caf779f
AM
469--- a/src/gallium/state_trackers/xorg/xorg_driver.c
470+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
7959a51a
AM
471@@ -45,6 +45,7 @@
472 #include "miscstruct.h"
473 #include "dixstruct.h"
474 #include "xf86xv.h"
475+#include "xorgVersion.h"
476 #ifndef XSERVER_LIBPCIACCESS
477 #error "libpciaccess needed"
478 #endif
479@@ -122,7 +123,7 @@ xorg_tracker_set_functions(ScrnInfoPtr scrn)
480 Bool
481 xorg_tracker_have_modesetting(ScrnInfoPtr pScrn, struct pci_device *device)
482 {
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);
492- xfree(BusID);
493+ free(BusID);
494 return FALSE;
495 }
496
497 xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
498 "Drm modesetting supported on %s\n", BusID);
499
500- xfree(BusID);
501+ free(BusID);
502 return TRUE;
503 }
504
505@@ -174,7 +175,7 @@ drv_free_rec(ScrnInfoPtr pScrn)
506 if (!pScrn->driverPrivate)
507 return;
508
509- xfree(pScrn->driverPrivate);
510+ free(pScrn->driverPrivate);
511
512 pScrn->driverPrivate = NULL;
513 }
514@@ -274,7 +275,7 @@ drv_init_drm(ScrnInfoPtr pScrn)
515 if (ms->fd < 0) {
516 char *BusID;
517
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)
524
525 ms->fd = drmOpen(driver_descriptor.driver_name, BusID);
526 ms->isMaster = TRUE;
527- xfree(BusID);
528+ free(BusID);
529
530 if (ms->fd >= 0)
531 return TRUE;
532@@ -369,6 +370,7 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags)
9caf779f
AM
533 ms = modesettingPTR(pScrn);
534 ms->pEnt = pEnt;
535 ms->cust = cust;
536+ ms->fb_id = -1;
537
538 pScrn->displayWidth = 640; /* default it */
539
7959a51a 540@@ -402,19 +404,6 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags)
9caf779f
AM
541 if (!drv_init_drm(pScrn))
542 return FALSE;
543
544- use3D = cust ? !cust->no_3d : TRUE;
545- ms->from_3D = xf86GetOptValBool(ms->Options, OPTION_3D_ACCEL,
546- &use3D) ?
547- X_CONFIG : X_PROBED;
548-
549- ms->no3D = !use3D;
550-
551- if (!drv_init_resource_management(pScrn)) {
552- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Could not init "
553- "Gallium3D or libKMS.");
554- return FALSE;
555- }
556-
557 pScrn->monitor = pScrn->confScreen->monitor;
558 pScrn->progClock = TRUE;
559 pScrn->rgbBits = 8;
7959a51a
AM
560@@ -444,11 +433,24 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags)
561
562 /* Process the options */
563 xf86CollectOptions(pScrn, NULL);
564- if (!(ms->Options = xalloc(sizeof(drv_options))))
565+ if (!(ms->Options = malloc(sizeof(drv_options))))
566 return FALSE;
9caf779f
AM
567 memcpy(ms->Options, drv_options, sizeof(drv_options));
568 xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, ms->Options);
569
570+ use3D = cust ? !cust->no_3d : TRUE;
571+ ms->from_3D = xf86GetOptValBool(ms->Options, OPTION_3D_ACCEL,
572+ &use3D) ?
573+ X_CONFIG : X_PROBED;
574+
575+ ms->no3D = !use3D;
576+
577+ if (!drv_init_resource_management(pScrn)) {
578+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Could not init "
579+ "Gallium3D or libKMS.");
580+ return FALSE;
581+ }
582+
583 /* Allocate an xf86CrtcConfig */
584 xf86CrtcConfigInit(pScrn, &crtc_config_funcs);
585 xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
7959a51a 586@@ -791,7 +793,9 @@ drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
9caf779f
AM
587 if (!ms->SWCursor)
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));
594
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 */
7959a51a 597@@ -862,8 +866,10 @@ drv_leave_vt(int scrnIndex, int flags)
9caf779f
AM
598 }
599 }
600
601- drmModeRmFB(ms->fd, ms->fb_id);
602- ms->fb_id = -1;
603+ if (ms->fb_id != -1) {
604+ drmModeRmFB(ms->fd, ms->fb_id);
605+ ms->fb_id = -1;
606+ }
607
608 /* idle hardware */
609 if (!ms->kms)
7959a51a 610@@ -944,7 +950,6 @@ drv_close_screen(int scrnIndex, ScreenPtr pScreen)
9caf779f
AM
611 }
612 #endif
613
614- drmModeRmFB(ms->fd, ms->fb_id);
615 ms->destroy_front_buffer(pScrn);
616
617 if (ms->exa)
7959a51a
AM
618@@ -1178,6 +1183,8 @@ drv_bind_front_buffer_kms(ScrnInfoPtr pScrn)
619 stride,
620 ptr);
621
622+#if (XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 9, 99, 1, 0))
623+
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)
628 */
629 pScrn->pixmapPrivate.ptr = ptr;
630
631+#endif
632+
633 return TRUE;
634
635 err_destroy:
636diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
637index 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)
641 {
642 struct exa_pixmap_priv *priv;
643
644- priv = xcalloc(1, sizeof(struct exa_pixmap_priv));
645+ priv = calloc(1, sizeof(struct exa_pixmap_priv));
646 if (!priv)
647 return NULL;
648
649@@ -737,7 +737,7 @@ ExaDestroyPixmap(ScreenPtr pScreen, void *dPriv)
650
651 pipe_resource_reference(&priv->tex, NULL);
652
653- xfree(priv);
654+ free(priv);
655 }
656
657 static Bool
658@@ -975,7 +975,7 @@ xorg_exa_close(ScrnInfoPtr pScrn)
659 ms->ctx = NULL;
660
661 exaDriverFini(pScrn->pScreen);
662- xfree(exa);
663+ free(exa);
664 ms->exa = NULL;
665 }
666
667@@ -987,7 +987,7 @@ xorg_exa_init(ScrnInfoPtr pScrn, Bool accel)
668 ExaDriverPtr pExa;
669 CustomizerPtr cust = ms->cust;
670
671- exa = xcalloc(1, sizeof(struct exa_context));
672+ exa = calloc(1, sizeof(struct exa_context));
673 if (!exa)
674 return NULL;
675
676diff --git a/src/gallium/state_trackers/xorg/xorg_output.c b/src/gallium/state_trackers/xorg/xorg_output.c
677index 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];
683 if (drm_mode) {
684- mode = xcalloc(1, sizeof(DisplayModeRec));
685+ mode = calloc(1, sizeof(DisplayModeRec));
686 if (!mode)
687 continue;
688 mode->Clock = drm_mode->clock;
689@@ -195,7 +195,7 @@ output_destroy(xf86OutputPtr output)
690 {
691 struct output_private *priv = output->driver_private;
692 drmModeFreeConnector(priv->drm_connector);
693- xfree(priv);
694+ free(priv);
695 output->driver_private = NULL;
696 }
697
698@@ -262,14 +262,14 @@ xorg_output_init(ScrnInfoPtr pScrn)
699 drm_connector->connector_type_id);
700
701
702- priv = xcalloc(sizeof(*priv), 1);
703+ priv = calloc(sizeof(*priv), 1);
704 if (!priv) {
705 continue;
706 }
707
708 output = xf86OutputCreate(pScrn, &output_funcs, name);
709 if (!output) {
710- xfree(priv);
711+ free(priv);
712 continue;
713 }
714
9caf779f
AM
715diff --git a/src/gallium/state_trackers/xorg/xorg_tracker.h b/src/gallium/state_trackers/xorg/xorg_tracker.h
716index 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;
722 Bool no_3d;
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);
7959a51a
AM
727diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c b/src/gallium/state_trackers/xorg/xorg_xv.c
728index 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));
734
735+#ifdef COMPOSITE
736 REGION_TRANSLATE(pScrn->pScreen, dstRegion, -pPixmap->screen_x,
737 -pPixmap->screen_y);
738+#endif
739
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;
750 float offset_w;
751 float offset_h;
752
753+#ifdef COMPOSITE
754+ offset_x += pPixmap->screen_x;
755+ offset_y += pPixmap->screen_y;
756+#endif
757+
758 x = box_x1;
759 y = box_y1;
760 w = box_x2 - box_x1;
761diff --git a/src/gallium/targets/Makefile.xorg b/src/gallium/targets/Makefile.xorg
762index 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)
767
768 ifeq ($(MESA_LLVM),1)
769-LD = g++
770+LD = $(CXX)
771 LDFLAGS += $(LLVM_LDFLAGS)
772 USE_CXX=1
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)
776
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)
780
781 depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS) $(GENERATED_SOURCES)
782 rm -f depend
9caf779f
AM
783diff --git a/src/gallium/targets/egl/Makefile b/src/gallium/targets/egl/Makefile
784index 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 \
793+ $(LIBDRM_CFLAGS)
794+
795 common_SYS :=
796 common_LIBS := \
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
800
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
805 endif
806-ifneq ($(findstring kms, $(EGL_PLATFORMS)),)
807-egl_SYS += -ldrm
808+ifneq ($(findstring drm, $(EGL_PLATFORMS)),)
809+egl_SYS += $(LIBDRM_LIB)
810 endif
811 ifneq ($(findstring fbdev, $(EGL_PLATFORMS)),)
812 egl_LIBS += $(TOP)/src/gallium/winsys/sw/fbdev/libfbdev.a
7959a51a
AM
813diff --git a/src/gallium/targets/egl/pipe_i965.c b/src/gallium/targets/egl/pipe_i965.c
814index 43bf646..36b03b3 100644
815--- a/src/gallium/targets/egl/pipe_i965.c
816+++ b/src/gallium/targets/egl/pipe_i965.c
817@@ -1,6 +1,7 @@
818
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"
9caf779f 825diff --git a/src/gallium/targets/xorg-vmwgfx/vmw_ctrl.c b/src/gallium/targets/xorg-vmwgfx/vmw_ctrl.c
7959a51a 826index 237b308..9b422e6 100644
9caf779f
AM
827--- a/src/gallium/targets/xorg-vmwgfx/vmw_ctrl.c
828+++ b/src/gallium/targets/xorg-vmwgfx/vmw_ctrl.c
829@@ -32,6 +32,7 @@
830 * allows X clients to communicate with the driver.
831 */
832
833+#include <xorg-server.h>
834 #include "dixstruct.h"
835 #include "extnsionst.h"
836 #include <X11/X.h>
7959a51a
AM
837@@ -211,7 +212,7 @@ VMwareCtrlDoSetTopology(ScrnInfoPtr pScrn,
838 struct vmw_customizer *vmw = vmw_customizer(xorg_customizer(pScrn));
839 int i;
840
841- rects = xcalloc(number, sizeof(*rects));
842+ rects = calloc(number, sizeof(*rects));
843 if (!rects)
844 return FALSE;
845
846@@ -224,7 +225,7 @@ VMwareCtrlDoSetTopology(ScrnInfoPtr pScrn,
847
848 vmw_ioctl_update_layout(vmw, number, rects);
849
850- xfree(rects);
851+ free(rects);
852 return TRUE;
853 }
854
855diff --git a/src/gallium/targets/xorg-vmwgfx/vmw_ioctl.c b/src/gallium/targets/xorg-vmwgfx/vmw_ioctl.c
856index 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;
861 int ret;
862
863- buf = xcalloc(1, sizeof(*buf));
864+ buf = calloc(1, sizeof(*buf));
865 if (!buf)
866 goto err;
867
868@@ -192,7 +192,7 @@ vmw_ioctl_buffer_create(struct vmw_customizer *vmw, uint32_t size, unsigned *han
869 return buf;
870
871 err_free:
872- xfree(buf);
873+ free(buf);
874 err:
875 return NULL;
876 }
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));
880
881- xfree(buf);
882+ free(buf);
883 }
884
885 void *
9caf779f
AM
886diff --git a/src/gallium/targets/xorg-vmwgfx/vmw_screen.c b/src/gallium/targets/xorg-vmwgfx/vmw_screen.c
887index 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;
893 cust->no_3d = TRUE;
894+ cust->unhidden_hw_cursor_update = TRUE;
895 vmw->pScrn = pScrn;
896
897 pScrn->driverPrivate = cust;
7959a51a
AM
898diff --git a/src/gallium/targets/xorg-vmwgfx/vmw_video.c b/src/gallium/targets/xorg-vmwgfx/vmw_video.c
899index 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)
903 numAdaptors = 1;
904 overlayAdaptors = &newAdaptor;
905 } else {
906- newAdaptors = xalloc((numAdaptors + 1) *
907+ newAdaptors = malloc((numAdaptors + 1) *
908 sizeof(XF86VideoAdaptorPtr*));
909 if (!newAdaptors) {
910 xf86XVFreeVideoAdaptorRec(newAdaptor);
911@@ -320,7 +320,7 @@ vmw_video_init(struct vmw_customizer *vmw)
912 }
913
914 if (newAdaptors) {
915- xfree(newAdaptors);
916+ free(newAdaptors);
917 }
918
919 debug_printf("Initialized VMware Xv extension successfully\n");
920@@ -438,7 +438,7 @@ vmw_video_init_adaptor(ScrnInfoPtr pScrn, struct vmw_customizer *vmw)
921 return NULL;
922 }
923
924- video = xcalloc(1, sizeof(*video));
925+ video = calloc(1, sizeof(*video));
926 if (!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,
930 }
931
932 out->size = size;
933- out->extra_data = xcalloc(1, size);
934+ out->extra_data = calloc(1, size);
935
936 debug_printf("\t\t%s: allocated buffer %p of size %i\n", __func__, out, size);
937
938@@ -773,7 +773,7 @@ vmw_video_buffer_free(struct vmw_customizer *vmw,
939 if (out->size == 0)
940 return Success;
941
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);
946
947diff --git a/src/mesa/Makefile b/src/mesa/Makefile
948index 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)
953
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)
959
9caf779f 960diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c
7959a51a 961index dbf4ad4..160e7e7 100644
9caf779f
AM
962--- a/src/mesa/drivers/dri/r200/r200_swtcl.c
963+++ b/src/mesa/drivers/dri/r200/r200_swtcl.c
7959a51a
AM
964@@ -319,10 +319,9 @@ static INLINE GLuint reduced_hw_prim( GLcontext *ctx, GLuint prim)
965 {
966 switch (prim) {
967 case GL_POINTS:
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);
975 case GL_LINES:
976 /* fallthrough */
977 case GL_LINE_LOOP:
978@@ -613,6 +612,9 @@ static void r200RasterPrimitive( GLcontext *ctx, GLuint hwprim )
9caf779f
AM
979 r200ContextPtr rmesa = R200_CONTEXT(ctx);
980
981 radeon_prepare_render(&rmesa->radeon);
982+ if (rmesa->radeon.NewGLState)
983+ r200ValidateState( ctx );
984+
985
986 if (rmesa->radeon.swtcl.hw_primitive != hwprim) {
987 /* need to disable perspective-correct texturing for point sprites */
988diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c
7959a51a 989index 4ae0f30..2743997 100644
9caf779f
AM
990--- a/src/mesa/drivers/dri/r200/r200_tcl.c
991+++ b/src/mesa/drivers/dri/r200/r200_tcl.c
7959a51a
AM
992@@ -68,9 +68,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
993 #define HAVE_ELTS 1
994
995
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,
9caf779f
AM
1005 GLuint newprim = hw_prim | R200_VF_TCL_OUTPUT_VTX_ENABLE;
1006
1007 radeon_prepare_render(&rmesa->radeon);
1008+ if (rmesa->radeon.NewGLState)
1009+ r200ValidateState( ctx );
1010
1011 if (newprim != rmesa->tcl.hw_primitive ||
1012 !discrete_prim[hw_prim&0xf]) {
7959a51a
AM
1013diff --git a/src/mesa/drivers/dri/r300/r300_draw.c b/src/mesa/drivers/dri/r300/r300_draw.c
1014index 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,
1018 GLuint max_index)
1019 {
1020 GLboolean retval;
1021+ struct r300_context *r300 = R300_CONTEXT(ctx);
1022+ radeonContextPtr radeon = &r300->radeon;
1023+
1024+ radeon_prepare_render(radeon);
1025
1026 /* This check should get folded into just the places that
1027 * min/max index are really needed.
1028diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
1029index 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;
1035
1036- radeon_prepare_render(&rmesa->radeon);
1037-
1038 type = r300PrimitiveType(rmesa, prim);
1039 num_verts = r300NumVerts(rmesa, end - start, prim);
1040
1041diff --git a/src/mesa/drivers/dri/r600/evergreen_render.c b/src/mesa/drivers/dri/r600/evergreen_render.c
1042index 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,
1046 {
1047 GLboolean retval = GL_FALSE;
1048
1049+ context_t *context = EVERGREEN_CONTEXT(ctx);
1050+ radeonContextPtr radeon = &context->radeon;
1051+ radeon_prepare_render(radeon);
1052+
1053 /* This check should get folded into just the places that
1054 * min/max index are really needed.
1055 */
9caf779f 1056diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c
7959a51a 1057index 85e4988..d4c7864 100644
9caf779f
AM
1058--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
1059+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
7959a51a
AM
1060@@ -251,9 +251,9 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
1061 radeon->texture_rect_row_align = 512;
1062 radeon->texture_compressed_row_align = 512;
1063 } else {
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;
1070 }
1071 } else if (IS_R200_CLASS(radeon->radeonScreen) ||
1072 IS_R100_CLASS(radeon->radeonScreen)) {
9caf779f
AM
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;
1078
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);
1084
1085- /* Intel driver does the equivalent of this, no clue if it is needed:
1086- * radeon_draw_buffer(radeon->glCtx, &(drawable->driverPrivate)->base);
1087- */
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);
1091+
1092 driContext->dri2.draw_stamp = drawable->dri2.stamp;
1093 }
1094
7959a51a
AM
1095@@ -738,10 +740,9 @@ radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable,
1096 buffers[i].flags);
1097
1098 if (bo == NULL) {
1099-
1100 fprintf(stderr, "failed to attach %s %d\n",
1101 regname, buffers[i].name);
1102-
1103+ continue;
1104 }
1105
1106 ret = radeon_bo_get_tiling(bo, &tiling_flags, &pitch);
1107diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
1108index 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 )
1112 else
1113 screen->chip_flags |= RADEON_CLASS_R600;
1114
1115+ /* set group bytes for r6xx+ */
1116+ screen->group_bytes = 256;
1117 screen->cpp = dri_priv->bpp / 8;
1118 screen->AGPMode = dri_priv->AGPMode;
1119
1120@@ -1382,7 +1384,8 @@ radeonCreateScreen2(__DRIscreen *sPriv)
1121 else
1122 screen->chip_flags |= RADEON_CLASS_R600;
1123
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);
1129 if (ret)
1130diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
1131index 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,
1135 return GL_TRUE;
1136
1137 radeon_prepare_render(&rmesa->radeon);
1138+ if (rmesa->radeon.NewGLState)
1139+ radeonValidateState( ctx );
1140
1141 tnl->Driver.Render.Start( ctx );
1142
1143diff --git a/src/mesa/drivers/dri/radeon/radeon_tcl.c b/src/mesa/drivers/dri/radeon/radeon_tcl.c
1144index 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;
1149
1150 radeon_prepare_render(&rmesa->radeon);
1151+ if (rmesa->radeon.NewGLState)
1152+ radeonValidateState( ctx );
1153
1154 if (newprim != rmesa->tcl.hw_primitive ||
1155 !discrete_prim[hw_prim&0xf]) {
1156diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
1157index 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,
1161 FILTER_3D(0);
1162 }
1163 }
1164- if ((datatype == GL_BYTE) && (comps == 4)) {
1165+ else if ((datatype == GL_BYTE) && (comps == 4)) {
1166 DECLARE_ROW_POINTERS(GLbyte, 4);
1167
1168 for (i = j = 0, k = k0; i < (GLuint) dstWidth;
9caf779f
AM
1169diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
1170index 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);
1178
1179- p_atomic_set(&stfb->revalidate, TRUE);
1180+ if (stfb && stfb->iface == stfbi) {
1181+ p_atomic_set(&stfb->revalidate, TRUE);
1182+ }
1183+ else {
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.
1189+ */
1190+ }
1191 }
1192
1193 static void
1194diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
1195index 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)
1199 {
1200 GLint level;
1201
1202- lambda = CLAMP(lambda, tObj->MinLod, tObj->MaxLod);
1203-
1204- level = (GLint) lambda;
1205-
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;
1210+ }
1211+ else {
1212+ /* choose mipmap level */
1213+ lambda = CLAMP(lambda, tObj->MinLod, tObj->MaxLod);
1214+ level = (GLint) lambda;
1215+ level = CLAMP(level, tObj->BaseLevel, tObj->_MaxLevel);
1216+ }
1217
1218 return level;
1219 }
This page took 0.23431 seconds and 4 git commands to generate.