mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 20:18:12 +02:00
hk: Fix crash in hk_handle_passthrough_gs
We should be returning if no GS is needed and no GS shader is bound. This fix various segfaults introduced by the original fix. Signed-off-by: Mary Guillemard <mary@mary.zone> Fixes:e10f29399f("hk: fix passthrough GS key invalidation") Reviewed-by: Eric Engestrom <eric@igalia.com> Reviewed-by: Janne Grunau <j@jannau.net> (cherry picked from commit6d040df750) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
This commit is contained in:
parent
03847a6f0b
commit
977f0409b2
2 changed files with 6 additions and 4 deletions
|
|
@ -44,7 +44,7 @@
|
|||
"description": "hk: Fix crash in hk_handle_passthrough_gs",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "e10f29399fb4c973b574df0d3649dfe3b2b7e4cf",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -3225,9 +3225,11 @@ hk_handle_passthrough_gs(struct hk_cmd_buffer *cmd, struct agx_draw draw)
|
|||
bool needs_gs = xfb_outputs;
|
||||
|
||||
/* If we don't need a GS but we do have a passthrough, unbind it */
|
||||
if (!needs_gs && gs != NULL) {
|
||||
assert(!needs_gs && gs->is_passthrough);
|
||||
hk_cmd_bind_graphics_shader(cmd, MESA_SHADER_GEOMETRY, NULL);
|
||||
if (!needs_gs) {
|
||||
if (gs != NULL) {
|
||||
assert(gs->is_passthrough);
|
||||
hk_cmd_bind_graphics_shader(cmd, MESA_SHADER_GEOMETRY, NULL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue