+ if (gl_info->supported[ARB_TEXTURE_GATHER])
+ {
+ for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i)
+ {
+ if (state->sampler_states[i][WINED3D_SAMP_MIPMAP_LOD_BIAS] == MAKEFOURCC('G','E','T','4'))
+ args->fetch4 |= 1 << i;
+ else
+ args->fetch4 &= ~(1 << i);
+ }
+ }
You either have to set args->fetch4 to 0 if ARB_TEXTURE_GATHER is not supported, or you don't need to remove the bit if the lod bias is not set to GET4. We have the memset at the start, so from the code point of view the second case applies. Once upon a time the idea was to avoid the memset to avoid writing ps_compile_args twice in this rather time critical function, but I don't know if this is still a worthwhile goal. Henri?