Subversion Repositories Kolibri OS

Rev

Rev 4358 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4358 Rev 4401
Line 199... Line 199...
199
   if (n < 0) {
199
   if (n < 0) {
200
      _mesa_error(ctx, GL_INVALID_VALUE, "glGenQueriesARB(n < 0)");
200
      _mesa_error(ctx, GL_INVALID_VALUE, "glGenQueriesARB(n < 0)");
201
      return;
201
      return;
202
   }
202
   }
Line 203... Line -...
203
 
-
 
204
   /* No query objects can be active at this time! */
-
 
205
   if (ctx->Query.CurrentOcclusionObject ||
-
 
206
       ctx->Query.CurrentTimerObject) {
-
 
207
      _mesa_error(ctx, GL_INVALID_OPERATION, "glGenQueriesARB");
-
 
208
      return;
-
 
209
   }
-
 
210
 
203
 
211
   first = _mesa_HashFindFreeKeyBlock(ctx->Query.QueryObjects, n);
204
   first = _mesa_HashFindFreeKeyBlock(ctx->Query.QueryObjects, n);
212
   if (first) {
205
   if (first) {
213
      GLsizei i;
206
      GLsizei i;
214
      for (i = 0; i < n; i++) {
207
      for (i = 0; i < n; i++) {
Line 238... Line 231...
238
   if (n < 0) {
231
   if (n < 0) {
239
      _mesa_error(ctx, GL_INVALID_VALUE, "glDeleteQueriesARB(n < 0)");
232
      _mesa_error(ctx, GL_INVALID_VALUE, "glDeleteQueriesARB(n < 0)");
240
      return;
233
      return;
241
   }
234
   }
Line 242... Line -...
242
 
-
 
243
   /* No query objects can be active at this time! */
-
 
244
   if (ctx->Query.CurrentOcclusionObject ||
-
 
245
       ctx->Query.CurrentTimerObject) {
-
 
246
      _mesa_error(ctx, GL_INVALID_OPERATION, "glDeleteQueriesARB");
-
 
247
      return;
-
 
248
   }
-
 
249
 
235
 
250
   for (i = 0; i < n; i++) {
236
   for (i = 0; i < n; i++) {
251
      if (ids[i] > 0) {
237
      if (ids[i] > 0) {
252
         struct gl_query_object *q = _mesa_lookup_query_object(ctx, ids[i]);
238
         struct gl_query_object *q = _mesa_lookup_query_object(ctx, ids[i]);
-
 
239
         if (q) {
-
 
240
            if (q->Active) {
-
 
241
               struct gl_query_object **bindpt;
253
         if (q) {
242
               bindpt = get_query_binding_point(ctx, q->Target);
-
 
243
               assert(bindpt); /* Should be non-null for active q. */
-
 
244
               if (bindpt) {
-
 
245
                  *bindpt = NULL;
-
 
246
               }
-
 
247
               q->Active = GL_FALSE;
-
 
248
               ctx->Driver.EndQuery(ctx, q);
254
            ASSERT(!q->Active); /* should be caught earlier */
249
            }
255
            _mesa_HashRemove(ctx->Query.QueryObjects, ids[i]);
250
            _mesa_HashRemove(ctx->Query.QueryObjects, ids[i]);
256
            ctx->Driver.DeleteQuery(ctx, q);
251
            ctx->Driver.DeleteQuery(ctx, q);
257
         }
252
         }
258
      }
253
      }