summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Davy <davyaxel0@gmail.com>2022-07-24 11:08:57 +0200
committerDylan Baker <dylan.c.baker@intel.com>2022-08-16 10:08:14 -0700
commitd16669e227185c1a4999b22e55aec0c2af7bad1a (patch)
tree442a098b801a7116fcd87249cc13277b0658b7b3
parentb400c2cd2af29597d730d9553e11d1bcb441c9bf (diff)
downloadmesa-d16669e227185c1a4999b22e55aec0c2af7bad1a.tar.gz
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 b74febffe6e97938130dfd405ae1678539eafcfe)
-rw-r--r--.pick_status.json2
-rw-r--r--src/gallium/frontends/nine/nine_state.c9
2 files changed, 10 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 472267dc918..3446bd926ae 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -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
},
diff --git a/src/gallium/frontends/nine/nine_state.c b/src/gallium/frontends/nine/nine_state.c
index 2d88e292652..051bf4de978 100644
--- a/src/gallium/frontends/nine/nine_state.c
+++ b/src/gallium/frontends/nine/nine_state.c
@@ -2385,6 +2385,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);
@@ -2410,6 +2413,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);
@@ -2440,6 +2446,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);