Henri Verbeet : wined3d: Enable SM3 if ARB_shader_texture_lod is supported.
Alexandre Julliard
julliard at winehq.org
Tue Apr 26 11:35:43 CDT 2011
Module: wine
Branch: master
Commit: 3f0120241bcfdcd28cc8c918ae38e4420fa20ae1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3f0120241bcfdcd28cc8c918ae38e4420fa20ae1
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Apr 25 22:54:15 2011 +0200
wined3d: Enable SM3 if ARB_shader_texture_lod is supported.
---
dlls/wined3d/glsl_shader.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index ba5a159..499ed15 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -4933,9 +4933,16 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct s
* goes up to 512. Assume that if the number of instructions is 512 or
* less we have to do with SM2 hardware. NOTE: SM3 requires 512 or more
* instructions but ATI and NVIDIA offer more than that (1024 vs 4096) on
- * their most basic SM3 hardware. */
+ * their most basic SM3 hardware.
+ *
+ * ARB_shader_texture_lod is a requirement for SM3 (texldd). Ideally we'd
+ * make this a hard requirement, but the extension is still somewhat new,
+ * and relatively few SM3 shaders actually depend on it. For the moment
+ * just use it to enable SM3 (20110423). */
if ((gl_info->supported[NV_VERTEX_PROGRAM3] && gl_info->supported[NV_FRAGMENT_PROGRAM2])
- || gl_info->limits.arb_ps_instructions > 512)
+ || gl_info->limits.arb_ps_instructions > 512
+ || gl_info->supported[ARB_SHADER_TEXTURE_LOD]
+ || gl_info->supported[EXT_GPU_SHADER4])
{
pCaps->VertexShaderVersion = WINED3DVS_VERSION(3,0);
pCaps->PixelShaderVersion = WINED3DPS_VERSION(3,0);
More information about the wine-cvs
mailing list