From bd5cb258870cfd5d93c1c1416da70ed0a5bc7dc9 Mon Sep 17 00:00:00 2001 From: Jannik Vogel Date: Mon, 13 Jul 2015 12:16:39 +0200 Subject: [PATCH] Fix GL3 mipmaps by forcing at least 1x1 --- hw/xbox/nv2a.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xbox/nv2a.c b/hw/xbox/nv2a.c index c75abf1bd5..1186b53e04 100644 --- a/hw/xbox/nv2a.c +++ b/hw/xbox/nv2a.c @@ -1982,6 +1982,8 @@ static TextureBinding* generate_texture(const TextureShape s, int level; for (level = 0; level < s.levels; level++) { + if (width < 1) width = 1; + if (height < 1) height = 1; if (f.gl_format == 0) { /* retarded way of indicating compressed */ unsigned int block_size; if (f.gl_internal_format == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT) {