[PATCH 4/5] wined3d: Only warn about using Lod sample functions in fragment shaders is ARB_shader_texture_lod isn't supported.
Henri Verbeet
hverbeet at codeweavers.com
Tue Sep 1 02:09:36 CDT 2009
---
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. */
--
1.6.0.6
More information about the wine-patches
mailing list