Commit c114b040 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Remove the useless lastThread field from IWineD3DDeviceImpl.

parent 2d750060
......@@ -1551,7 +1551,8 @@ static inline WineD3DContext *FindContext(IWineD3DDeviceImpl *This, IWineD3DSurf
switch(wined3d_settings.offscreen_rendering_mode) {
case ORM_FBO:
/* FBOs do not need a different context. Stay with whatever context is active at the moment */
if(This->activeContext && tid == This->lastThread) {
if (This->activeContext && This->activeContext->tid == tid)
{
context = This->activeContext;
} else {
/* This may happen if the app jumps straight into offscreen rendering
......@@ -1600,7 +1601,8 @@ static inline WineD3DContext *FindContext(IWineD3DDeviceImpl *This, IWineD3DSurf
case ORM_BACKBUFFER:
/* Stay with the currently active context for back buffer rendering */
if(This->activeContext && tid == This->lastThread) {
if (This->activeContext && This->activeContext->tid == tid)
{
context = This->activeContext;
} else {
/* This may happen if the app jumps straight into offscreen rendering
......@@ -1763,12 +1765,11 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU
if (!target) target = This->activeContext->current_rt;
if (This->activeContext->current_rt != target || tid != This->lastThread)
if (This->activeContext->current_rt != target || This->activeContext->tid != tid)
{
context = FindContext(This, target, tid);
context->draw_buffer_dirty = TRUE;
context->current_rt = target;
This->lastThread = tid;
} else {
/* Stick to the old context */
context = This->activeContext;
......
......@@ -2165,7 +2165,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
}
IWineD3DSurface_AddRef(This->render_targets[0]);
This->activeContext = swapchain->context[0];
This->lastThread = GetCurrentThreadId();
/* Depth Stencil support */
This->stencilBufferTarget = This->auto_depth_stencil_buffer;
......
......@@ -1584,7 +1584,6 @@ struct IWineD3DDeviceImpl
/* Context management */
WineD3DContext **contexts; /* Dynamic array containing pointers to context structures */
WineD3DContext *activeContext;
DWORD lastThread;
UINT numContexts;
WineD3DContext *pbufferContext; /* The context that has a pbuffer as drawable */
DWORD pbufferWidth, pbufferHeight; /* Size of the buffer drawable */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment