--- a/dlls/wined3d/glsl_shader.c +++ a/dlls/wined3d/glsl_shader.c @@ -91,6 +91,7 @@ struct glsl_sample_function enum wined3d_data_type data_type; BOOL output_single_component; unsigned int offset_size; + BOOL disable_lod; }; enum heap_node_op @@ -3420,6 +3421,17 @@ static void shader_glsl_get_sample_function(const struct wined3d_shader_context const char *base = "texture", *type_part = "", *suffix = ""; unsigned int coord_size, deriv_size; + if (shadow && lod && resource_type == WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY) + { + FIXME("GLSL does not support sample comparison with lod for 2D array textures.\n"); + lod = FALSE; + sample_function->disable_lod = TRUE; + } + else + { + sample_function->disable_lod = FALSE; + } + sample_function->data_type = ctx->reg_maps->resource_info[resource_idx].data_type; if (resource_type >= ARRAY_SIZE(resource_type_info)) @@ -3663,7 +3675,7 @@ static void PRINTF_ATTR(9, 10) shader_glsl_gen_sample_code(const struct wined3d_ } if (dx && dy) shader_addline(ins->ctx->buffer, ", %s, %s", dx, dy); - else if (bias) + else if (bias && !sample_function->disable_lod) shader_addline(ins->ctx->buffer, ", %s", bias); if (sample_function->offset_size) {