[Mesa-dev] [PATCH 2/2] mesa: use locked version of HashWalk for xfb objects

Timothy Arceri tarceri at itsqueeze.com
Mon Apr 24 05:59:24 UTC 2017


>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"
---
 src/mesa/main/transformfeedback.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c
index 3c72674..c3aa61c 100644
--- a/src/mesa/main/transformfeedback.c
+++ b/src/mesa/main/transformfeedback.c
@@ -65,22 +65,22 @@ bool
 _mesa_transform_feedback_is_using_program(struct gl_context *ctx,
                                           struct gl_shader_program *shProg)
 {
    if (!shProg->last_vert_prog)
       return false;
 
    struct using_program_tuple callback_data;
    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,
                                         &callback_data);
 
    return callback_data.found;
 }
 
 /**
  * Do reference counting of transform feedback buffers.
-- 
2.9.3



More information about the mesa-dev mailing list