From 4c65ccab6d48abe7be650ee7b9f3b72a70609a9a Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Sat, 30 Jul 2022 00:25:29 +0200 Subject: [PATCH] frontend/nine: Fix cso restore bug Invalidating all state groups is not sufficient, as some states check for actual changes. The correct way is to invalidate the commit mask. Found with a wine test. cc: mesa-stable Signed-off-by: Axel Davy Acked-by: David Heidelberg Part-of: --- src/gallium/frontends/nine/nine_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/frontends/nine/nine_state.c b/src/gallium/frontends/nine/nine_state.c index 9f940bc6f59..3725ebf6259 100644 --- a/src/gallium/frontends/nine/nine_state.c +++ b/src/gallium/frontends/nine/nine_state.c @@ -2841,10 +2841,10 @@ void nine_state_restore_non_cso(struct NineDevice9 *device) { struct nine_context *context = &device->context; - context->changed.group = NINE_STATE_ALL; + context->changed.group = NINE_STATE_ALL; /* TODO: we can remove states that have prepared commits */ context->changed.vtxbuf = (1ULL << device->caps.MaxStreams) - 1; context->changed.ucp = TRUE; - context->commit |= NINE_STATE_COMMIT_CONST_VS | NINE_STATE_COMMIT_CONST_PS; + context->commit |= 0xffffffff; /* re-commit everything */ context->enabled_sampler_count_vs = 0; context->enabled_sampler_count_ps = 0; }