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 <davyaxel0@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18021>
(cherry picked from commit b74febffe6)
This commit is contained in:
Axel Davy 2022-07-24 11:08:57 +02:00 committed by Dylan Baker
parent b712253b53
commit bdcffd60db
2 changed files with 10 additions and 1 deletions

View file

@ -949,7 +949,7 @@
"description": "frontend/nine: Skip invalid swvp calls",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -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);