Commit ab852393 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Only warn about using Lod sample functions in fragment shaders is…

wined3d: Only warn about using Lod sample functions in fragment shaders is ARB_shader_texture_lod isn't supported.
parent 078273af
......@@ -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. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment