Changeset 38589 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Aug 31, 2011 5:07:59 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 73782
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/surface.c
r38588 r38589 3196 3196 } 3197 3197 3198 #ifdef VBOX_WITH_WDDM 3199 # define VBOX_WINE_TEXDIRECT_USE_RESOURCELOAD 3200 #endif 3198 3201 /* Does a direct frame buffer -> texture copy. Stretching is done 3199 3202 * with single pixel copy calls … … 3208 3211 struct wined3d_context *context; 3209 3212 BOOL upsidedown = FALSE; 3210 BOOL is Offscreen = surface_is_offscreen(SrcSurface);3213 BOOL isSrcOffscreen = surface_is_offscreen(SrcSurface); 3211 3214 BOOL fNoStretching = TRUE; 3212 3215 RECT dst_rect = *dst_rect_in; … … 3225 3228 } 3226 3229 3227 if (is Offscreen)3230 if (isSrcOffscreen) 3228 3231 { 3229 3232 upsidedown = !upsidedown; … … 3255 3258 } 3256 3259 3260 #ifdef VBOX_WINE_TEXDIRECT_USE_RESOURCELOAD 3261 if (isSrcOffscreen) context = context_acquire(myDevice, SrcSurface, CTXUSAGE_RESOURCELOAD); 3262 else if (!surface_is_offscreen((IWineD3DSurface*)This)) context = context_acquire(myDevice, (IWineD3DSurface *) This, CTXUSAGE_RESOURCELOAD); 3263 else context = context_acquire(myDevice, NULL, CTXUSAGE_RESOURCELOAD); 3264 3265 surface_internal_preload(SrcSurface, SRGB_RGB); 3266 #else 3257 3267 context = context_acquire(myDevice, SrcSurface, CTXUSAGE_BLIT); 3268 #endif 3269 3258 3270 surface_internal_preload((IWineD3DSurface *) This, SRGB_RGB); 3259 3271 ENTER_GL(); … … 3262 3274 glBindTexture(This->texture_target, This->texture_name); 3263 3275 checkGLcall("glBindTexture"); 3264 if(is Offscreen) {3276 if(isSrcOffscreen) { 3265 3277 TRACE("Reading from an offscreen target\n"); 3278 #ifdef VBOX_WINE_TEXDIRECT_USE_RESOURCELOAD 3279 context_bind_fbo(context, GL_READ_FRAMEBUFFER, &context->src_fbo); 3280 context_attach_surface_fbo(context, GL_READ_FRAMEBUFFER, 0, (IWineD3DSurfaceImpl *)SrcSurface); 3281 #endif 3266 3282 glReadBuffer(myDevice->offscreenBuffer); 3283 checkGLcall("glReadBuffer()"); 3284 #ifdef VBOX_WINE_TEXDIRECT_USE_RESOURCELOAD 3285 context_attach_depth_stencil_fbo(context, GL_READ_FRAMEBUFFER, NULL, FALSE); 3286 #endif 3267 3287 } 3268 3288 else 3269 3289 { 3290 #ifdef VBOX_WINE_TEXDIRECT_USE_RESOURCELOAD 3291 context_bind_fbo(context, GL_READ_FRAMEBUFFER, NULL); 3292 #endif 3270 3293 glReadBuffer(surface_get_gl_buffer(SrcSurface)); 3294 checkGLcall("glReadBuffer()"); 3271 3295 } 3272 3296 checkGLcall("glReadBuffer");
Note:
See TracChangeset
for help on using the changeset viewer.