Changeset 39130 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Wine
- Timestamp:
- Oct 27, 2011 4:36:48 PM (13 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Wine
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/Makefile.kmk
r38156 r39130 188 188 wined3dwddm_DEFS = $(subst __i386__,,$(wined3d_DEFS)) VBOX_WITH_WDDM VBOX_WINE_WITHOUT_LIBWINE 189 189 wined3dwddm_DEFS.x86 = $(NO_SUCH_VARIABLE) 190 wined3dwddm_SOURCES = $(subst wined3d.def,wined3dwddm.def,$(wined3d_SOURCES)) vbox/libWineStub/debug.c wined3d/vboxext.c 190 wined3dwddm_SOURCES = $(subst wined3d.def,wined3dwddm.def,$(wined3d_SOURCES)) vbox/libWineStub/debug.c wined3d/vboxext.c vbox/VBoxDbgGl.c 191 191 wined3dwddm_SOURCES.x86 = $(NO_SUCH_VARIABLE) 192 192 wined3dwddm_SOURCES.amd64 = $(NO_SUCH_VARIABLE) -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/context.c
r39016 r39130 2558 2558 2559 2559 case CTXUSAGE_BLIT: 2560 case CTXUSAGE_BLIT_LIGHT: 2560 2561 if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { 2561 2562 if (!context->render_offscreen) context_validate_onscreen_formats(device, context); … … 2591 2592 switch(usage) { 2592 2593 case CTXUSAGE_RESOURCELOAD: 2594 case CTXUSAGE_BLIT_LIGHT: 2593 2595 /* This does not require any special states to be set up */ 2594 2596 break; -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/drawprim.c
r33656 r39130 37 37 #include "wined3d_private.h" 38 38 39 #if defined(VBOX_WITH_WDDM) 40 #include "../VBox/VBoxDbgGl.h" 41 #endif 42 39 43 WINE_DEFAULT_DEBUG_CHANNEL(d3d_draw); 40 44 #define GLINFO_LOCATION This->adapter->gl_info … … 614 618 return; 615 619 } 620 621 #if defined(VBOX_WITH_WDDM) 622 DBGL_CHECK_DRAWPRIM(context->gl_info, This); 623 #endif 616 624 617 625 if (This->stencilBufferTarget) { -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/glsl_shader.c
r38982 r39130 284 284 } 285 285 286 static void shader_glsl_dump_shader_source(const struct wined3d_gl_info *gl_info, GLhandleARB shader) 287 { 288 char *ptr; 289 GLint tmp, source_size; 290 char *source = NULL; 291 292 GL_EXTCALL(glGetObjectParameterivARB(shader, GL_OBJECT_SHADER_SOURCE_LENGTH_ARB, &tmp)); 293 294 source = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, tmp); 295 if (!source) 296 { 297 ERR("Failed to allocate %d bytes for shader source.\n", tmp); 298 return; 299 } 300 301 source_size = tmp; 302 303 WDLOG(("Object %u:\n", shader)); 304 GL_EXTCALL(glGetObjectParameterivARB(shader, GL_OBJECT_SUBTYPE_ARB, &tmp)); 305 WDLOG((" GL_OBJECT_SUBTYPE_ARB: %s.\n", debug_gl_shader_type(tmp))); 306 GL_EXTCALL(glGetObjectParameterivARB(shader, GL_OBJECT_COMPILE_STATUS_ARB, &tmp)); 307 WDLOG((" GL_OBJECT_COMPILE_STATUS_ARB: %d.\n", tmp)); 308 WDLOG(("\n")); 309 310 ptr = source; 311 GL_EXTCALL(glGetShaderSourceARB(shader, source_size, NULL, source)); 312 #if 0 313 while ((line = get_info_log_line(&ptr))) WDLOG((" %s\n", line)); 314 #else 315 WDLOG(("*****shader source***\n")); 316 WDLOG((" %s\n", source)); 317 WDLOG(("\n*****END shader source***\n\n")); 318 #endif 319 WDLOG(("\n")); 320 } 321 286 322 /* GL locking is done by the caller. */ 287 323 static void shader_glsl_dump_program_source(const struct wined3d_gl_info *gl_info, GLhandleARB program) … … 291 327 char *source = NULL; 292 328 329 WDLOG(("\n***************************dumping program %d******************************\n", program)); 330 293 331 GL_EXTCALL(glGetObjectParameterivARB(program, GL_OBJECT_ATTACHED_OBJECTS_ARB, &object_count)); 294 332 objects = HeapAlloc(GetProcessHeap(), 0, object_count * sizeof(*objects)); … … 302 340 for (i = 0; i < object_count; ++i) 303 341 { 304 char *ptr, *line; 305 GLint tmp; 306 307 GL_EXTCALL(glGetObjectParameterivARB(objects[i], GL_OBJECT_SHADER_SOURCE_LENGTH_ARB, &tmp)); 308 309 if (!source || source_size < tmp) 310 { 311 HeapFree(GetProcessHeap(), 0, source); 312 313 source = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, tmp); 314 if (!source) 315 { 316 ERR("Failed to allocate %d bytes for shader source.\n", tmp); 317 HeapFree(GetProcessHeap(), 0, objects); 318 return; 319 } 320 source_size = tmp; 321 } 322 323 WDLOG(("Object %u:\n", objects[i])); 324 GL_EXTCALL(glGetObjectParameterivARB(objects[i], GL_OBJECT_SUBTYPE_ARB, &tmp)); 325 WDLOG((" GL_OBJECT_SUBTYPE_ARB: %s.\n", debug_gl_shader_type(tmp))); 326 GL_EXTCALL(glGetObjectParameterivARB(objects[i], GL_OBJECT_COMPILE_STATUS_ARB, &tmp)); 327 WDLOG((" GL_OBJECT_COMPILE_STATUS_ARB: %d.\n", tmp)); 328 WDLOG(("\n")); 329 330 ptr = source; 331 GL_EXTCALL(glGetShaderSourceARB(objects[i], source_size, NULL, source)); 332 while ((line = get_info_log_line(&ptr))) WDLOG((" %s\n", line)); 333 WDLOG(("\n")); 342 shader_glsl_dump_shader_source(gl_info, objects[i]); 334 343 } 335 344 336 345 HeapFree(GetProcessHeap(), 0, source); 337 346 HeapFree(GetProcessHeap(), 0, objects); 347 348 WDLOG(("\n***************************END dumping program %d******************************\n\n", program)); 338 349 } 339 350 … … 358 369 { 359 370 ERR("Program %u link status invalid.\n", program); 371 #ifndef VBOXWINEDBG_SHADERS 360 372 shader_glsl_dump_program_source(gl_info, program); 361 } 373 #endif 374 } 375 #ifdef VBOXWINEDBG_SHADERS 376 shader_glsl_dump_program_source(gl_info, program); 377 #endif 362 378 } 363 379 else if (tmp == GL_SHADER_OBJECT_ARB) … … 372 388 { 373 389 ERR("Shader %u compile status invalid.\n", program); 374 shader_glsl_dump_ program_source(gl_info, program);390 shader_glsl_dump_shader_source(gl_info, program); 375 391 } 376 392 } … … 3104 3120 { 3105 3121 FIXME("texldd used, but not supported by hardware. Falling back to regular tex\n"); 3106 return shader_glsl_tex(ins); 3122 shader_glsl_tex(ins); 3123 return; 3107 3124 } 3108 3125 -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/surface.c
r39048 r39130 3247 3247 } 3248 3248 3249 #ifdef VBOX_WITH_WDDM3250 # define VBOX_WINE_TEXDIRECT_USE_RESOURCELOAD3251 #endif3252 3249 /* Does a direct frame buffer -> texture copy. Stretching is done 3253 3250 * with single pixel copy calls … … 3309 3306 } 3310 3307 3311 #ifdef VBOX_WINE_TEXDIRECT_USE_RESOURCELOAD 3312 if (isSrcOffscreen) context = context_acquire(myDevice, SrcSurface, CTXUSAGE_RESOURCELOAD); 3313 else if (!surface_is_offscreen((IWineD3DSurface*)This)) context = context_acquire(myDevice, (IWineD3DSurface *) This, CTXUSAGE_RESOURCELOAD); 3314 else context = context_acquire(myDevice, NULL, CTXUSAGE_RESOURCELOAD); 3315 3316 surface_internal_preload(SrcSurface, SRGB_RGB); 3308 context = context_acquire(myDevice, SrcSurface, 3309 #ifdef VBOX_WITH_WDDM 3310 CTXUSAGE_BLIT_LIGHT 3317 3311 #else 3318 context = context_acquire(myDevice, SrcSurface, CTXUSAGE_BLIT);3312 CTXUSAGE_BLIT 3319 3313 #endif 3314 ); 3320 3315 3321 3316 surface_internal_preload((IWineD3DSurface *) This, SRGB_RGB); … … 3327 3322 if(isSrcOffscreen) { 3328 3323 TRACE("Reading from an offscreen target\n"); 3329 #ifdef VBOX_WINE_TEXDIRECT_USE_RESOURCELOAD3330 context_bind_fbo(context, GL_READ_FRAMEBUFFER, &context->src_fbo);3331 context_attach_surface_fbo(context, GL_READ_FRAMEBUFFER, 0, (IWineD3DSurfaceImpl *)SrcSurface);3332 #endif3333 3324 glReadBuffer(myDevice->offscreenBuffer); 3334 3325 checkGLcall("glReadBuffer()"); 3335 #ifdef VBOX_WINE_TEXDIRECT_USE_RESOURCELOAD3336 context_attach_depth_stencil_fbo(context, GL_READ_FRAMEBUFFER, NULL, FALSE);3337 #endif3338 3326 } 3339 3327 else 3340 3328 { 3341 #ifdef VBOX_WINE_TEXDIRECT_USE_RESOURCELOAD3342 context_bind_fbo(context, GL_READ_FRAMEBUFFER, NULL);3343 #endif3344 3329 glReadBuffer(surface_get_gl_buffer(SrcSurface)); 3345 3330 checkGLcall("glReadBuffer()"); -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_private.h
r38982 r39130 1254 1254 CTXUSAGE_BLIT = 3, /* OpenGL states are set up 3D drawing */ 1255 1255 CTXUSAGE_CLEAR = 4, /* Drawable and states are set up for clearing */ 1256 CTXUSAGE_BLIT_LIGHT = 5, /* OpenGL states are set up 3D drawing */ 1256 1257 } ContextUsage; 1257 1258
Note:
See TracChangeset
for help on using the changeset viewer.