2009/6/26 Stefan Dösinger <ste...@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.