WineCfg and DirectX options

Vit Hrachovy vit.hrachovy at
Tue Mar 20 06:54:48 CDT 2007

On Mon, Mar 19, 2007 at 02:07:59PM +0100, Stefan D?singer wrote:
> > Hi,
> > implementing GLSL checkbox, OffScreenRenderingMode dropdown menu and
> > VideoMemorySize textbox into winecfg would be easy.
> GLSL is OK IMO, because some drivers(*cough* macos *cough*) have serious 
> problems with glsl. It could be included into the shader dropdown box. The 
> issue that needs to be dealt with is that we can't combine arb vertex shaders 
> and glsl pixel shaders or vice versa.
> Video memory size maybe too. There are vendor dependent ways to read it, but 
> implementing them is pretty nasty(requires some private  to winex11.drv). 
> Altough we had that discussion a number of times already and we only agreed 
> on a registry key so far.

Hi Stephan,
I've inspected winecfg code closely and the current state is that
implementing GLSL into shader dropdown menu would make it non-elegant.

Shader dropdown box expects the registry value to be only on one place,
in [Software\\Wine\\Direct3D] VertexShaderMode.

GLSL in my opinion uses two registry entries - VertexShaderMode and
UseGLSL. IMO UseGLSL == enabled implicates VertexShaderMode == hardware.

To reflect the current state I could take one of the following two

1.  Add a checkbox 'Allow GLSL (if supported by hardware)' after 'Allow
    Pixel Shader (if supported by hardware)'. This checkbox would control
    only state of UseGLSL registry entry, nothing else.

1.1 Checkbox 'Allow GLSL' would set Vertex Shader Mode to "hardware" when

2.  Implement Implement GLSL entry into Vertex Shader Support dropdown
    menu and create nasty workarounds like:
  if (strcmp("GLSL" , D3D_VS_Modes[selected_mode].settingStr) == 0) {
    set_reg_key(config_key, keypath("Direct3D"), "VertexShaderMode", 
      "hardware" );
    set_reg_key(config_key, keypath("Direct3D"), "UseGLSL", "enabled");
    set_reg_key(config_key, keypath("Direct3D"), "VertexShaderMode",
    set_reg_key(config_key, keypath("Direct3D"), "UseGLSL", "disabled");

    where previous code was only:

  set_reg_key(config_key, keypath("Direct3D"), "VertexShaderMode",

I'd vote for 1. or 1.1 solution.

There is also another solution - to implement UseGLSL registry entry into
VertexShaderMode entry and discard UseGLSL key completely. However, this 
is far reaching change.

Vit Hrachovy

More information about the wine-devel mailing list