* The copyrights are still in my copy of the altered file. I have no idea why CVS removed them. I'll look into why it did that. Same goes with the formatting.
* Will change from WARN to FIXME.
* Detecting the amount of texture memory is implementation specific and so we'd have to do different code for different drivers. If we were talking about Mac OS X, there OpenGL implementation does have this built-in but I do not believe this to be the case for WGL or Linux OpenGL. OpenGL, unlike Direct3D, is not designed for only 3D accelerated setups, and as such does not make any assumptions about hardware. Direct3D on the other hand is always run natively on Wintel boxes and there is a more consistant hardware setup.
* Winecfg cannot easily detect what PS version is supported because it is not linked with wined3d. I would have to link the GL code into winecfg in order to detect if the OpenGL driver supports x version of Pixel Shaders which would then require additional defs to still allow for the --without-opengl option in the configure script.
* Selecting too much texture memory may or may not break a game. It is entirely dependent on the game itself. Some games will automatically scale back texture useage when memory runs out, even if it runs out earlier than it should. Others will throw an exception and stop.
* Will fix the defaults and terminology.
Vitaliy Margolen wrote:
Saturday, February 4, 2006, 3:33:50 PM, Brian Hill wrote:
Attached is a patch file of the changes I have made to wined3d and it's config options.
Summary of the changes :
- User-selectable pixel shader version. Default is 1.4. 2.0 is
selectable and if your card has GLSL support it should return the PS version to apps as 2.0. 98% of the PS 2.0 functions right now however are stubs or not implemented so this is why 1.4 is default. Setting the version to 2.0 will return a warning stating that it will most likely break any applications that try to use 2.0.
Did we really had so much changes that we can change default from none to 1.4?
- User-selectable texture memory reporting. The current CVS version is
hardcoded to report 64 megabytes of graphics card texture memory. I
We still need to make an attempt to detect it. Overriding it this way doesn't really make it more universal. From what I see it will be another way to users to select as much as there is and brake textures totally.
[skip]
Now the patch itself:
if (Adapter >= IWineD3D_GetAdapterCount(iface)) {
return D3DERR_INVALIDCALL;
}return D3DERR_INVALIDCALL;
This and lots of other places: Please don't change formatting in the function that you haven't otherwise changed. Especially when you change from accepted format (4 spaces indent) to something different.
if(GL_SUPPORT(ARB_SHADING_LANGUAGE_100)) {
WARN("PS 2.0 support is mostly incomplete,turning it
on will break most applications that attempt to use it.\n");
Use FIXME instead. WARN by default is not shown.
} else {
WARN("Your OpenGL driver lacks the needed extensions to support Pixel Shader 2.0\n");
WARN("Defaulting back to Pixel Shader version 1.4");
*pCaps->PixelShaderVersion = D3DPS_VERSION(1,4);
*pCaps->PixelShader1xMaxValue = 1.0;
}
If GPU / driver doesn't support PS2.0 then users shouldn't be able to select this option in the first place.
default :
WARN("Invalid Pixel Shader version %d",wined3d_settings.ps_mode);
break;
Default should be NONE.
if (!strcmp(buffer,"default"))
{
TRACE("Allow pixel shaders version 1.4\n");
wined3d_settings.ps_mode = PS_14;
}
I would drop default and make it "auto-detect" and make it default instead.
from dlls/wined3d/wined3d_main.c:
wined3d_settings_t wined3d_settings = { VS_HW, /* Hardware by default */ PS_NONE, /* Disabled by default */ VBO_HW /* Hardware by default */ };
As you see default is default is PS_NONE. So please make winecfg match that. Or change it here as well. (This is when no options are present in the registry)
if (!strcmp(buffer,"16 Mb")) {
TRACE("Setting available texture memory to 16 Mb + AGP");
wined3d_settings.texture_memory = 16 * 1024 * 1024;
}
Don't use "16 Mb" format. Use number in bytes. That should prevent lots of problems with parsing "user edited" entries.
--- programs/winecfg/x11drvdlg.c 2 Feb 2006 13:13:48 -0000 1.31 +++ programs/winecfg/x11drvdlg.c 4 Feb 2006 22:21:04 -0000 @@ -1,26 +1,3 @@ -/*
- Graphics configuration code
- Copyright 2003 Mark Westcott
- Copyright 2003-2004 Mike Hearn
- Copyright 2005 Raphael Junqueira
Why are you deleting copyrights?
Regards, Vitaliy Margolen