On Fri, Aug 14, 2009 at 9:41 PM, Stephen Eilertspedrosa@gmail.com wrote:
On Fri, Aug 14, 2009 at 4:23 PM, King InuYasha ngompa13@gmail.com wrote:
This seems like the wrong way to go. I'm wondering if there is another way to detect VRAM? There should be a way to determine VRAM from Xorg? Why should OpenGL or DirectDraw be the method that Wine uses to determine video RAM? Why should Wine have a fixed value based on a list? Maybe I'm being stupid, but I think it would make sense for the display server (xorg) to know how much VRAM a graphics card has...
Just a nitpick: Wine does not *use* DirectDraw, it *implements* DirectDraw, as there's no DirectDraw anywhere other than win32.
I see no problem querying OpenGL, if the extensions can be trusted to provide useful values - even if they are undocumented or not always available. The problem with the approach so far seems to be that this extension is ATI-specific. Then again, the current fallback can be left in place if Wine does not find a way to properly detect the VRAM amount.
As for asking Xorg, I do not have the knowledge to say if it is feasible - but one would think that would've been tried long ago if it were straightforward.
--Stephen
programmer, n: A red eyed, mumbling mammal capable of conversing with inanimate monsters.
Xorg explicitly doesn't tell programs how much memory they have as it can lead to bad designs and these days cards have a sufficient amount of memory for 2D. In case of 3D programs the amount of memory is more important to have. OpenGL itself (except using the ATI extension) does not provide a way to query the amount of video memory or the exact videocard (yes it exports the renderer string but d3d exports the pci id as well. Like X, OpenGL wants to hide this information from the designer. Though these days this information is becoming more and more important for designers as they can decide to e.g. use a different code path. Native Linux games like Quake Wars for this reason use vendor specific extensions like NV-CONTROL to obtain some info. It might make sense to have a cleaned up version of the ATI memory extension as real ARB extension. For modern games it is crucial. Hopefully AMD can clean it up. When I last checked this extension months ago the total amount of memory wasn't in the spec, it might make sense to update the spec.
Regards, Roderick Colenbrander