[PATCH 1/5] wined3d: Make sure queries have an active GL context.

Henri Verbeet hverbeet at gmail.com
Fri Jun 26 04:09:11 CDT 2009


2009/6/26 Stefan Dösinger <stefan at codeweavers.com>:
> Am Friday 26 June 2009 10:07:08 schrieb Henri Verbeet:
>> +    ActivateContext(This->wineD3DDevice,
>> This->wineD3DDevice->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD); +
>>      if (((WineQueryOcclusionData *)This->extendedData)->ctx !=
>> This->wineD3DDevice->activeContext ||
>> This->wineD3DDevice->activeContext->tid != GetCurrentThreadId())
>
>
> Wouldn't it be better to activate a context after the thread check? Ie, don't
> activate a context when we know that we can't make use of the GL query
> anyway?
>
Well, it checks the thread id of the currently active context. I think
it makes sense to make sure that's actually a context appropriate for
this thread, rather than whatever was used last.



More information about the wine-devel mailing list