From cab5558bc15b557297f3fd6e9a22025ab65e3b73 Mon Sep 17 00:00:00 2001 From: espes Date: Sun, 21 Jun 2015 03:55:20 +1000 Subject: [PATCH] untested surface format --- hw/xbox/nv2a.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/xbox/nv2a.c b/hw/xbox/nv2a.c index 785bc43cf8..00dfb0c363 100644 --- a/hw/xbox/nv2a.c +++ b/hw/xbox/nv2a.c @@ -1998,6 +1998,11 @@ static void pgraph_update_surface(NV2AState *d, bool upload) GLenum gl_type; unsigned int bytes_per_pixel; switch (d->pgraph.surface_color.format) { + case NV097_SET_SURFACE_FORMAT_COLOR_LE_X1R5G5B5_Z1R5G5B5: + bytes_per_pixel = 2; + gl_format = GL_BGRA; + gl_type = GL_UNSIGNED_SHORT_1_5_5_5_REV; + break; case NV097_SET_SURFACE_FORMAT_COLOR_LE_R5G6B5: bytes_per_pixel = 2; gl_format = GL_RGB; @@ -2010,6 +2015,8 @@ static void pgraph_update_surface(NV2AState *d, bool upload) gl_type = GL_UNSIGNED_INT_8_8_8_8_REV; break; default: + NV2A_DPRINTF("bad color surface format %x\n", + d->pgraph.surface_color.format); assert(false); }