wined3d: Only warn about using Lod sample functions in fragment shaders is ARB_shader_texture_lod isn't supported.

This commit is contained in:
Henri Verbeet 2009-09-01 09:09:36 +02:00 committed by Alexandre Julliard
parent 078273afa6
commit ab8523931a

View File

@ -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. */