Module: Mesa Branch: main Commit: b74febffe6e97938130dfd405ae1678539eafcfe URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b74febffe6e97938130dfd405ae1678539eafcfe
Author: Axel Davy <[email protected]> Date: Sun Jul 24 11:08:57 2022 +0200 frontend/nine: Skip invalid swvp calls Without this it may crash running wine tests. According to the test themselves, the correct behaviour is a bit more complicated, but that's a first step. cc: mesa-stable Signed-off-by: Axel Davy <[email protected]> Acked-by: David Heidelberg <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18021> --- src/gallium/frontends/nine/nine_state.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gallium/frontends/nine/nine_state.c b/src/gallium/frontends/nine/nine_state.c index 926da8fb82e..9ebfdb24712 100644 --- a/src/gallium/frontends/nine/nine_state.c +++ b/src/gallium/frontends/nine/nine_state.c @@ -2384,6 +2384,9 @@ CSMT_ITEM_NO_WAIT(nine_context_draw_primitive, struct pipe_draw_info info; struct pipe_draw_start_count_bias draw; + if (context->vs && context->vs->swvp_only && !context->swvp) + return; + nine_update_state(device); init_draw_info(&info, &draw, device, PrimitiveType, PrimitiveCount); @@ -2409,6 +2412,9 @@ CSMT_ITEM_NO_WAIT(nine_context_draw_indexed_primitive, struct pipe_draw_info info; struct pipe_draw_start_count_bias draw; + if (context->vs && context->vs->swvp_only && !context->swvp) + return; + nine_update_state(device); init_draw_info(&info, &draw, device, PrimitiveType, PrimitiveCount); @@ -2439,6 +2445,9 @@ CSMT_ITEM_NO_WAIT(nine_context_draw_indexed_primitive_from_vtxbuf_idxbuf, struct pipe_draw_info info; struct pipe_draw_start_count_bias draw; + if (context->vs && context->vs->swvp_only && !context->swvp) + return; + nine_update_state(device); init_draw_info(&info, &draw, device, PrimitiveType, PrimitiveCount);
