From f5de7186aa5669982227acde39cc0324fa69e8e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Wed, 22 Feb 2017 13:19:27 +0100 Subject: [PATCH] wined3d: Do not try to invalidate compute states for freshly created contexts. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The context_invalidate_state() function doesn't handle compute states properly. Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index a58a90522dc..67daded232d 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -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); }