Henri Verbeet : wined3d: Only warn about using Lod sample functions in fragment shaders is ARB_shader_texture_lod isn 't supported.
Alexandre Julliard
julliard at winehq.org
Tue Sep 1 11:05:54 CDT 2009
Module: wine
Branch: master
Commit: ab8523931aff5ce25d334aec2ae3612ec16f2ff3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ab8523931aff5ce25d334aec2ae3612ec16f2ff3
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Sep 1 09:09:36 2009 +0200
wined3d: Only warn about using Lod sample functions in fragment shaders is ARB_shader_texture_lod isn't supported.
---
dlls/wined3d/glsl_shader.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 8aae5f5..b6fac0c 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -2769,6 +2769,7 @@ static void shader_glsl_texldl(const struct wined3d_shader_instruction *ins)
{
IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader;
IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
+ const struct wined3d_gl_info *gl_info = &deviceImpl->adapter->gl_info;
glsl_sample_function_t sample_function;
glsl_src_param_t coord_param, lod_param;
DWORD sample_flags = WINED3D_GLSL_SAMPLE_LOD;
@@ -2787,7 +2788,8 @@ static void shader_glsl_texldl(const struct wined3d_shader_instruction *ins)
shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_3, &lod_param);
- if (shader_is_pshader_version(ins->ctx->reg_maps->shader_version.type))
+ if (!gl_info->supported[ARB_SHADER_TEXTURE_LOD]
+ && shader_is_pshader_version(ins->ctx->reg_maps->shader_version.type))
{
/* The GLSL spec claims the Lod sampling functions are only supported in vertex shaders.
* However, they seem to work just fine in fragment shaders as well. */
More information about the wine-cvs
mailing list