Changeset 35825 in vbox
- Timestamp:
- Feb 2, 2011 2:11:24 PM (14 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/arb_program_shader.c
r35822 r35825 588 588 static void shader_arb_load_constants(const struct wined3d_context *context, char usePixelShader, char useVertexShader) 589 589 { 590 #ifdef VBOX_WITH_WDDM 591 IWineD3DDeviceImpl *device = context->device; 592 #else 593 IWineD3DDeviceImpl *device = context->swapchain->device; 594 #endif 590 IWineD3DDeviceImpl *device = context_get_device(context); 595 591 IWineD3DStateBlockImpl* stateBlock = device->stateBlock; 592 596 593 const struct wined3d_gl_info *gl_info = context->gl_info; 597 594 … … 622 619 /* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active 623 620 * context. On a context switch the old context will be fully dirtified */ 624 #ifdef VBOX_WITH_WDDM 625 if (!context || context->device != This) return; 626 #else 627 if (!context || context->swapchain->device != This) return; 628 #endif 621 if (!context || context_get_device(context) != This) return; 629 622 630 623 memset(context->vshader_const_dirty + start, 1, sizeof(*context->vshader_const_dirty) * count); … … 639 632 /* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active 640 633 * context. On a context switch the old context will be fully dirtified */ 641 #ifdef VBOX_WITH_WDDM 642 if (!context || context->device != This) return; 643 #else 644 if (!context || context->swapchain->device != This) return; 645 #endif 634 if (!context || context_get_device(context) != This) return; 646 635 647 636 memset(context->pshader_const_dirty + start, 1, sizeof(*context->pshader_const_dirty) * count); … … 4369 4358 static void shader_arb_select(const struct wined3d_context *context, BOOL usePS, BOOL useVS) 4370 4359 { 4371 #ifdef VBOX_WITH_WDDM 4372 IWineD3DDeviceImpl *This = context->device; 4373 #else 4374 IWineD3DDeviceImpl *This = context->swapchain->device; 4375 #endif 4360 IWineD3DDeviceImpl *This = context_get_device(context); 4376 4361 struct shader_arb_priv *priv = This->shader_priv; 4377 4362 const struct wined3d_gl_info *gl_info = context->gl_info; -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/context.c
r34290 r35825 331 331 { 332 332 const struct wined3d_gl_info *gl_info = context->gl_info; 333 #ifdef VBOX_WITH_WDDM 334 IWineD3DDeviceImpl *device = context->device; 335 #else 336 IWineD3DDeviceImpl *device = context->swapchain->device; 337 #endif 333 IWineD3DDeviceImpl *device = context_get_device(context); 338 334 struct fbo_entry *entry; 339 335 … … 352 348 { 353 349 const struct wined3d_gl_info *gl_info = context->gl_info; 354 #ifdef VBOX_WITH_WDDM 355 IWineD3DDeviceImpl *device = context->device; 356 #else 357 IWineD3DDeviceImpl *device = context->swapchain->device; 358 #endif 350 IWineD3DDeviceImpl *device = context_get_device(context); 359 351 360 352 context_bind_fbo(context, GL_FRAMEBUFFER, &entry->id); … … 385 377 { 386 378 const struct wined3d_gl_info *gl_info = context->gl_info; 387 #ifdef VBOX_WITH_WDDM 388 IWineD3DDeviceImpl *device = context->device; 389 #else 390 IWineD3DDeviceImpl *device = context->swapchain->device; 391 #endif 379 IWineD3DDeviceImpl *device = context_get_device(context); 392 380 struct fbo_entry *entry; 393 381 … … 425 413 { 426 414 const struct wined3d_gl_info *gl_info = context->gl_info; 427 #ifdef VBOX_WITH_WDDM 428 IWineD3DDeviceImpl *device = context->device; 429 #else 430 IWineD3DDeviceImpl *device = context->swapchain->device; 431 #endif 415 IWineD3DDeviceImpl *device = context_get_device(context); 432 416 unsigned int i; 433 417 … … 1262 1246 } 1263 1247 1264 1248 struct IWineD3DDeviceImpl *context_get_device(const struct wined3d_context *context) 1249 { 1250 #ifdef VBOX_WITH_WDDM 1251 return context->device; 1252 #else 1253 return context->swapchain->device; 1254 #endif 1255 } 1265 1256 1266 1257 … … 2004 1995 { 2005 1996 if (current_context 2006 && current_context->current_rt 2007 #ifdef VBOX_WITH_WDDM 2008 && current_context->device == This 2009 #else 2010 && current_context->swapchain->device == This 2011 #endif 2012 ) 1997 && current_context->current_rt 1998 && context_get_device(current_context) == This 1999 ) 2013 2000 { 2014 2001 target = current_context->current_rt; … … 2061 2048 2062 2049 /* Stay with the currently active context. */ 2063 if (current_context 2064 #ifdef VBOX_WITH_WDDM 2065 && current_context->device == This 2066 #else 2067 && current_context->swapchain->device == This 2068 #endif 2069 ) 2050 if (current_context && context_get_device(current_context) == This) 2070 2051 { 2071 2052 context = current_context; -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/glsl_shader.c
r35822 r35825 777 777 { 778 778 const struct wined3d_gl_info *gl_info = context->gl_info; 779 #ifdef VBOX_WITH_WDDM 780 IWineD3DDeviceImpl *device = context->device; 781 #else 782 IWineD3DDeviceImpl *device = context->swapchain->device; 783 #endif 779 IWineD3DDeviceImpl *device = context_get_device(context); 784 780 IWineD3DStateBlockImpl* stateBlock = device->stateBlock; 785 781 struct shader_glsl_priv *priv = device->shader_priv; … … 4679 4675 { 4680 4676 const struct wined3d_gl_info *gl_info = context->gl_info; 4681 #ifdef VBOX_WITH_WDDM 4682 IWineD3DDeviceImpl *device = context->device; 4683 #else 4684 IWineD3DDeviceImpl *device = context->swapchain->device; 4685 #endif 4677 IWineD3DDeviceImpl *device = context_get_device(context); 4686 4678 struct shader_glsl_priv *priv = device->shader_priv; 4687 4679 GLhandleARB program_id = 0; -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_private.h
r35822 r35825 1260 1260 struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain, IWineD3DSurfaceImpl *target, 1261 1261 const struct wined3d_format_desc *ds_format_desc) DECLSPEC_HIDDEN; 1262 struct IWineD3DDeviceImpl *context_get_device(const struct wined3d_context *context); DECLSPEC_HIDDEN; 1262 1263 #ifdef VBOX_WITH_WDDM 1263 1264 struct wined3d_context *context_find_create(IWineD3DDeviceImpl *device, IWineD3DSwapChainImpl *swapchain, IWineD3DSurfaceImpl *target,
Note:
See TracChangeset
for help on using the changeset viewer.