wined3d PS 2.0/TexMem/Config Window Patch
Vitaliy Margolen
wine-devel at kievinfo.com
Sat Feb 4 17:49:55 CST 2006
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
More information about the wine-devel
mailing list