mesa: use locked version of HashWalk for xfb objects
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 24 Apr 2017 05:59:24 +0000 (15:59 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 24 Apr 2017 23:58:47 +0000 (09:58 +1000)
From Chapter 5 'Shared Objects and Multiple Contexts' of
the OpenGL 4.5 spec:

   "Objects which contain references to other objects include
   framebuffer, program pipeline, query, transform feedback,
   and vertex array objects.   Such objects are called container
   objects and are not shared"

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/main/transformfeedback.c

index 3c72674d6c100ebb0d34e0ec4ec732b12494c7b4..c3aa61c2f6e75d5510d4d270b3afb21d3adbedda 100644 (file)
@@ -72,8 +72,8 @@ _mesa_transform_feedback_is_using_program(struct gl_context *ctx,
    callback_data.found = false;
    callback_data.prog = shProg->last_vert_prog;
 
-   _mesa_HashWalk(ctx->TransformFeedback.Objects,
-                  active_xfb_object_references_program, &callback_data);
+   _mesa_HashWalkLocked(ctx->TransformFeedback.Objects,
+                        active_xfb_object_references_program, &callback_data);
 
    /* Also check DefaultObject, as it's not in the Objects hash table. */
    active_xfb_object_references_program(0, ctx->TransformFeedback.DefaultObject,