idea: display drivers

Roderick Colenbrander thunderbird2k at gmail.com
Sun Feb 7 11:23:51 CST 2010


On Sun, Feb 7, 2010 at 4:40 PM, Reece Dunn <msclrhd at googlemail.com> wrote:
> On 7 February 2010 15:02, Roderick Colenbrander <thunderbird2k at gmail.com> wrote:
>>> Emmanuel's code is available from Sourceforge.  It is a good starting
>>> point for this.  If you want, send me what you have so far for testing
>>> purposes.  It would be great to have a native MacOSX windowing system.
>>>
>>> James McKenzie
>>>
>>
>> The design of the old quartz driver is not correct. I remember that
>> Alexandre commented that a lot of code which was in it doesn't make
>> sense for a quartz driver but only for X11. Before a quartz driver can
>> be written we really need a dib engine. It will make writing another
>> driver much easier and much more code would be shared.
>>
>> Thinking a few steps further I also think that at some point the
>> current X11 driver needs to be redesigned for modern windows version
>> (we would get a classic winex11 and a modern one). The modern one
>> would in my opinion only be responsible for creating windows, font
>> rendering but the rest would all be done using OpenGL. This way the
>> rendering code could also work on OSX and only window management stuff
>> would be needed.
>
> In general, this seems to be the best approach. I do have a few
> questions, though:
>
>  1/  Does this mean that OpenGL is required for all GDI calls, not
> just D3D? If so, it will exclude people who don't have OpenGL support
> (e.g. are using the vesa, nv, or nouveau drivers).

I think that in the end we would need 2 drivers. One classic x11 in
the current design (adjusted a bit were possible) and one which
follows the Win7-design using OpenGL. The idea would be to let Wine
perform the majority of GDI calls in software (both the DIB stuff and
a big part of the DDB calls). Like Win7 we would accelerate common GDI
functions like AlphaBlend, BitBlt/StretchBlt (only the common ROPs
like SRCBLT and a few others) and ColorFill on the gpu using opengl.
See http://msdn.microsoft.com/en-us/library/dd434692.aspx for what
Win7 accelerates.

When using OpenGL we would emulate DIBSections using PBOs and perhaps
GLX_texture_from_bitmap is of any use as well in case of X11.

>  2/  What will the performance of GDI32 calls be like? There are
> various comments that the Vista architecture does not optimise GDI32
> calls, so applications that use these are slower.
>

Vista performed all of GDI in software but Win7 accelerates a couple
of common calls which I mentioned above using the GPU. Performance
could be quite good.

So to summarize a win7-style wine rendering architecture would perform
all DIB rendering in software ('the dib engine') and also the
non-common DDB calls. Other calls are accelerated using OpenGL. A
x11/quartz/some_other_os driver would be used for window creation,
window management, input and likely font rendering.

Roderick



More information about the wine-devel mailing list