[Mesa-users] Newbie questions about WinSys.

Brian Paul brianp at vmware.com
Tue Aug 23 14:20:16 UTC 2016


On 08/22/2016 06:54 PM, Minkyu Lee wrote:
> Hi, I'm looking on WinSys recently.
>
> In some documentations, I read WinSys is OS(kernel) dependent.
>
> So I thought that the source codes of WinSys are different for different
> OSes.
>
> e.g. WInSys for Linux =/ WinSys for FreeBSD =/ WinSys for windows ...
>
> It may be wrong, but I think Mesa from
> mesa-git(https://cgit.freedesktop.org/mesa/mesa/
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__cgit.freedesktop.org_mesa_mesa_&d=CwMFaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=T0t4QG7chq2ZwJo6wilkFznRSFy-8uDKartPGbomVj8&m=8RxyW7QCwyVhusB6uKc6Ic0Oc7yLMqP6CVB3MLgI-eQ&s=NOraC_axRhJTouoaBmcFk9GswXZMJtDO2fm6XNb79nM&e=>)
> is for Linux.
>
> And I also thought it should be different from Mesa from FreeBSD ports.
>
> (I think FreeBSD ports ports other platform's modules, pkgs, libs, etc
> to FreeBSD)
>
> But when I checked these two WinSys codes (Linux vs FreeBSD) with
> vimdiff, the source codes are exactly same and I got confused.

Exactly what dirs/files are you comparing?


>
> Please someone tell me what I think wrong, and how WinSyses are
> different from each other depending on OS.

In the Gallium architecture, a "winsys" encapsulates whatever code is 
needed to interface a driver to a specific OS or window system.  Note 
that drivers should have no specific OS dependencies.  When a driver 
needs to allocate graphics memory, for example, it'll call a winsys 
interface function.

I've never used FreeBSD or looked at any code related to it so I can't 
comment on that.

Our VMware gallium driver ("svga") works both on Linux and Windows.  The 
linux winsys code is in src/gallium/winsys/svga/drm/.  The Windows 
winsys code is proprietary and not in the Mesa/gallium git tree. 
Anyway, the winsys interface for our driver is defined by 
src/gallium/drivers/svga/svga_winsys.h

By far, the vast majority of Mesa/gallium development is done on Linux 
so most of the winsys code you might find is for Linux.  Sorry I don't 
know much about the FreeBSD side of things.

-Brian



More information about the mesa-users mailing list