From 6ffb0ffbd02762dec7d9f32491b47d165e3a8c87 Mon Sep 17 00:00:00 2001 From: espes Date: Mon, 13 Jul 2015 14:50:31 +1000 Subject: [PATCH] s32k is probably signed --- hw/xbox/nv2a.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xbox/nv2a.c b/hw/xbox/nv2a.c index 93ed77cdef..4735c69017 100644 --- a/hw/xbox/nv2a.c +++ b/hw/xbox/nv2a.c @@ -1665,12 +1665,12 @@ static void pgraph_update_memory_buffer(NV2AState *d, hwaddr addr, hwaddr size, hwaddr end = TARGET_PAGE_ALIGN(addr + size); addr &= TARGET_PAGE_MASK; + assert(end < memory_region_size(d->vram)); if (f || memory_region_test_and_clear_dirty(d->vram, addr, end - addr, DIRTY_MEMORY_NV2A)) { - glBufferSubData(GL_ARRAY_BUFFER, addr, end - addr, - d->vram_ptr + addr); + glBufferSubData(GL_ARRAY_BUFFER, addr, end - addr, d->vram_ptr + addr); } } @@ -3861,7 +3861,7 @@ static void pgraph_method(NV2AState *d, vertex_attribute->needs_conversion = false; break; case NV097_SET_VERTEX_DATA_ARRAY_FORMAT_TYPE_S32K: - vertex_attribute->gl_type = GL_UNSIGNED_SHORT; + vertex_attribute->gl_type = GL_SHORT; vertex_attribute->gl_normalize = GL_FALSE; vertex_attribute->size = 2; vertex_attribute->needs_conversion = false;