13f4a0 import mesa-9.2.5-5.20131218.el7.src.rpm

Authored and Committed by centosrcm 11 years ago
    import mesa-9.2.5-5.20131218.el7.src.rpm
    
        
file modified
+1 -1
.mesa.metadata CHANGED
@@ -1 +1 @@
1
- 1d09a1b6e18e50208076d87c844101d607e2c737 SOURCES/mesa-20131023.tar.xz
1
+ f4f0d3bc6f0b28bcd95f17b75126d543d65929b5 SOURCES/mesa-20131218.tar.xz
SOURCES/0001-glx-Fix-the-default-values-for-GLXFBConfig-attribute.patch ADDED
@@ -0,0 +1,50 @@
1
+ From 8b8eb7562699c091841ec6edec7e60ab3c4dfe67 Mon Sep 17 00:00:00 2001
2
+ From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= <fredrik@kde.org>
3
+ Date: Mon, 17 Feb 2014 23:10:17 +0100
4
+ Subject: [PATCH] glx: Fix the default values for GLXFBConfig attributes
5
+
6
+ The default values for GLX_DRAWABLE_TYPE and GLX_RENDER_TYPE are
7
+ GLX_WINDOW_BIT and GLX_RGBA_BIT respectively, as specified in
8
+ the GLX 1.4 specification.
9
+
10
+ This fixes the glx-choosefbconfig-defaults piglit test.
11
+
12
+ Cc: "9.2 10.0 10.1" <mesa-stable@lists.freedesktop.org>
13
+
14
+ Signed-off-by: Dave Airlie <airlied@redhat.com>
15
+ ---
16
+ src/glx/glxcmds.c | 9 ++-------
17
+ 1 file changed, 2 insertions(+), 7 deletions(-)
18
+
19
+ diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
20
+ index ec16e8f..e005639 100644
21
+ --- a/src/glx/glxcmds.c
22
+ +++ b/src/glx/glxcmds.c
23
+ @@ -917,13 +917,10 @@ init_fbconfig_for_chooser(struct glx_config * config,
24
+ if (fbconfig_style_tags) {
25
+ config->rgbMode = GL_TRUE;
26
+ config->doubleBufferMode = GLX_DONT_CARE;
27
+ - /* allow any kind of drawable, including those for off-screen buffers */
28
+ - config->drawableType = 0;
29
+ - } else {
30
+ - /* allow configs which support on-screen drawing */
31
+ - config->drawableType = GLX_WINDOW_BIT;
32
+ + config->renderType = GLX_RGBA_BIT;
33
+ }
34
+
35
+ + config->drawableType = GLX_WINDOW_BIT;
36
+ config->visualRating = GLX_DONT_CARE;
37
+ config->transparentPixel = GLX_NONE;
38
+ config->transparentRed = GLX_DONT_CARE;
39
+ @@ -932,8 +929,6 @@ init_fbconfig_for_chooser(struct glx_config * config,
40
+ config->transparentAlpha = GLX_DONT_CARE;
41
+ config->transparentIndex = GLX_DONT_CARE;
42
+
43
+ - /* Set GLX_RENDER_TYPE property to not expect any flags by default. */
44
+ - config->renderType = 0;
45
+ config->xRenderable = GLX_DONT_CARE;
46
+ config->fbconfigID = (GLXFBConfigID) (GLX_DONT_CARE);
47
+
48
+ --
49
+ 1.8.3.1
50
+
SOURCES/0001-r600g-fix-SUMO2-pci-id.patch ADDED
@@ -0,0 +1,29 @@
1
+ From e2d53fac1c5b18f5c9e95d39d4e2be4703b0b363 Mon Sep 17 00:00:00 2001
2
+ From: Alex Deucher <alexander.deucher@amd.com>
3
+ Date: Tue, 24 Dec 2013 15:22:31 -0500
4
+ Subject: [PATCH] r600g: fix SUMO2 pci id
5
+
6
+ 0x9649 is sumo2, not sumo.
7
+
8
+ Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
9
+ CC: "9.2" "10.0" <mesa-stable@lists.freedesktop.org>
10
+ ---
11
+ include/pci_ids/r600_pci_ids.h | 2 +-
12
+ 1 file changed, 1 insertion(+), 1 deletion(-)
13
+
14
+ diff --git a/include/pci_ids/r600_pci_ids.h b/include/pci_ids/r600_pci_ids.h
15
+ index 5036a83..533c9f3 100644
16
+ --- a/include/pci_ids/r600_pci_ids.h
17
+ +++ b/include/pci_ids/r600_pci_ids.h
18
+ @@ -208,7 +208,7 @@ CHIPSET(0x9644, SUMO2_9644, SUMO2)
19
+ CHIPSET(0x9645, SUMO2_9645, SUMO2)
20
+ CHIPSET(0x9647, SUMO_9647, SUMO)
21
+ CHIPSET(0x9648, SUMO_9648, SUMO)
22
+ -CHIPSET(0x9649, SUMO_9649, SUMO)
23
+ +CHIPSET(0x9649, SUMO2_9649, SUMO2)
24
+ CHIPSET(0x964a, SUMO_964A, SUMO)
25
+ CHIPSET(0x964b, SUMO_964B, SUMO)
26
+ CHIPSET(0x964c, SUMO_964C, SUMO)
27
+ --
28
+ 1.8.4.2
29
+
SOURCES/0001-swrast-gallium-classic-add-MESA_copy_sub_buffer-supp.patch ADDED
@@ -0,0 +1,1020 @@
1
+ From cbefe3f43f3d7e81367f7515512950b97fc0dd2c Mon Sep 17 00:00:00 2001
2
+ From: Dave Airlie <airlied@gmail.com>
3
+ Date: Thu, 28 Nov 2013 11:08:11 +1000
4
+ Subject: [PATCH] swrast* (gallium, classic): add MESA_copy_sub_buffer support
5
+ (v3)
6
+
7
+ This patches add MESA_copy_sub_buffer support to the dri sw loader and
8
+ then to gallium state tracker, llvmpipe, softpipe and other bits.
9
+
10
+ It reuses the dri1 driver extension interface, and it updates the swrast
11
+ loader interface for a new putimage which can take a stride.
12
+
13
+ I've tested this with gnome-shell with a cogl hacked to reenable sub copies
14
+ for llvmpipe and the one piglit test.
15
+
16
+ I could probably split this patch up as well.
17
+
18
+ v2: pass a pipe_box, to reduce the entrypoints, as per Jose's review,
19
+ add to p_screen doc comments.
20
+
21
+ v3: finish off winsys interfaces, add swrast classic support as well.
22
+
23
+ Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
24
+ Signed-off-by: Dave Airlie <airlied@redhat.com>
25
+
26
+ swrast: add support for copy_sub_buffer
27
+
28
+ Conflicts:
29
+ src/gallium/state_trackers/dri/sw/drisw.c
30
+ src/gallium/targets/haiku-softpipe/GalliumContext.cpp
31
+ src/mesa/drivers/dri/common/dri_util.c
32
+ src/mesa/drivers/dri/swrast/swrast.c
33
+ ---
34
+ include/GL/internal/dri_interface.h | 9 +++-
35
+ src/gallium/auxiliary/vl/vl_winsys_dri.c | 2 +-
36
+ src/gallium/drivers/galahad/glhd_screen.c | 5 +-
37
+ src/gallium/drivers/i915/i915_screen.c | 4 +-
38
+ src/gallium/drivers/identity/id_screen.c | 5 +-
39
+ src/gallium/drivers/llvmpipe/lp_screen.c | 6 +--
40
+ src/gallium/drivers/noop/noop_pipe.c | 2 +-
41
+ src/gallium/drivers/rbug/rbug_screen.c | 4 +-
42
+ src/gallium/drivers/softpipe/sp_screen.c | 5 +-
43
+ src/gallium/drivers/trace/tr_screen.c | 5 +-
44
+ src/gallium/include/pipe/p_screen.h | 7 +--
45
+ src/gallium/include/state_tracker/drisw_api.h | 2 +
46
+ src/gallium/include/state_tracker/sw_winsys.h | 5 +-
47
+ src/gallium/state_trackers/dri/sw/drisw.c | 58 ++++++++++++++++++++--
48
+ .../state_trackers/egl/common/native_helper.c | 2 +-
49
+ src/gallium/state_trackers/egl/x11/native_ximage.c | 2 +-
50
+ src/gallium/state_trackers/glx/xlib/xm_st.c | 2 +-
51
+ src/gallium/state_trackers/vdpau/presentation.c | 2 +-
52
+ src/gallium/state_trackers/xvmc/surface.c | 2 +-
53
+ src/gallium/tests/graw/clear.c | 2 +-
54
+ src/gallium/tests/graw/fs-test.c | 2 +-
55
+ src/gallium/tests/graw/graw_util.h | 2 +-
56
+ src/gallium/tests/graw/gs-test.c | 2 +-
57
+ src/gallium/tests/graw/quad-sample.c | 2 +-
58
+ src/gallium/tests/graw/shader-leak.c | 2 +-
59
+ src/gallium/tests/graw/tri-gs.c | 2 +-
60
+ src/gallium/tests/graw/tri-instanced.c | 2 +-
61
+ src/gallium/tests/graw/vs-test.c | 2 +-
62
+ .../winsys/sw/android/android_sw_winsys.cpp | 3 +-
63
+ src/gallium/winsys/sw/dri/dri_sw_winsys.c | 16 ++++--
64
+ src/gallium/winsys/sw/fbdev/fbdev_sw_winsys.c | 3 +-
65
+ src/gallium/winsys/sw/gdi/gdi_sw_winsys.c | 3 +-
66
+ src/gallium/winsys/sw/hgl/hgl_sw_winsys.c | 3 +-
67
+ src/gallium/winsys/sw/null/null_sw_winsys.c | 3 +-
68
+ src/gallium/winsys/sw/wayland/wayland_sw_winsys.c | 3 +-
69
+ src/gallium/winsys/sw/xlib/xlib_sw_winsys.c | 3 +-
70
+ src/glx/drisw_glx.c | 43 ++++++++++++++--
71
+ src/mesa/drivers/dri/common/dri_util.h | 5 +-
72
+ src/mesa/drivers/dri/common/drisw_util.c | 15 ++++++
73
+ src/mesa/drivers/dri/swrast/swrast.c | 35 +++++++++++++
74
+ 40 files changed, 225 insertions(+), 57 deletions(-)
75
+
76
+ diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
77
+ index 5c99d55..09c1406 100644
78
+ --- a/include/GL/internal/dri_interface.h
79
+ +++ b/include/GL/internal/dri_interface.h
80
+ @@ -439,7 +439,7 @@ struct __DRIdamageExtensionRec {
81
+ * SWRast Loader extension.
82
+ */
83
+ #define __DRI_SWRAST_LOADER "DRI_SWRastLoader"
84
+ -#define __DRI_SWRAST_LOADER_VERSION 1
85
+ +#define __DRI_SWRAST_LOADER_VERSION 2
86
+ struct __DRIswrastLoaderExtensionRec {
87
+ __DRIextension base;
88
+
89
+ @@ -463,6 +463,13 @@ struct __DRIswrastLoaderExtensionRec {
90
+ void (*getImage)(__DRIdrawable *readable,
91
+ int x, int y, int width, int height,
92
+ char *data, void *loaderPrivate);
93
+ +
94
+ + /**
95
+ + * Put image to drawable
96
+ + */
97
+ + void (*putImage2)(__DRIdrawable *drawable, int op,
98
+ + int x, int y, int width, int height, int stride,
99
+ + char *data, void *loaderPrivate);
100
+ };
101
+
102
+ /**
103
+ diff --git a/src/gallium/auxiliary/vl/vl_winsys_dri.c b/src/gallium/auxiliary/vl/vl_winsys_dri.c
104
+ index 7aec3fe..e747a66 100644
105
+ --- a/src/gallium/auxiliary/vl/vl_winsys_dri.c
106
+ +++ b/src/gallium/auxiliary/vl/vl_winsys_dri.c
107
+ @@ -115,7 +115,7 @@ static void
108
+ vl_dri2_flush_frontbuffer(struct pipe_screen *screen,
109
+ struct pipe_resource *resource,
110
+ unsigned level, unsigned layer,
111
+ - void *context_private)
112
+ + void *context_private, struct pipe_box *sub_box)
113
+ {
114
+ struct vl_dri_screen *scrn = (struct vl_dri_screen*)context_private;
115
+ uint32_t msc_hi, msc_lo;
116
+ diff --git a/src/gallium/drivers/galahad/glhd_screen.c b/src/gallium/drivers/galahad/glhd_screen.c
117
+ index 16a5ff1..5a91077 100644
118
+ --- a/src/gallium/drivers/galahad/glhd_screen.c
119
+ +++ b/src/gallium/drivers/galahad/glhd_screen.c
120
+ @@ -275,7 +275,8 @@ static void
121
+ galahad_screen_flush_frontbuffer(struct pipe_screen *_screen,
122
+ struct pipe_resource *_resource,
123
+ unsigned level, unsigned layer,
124
+ - void *context_private)
125
+ + void *context_private,
126
+ + struct pipe_box *sub_box)
127
+ {
128
+ struct galahad_screen *glhd_screen = galahad_screen(_screen);
129
+ struct galahad_resource *glhd_resource = galahad_resource(_resource);
130
+ @@ -285,7 +286,7 @@ galahad_screen_flush_frontbuffer(struct pipe_screen *_screen,
131
+ screen->flush_frontbuffer(screen,
132
+ resource,
133
+ level, layer,
134
+ - context_private);
135
+ + context_private, sub_box);
136
+ }
137
+
138
+ static void
139
+ diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
140
+ index 556dda8..0ff2640 100644
141
+ --- a/src/gallium/drivers/i915/i915_screen.c
142
+ +++ b/src/gallium/drivers/i915/i915_screen.c
143
+ @@ -419,7 +419,8 @@ static void
144
+ i915_flush_frontbuffer(struct pipe_screen *screen,
145
+ struct pipe_resource *resource,
146
+ unsigned level, unsigned layer,
147
+ - void *winsys_drawable_handle)
148
+ + void *winsys_drawable_handle,
149
+ + struct pipe_box *sub_box)
150
+ {
151
+ /* XXX: Dummy right now. */
152
+ (void)screen;
153
+ @@ -427,6 +428,7 @@ i915_flush_frontbuffer(struct pipe_screen *screen,
154
+ (void)level;
155
+ (void)layer;
156
+ (void)winsys_drawable_handle;
157
+ + (void)sub_box;
158
+ }
159
+
160
+ static void
161
+ diff --git a/src/gallium/drivers/identity/id_screen.c b/src/gallium/drivers/identity/id_screen.c
162
+ index 26df7f6..28cfa1f6 100644
163
+ --- a/src/gallium/drivers/identity/id_screen.c
164
+ +++ b/src/gallium/drivers/identity/id_screen.c
165
+ @@ -192,7 +192,8 @@ static void
166
+ identity_screen_flush_frontbuffer(struct pipe_screen *_screen,
167
+ struct pipe_resource *_resource,
168
+ unsigned level, unsigned layer,
169
+ - void *context_private)
170
+ + void *context_private,
171
+ + struct pipe_box *sub_box)
172
+ {
173
+ struct identity_screen *id_screen = identity_screen(_screen);
174
+ struct identity_resource *id_resource = identity_resource(_resource);
175
+ @@ -202,7 +203,7 @@ identity_screen_flush_frontbuffer(struct pipe_screen *_screen,
176
+ screen->flush_frontbuffer(screen,
177
+ resource,
178
+ level, layer,
179
+ - context_private);
180
+ + context_private, sub_box);
181
+ }
182
+
183
+ static void
184
+ diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
185
+ index b3cd77f..f488d6d 100644
186
+ --- a/src/gallium/drivers/llvmpipe/lp_screen.c
187
+ +++ b/src/gallium/drivers/llvmpipe/lp_screen.c
188
+ @@ -403,7 +403,8 @@ static void
189
+ llvmpipe_flush_frontbuffer(struct pipe_screen *_screen,
190
+ struct pipe_resource *resource,
191
+ unsigned level, unsigned layer,
192
+ - void *context_private)
193
+ + void *context_private,
194
+ + struct pipe_box *sub_box)
195
+ {
196
+ struct llvmpipe_screen *screen = llvmpipe_screen(_screen);
197
+ struct sw_winsys *winsys = screen->winsys;
198
+ @@ -411,10 +412,9 @@ llvmpipe_flush_frontbuffer(struct pipe_screen *_screen,
199
+
200
+ assert(texture->dt);
201
+ if (texture->dt)
202
+ - winsys->displaytarget_display(winsys, texture->dt, context_private);
203
+ + winsys->displaytarget_display(winsys, texture->dt, context_private, sub_box);
204
+ }
205
+
206
+ -
207
+ static void
208
+ llvmpipe_destroy_screen( struct pipe_screen *_screen )
209
+ {
210
+ diff --git a/src/gallium/drivers/noop/noop_pipe.c b/src/gallium/drivers/noop/noop_pipe.c
211
+ index ac837b1..849a4d1 100644
212
+ --- a/src/gallium/drivers/noop/noop_pipe.c
213
+ +++ b/src/gallium/drivers/noop/noop_pipe.c
214
+ @@ -288,7 +288,7 @@ static struct pipe_context *noop_create_context(struct pipe_screen *screen, void
215
+ static void noop_flush_frontbuffer(struct pipe_screen *_screen,
216
+ struct pipe_resource *resource,
217
+ unsigned level, unsigned layer,
218
+ - void *context_private)
219
+ + void *context_private, struct pipe_box *box)
220
+ {
221
+ }
222
+
223
+ diff --git a/src/gallium/drivers/rbug/rbug_screen.c b/src/gallium/drivers/rbug/rbug_screen.c
224
+ index 2471fdb..8576e2f 100644
225
+ --- a/src/gallium/drivers/rbug/rbug_screen.c
226
+ +++ b/src/gallium/drivers/rbug/rbug_screen.c
227
+ @@ -190,7 +190,7 @@ static void
228
+ rbug_screen_flush_frontbuffer(struct pipe_screen *_screen,
229
+ struct pipe_resource *_resource,
230
+ unsigned level, unsigned layer,
231
+ - void *context_private)
232
+ + void *context_private, struct pipe_box *sub_box)
233
+ {
234
+ struct rbug_screen *rb_screen = rbug_screen(_screen);
235
+ struct rbug_resource *rb_resource = rbug_resource(_resource);
236
+ @@ -200,7 +200,7 @@ rbug_screen_flush_frontbuffer(struct pipe_screen *_screen,
237
+ screen->flush_frontbuffer(screen,
238
+ resource,
239
+ level, layer,
240
+ - context_private);
241
+ + context_private, sub_box);
242
+ }
243
+
244
+ static void
245
+ diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
246
+ index f6acdc8..3e3f366 100644
247
+ --- a/src/gallium/drivers/softpipe/sp_screen.c
248
+ +++ b/src/gallium/drivers/softpipe/sp_screen.c
249
+ @@ -364,7 +364,8 @@ static void
250
+ softpipe_flush_frontbuffer(struct pipe_screen *_screen,
251
+ struct pipe_resource *resource,
252
+ unsigned level, unsigned layer,
253
+ - void *context_private)
254
+ + void *context_private,
255
+ + struct pipe_box *sub_box)
256
+ {
257
+ struct softpipe_screen *screen = softpipe_screen(_screen);
258
+ struct sw_winsys *winsys = screen->winsys;
259
+ @@ -372,7 +373,7 @@ softpipe_flush_frontbuffer(struct pipe_screen *_screen,
260
+
261
+ assert(texture->dt);
262
+ if (texture->dt)
263
+ - winsys->displaytarget_display(winsys, texture->dt, context_private);
264
+ + winsys->displaytarget_display(winsys, texture->dt, context_private, sub_box);
265
+ }
266
+
267
+ static uint64_t
268
+ diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c
269
+ index 5281ba8..b71ebbe 100644
270
+ --- a/src/gallium/drivers/trace/tr_screen.c
271
+ +++ b/src/gallium/drivers/trace/tr_screen.c
272
+ @@ -210,7 +210,8 @@ static void
273
+ trace_screen_flush_frontbuffer(struct pipe_screen *_screen,
274
+ struct pipe_resource *_resource,
275
+ unsigned level, unsigned layer,
276
+ - void *context_private)
277
+ + void *context_private,
278
+ + struct pipe_box *sub_box)
279
+ {
280
+ struct trace_screen *tr_scr = trace_screen(_screen);
281
+ struct trace_resource *tr_res = trace_resource(_resource);
282
+ @@ -227,7 +228,7 @@ trace_screen_flush_frontbuffer(struct pipe_screen *_screen,
283
+ trace_dump_arg(ptr, context_private);
284
+ */
285
+
286
+ - screen->flush_frontbuffer(screen, resource, level, layer, context_private);
287
+ + screen->flush_frontbuffer(screen, resource, level, layer, context_private, sub_box);
288
+
289
+ trace_dump_call_end();
290
+ }
291
+ diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
292
+ index c487e8e..c0f4fd1 100644
293
+ --- a/src/gallium/include/pipe/p_screen.h
294
+ +++ b/src/gallium/include/pipe/p_screen.h
295
+ @@ -56,6 +56,7 @@ struct pipe_fence_handle;
296
+ struct pipe_resource;
297
+ struct pipe_surface;
298
+ struct pipe_transfer;
299
+ +struct pipe_box;
300
+
301
+
302
+ /**
303
+ @@ -179,13 +180,13 @@ struct pipe_screen {
304
+ * displayed, eg copy fake frontbuffer.
305
+ * \param winsys_drawable_handle an opaque handle that the calling context
306
+ * gets out-of-band
307
+ + * \param subbox an optional sub region to flush
308
+ */
309
+ void (*flush_frontbuffer)( struct pipe_screen *screen,
310
+ struct pipe_resource *resource,
311
+ unsigned level, unsigned layer,
312
+ - void *winsys_drawable_handle );
313
+ -
314
+ -
315
+ + void *winsys_drawable_handle,
316
+ + struct pipe_box *subbox );
317
+
318
+ /** Set ptr = fence, with reference counting */
319
+ void (*fence_reference)( struct pipe_screen *screen,
320
+ diff --git a/src/gallium/include/state_tracker/drisw_api.h b/src/gallium/include/state_tracker/drisw_api.h
321
+ index 944a649..328440c 100644
322
+ --- a/src/gallium/include/state_tracker/drisw_api.h
323
+ +++ b/src/gallium/include/state_tracker/drisw_api.h
324
+ @@ -13,6 +13,8 @@ struct drisw_loader_funcs
325
+ {
326
+ void (*put_image) (struct dri_drawable *dri_drawable,
327
+ void *data, unsigned width, unsigned height);
328
+ + void (*put_image2) (struct dri_drawable *dri_drawable,
329
+ + void *data, int x, int y, unsigned width, unsigned height, unsigned stride);
330
+ };
331
+
332
+ /**
333
+ diff --git a/src/gallium/include/state_tracker/sw_winsys.h b/src/gallium/include/state_tracker/sw_winsys.h
334
+ index 0b11fe3..d08ddd6 100644
335
+ --- a/src/gallium/include/state_tracker/sw_winsys.h
336
+ +++ b/src/gallium/include/state_tracker/sw_winsys.h
337
+ @@ -48,7 +48,7 @@ struct winsys_handle;
338
+ struct pipe_screen;
339
+ struct pipe_context;
340
+ struct pipe_resource;
341
+ -
342
+ +struct pipe_box;
343
+
344
+ /**
345
+ * Opaque pointer.
346
+ @@ -129,7 +129,8 @@ struct sw_winsys
347
+ void
348
+ (*displaytarget_display)( struct sw_winsys *ws,
349
+ struct sw_displaytarget *dt,
350
+ - void *context_private );
351
+ + void *context_private,
352
+ + struct pipe_box *box );
353
+
354
+ void
355
+ (*displaytarget_destroy)( struct sw_winsys *ws,
356
+ diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c
357
+ index 121a205..aa0d3e0 100644
358
+ --- a/src/gallium/state_trackers/dri/sw/drisw.c
359
+ +++ b/src/gallium/state_trackers/dri/sw/drisw.c
360
+ @@ -37,6 +37,7 @@
361
+ #include "util/u_format.h"
362
+ #include "util/u_memory.h"
363
+ #include "util/u_inlines.h"
364
+ +#include "util/u_box.h"
365
+ #include "pipe/p_context.h"
366
+ #include "state_tracker/drisw_api.h"
367
+ #include "state_tracker/st_context.h"
368
+ @@ -71,6 +72,18 @@ put_image(__DRIdrawable *dPriv, void *data, unsigned width, unsigned height)
369
+ }
370
+
371
+ static INLINE void
372
+ +put_image2(__DRIdrawable *dPriv, void *data, int x, int y,
373
+ + unsigned width, unsigned height, unsigned stride)
374
+ +{
375
+ + __DRIscreen *sPriv = dPriv->driScreenPriv;
376
+ + const __DRIswrastLoaderExtension *loader = sPriv->swrast_loader;
377
+ +
378
+ + loader->putImage2(dPriv, __DRI_SWRAST_IMAGE_OP_SWAP,
379
+ + x, y, width, height, stride,
380
+ + data, dPriv->loaderPrivate);
381
+ +}
382
+ +
383
+ +static INLINE void
384
+ get_image(__DRIdrawable *dPriv, int x, int y, int width, int height, void *data)
385
+ {
386
+ __DRIscreen *sPriv = dPriv->driScreenPriv;
387
+ @@ -99,9 +112,19 @@ drisw_put_image(struct dri_drawable *drawable,
388
+ put_image(dPriv, data, width, height);
389
+ }
390
+
391
+ +static void
392
+ +drisw_put_image2(struct dri_drawable *drawable,
393
+ + void *data, int x, int y, unsigned width, unsigned height,
394
+ + unsigned stride)
395
+ +{
396
+ + __DRIdrawable *dPriv = drawable->dPriv;
397
+ +
398
+ + put_image2(dPriv, data, x, y, width, height, stride);
399
+ +}
400
+ +
401
+ static INLINE void
402
+ drisw_present_texture(__DRIdrawable *dPriv,
403
+ - struct pipe_resource *ptex)
404
+ + struct pipe_resource *ptex, struct pipe_box *sub_box)
405
+ {
406
+ struct dri_drawable *drawable = dri_drawable(dPriv);
407
+ struct dri_screen *screen = dri_screen(drawable->sPriv);
408
+ @@ -109,7 +132,7 @@ drisw_present_texture(__DRIdrawable *dPriv,
409
+ if (swrast_no_present)
410
+ return;
411
+
412
+ - screen->base.screen->flush_frontbuffer(screen->base.screen, ptex, 0, 0, drawable);
413
+ + screen->base.screen->flush_frontbuffer(screen->base.screen, ptex, 0, 0, drawable, sub_box);
414
+ }
415
+
416
+ static INLINE void
417
+ @@ -126,7 +149,7 @@ static INLINE void
418
+ drisw_copy_to_front(__DRIdrawable * dPriv,
419
+ struct pipe_resource *ptex)
420
+ {
421
+ - drisw_present_texture(dPriv, ptex);
422
+ + drisw_present_texture(dPriv, ptex, NULL);
423
+
424
+ drisw_invalidate_drawable(dPriv);
425
+ }
426
+ @@ -158,6 +181,30 @@ drisw_swap_buffers(__DRIdrawable *dPriv)
427
+ }
428
+
429
+ static void
430
+ +drisw_copy_sub_buffer(__DRIdrawable *dPriv, int x, int y,
431
+ + int w, int h)
432
+ +{
433
+ + struct dri_context *ctx = dri_get_current(dPriv->driScreenPriv);
434
+ + struct dri_drawable *drawable = dri_drawable(dPriv);
435
+ + struct pipe_resource *ptex;
436
+ + struct pipe_box box;
437
+ + if (!ctx)
438
+ + return;
439
+ +
440
+ + ptex = drawable->textures[ST_ATTACHMENT_BACK_LEFT];
441
+ +
442
+ + if (ptex) {
443
+ + if (ctx->pp && drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL])
444
+ + pp_run(ctx->pp, ptex, ptex, drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL]);
445
+ +
446
+ + ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL);
447
+ +
448
+ + u_box_2d(x, dPriv->h - y - h, w, h, &box);
449
+ + drisw_present_texture(dPriv, ptex, &box);
450
+ + }
451
+ +}
452
+ +
453
+ +static void
454
+ drisw_flush_frontbuffer(struct dri_context *ctx,
455
+ struct dri_drawable *drawable,
456
+ enum st_attachment_type statt)
457
+ @@ -288,7 +335,8 @@ static const __DRIextension *drisw_screen_extensions[] = {
458
+ };
459
+
460
+ static struct drisw_loader_funcs drisw_lf = {
461
+ - .put_image = drisw_put_image
462
+ + .put_image = drisw_put_image,
463
+ + .put_image2 = drisw_put_image2
464
+ };
465
+
466
+ static const __DRIconfig **
467
+ @@ -359,12 +407,14 @@ const struct __DriverAPIRec driDriverAPI = {
468
+ .SwapBuffers = drisw_swap_buffers,
469
+ .MakeCurrent = dri_make_current,
470
+ .UnbindContext = dri_unbind_context,
471
+ + .CopySubBuffer = drisw_copy_sub_buffer,
472
+ };
473
+
474
+ /* This is the table of extensions that the loader will dlsym() for. */
475
+ PUBLIC const __DRIextension *__driDriverExtensions[] = {
476
+ &driCoreExtension.base,
477
+ &driSWRastExtension.base,
478
+ + &driCopySubBufferExtension.base,
479
+ NULL
480
+ };
481
+
482
+ diff --git a/src/gallium/state_trackers/egl/common/native_helper.c b/src/gallium/state_trackers/egl/common/native_helper.c
483
+ index b578a8a..5c2be19 100644
484
+ --- a/src/gallium/state_trackers/egl/common/native_helper.c
485
+ +++ b/src/gallium/state_trackers/egl/common/native_helper.c
486
+ @@ -244,7 +244,7 @@ resource_surface_present(struct resource_surface *rsurf,
487
+ return TRUE;
488
+
489
+ rsurf->screen->flush_frontbuffer(rsurf->screen,
490
+ - pres, 0, 0, winsys_drawable_handle);
491
+ + pres, 0, 0, winsys_drawable_handle, NULL);
492
+
493
+ return TRUE;
494
+ }
495
+ diff --git a/src/gallium/state_trackers/egl/x11/native_ximage.c b/src/gallium/state_trackers/egl/x11/native_ximage.c
496
+ index 28c6442..019e535 100644
497
+ --- a/src/gallium/state_trackers/egl/x11/native_ximage.c
498
+ +++ b/src/gallium/state_trackers/egl/x11/native_ximage.c
499
+ @@ -476,7 +476,7 @@ ximage_display_copy_to_pixmap(struct native_display *ndpy,
500
+ xdraw.drawable = (Drawable) pix;
501
+
502
+ xdpy->base.screen->flush_frontbuffer(xdpy->base.screen,
503
+ - src, 0, 0, &xdraw);
504
+ + src, 0, 0, &xdraw, NULL);
505
+
506
+ return TRUE;
507
+ }
508
+ diff --git a/src/gallium/state_trackers/glx/xlib/xm_st.c b/src/gallium/state_trackers/glx/xlib/xm_st.c
509
+ index fb69998..7f73a3a 100644
510
+ --- a/src/gallium/state_trackers/glx/xlib/xm_st.c
511
+ +++ b/src/gallium/state_trackers/glx/xlib/xm_st.c
512
+ @@ -74,7 +74,7 @@ xmesa_st_framebuffer_display(struct st_framebuffer_iface *stfbi,
513
+ pres = xstfb->display_resource;
514
+ }
515
+
516
+ - xstfb->screen->flush_frontbuffer(xstfb->screen, pres, 0, 0, &xstfb->buffer->ws);
517
+ + xstfb->screen->flush_frontbuffer(xstfb->screen, pres, 0, 0, &xstfb->buffer->ws, NULL);
518
+ return TRUE;
519
+ }
520
+
521
+ diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c
522
+ index c9f8ea7..e68e25f 100644
523
+ --- a/src/gallium/state_trackers/vdpau/presentation.c
524
+ +++ b/src/gallium/state_trackers/vdpau/presentation.c
525
+ @@ -269,7 +269,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue,
526
+ pipe->screen->flush_frontbuffer
527
+ (
528
+ pipe->screen, tex, 0, 0,
529
+ - vl_screen_get_private(pq->device->vscreen)
530
+ + vl_screen_get_private(pq->device->vscreen), NULL
531
+ );
532
+
533
+ pipe->screen->fence_reference(pipe->screen, &surf->fence, NULL);
534
+ diff --git a/src/gallium/state_trackers/xvmc/surface.c b/src/gallium/state_trackers/xvmc/surface.c
535
+ index 6a895aa..ea778a3 100644
536
+ --- a/src/gallium/state_trackers/xvmc/surface.c
537
+ +++ b/src/gallium/state_trackers/xvmc/surface.c
538
+ @@ -441,7 +441,7 @@ Status XvMCPutSurface(Display *dpy, XvMCSurface *surface, Drawable drawable,
539
+ pipe->screen->flush_frontbuffer
540
+ (
541
+ pipe->screen, tex, 0, 0,
542
+ - vl_screen_get_private(context_priv->vscreen)
543
+ + vl_screen_get_private(context_priv->vscreen), NULL
544
+ );
545
+
546
+ if(dump_window == -1) {
547
+ diff --git a/src/gallium/tests/graw/clear.c b/src/gallium/tests/graw/clear.c
548
+ index 77c59db..f38da47 100644
549
+ --- a/src/gallium/tests/graw/clear.c
550
+ +++ b/src/gallium/tests/graw/clear.c
551
+ @@ -33,7 +33,7 @@ static void draw( void )
552
+
553
+ graw_save_surface_to_file(ctx, surf, NULL);
554
+
555
+ - screen->flush_frontbuffer(screen, tex, 0, 0, window);
556
+ + screen->flush_frontbuffer(screen, tex, 0, 0, window, NULL);
557
+ }
558
+
559
+ static void init( void )
560
+ diff --git a/src/gallium/tests/graw/fs-test.c b/src/gallium/tests/graw/fs-test.c
561
+ index 38a2c4b..a01c014 100644
562
+ --- a/src/gallium/tests/graw/fs-test.c
563
+ +++ b/src/gallium/tests/graw/fs-test.c
564
+ @@ -240,7 +240,7 @@ static void draw( void )
565
+
566
+ graw_save_surface_to_file(ctx, surf, NULL);
567
+
568
+ - screen->flush_frontbuffer(screen, rttex, 0, 0, window);
569
+ + screen->flush_frontbuffer(screen, rttex, 0, 0, window, NULL);
570
+ }
571
+
572
+ #define SIZE 16
573
+ diff --git a/src/gallium/tests/graw/graw_util.h b/src/gallium/tests/graw/graw_util.h
574
+ index 8557285..1856f0d 100644
575
+ --- a/src/gallium/tests/graw/graw_util.h
576
+ +++ b/src/gallium/tests/graw/graw_util.h
577
+ @@ -211,7 +211,7 @@ static INLINE void
578
+ graw_util_flush_front(const struct graw_info *info)
579
+ {
580
+ info->screen->flush_frontbuffer(info->screen, info->color_buf[0],
581
+ - 0, 0, info->window);
582
+ + 0, 0, info->window, NULL);
583
+ }
584
+
585
+
586
+ diff --git a/src/gallium/tests/graw/gs-test.c b/src/gallium/tests/graw/gs-test.c
587
+ index e4e4f61..1745c84 100644
588
+ --- a/src/gallium/tests/graw/gs-test.c
589
+ +++ b/src/gallium/tests/graw/gs-test.c
590
+ @@ -347,7 +347,7 @@ static void draw( void )
591
+
592
+ graw_save_surface_to_file(ctx, surf, NULL);
593
+
594
+ - screen->flush_frontbuffer(screen, rttex, 0, 0, window);
595
+ + screen->flush_frontbuffer(screen, rttex, 0, 0, window, NULL);
596
+ }
597
+
598
+ #define SIZE 16
599
+ diff --git a/src/gallium/tests/graw/quad-sample.c b/src/gallium/tests/graw/quad-sample.c
600
+ index 969ffa7..9960c30 100644
601
+ --- a/src/gallium/tests/graw/quad-sample.c
602
+ +++ b/src/gallium/tests/graw/quad-sample.c
603
+ @@ -156,7 +156,7 @@ static void draw( void )
604
+
605
+ graw_save_surface_to_file(ctx, surf, NULL);
606
+
607
+ - screen->flush_frontbuffer(screen, rttex, 0, 0, window);
608
+ + screen->flush_frontbuffer(screen, rttex, 0, 0, window, NULL);
609
+ }
610
+
611
+ #define SIZE 16
612
+ diff --git a/src/gallium/tests/graw/shader-leak.c b/src/gallium/tests/graw/shader-leak.c
613
+ index 4ef752b..754ada6 100644
614
+ --- a/src/gallium/tests/graw/shader-leak.c
615
+ +++ b/src/gallium/tests/graw/shader-leak.c
616
+ @@ -158,7 +158,7 @@ static void draw( void )
617
+ ctx->delete_fs_state(ctx, fs);
618
+ }
619
+
620
+ - screen->flush_frontbuffer(screen, tex, 0, 0, window);
621
+ + screen->flush_frontbuffer(screen, tex, 0, 0, window, NULL);
622
+ ctx->destroy(ctx);
623
+
624
+ exit(0);
625
+ diff --git a/src/gallium/tests/graw/tri-gs.c b/src/gallium/tests/graw/tri-gs.c
626
+ index 37323aa..24de12b 100644
627
+ --- a/src/gallium/tests/graw/tri-gs.c
628
+ +++ b/src/gallium/tests/graw/tri-gs.c
629
+ @@ -168,7 +168,7 @@ static void draw( void )
630
+ util_draw_arrays(ctx, PIPE_PRIM_TRIANGLES, 0, 3);
631
+ ctx->flush(ctx, NULL, 0);
632
+
633
+ - screen->flush_frontbuffer(screen, tex, 0, 0, window);
634
+ + screen->flush_frontbuffer(screen, tex, 0, 0, window, NULL);
635
+ }
636
+
637
+
638
+ diff --git a/src/gallium/tests/graw/tri-instanced.c b/src/gallium/tests/graw/tri-instanced.c
639
+ index f84463d..55bc3a5 100644
640
+ --- a/src/gallium/tests/graw/tri-instanced.c
641
+ +++ b/src/gallium/tests/graw/tri-instanced.c
642
+ @@ -219,7 +219,7 @@ static void draw( void )
643
+
644
+ graw_save_surface_to_file(ctx, surf, NULL);
645
+
646
+ - screen->flush_frontbuffer(screen, tex, 0, 0, window);
647
+ + screen->flush_frontbuffer(screen, tex, 0, 0, window, NULL);
648
+ }
649
+
650
+
651
+ diff --git a/src/gallium/tests/graw/vs-test.c b/src/gallium/tests/graw/vs-test.c
652
+ index 5a7d0a0..ce1941d 100644
653
+ --- a/src/gallium/tests/graw/vs-test.c
654
+ +++ b/src/gallium/tests/graw/vs-test.c
655
+ @@ -234,7 +234,7 @@ static void draw( void )
656
+
657
+ graw_save_surface_to_file(ctx, surf, NULL);
658
+
659
+ - screen->flush_frontbuffer(screen, rttex, 0, 0, window);
660
+ + screen->flush_frontbuffer(screen, rttex, 0, 0, window, NULL);
661
+ }
662
+
663
+ #define SIZE 16
664
+ diff --git a/src/gallium/winsys/sw/android/android_sw_winsys.cpp b/src/gallium/winsys/sw/android/android_sw_winsys.cpp
665
+ index cb91aad..4b1040c 100644
666
+ --- a/src/gallium/winsys/sw/android/android_sw_winsys.cpp
667
+ +++ b/src/gallium/winsys/sw/android/android_sw_winsys.cpp
668
+ @@ -74,7 +74,8 @@ namespace android {
669
+ static void
670
+ android_displaytarget_display(struct sw_winsys *ws,
671
+ struct sw_displaytarget *dt,
672
+ - void *context_private)
673
+ + void *context_private,
674
+ + struct pipe_box *box)
675
+ {
676
+ }
677
+
678
+ diff --git a/src/gallium/winsys/sw/dri/dri_sw_winsys.c b/src/gallium/winsys/sw/dri/dri_sw_winsys.c
679
+ index edb3a38..6fed22b 100644
680
+ --- a/src/gallium/winsys/sw/dri/dri_sw_winsys.c
681
+ +++ b/src/gallium/winsys/sw/dri/dri_sw_winsys.c
682
+ @@ -166,25 +166,33 @@ dri_sw_displaytarget_get_handle(struct sw_winsys *winsys,
683
+ static void
684
+ dri_sw_displaytarget_display(struct sw_winsys *ws,
685
+ struct sw_displaytarget *dt,
686
+ - void *context_private)
687
+ + void *context_private,
688
+ + struct pipe_box *box)
689
+ {
690
+ struct dri_sw_winsys *dri_sw_ws = dri_sw_winsys(ws);
691
+ struct dri_sw_displaytarget *dri_sw_dt = dri_sw_displaytarget(dt);
692
+ struct dri_drawable *dri_drawable = (struct dri_drawable *)context_private;
693
+ unsigned width, height;
694
+ + unsigned blsize = util_format_get_blocksize(dri_sw_dt->format);
695
+
696
+ /* Set the width to 'stride / cpp'.
697
+ *
698
+ * PutImage correctly clips to the width of the dst drawable.
699
+ */
700
+ - width = dri_sw_dt->stride / util_format_get_blocksize(dri_sw_dt->format);
701
+ + width = dri_sw_dt->stride / blsize;
702
+
703
+ height = dri_sw_dt->height;
704
+
705
+ - dri_sw_ws->lf->put_image(dri_drawable, dri_sw_dt->data, width, height);
706
+ + if (box) {
707
+ + void *data;
708
+ + data = dri_sw_dt->data + (dri_sw_dt->stride * box->y) + box->x * blsize;
709
+ + dri_sw_ws->lf->put_image2(dri_drawable, data,
710
+ + box->x, box->y, box->width, box->height, dri_sw_dt->stride);
711
+ + } else {
712
+ + dri_sw_ws->lf->put_image(dri_drawable, dri_sw_dt->data, width, height);
713
+ + }
714
+ }
715
+
716
+ -
717
+ static void
718
+ dri_destroy_sw_winsys(struct sw_winsys *winsys)
719
+ {
720
+ diff --git a/src/gallium/winsys/sw/fbdev/fbdev_sw_winsys.c b/src/gallium/winsys/sw/fbdev/fbdev_sw_winsys.c
721
+ index a280985..cc3ce1a 100644
722
+ --- a/src/gallium/winsys/sw/fbdev/fbdev_sw_winsys.c
723
+ +++ b/src/gallium/winsys/sw/fbdev/fbdev_sw_winsys.c
724
+ @@ -74,7 +74,8 @@ fbdev_sw_winsys(struct sw_winsys *ws)
725
+ static void
726
+ fbdev_displaytarget_display(struct sw_winsys *ws,
727
+ struct sw_displaytarget *dt,
728
+ - void *winsys_private)
729
+ + void *winsys_private,
730
+ + struct pipe_box *box)
731
+ {
732
+ struct fbdev_sw_winsys *fbdev = fbdev_sw_winsys(ws);
733
+ struct fbdev_sw_displaytarget *src = fbdev_sw_displaytarget(dt);
734
+ diff --git a/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c b/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c
735
+ index 2e12f6e..aae3ec5 100644
736
+ --- a/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c
737
+ +++ b/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c
738
+ @@ -207,7 +207,8 @@ gdi_sw_display( struct sw_winsys *winsys,
739
+ static void
740
+ gdi_sw_displaytarget_display(struct sw_winsys *winsys,
741
+ struct sw_displaytarget *dt,
742
+ - void *context_private)
743
+ + void *context_private,
744
+ + struct pipe_box *box)
745
+ {
746
+ /* nasty:
747
+ */
748
+ diff --git a/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c b/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c
749
+ index 1d51dd6..f09272a 100644
750
+ --- a/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c
751
+ +++ b/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c
752
+ @@ -147,7 +147,8 @@ hgl_winsys_displaytarget_unmap(struct sw_winsys* winsys,
753
+
754
+ static void
755
+ hgl_winsys_displaytarget_display(struct sw_winsys* winsys,
756
+ - struct sw_displaytarget* displayTarget, void* contextPrivate)
757
+ + struct sw_displaytarget* displayTarget, void* contextPrivate,
758
+ + struct pipe_box *box)
759
+ {
760
+ assert(contextPrivate);
761
+
762
+ diff --git a/src/gallium/winsys/sw/null/null_sw_winsys.c b/src/gallium/winsys/sw/null/null_sw_winsys.c
763
+ index 44849da..9c8b3ec 100644
764
+ --- a/src/gallium/winsys/sw/null/null_sw_winsys.c
765
+ +++ b/src/gallium/winsys/sw/null/null_sw_winsys.c
766
+ @@ -114,7 +114,8 @@ null_sw_displaytarget_get_handle(struct sw_winsys *winsys,
767
+ static void
768
+ null_sw_displaytarget_display(struct sw_winsys *winsys,
769
+ struct sw_displaytarget *dt,
770
+ - void *context_private)
771
+ + void *context_private,
772
+ + struct pipe_box *box)
773
+ {
774
+ assert(0);
775
+ }
776
+ diff --git a/src/gallium/winsys/sw/wayland/wayland_sw_winsys.c b/src/gallium/winsys/sw/wayland/wayland_sw_winsys.c
777
+ index f432de9..e428613 100644
778
+ --- a/src/gallium/winsys/sw/wayland/wayland_sw_winsys.c
779
+ +++ b/src/gallium/winsys/sw/wayland/wayland_sw_winsys.c
780
+ @@ -75,7 +75,8 @@ wayland_sw_winsys(struct sw_winsys *ws)
781
+ static void
782
+ wayland_displaytarget_display(struct sw_winsys *ws,
783
+ struct sw_displaytarget *dt,
784
+ - void *context_private)
785
+ + void *context_private,
786
+ + struct pipe_box *box)
787
+ {
788
+ }
789
+
790
+ diff --git a/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c b/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c
791
+ index 6e71530..99da2ae 100644
792
+ --- a/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c
793
+ +++ b/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c
794
+ @@ -376,7 +376,8 @@ xlib_sw_display(struct xlib_drawable *xlib_drawable,
795
+ static void
796
+ xlib_displaytarget_display(struct sw_winsys *ws,
797
+ struct sw_displaytarget *dt,
798
+ - void *context_private)
799
+ + void *context_private,
800
+ + struct pipe_box *box)
801
+ {
802
+ struct xlib_drawable *xlib_drawable = (struct xlib_drawable *)context_private;
803
+ xlib_sw_display(xlib_drawable, dt);
804
+ diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
805
+ index 393be20..f903b2d 100644
806
+ --- a/src/glx/drisw_glx.c
807
+ +++ b/src/glx/drisw_glx.c
808
+ @@ -49,6 +49,7 @@ struct drisw_screen
809
+ const __DRIcoreExtension *core;
810
+ const __DRIswrastExtension *swrast;
811
+ const __DRItexBufferExtension *texBuffer;
812
+ + const __DRIcopySubBufferExtension *copySubBuffer;
813
+
814
+ const __DRIconfig **driver_configs;
815
+
816
+ @@ -171,9 +172,9 @@ bytes_per_line(unsigned pitch_bits, unsigned mul)
817
+ }
818
+
819
+ static void
820
+ -swrastPutImage(__DRIdrawable * draw, int op,
821
+ - int x, int y, int w, int h,
822
+ - char *data, void *loaderPrivate)
823
+ +swrastPutImage2(__DRIdrawable * draw, int op,
824
+ + int x, int y, int w, int h, int stride,
825
+ + char *data, void *loaderPrivate)
826
+ {
827
+ struct drisw_drawable *pdp = loaderPrivate;
828
+ __GLXDRIdrawable *pdraw = &(pdp->base);
829
+ @@ -199,7 +200,7 @@ swrastPutImage(__DRIdrawable * draw, int op,
830
+ ximage->data = data;
831
+ ximage->width = w;
832
+ ximage->height = h;
833
+ - ximage->bytes_per_line = bytes_per_line(w * ximage->bits_per_pixel, 32);
834
+ + ximage->bytes_per_line = stride ? stride : bytes_per_line(w * ximage->bits_per_pixel, 32);
835
+
836
+ XPutImage(dpy, drawable, gc, ximage, 0, 0, x, y, w, h);
837
+
838
+ @@ -207,6 +208,14 @@ swrastPutImage(__DRIdrawable * draw, int op,
839
+ }
840
+
841
+ static void
842
+ +swrastPutImage(__DRIdrawable * draw, int op,
843
+ + int x, int y, int w, int h,
844
+ + char *data, void *loaderPrivate)
845
+ +{
846
+ + swrastPutImage2(draw, op, x, y, w, h, 0, data, loaderPrivate);
847
+ +}
848
+ +
849
+ +static void
850
+ swrastGetImage(__DRIdrawable * read,
851
+ int x, int y, int w, int h,
852
+ char *data, void *loaderPrivate)
853
+ @@ -234,7 +243,8 @@ static const __DRIswrastLoaderExtension swrastLoaderExtension = {
854
+ {__DRI_SWRAST_LOADER, __DRI_SWRAST_LOADER_VERSION},
855
+ swrastGetDrawableInfo,
856
+ swrastPutImage,
857
+ - swrastGetImage
858
+ + swrastGetImage,
859
+ + swrastPutImage2,
860
+ };
861
+
862
+ static const __DRIextension *loader_extensions[] = {
863
+ @@ -585,6 +595,21 @@ driswSwapBuffers(__GLXDRIdrawable * pdraw,
864
+ }
865
+
866
+ static void
867
+ +driswCopySubBuffer(__GLXDRIdrawable * pdraw,
868
+ + int x, int y, int width, int height, Bool flush)
869
+ +{
870
+ + struct drisw_drawable *pdp = (struct drisw_drawable *) pdraw;
871
+ + struct drisw_screen *psc = (struct drisw_screen *) pdp->base.psc;
872
+ +
873
+ + if (flush) {
874
+ + glFlush();
875
+ + }
876
+ +
877
+ + (*psc->copySubBuffer->copySubBuffer) (pdp->driDrawable,
878
+ + x, y, width, height);
879
+ +}
880
+ +
881
+ +static void
882
+ driswDestroyScreen(struct glx_screen *base)
883
+ {
884
+ struct drisw_screen *psc = (struct drisw_screen *) base;
885
+ @@ -632,6 +657,9 @@ driswBindExtensions(struct drisw_screen *psc, const __DRIextension **extensions)
886
+ "GLX_EXT_create_context_es2_profile");
887
+ }
888
+
889
+ + if (psc->copySubBuffer)
890
+ + __glXEnableDirectExtension(&psc->base, "GLX_MESA_copy_sub_buffer");
891
+ +
892
+ /* FIXME: Figure out what other extensions can be ported here from dri2. */
893
+ for (i = 0; extensions[i]; i++) {
894
+ if ((strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0)) {
895
+ @@ -675,6 +703,8 @@ driswCreateScreen(int screen, struct glx_display *priv)
896
+ psc->core = (__DRIcoreExtension *) extensions[i];
897
+ if (strcmp(extensions[i]->name, __DRI_SWRAST) == 0)
898
+ psc->swrast = (__DRIswrastExtension *) extensions[i];
899
+ + if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0)
900
+ + psc->copySubBuffer = (__DRIcopySubBufferExtension *) extensions[i];
901
+ }
902
+
903
+ if (psc->core == NULL || psc->swrast == NULL) {
904
+ @@ -713,6 +743,9 @@ driswCreateScreen(int screen, struct glx_display *priv)
905
+ psp->createDrawable = driswCreateDrawable;
906
+ psp->swapBuffers = driswSwapBuffers;
907
+
908
+ + if (psc->copySubBuffer)
909
+ + psp->copySubBuffer = driswCopySubBuffer;
910
+ +
911
+ return &psc->base;
912
+
913
+ handle_error:
914
+ diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h
915
+ index 900f048..4c71fe4 100644
916
+ --- a/src/mesa/drivers/dri/common/dri_util.h
917
+ +++ b/src/mesa/drivers/dri/common/dri_util.h
918
+ @@ -65,7 +65,7 @@ extern const __DRIcoreExtension driCoreExtension;
919
+ extern const __DRIswrastExtension driSWRastExtension;
920
+ extern const __DRIdri2Extension driDRI2Extension;
921
+ extern const __DRI2configQueryExtension dri2ConfigQueryExtension;
922
+ -
923
+ +extern const __DRIcopySubBufferExtension driCopySubBufferExtension;
924
+ /**
925
+ * Driver callback functions.
926
+ *
927
+ @@ -113,6 +113,9 @@ struct __DriverAPIRec {
928
+ int width, int height);
929
+
930
+ void (*ReleaseBuffer) (__DRIscreen *screenPrivate, __DRIbuffer *buffer);
931
+ +
932
+ + void (*CopySubBuffer)(__DRIdrawable *driDrawPriv, int x, int y,
933
+ + int w, int h);
934
+ };
935
+
936
+ extern const struct __DriverAPIRec driDriverAPI;
937
+ diff --git a/src/mesa/drivers/dri/common/drisw_util.c b/src/mesa/drivers/dri/common/drisw_util.c
938
+ index 89f03c3..0da4142 100644
939
+ --- a/src/mesa/drivers/dri/common/drisw_util.c
940
+ +++ b/src/mesa/drivers/dri/common/drisw_util.c
941
+ @@ -373,3 +373,18 @@ const __DRIswrastExtension driSWRastExtension = {
942
+ driCreateNewContextForAPI,
943
+ driCreateContextAttribs
944
+ };
945
+ +
946
+ +/* swrast copy sub buffer entrypoint. */
947
+ +static void driCopySubBuffer(__DRIdrawable *pdp, int x, int y,
948
+ + int w, int h)
949
+ +{
950
+ + assert(pdp->driScreenPriv->swrast_loader);
951
+ +
952
+ + driDriverAPI.CopySubBuffer(pdp, x, y, w, h);
953
+ +}
954
+ +
955
+ +/* for swrast only */
956
+ +const __DRIcopySubBufferExtension driCopySubBufferExtension = {
957
+ + { __DRI_COPY_SUB_BUFFER, 1 },
958
+ + .copySubBuffer = driCopySubBuffer,
959
+ +};
960
+ diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
961
+ index 3870673..eb6d23b 100644
962
+ --- a/src/mesa/drivers/dri/swrast/swrast.c
963
+ +++ b/src/mesa/drivers/dri/swrast/swrast.c
964
+ @@ -830,6 +830,39 @@ dri_unbind_context(__DRIcontext * cPriv)
965
+ return GL_TRUE;
966
+ }
967
+
968
+ +static void
969
+ +dri_copy_sub_buffer(__DRIdrawable *dPriv, int x, int y,
970
+ + int w, int h)
971
+ +{
972
+ + __DRIscreen *sPriv = dPriv->driScreenPriv;
973
+ + void *data;
974
+ + int iy;
975
+ + struct dri_drawable *drawable = dri_drawable(dPriv);
976
+ + struct gl_framebuffer *fb;
977
+ + struct dri_swrast_renderbuffer *frontrb, *backrb;
978
+ +
979
+ + TRACE;
980
+ +
981
+ + fb = &drawable->Base;
982
+ +
983
+ + frontrb =
984
+ + dri_swrast_renderbuffer(fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer);
985
+ + backrb =
986
+ + dri_swrast_renderbuffer(fb->Attachment[BUFFER_BACK_LEFT].Renderbuffer);
987
+ +
988
+ + /* check for signle-buffered */
989
+ + if (backrb == NULL)
990
+ + return;
991
+ +
992
+ + iy = frontrb->Base.Base.Height - y - h;
993
+ + data = (char *)backrb->Base.Buffer + (iy * backrb->pitch) + (x * ((backrb->bpp + 7) / 8));
994
+ + sPriv->swrast_loader->putImage2(dPriv, __DRI_SWRAST_IMAGE_OP_SWAP,
995
+ + x, iy, w, h,
996
+ + frontrb->pitch,
997
+ + data,
998
+ + dPriv->loaderPrivate);
999
+ +}
1000
+ +
1001
+
1002
+ const struct __DriverAPIRec driDriverAPI = {
1003
+ .InitScreen = dri_init_screen,
1004
+ @@ -841,11 +874,13 @@ const struct __DriverAPIRec driDriverAPI = {
1005
+ .SwapBuffers = dri_swap_buffers,
1006
+ .MakeCurrent = dri_make_current,
1007
+ .UnbindContext = dri_unbind_context,
1008
+ + .CopySubBuffer = dri_copy_sub_buffer,
1009
+ };
1010
+
1011
+ /* This is the table of extensions that the loader will dlsym() for. */
1012
+ PUBLIC const __DRIextension *__driDriverExtensions[] = {
1013
+ &driCoreExtension.base,
1014
+ &driSWRastExtension.base,
1015
+ + &driCopySubBufferExtension.base,
1016
+ NULL
1017
+ };
1018
+ --
1019
+ 1.8.4.2
1020
+
file modified
+41 -5
SPECS/mesa.spec CHANGED
@@ -21,7 +21,7 @@
21
21
%define with_llvm 1
22
22
%endif
23
23
24
- %ifarch s390 s390x
24
+ %ifarch s390 s390x aarch64
25
25
%define with_hardware 0
26
26
%ifarch s390
27
27
%define base_drivers swrast
@@ -42,13 +42,13 @@
42
42
43
43
%define _default_patch_fuzz 2
44
44
45
- %define gitdate 20131023
45
+ %define gitdate 20131218
46
46
#% define snapshot
47
47
48
48
Summary: Mesa graphics libraries
49
49
Name: mesa
50
- Version: 9.2
51
- Release: 3.%{gitdate}%{?dist}
50
+ Version: 9.2.5
51
+ Release: 5.%{gitdate}%{?dist}
52
52
License: MIT
53
53
Group: System Environment/Libraries
54
54
URL: http://www.mesa3d.org
@@ -71,6 +71,13 @@ Patch15: mesa-9.2-hardware-float.patch
71
71
Patch16: mesa-9.2-no-useless-vdpau.patch
72
72
Patch20: mesa-9.2-evergreen-big-endian.patch
73
73
Patch21: add-kaveri-berlin-pciid.patch
74
+ Patch22: 0001-r600g-fix-SUMO2-pci-id.patch
75
+
76
+ # fix copy sub buffer on swrast
77
+ Patch30: 0001-swrast-gallium-classic-add-MESA_copy_sub_buffer-supp.patch
78
+
79
+ # fix GLX defaults against binary
80
+ Patch40: 0001-glx-Fix-the-default-values-for-GLXFBConfig-attribute.patch
74
81
75
82
BuildRequires: pkgconfig autoconf automake libtool
76
83
%if %{with_hardware}
@@ -119,6 +126,7 @@ Mesa
119
126
Summary: Mesa libGL runtime libraries and DRI drivers
120
127
Group: System Environment/Libraries
121
128
Provides: libGL
129
+ Requires: mesa-libglapi = %{version}-%{release}
122
130
123
131
%description libGL
124
132
Mesa libGL runtime library.
@@ -126,6 +134,7 @@ Mesa libGL runtime library.
126
134
%package libEGL
127
135
Summary: Mesa libEGL runtime libraries
128
136
Group: System Environment/Libraries
137
+ Requires: mesa-libgbm = %{version}-%{release}
129
138
130
139
%description libEGL
131
140
Mesa libEGL runtime libraries
@@ -133,6 +142,7 @@ Mesa libEGL runtime libraries
133
142
%package libGLES
134
143
Summary: Mesa libGLES runtime libraries
135
144
Group: System Environment/Libraries
145
+ Requires: mesa-libglapi = %{version}-%{release}
136
146
137
147
%description libGLES
138
148
Mesa GLES runtime libraries
@@ -149,7 +159,7 @@ Mesa driver filesystem
149
159
Summary: Mesa-based DRI drivers
150
160
Group: User Interface/X Hardware Support
151
161
Requires: mesa-filesystem%{?_isa}
152
- Obsoletes: mesa-dri-drivers-dri1 < 7.12
162
+ Obsoletes: mesa-dri1-drivers < 7.12
153
163
Obsoletes: mesa-dri-llvmcore <= 7.12
154
164
%description dri-drivers
155
165
Mesa-based DRI drivers.
@@ -196,6 +206,7 @@ Mesa libGLES development package
196
206
Summary: Mesa offscreen rendering libraries
197
207
Group: System Environment/Libraries
198
208
Provides: libOSMesa
209
+ Requires: mesa-libglapi = %{version}-%{release}
199
210
200
211
%description libOSMesa
201
212
Mesa offscreen rendering libraries
@@ -214,6 +225,7 @@ Mesa offscreen rendering development package
214
225
Summary: Mesa gbm library
215
226
Group: System Environment/Libraries
216
227
Provides: libgbm
228
+ Requires: mesa-libglapi = %{version}-%{release}
217
229
218
230
%description libgbm
219
231
Mesa gbm runtime library.
@@ -298,6 +310,9 @@ grep -q ^/ src/gallium/auxiliary/vl/vl_decoder.c && exit 1
298
310
%patch16 -p1 -b .vdpau
299
311
%patch20 -p1 -b .egbe
300
312
%patch21 -p1 -b .kaveri
313
+ %patch22 -p1 -b .sumo2
314
+ %patch30 -p1 -b .copysub
315
+ %patch40 -p1 -b .fixglx
301
316
302
317
%if 0%{with_private_llvm}
303
318
sed -i 's/llvm-config/mesa-private-llvm-config-%{__isa_bits}/g' configure.ac
@@ -597,6 +612,27 @@ rm -rf $RPM_BUILD_ROOT
597
612
%endif
598
613
599
614
%changelog
615
+ * Mon Feb 24 2014 Dave Airlie <airlied@redhat.com> 9.2.5-5.20131218
616
+ - fix GLX attribs against binary drivers (#1064117)
617
+
618
+ * Wed Feb 12 2014 Adam Jackson <ajax@redhat.com> 9.2.5-4.20131218
619
+ - Mass rebuild
620
+
621
+ * Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 9.2.5-3.20131218
622
+ - Mass rebuild 2014-01-24
623
+
624
+ * Tue Jan 14 2014 Dave Airlie <airlied@redhat.com> 9.2.5-2.20131218
625
+ - obsolete correct dri1 drivers package (#1043903)
626
+
627
+ * Mon Jan 13 2014 Dave Airlie <airlied@redhat.com> 9.2.5-1.20131218
628
+ - rebase to final 9.2.5 release + copy sub buffer enable for swrast
629
+
630
+ * Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 9.2-5.20131023
631
+ - Mass rebuild 2013-12-27
632
+
633
+ * Wed Nov 06 2013 Dave Airlie <airlied@redhat.com> 9.2-4.20131023
634
+ - fix build for now on aarch64
635
+
600
636
* Thu Oct 31 2013 Jerome Glisse <jglisse@redhat.com> 9.2-3.20131023
601
637
- Add missing kaveri pci id
602
638