D3D9 autogeneration of mipmaps

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

D3D9 autogeneration of mipmaps

Post by CuteAlien »

I just found out that CD3D9Driver::queryFeature returns always false for EVDF_MIP_MAP_AUTO_UPDATE.
The code explains that even:

Code: Select all

 
        case EVDF_MIP_MAP_AUTO_UPDATE:
                // always return false because a lot of drivers claim they do
                // this but actually don't do this at all.
                return false; //(Caps.Caps2 & D3DCAPS2_CANAUTOGENMIPMAP) != 0;
 
But I just checked the MSDN documentation for that (http://msdn.microsoft.com/en-us/library ... 85%29.aspx) and it says to call CheckDeviceFormat with D3DUSAGE_AUTOGENMIPMAP afterward. And only if the return value is D3D_OK, the mipmaps are guaranteed to be autogenerated.
So just wondering if that was tried already? I'm a little afraid of just changing it as I don't know on which cards it fails or what was tried before.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: D3D9 autogeneration of mipmaps

Post by hybrid »

Yes, I tried that at least two times already. But Niko always found problematic gfx card with those lines, so we always reverted the code. You also need to check another CAPS entry, IIRC. Otherwise mipmaps are only generated for special dimensions. And it will still break for many driver versions.
Post Reply