From 21718399f2680b5d2e48e554f9dfd591f3efc0f2 Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Mon, 11 Oct 2021 23:51:59 -0700 Subject: [PATCH] nv2a: Discard unknown blend factors --- hw/xbox/nv2a/pgraph.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/xbox/nv2a/pgraph.c b/hw/xbox/nv2a/pgraph.c index 28b0164800..cbca09163f 100644 --- a/hw/xbox/nv2a/pgraph.c +++ b/hw/xbox/nv2a/pgraph.c @@ -1489,9 +1489,8 @@ DEF_METHOD(NV097, SET_BLEND_FUNC_SFACTOR) case NV097_SET_BLEND_FUNC_SFACTOR_V_ONE_MINUS_CONSTANT_ALPHA: factor = NV_PGRAPH_BLEND_SFACTOR_ONE_MINUS_CONSTANT_ALPHA; break; default: - fprintf(stderr, "Unknown blend source factor: 0x%x\n", parameter); - assert(false); - break; + NV2A_DPRINTF("Unknown blend source factor: 0x%08x\n", parameter); + return; /* discard */ } SET_MASK(pg->regs[NV_PGRAPH_BLEND], NV_PGRAPH_BLEND_SFACTOR, factor); } @@ -1531,9 +1530,8 @@ DEF_METHOD(NV097, SET_BLEND_FUNC_DFACTOR) case NV097_SET_BLEND_FUNC_DFACTOR_V_ONE_MINUS_CONSTANT_ALPHA: factor = NV_PGRAPH_BLEND_DFACTOR_ONE_MINUS_CONSTANT_ALPHA; break; default: - fprintf(stderr, "Unknown blend destination factor: 0x%x\n", parameter); - assert(false); - break; + NV2A_DPRINTF("Unknown blend destination factor: 0x%08x\n", parameter); + return; /* discard */ } SET_MASK(pg->regs[NV_PGRAPH_BLEND], NV_PGRAPH_BLEND_DFACTOR, factor); }