[PATCH] wined3d VideoRam registry setting

Oliver Stieber oliver_stieber at yahoo.co.uk
Sun Oct 16 10:22:48 CDT 2005

> > 
> > > Another thing:
> > > Would it be better to determine the amount of videoRam when installing
> > wine
> > > and storing it in the registry or checking at runtime when
> > > GetAvailableTextureMem is called?
> > I'd suggest to determine it in IWineD3D::CreateDevice and store it in the 
> > IWineD3DDeviceImpl class.
> > 
> > How does this script work with multiple graphics cards?

ATI and NVidia both have extensions to X that return the total video memory on the card, other
options include using code from the DRI project, and I've got some very old dos code for some
Matrox cards. Since there is no standard way to find out the amount of video ram available were
going to have to maintain different versions for different cards until the day that there's a
standard X extension.

> Parsing the X log file is way to hacky in my opinion to determine the amount
> of video memory. Depending on how many X servers you use it can be a
> different file. In case of nvidia videocards I would prefer to use the
> NV-CONTROL extension for X. (it is available on Linux/Solaris/FreeBSD) In
> other cases I would use the pci header of the videocard. A part of it
> contains what memory ranges are mapped and a part of it corresponds to the
> size which is mapped for the framebuffer. For instance 128MB on my system:
> 0000:01:00.0 VGA compatible controller: nVidia Corporation NV35 [GeForce FX
> 5900] (rev a1) (prog-if 00 [VGA])
>         Flags: bus master, 66MHz, medium devsel, latency 248, IRQ 11
>         Memory at de000000 (32-bit, non-prefetchable) [size=16M]
>         Memory at d0000000 (32-bit, prefetchable) [size=128M]
>         Expansion ROM at dfee0000 [disabled] [size=128K]
>         Capabilities: <available only to root>
> The only thing is that the pci header can't be thrusted in all cases but I
> would say it is a lot better than nothing.

The PCI option isn't a good option, for one the memory mapped doesn't have to relate to the size
of the on-board memory if the driver uses paging. I would say that it's worse than nothing,
letting the user select how much memory they have installed via winecfg is a better option.


> Regards,
> Roderick
> -- 
> NEU: Telefon-Flatrate fürs dt. Festnetz! GMX Phone_Flat: 9,99 Euro/Mon.*
> Für DSL-Nutzer. Ohne Providerwechsel! http://www.gmx.net/de/go/telefonie

How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com

More information about the wine-devel mailing list