@karlos: i see, i suspected it since alain introducetd similar mechanism just of late. dunno which is better, but i fear env variables should be used with caution even though it sounds more amiga-like. im not familiar with how do you create them, but they might duplicate or cross interact once there are more applications and also one tends to forget them when something goes wrong.
The env mechanism is fairly simple. Each driver already has it's own directory within ENV:Warp3D in which it stores the global settings for that driver. I extended this by adding subdirectories, where the name of the subdirectory needs to match the name of the executable the setting is for. You add them on an as-needed basis.
To quote the documentation:
The general path to these settings is ENV:Warp3D///. Thus, when the application "ShootEmUpFTW" running on a Radeon 9250 allocates the 3D resources, the driver checks to see whether any of the driver's environment settings in the ENV:Warp3D/RadeonR200/ directory have also been set in the ENV:Warp3D/RadeonR200/ShootEmUpFTW/ directory. Any that have will override those in the main ENV:Warp3D/RadeonR200/ directory.
So, when an application first loads the driver, the global settings are pulled in. This is the standard behaviour.
Next, whenever the application creates a 3D context, the driver tries to determine the command name of the application that opened it (falling back onto the task name if nothing else works) and looks to see if a subdirectory of overridden settings exists with that name. If it does, it re-evaluates any that it finds in there and applies them to the current context only*
Per application settings always trump global ones. This means that you can rely on the global settings mostly and tweak individual variables per application as necessary to get around any bugs, incompatibilities etc.
*unless the creator of the 3D context is a vanilla Task, in which case, it can't do the necessary IO and so just uses the global settings as they are. Thankfully I've not seen any examples of this.