~ubuntu-branches/ubuntu/natty/mesa/natty-proposed

« back to all changes in this revision

Viewing changes to src/mesa/vbo/vbo_save_draw.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Hooker, Robert Hooker, Christopher James Halse Rogers
  • Date: 2010-09-14 08:55:40 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100914085540-m4fpl0hdjlfd4jgz
Tags: 7.9~git20100909-0ubuntu1
[ Robert Hooker ]
* New upstream git snapshot up to commit 94118fe2d4b1e5 (LP: #631413)
* New features include ATI HD5xxx series support in r600, and a vastly
  improved glsl compiler.
* Remove pre-generated .pc's, use the ones generated at build time
  instead.
* Remove all references to mesa-utils now that its no longer shipped
  with the mesa source.
* Disable the experimental ARB_fragment_shader option by default on
  i915, it exposes incomplete functionality that breaks KDE compositing
  among other things. It can be enabled via driconf still. (LP: #628930).

[ Christopher James Halse Rogers ]
* debian/patches/04_osmesa_version.diff:
  - Refresh for new upstream
* Bugs fixed in this release:
  - Fixes severe rendering corruption in Unity on radeon (LP: #628727,
    LP: #596292, LP: #599741, LP: #630315, LP: #613694, LP: #599741).
  - Also fixes rendering in gnome-shell (LP: #578619).
  - Flickering in OpenGL apps on radeon (LP: #626943, LP: #610541).
  - Provides preliminary support for new intel chips (LP: #601052).
* debian/rules:
  - Update configure flags to match upstream reshuffling.
  - Explicitly remove gallium DRI drivers that we don't want to ship.
* Update debian/gbp.conf for this Maverick-specific packaging
* libegl1-mesa-dri-x11,kms: There are no longer separate kms or x11 drivers
  for EGL, libegl1-mesa-drivers now contains a single driver that provides
  both backends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
#include "vbo_context.h"
39
39
 
40
40
 
41
 
/*
 
41
#if FEATURE_dlist
 
42
 
 
43
 
 
44
/**
42
45
 * After playback, copy everything but the position from the
43
46
 * last vertex to the saved state
44
47
 */
45
 
static void _playback_copy_to_current( GLcontext *ctx,
46
 
                                       const struct vbo_save_vertex_list *node )
 
48
static void
 
49
_playback_copy_to_current(GLcontext *ctx,
 
50
                          const struct vbo_save_vertex_list *node)
47
51
{
48
52
   struct vbo_context *vbo = vbo_context(ctx);
49
53
   GLfloat vertex[VBO_ATTRIB_MAX * 4];
81
85
                       node->attrsz[i], 
82
86
                       data);
83
87
         
84
 
         if (memcmp(current, tmp, 4 * sizeof(GLfloat)) != 0)
85
 
         {
 
88
         if (memcmp(current, tmp, 4 * sizeof(GLfloat)) != 0) {
86
89
            memcpy(current, tmp, 4 * sizeof(GLfloat));
87
90
 
88
91
            vbo->currval[i].Size = node->attrsz[i];
117
120
 
118
121
 
119
122
 
120
 
/* Treat the vertex storage as a VBO, define vertex arrays pointing
 
123
/**
 
124
 * Treat the vertex storage as a VBO, define vertex arrays pointing
121
125
 * into it:
122
126
 */
123
 
static void vbo_bind_vertex_list( GLcontext *ctx,
124
 
                                   const struct vbo_save_vertex_list *node )
 
127
static void vbo_bind_vertex_list(GLcontext *ctx,
 
128
                                 const struct vbo_save_vertex_list *node)
125
129
{
126
130
   struct vbo_context *vbo = vbo_context(ctx);
127
131
   struct vbo_save_context *save = &vbo->save;
175
179
   }
176
180
 
177
181
   for (attr = 0; attr < VERT_ATTRIB_MAX; attr++) {
178
 
      GLuint src = map[attr];
 
182
      const GLuint src = map[attr];
179
183
 
180
184
      if (node_attrsz[src]) {
181
185
         /* override the default array set above */
203
207
   _mesa_set_varying_vp_inputs( ctx, varying_inputs );
204
208
}
205
209
 
206
 
static void vbo_save_loopback_vertex_list( GLcontext *ctx,
207
 
                                           const struct vbo_save_vertex_list *list )
 
210
 
 
211
static void
 
212
vbo_save_loopback_vertex_list(GLcontext *ctx,
 
213
                              const struct vbo_save_vertex_list *list)
208
214
{
209
215
   const char *buffer = ctx->Driver.MapBuffer(ctx, 
210
216
                                              GL_ARRAY_BUFFER_ARB, 
211
217
                                              GL_READ_ONLY, /* ? */
212
 
                                               list->vertex_store->bufferobj);
 
218
                                              list->vertex_store->bufferobj);
213
219
 
214
 
   vbo_loopback_vertex_list( ctx,
215
 
                             (const GLfloat *)(buffer + list->buffer_offset),
216
 
                             list->attrsz,
217
 
                             list->prim,
218
 
                             list->prim_count,
219
 
                             list->wrap_count,
220
 
                             list->vertex_size);
 
220
   vbo_loopback_vertex_list(ctx,
 
221
                            (const GLfloat *)(buffer + list->buffer_offset),
 
222
                            list->attrsz,
 
223
                            list->prim,
 
224
                            list->prim_count,
 
225
                            list->wrap_count,
 
226
                            list->vertex_size);
221
227
 
222
228
   ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB, 
223
229
                           list->vertex_store->bufferobj);
226
232
 
227
233
/**
228
234
 * Execute the buffer and save copied verts.
 
235
 * This is called from the display list code when executing
 
236
 * a drawing command.
229
237
 */
230
 
void vbo_save_playback_vertex_list( GLcontext *ctx, void *data )
 
238
void
 
239
vbo_save_playback_vertex_list(GLcontext *ctx, void *data)
231
240
{
232
 
   const struct vbo_save_vertex_list *node = (const struct vbo_save_vertex_list *) data;
 
241
   const struct vbo_save_vertex_list *node =
 
242
      (const struct vbo_save_vertex_list *) data;
233
243
   struct vbo_save_context *save = &vbo_context(ctx)->save;
234
244
 
235
245
   FLUSH_CURRENT(ctx, 0);
274
284
      if (ctx->NewState)
275
285
         _mesa_update_state( ctx );
276
286
 
277
 
      vbo_context(ctx)->draw_prims( ctx, 
278
 
                                    save->inputs, 
279
 
                                    node->prim, 
280
 
                                    node->prim_count,
281
 
                                    NULL,
282
 
                                    GL_TRUE,
283
 
                                    0,  /* Node is a VBO, so this is ok */
284
 
                                    node->count - 1);
 
287
      vbo_context(ctx)->draw_prims(ctx, 
 
288
                                   save->inputs, 
 
289
                                   node->prim, 
 
290
                                   node->prim_count,
 
291
                                   NULL,
 
292
                                   GL_TRUE,
 
293
                                   0,   /* Node is a VBO, so this is ok */
 
294
                                   node->count - 1);
285
295
   }
286
296
 
287
297
   /* Copy to current?
288
298
    */
289
299
   _playback_copy_to_current( ctx, node );
290
300
}
 
301
 
 
302
 
 
303
#endif /* FEATURE_dlist */