gallium/draw: Fix intermittent failure to bind new geometry shaders.
If you deleted your old GS and created a new one, then it would occasionally skip binding the new GS because the token pointers were equal. Clear the current token pointer in the machine when we're deleting its token. Cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8277>
This commit is contained in:
@@ -964,6 +964,9 @@ void draw_delete_geometry_shader(struct draw_context *draw,
|
||||
}
|
||||
#endif
|
||||
|
||||
if (draw->gs.tgsi.machine && draw->gs.tgsi.machine->Tokens == dgs->state.tokens)
|
||||
draw->gs.tgsi.machine->Tokens = NULL;
|
||||
|
||||
for (i = 0; i < TGSI_MAX_VERTEX_STREAMS; i++)
|
||||
FREE(dgs->stream[i].primitive_lengths);
|
||||
|
||||
|
Reference in New Issue
Block a user