Re: Video Memory Patch and GetAvailableTextureMem

Ove Kaaven <[email protected]>
Newsgroups gmane.comp.emulators.winex.devel
Organization TransGaming Technologies Inc
Message-ID <1071530622.1572.83.camel@renegade>
man, 15.12.2003 kl. 23.12 skrev Simon Day:
> Trying to run a game called Horizons, however on startup it complains
> that it only has 16Mb of ram available (this was first running on winex
> 3.2)
> 
> After checking out the cvs tip (this morning) I found Rob's video ram
> patch did not seem to be in the code.

It certainly is, although not unmodified. Your grep doesn't show x11drv,
so I guess it must be applied for you too. But looking at the patch
again, I guess it only treats ddraw (d3d7 and earlier), not d3d8 or
d3d9.

> dlls/d3d8/d3d8_main.c
> 
> UINT WINAPI Direct3DDevice8_GetAvailableTextureMem(LPDIRECT3DDEVICE8
> iface)
> {
>   TRACE("(%p)->()\n", iface);
>   return 16*1024*1024; /* 16MB */
> }

You could change it to something like

  return dd_gbl->ddCaps.dwVidMemFree;

to take advantage of Rob's patch, although currently dwVidMemFree never
changes so it still won't be an accurate representation of the actual
free memory...

> What exactly did I change when I changed the texture mem? Is that
> refering to graphics card memory or the APG apeture? shoudl this also be
> parametised similarly to the videoram as done by rob in his patch?

I think it would refer to graphics card memory. That's where textures in
D3DPOOL_DEFAULT goes. (I suspect AGP memory might be used for loading
textures from D3DPOOL_MANAGED, but managed textures can also be stored
in plain system memory when not in use, and in graphics card memory when
in use, so the amount of AGP memory does not matter for d3d8 texturing.)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.