On 1 August 2014 20:25, Andrei Slăvoiu andrei.slavoiu@gmail.com wrote:
-static UINT d3d_level_from_gl_info(const struct wined3d_gl_info *gl_info) +static enum wined3d_d3d_level d3d_level_from_gl_info(const struct wined3d_gl_info *gl_info) {
- UINT level = 0;
enum wined3d_d3d_level level = WINED3D_D3D_LEVEL_5;
if (gl_info->supported[ARB_MULTITEXTURE])
level = 6;
if (gl_info->supported[ARB_TEXTURE_COMPRESSION] && gl_info->supported[ARB_TEXTURE_CUBE_MAP] && gl_info->supported[ARB_TEXTURE_ENV_DOT3])level = WINED3D_D3D_LEVEL_6;
level = 7;
- if (level == 7 && gl_info->supported[ARB_MULTISAMPLE]
level = WINED3D_D3D_LEVEL_7;
- if (level == WINED3D_D3D_LEVEL_7 && gl_info->supported[ARB_MULTISAMPLE] && gl_info->supported[ARB_TEXTURE_BORDER_CLAMP])
level = 8;
- if (level == 8 && gl_info->supported[ARB_FRAGMENT_PROGRAM]
level = WINED3D_D3D_LEVEL_8;
- if (level == WINED3D_D3D_LEVEL_8 && gl_info->supported[ARB_FRAGMENT_PROGRAM] && gl_info->supported[ARB_VERTEX_SHADER])
level = 9;
- if (level == 9 && (gl_info->supported[EXT_GPU_SHADER4]
level = WINED3D_D3D_LEVEL_9_SM2;
- if (level == WINED3D_D3D_LEVEL_9_SM2 && (gl_info->supported[EXT_GPU_SHADER4] || gl_info->glsl_version >= MAKEDWORD_VERSION(1, 30)))
level = 10;
level = WINED3D_D3D_LEVEL_10;
return level;
}
...
- if (d3d_level >= 9 && gl_info->supported[NV_VERTEX_PROGRAM3])
- if (d3d_level >= WINED3D_D3D_LEVEL_9_SM3)
You never return WINED3D_D3D_LEVEL_9_SM3 from d3d_level_from_gl_info(). I'd recommend to just introduce WINED3D_D3D_LEVEL_9 in this patch, and split it up in _SM2 and _SM3 in a separate patch.