On Mon, Feb 1, 2016 at 3:50 PM, Marek Olšák <[email protected]> wrote:
> On Tue, Jan 26, 2016 at 11:33 PM, Steinar H. Gunderson
> <[email protected]> wrote:
>> On Tue, Jan 26, 2016 at 07:00:20PM +0100, Marek Olšák wrote:
>>>>>> Might be worth keeping _mesa_ref_sync_object(), even if it's an inline
>>>>>> wrapper around the above. As things get a bit confusing - foo_get vs
>>>>>> foo_unref.
>>>>> What about _mesa_get_and_ref_sync()?
>>> Sounds good to me.
>>
>> Attached new version, also with updated description as requested.
>
> Thanks. I'll push this in 2 days if there are no comments.
>
> There is just one declaration-after-code occurrence, which I'll fix
> before pushing.

Sorry, I'm withdrawing my statement.

Look at this code:

 _mesa_ObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label)
 {
    GET_CURRENT_CONTEXT(ctx);
-   struct gl_sync_object *const syncObj = (struct gl_sync_object *) ptr;
+   struct gl_sync_object *syncObj = _mesa_get_and_ref_sync(ctx, sync, true);

"sync" is undeclared here. It builds, because "sync" is also a
function from unistd.h. This is wrong.

Marek
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to