When running 2D applications (e.g. StarCraft) A white screen flickers and makes
the application unusable. It appears to be similar to Bug 10697
(http://bugs.winehq.org/show_bug.cgi?id=10697)(clicky) but not quite the same.
The problem seems to stem from failed OpenGL calls in dlls/wined3d/surface.c.
Here (http://pastebin.com/m79d613b4)(clicky) is the log with
WINEDEBUG=trace+d3d_surface.
I think the problem stems from these two lines:
trace:d3d_surface:surface_allocate_surface (0x144480) : Creating surface (target
0xde1) level 0, d3d format WINED3DFMT_P8_UINT, internal format 0x1908, width
1024, height 512, gl format 0x1908, gl type=0x1401
fixme:d3d_surface:surface_allocate_surface
>>>>>>>>>>>>>>>>>
GL_INVALID_VALUE (0x501) from glTexImage2D @ surface.c / 597
Wine can't allocate the surface and so later it can't upload it and
marks the surface as indrawable:
trace:d3d_surface:surface_upload_data This 0x144480, internal 0x1908, width 640,
height 480, format 0x1908, type 0x1401, data 0x1543020.
trace:d3d_surface:surface_upload_data target 0xde1, level 0, resource size
307200.
trace:d3d_surface:surface_upload_data Calling glTexSubImage2D.
fixme:d3d_surface:surface_upload_data
>>>>>>>>>>>>>>>>>
GL_INVALID_OPERATION (0x502) from glTexSubImage2D @ surface.c / 537
trace:d3d_surface:IWineD3DSurfaceImpl_LoadLocation
(0x144480)->(SFLAG_INDRAWABLE, (nil))
Looking at the OpenGL api documentation it seems that most of the parameters
that would cause a GL_INVALID_VALUE are correct. But there are a couple that
are dependent on TEXTURE_MAX_SIZE or something like that. I'm not sure what
TEXTURE_MAX_SIZE is because it's dependent on the video card and the texture
options. I don't really have any experience with OpenGL programming, so I
was hoping someone would help me figure this out.[/code]