wined3d: Do not try to invalidate compute states for freshly created contexts.

The context_invalidate_state() function doesn't handle compute states
properly.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2017-02-22 13:19:27 +01:00 committed by Alexandre Julliard
parent cab9282d10
commit f5de7186aa
1 changed files with 3 additions and 3 deletions

View File

@ -1828,11 +1828,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
ret->d3d_info = d3d_info;
ret->state_table = device->StateTable;
/* Mark all states dirty to force a proper initialization of the states
* on the first use of the context. */
/* Mark all states dirty to force a proper initialization of the states on
* the first use of the context. Compute states do not need initialization. */
for (state = 0; state <= STATE_HIGHEST; ++state)
{
if (ret->state_table[state].representative)
if (ret->state_table[state].representative && !STATE_IS_COMPUTE(state))
context_invalidate_state(ret, state);
}