From a4b8caf7439814cb8f6cc18e670e53bb2acd9490 Mon Sep 17 00:00:00 2001 From: Erik Abair Date: Sat, 8 Nov 2025 07:30:28 -0800 Subject: [PATCH] nv2a: Prevent GL assert on END without BEGIN --- hw/xbox/nv2a/pgraph/pgraph.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xbox/nv2a/pgraph/pgraph.c b/hw/xbox/nv2a/pgraph/pgraph.c index 9d55d68724..1e75cb810d 100644 --- a/hw/xbox/nv2a/pgraph/pgraph.c +++ b/hw/xbox/nv2a/pgraph/pgraph.c @@ -2497,6 +2497,8 @@ DEF_METHOD(NV097, SET_BEGIN_END) if (parameter == NV097_SET_BEGIN_END_OP_END) { if (pg->primitive_mode == PRIM_TYPE_INVALID) { NV2A_DPRINTF("End without Begin!\n"); + pgraph_reset_inline_buffers(pg); + return; } nv2a_profile_inc_counter(NV2A_PROF_BEGIN_ENDS); d->pgraph.renderer->ops.draw_end(d);