Commit a79db19f authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Set fixed_function_usage_map to 0 for an sm4 draw without a PS.

parent 0900d919
...@@ -3735,12 +3735,26 @@ static void context_invalidate_texture_stage(struct wined3d_context *context, DW ...@@ -3735,12 +3735,26 @@ static void context_invalidate_texture_stage(struct wined3d_context *context, DW
context_invalidate_state(context, STATE_TEXTURESTAGE(stage, i)); context_invalidate_state(context, STATE_TEXTURESTAGE(stage, i));
} }
static bool use_ffp_ps(const struct wined3d_state *state)
{
struct wined3d_shader *vs = state->shader[WINED3D_SHADER_TYPE_VERTEX];
if (!use_vs(state))
return true;
if (vs && vs->reg_maps.shader_version.major >= 4)
return false;
return true;
}
static void context_update_fixed_function_usage_map(struct wined3d_context *context, static void context_update_fixed_function_usage_map(struct wined3d_context *context,
const struct wined3d_state *state) const struct wined3d_state *state)
{ {
UINT i, start, end; UINT i = 0, start, end;
context->fixed_function_usage_map = 0; context->fixed_function_usage_map = 0;
if (use_ffp_ps(state))
{
for (i = 0; i < WINED3D_MAX_FFP_TEXTURES; ++i) for (i = 0; i < WINED3D_MAX_FFP_TEXTURES; ++i)
{ {
enum wined3d_texture_op color_op = state->texture_states[i][WINED3D_TSS_COLOR_OP]; enum wined3d_texture_op color_op = state->texture_states[i][WINED3D_TSS_COLOR_OP];
...@@ -3770,6 +3784,7 @@ static void context_update_fixed_function_usage_map(struct wined3d_context *cont ...@@ -3770,6 +3784,7 @@ static void context_update_fixed_function_usage_map(struct wined3d_context *cont
&& i < WINED3D_MAX_FFP_TEXTURES - 1) && i < WINED3D_MAX_FFP_TEXTURES - 1)
context->fixed_function_usage_map |= (1u << (i + 1)); context->fixed_function_usage_map |= (1u << (i + 1));
} }
}
if (i < context->lowest_disabled_stage) if (i < context->lowest_disabled_stage)
{ {
......
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