~ubuntu-branches/ubuntu/raring/mesa/raring

« back to all changes in this revision

Viewing changes to src/mesa/main/queryobj.c

  • Committer: Package Import Robot
  • Author(s): Maarten Lankhorst
  • Date: 2013-01-22 11:54:09 UTC
  • mfrom: (1.7.13)
  • Revision ID: package-import@ubuntu.com-20130122115409-5e9xii2ee1whab3e
Tags: 9.0.2-0ubuntu1
* New upstream release.
* Decrease size of mesa's libgl1-mesa-dri again
  - re-enable 117-static-gallium.patch
  - add 118-dricore-gallium.patch to link against libdricore again

Show diffs side-by-side

added added

removed removed

Lines of Context:
313
313
 
314
314
   q = _mesa_lookup_query_object(ctx, id);
315
315
   if (!q) {
316
 
      /* create new object */
317
 
      q = ctx->Driver.NewQueryObject(ctx, id);
318
 
      if (!q) {
319
 
         _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBeginQuery{Indexed}");
 
316
      if (ctx->API == API_OPENGL_CORE) {
 
317
         _mesa_error(ctx, GL_INVALID_OPERATION,
 
318
                     "glBeginQuery{Indexed}(non-gen name)");
320
319
         return;
 
320
      } else {
 
321
         /* create new object */
 
322
         q = ctx->Driver.NewQueryObject(ctx, id);
 
323
         if (!q) {
 
324
            _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBeginQuery{Indexed}");
 
325
            return;
 
326
         }
 
327
         _mesa_HashInsert(ctx->Query.QueryObjects, id, q);
321
328
      }
322
 
      _mesa_HashInsert(ctx->Query.QueryObjects, id, q);
323
329
   }
324
330
   else {
325
331
      /* pre-existing object */