From 14748d9bbbba6dd8596501ef00e0cfb70c661dd6 Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Mon, 23 May 2022 21:59:54 -0700 Subject: [PATCH] nv2a: Limit base, max mipmap level --- hw/xbox/nv2a/pgraph.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xbox/nv2a/pgraph.c b/hw/xbox/nv2a/pgraph.c index 37da107e8e0..450f76647fe 100644 --- a/hw/xbox/nv2a/pgraph.c +++ b/hw/xbox/nv2a/pgraph.c @@ -6320,6 +6320,8 @@ static void pgraph_bind_textures(NV2AState *d) } } assert(levels > 0); + min_mipmap_level = MIN(levels-1, min_mipmap_level); + max_mipmap_level = MIN(levels-1, max_mipmap_level); } size_t length = 0;