Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/wined3d/adapter_gl.c | 1 + dlls/wined3d/shader.c | 2 +- dlls/wined3d/utils.c | 2 +- dlls/wined3d/wined3d_private.h | 1 + 4 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 52fd6851f82..90d9ba69008 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -3777,6 +3777,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, adapter->vertex_pipe->vp_get_caps(adapter, &vertex_caps); d3d_info->xyzrhw = vertex_caps.xyzrhw; d3d_info->ffp_generic_attributes = vertex_caps.ffp_generic_attributes; + d3d_info->ffp_alpha_test = !!gl_info->supported[WINED3D_GL_LEGACY_CONTEXT]; d3d_info->limits.ffp_vertex_blend_matrices = vertex_caps.max_vertex_blend_matrices; d3d_info->limits.active_light_count = vertex_caps.max_active_lights; d3d_info->emulated_flatshading = vertex_caps.emulated_flatshading; diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index ac3de3d776e..116dd5632f5 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -4146,7 +4146,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3 args->pointsprite = state->render_states[WINED3D_RS_POINTSPRITEENABLE] && state->gl_primitive_type == GL_POINTS;
- if (gl_info->supported[WINED3D_GL_LEGACY_CONTEXT]) + if (d3d_info->ffp_alpha_test) args->alpha_test_func = WINED3D_CMP_ALWAYS - 1; else args->alpha_test_func = (state->render_states[WINED3D_RS_ALPHATESTENABLE] diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 31eca98665f..1dfb1700d3a 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -6226,7 +6226,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d settings->pointsprite = state->render_states[WINED3D_RS_POINTSPRITEENABLE] && state->gl_primitive_type == GL_POINTS;
- if (gl_info->supported[WINED3D_GL_LEGACY_CONTEXT]) + if (d3d_info->ffp_alpha_test) settings->alpha_test_func = WINED3D_CMP_ALWAYS - 1; else settings->alpha_test_func = (state->render_states[WINED3D_RS_ALPHATESTENABLE] diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 76a938a3e8c..add1f1c68bd 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -202,6 +202,7 @@ struct wined3d_d3d_info uint32_t xyzrhw : 1; uint32_t emulated_flatshading : 1; uint32_t ffp_generic_attributes : 1; + uint32_t ffp_alpha_test : 1; uint32_t vs_clipping : 1; uint32_t shader_color_key : 1; uint32_t shader_double_precision : 1;