Changeset 32508 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/context.c
- Timestamp:
- Sep 15, 2010 11:15:38 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/context.c
r32501 r32508 853 853 854 854 context_validate(context 855 #ifdef VBOXWDDM 856 , NULL//context->device->swapchains[0]855 #ifdef VBOXWDDM/* tmp work-around */ 856 , context->device->swapchains[context->device->NumberOfSwapChains-1] 857 857 #endif 858 858 ); … … 1595 1595 const struct wined3d_format_desc *ds_format_desc) 1596 1596 { 1597 IWineD3DSwapChainImpl *swapChain = NULL;1598 1597 int i, j; 1599 1598 int swapchains = IWineD3DDevice_GetNumberOfSwapChains(device); … … 1605 1604 for(i = 0 ; i < swapchains ; i ++) 1606 1605 { 1607 IWineD3D Device_GetSwapChain(device, i, &swapChain);1608 if (swapChain->ds_format == ds_format_desc)1609 {1610 for(j = 0; j < swapChain->num_contexts; j++){1611 if(swapChain->context[j]->tid == tid1612 && swapChain->context[j]->tid == tid) {1613 context = swapChain->context[j];1606 IWineD3DSwapChainImpl *curSwapChain; 1607 IWineD3DDevice_GetSwapChain(device, i, &curSwapChain); 1608 if (curSwapChain->ds_format == ds_format_desc) 1609 { 1610 for(j = 0; j < curSwapChain->num_contexts; j++) { 1611 if(curSwapChain->context[j]->tid == tid) { 1612 context = curSwapChain->context[j]; 1614 1613 break; 1615 1614 } … … 1621 1620 } 1622 1621 1622 IWineD3DSwapChain_Release(curSwapChain); 1623 1623 1624 if (context) 1624 1625 break; 1625 IWineD3DSwapChain_Release(swapChain);1626 1626 } 1627 1627 … … 1633 1633 else 1634 1634 { 1635 Assert(swapChain); 1636 context_validate(context, swapChain); 1635 context_validate(context, swapchain); 1637 1636 context_setup_target(device, context, target); 1638 1637 context_enter(context); 1639 1638 Assert(context->valid); 1640 IWineD3DSwapChain_Release(swapChain);1641 1639 } 1642 1640 … … 1968 1966 else 1969 1967 { 1968 #ifdef VBOXWDDM 1969 /* tmp work-around */ 1970 IWineD3DSwapChainImpl *swapchain = (IWineD3DSwapChainImpl *)This->swapchains[This->NumberOfSwapChains-1]; 1971 #else 1970 1972 IWineD3DSwapChainImpl *swapchain = (IWineD3DSwapChainImpl *)This->swapchains[0]; 1973 #endif 1971 1974 if (swapchain->backBuffer) target = swapchain->backBuffer[0]; 1972 1975 else target = swapchain->frontBuffer; … … 1976 1979 if (current_context && current_context->current_rt == target) 1977 1980 { 1978 context_validate(current_context1979 1981 #ifdef VBOXWDDM 1980 , NULL// current_context->device->swapchains[0] 1981 #endif 1982 ); 1982 IWineD3DSwapChainImpl *swapchain = NULL; 1983 if (SUCCEEDED(IWineD3DSurface_GetContainer(target, &IID_IWineD3DSwapChain, (void **)&swapchain))) { 1984 context_validate(current_context, swapchain); 1985 IWineD3DSwapChain_Release(swapchain); 1986 } 1987 else { 1988 /* tmp work-around */ 1989 context_validate(current_context, current_context->device->swapchains[current_context->device->NumberOfSwapChains-1]); 1990 } 1991 #else 1992 context_validate(current_context); 1993 #endif 1983 1994 return current_context; 1984 1995 } … … 1988 1999 1989 2000 context = findThreadContextForSwapChain(swapchain, tid); 1990 IWineD3DSwapChain_Release(swapchain);1991 2001 #ifdef VBOXWDDM 1992 2002 context_validate(context, swapchain); 1993 2003 #endif 2004 IWineD3DSwapChain_Release(swapchain); 1994 2005 } 1995 2006 else … … 2016 2027 * Can also happen on thread switches - in that case findThreadContextForSwapChain 2017 2028 * is perfect to call. */ 2029 #ifdef VBOXWDDM /* tmp work-around */ 2030 context = findThreadContextForSwapChain(This->swapchains[This->NumberOfSwapChains-1], tid); 2031 #else 2018 2032 context = findThreadContextForSwapChain(This->swapchains[0], tid); 2033 #endif 2019 2034 } 2020 2035 #ifdef VBOXWDDM 2021 2036 context_validate(context, 2022 NULL//This->swapchains[0]2037 This->swapchains[This->NumberOfSwapChains-1] /* tmp work-around */ 2023 2038 ); 2024 2039 #endif
Note:
See TracChangeset
for help on using the changeset viewer.