wined3d: Store fixed-function alpha test support in struct wined3d_d3d_info.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2019-08-06 01:23:17 +04:30 committed by Alexandre Julliard
parent e795ddb3d8
commit ca6cbb73e1
4 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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]

View File

@ -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]

View File

@ -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;