From fe28f90556e73f99cd68b37019b497a28cf3a059 Mon Sep 17 00:00:00 2001 From: espes Date: Fri, 17 Jul 2015 13:45:58 +1000 Subject: [PATCH] GL_CLAMP was removed in gl3 --- hw/xbox/nv2a.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/xbox/nv2a.c b/hw/xbox/nv2a.c index 0bb944e5f1..28d955f89d 100644 --- a/hw/xbox/nv2a.c +++ b/hw/xbox/nv2a.c @@ -1046,7 +1046,7 @@ static const GLenum pgraph_texture_addr_map[] = { GL_MIRRORED_REPEAT, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_BORDER, - GL_CLAMP + // GL_CLAMP }; static const GLenum pgraph_blend_factor_map[] = { @@ -2476,13 +2476,16 @@ static void pgraph_bind_textures(NV2AState *d) pgraph_texture_mag_filter_map[mag_filter]); /* Texture wrapping */ + assert(addru < ARRAYSIZE(pgraph_texture_addr_map)); glTexParameteri(binding->gl_target, GL_TEXTURE_WRAP_S, pgraph_texture_addr_map[addru]); if (dimensionality > 1) { + assert(addrv < ARRAYSIZE(pgraph_texture_addr_map)); glTexParameteri(binding->gl_target, GL_TEXTURE_WRAP_T, pgraph_texture_addr_map[addrv]); } if (dimensionality > 2) { + assert(addrp < ARRAYSIZE(pgraph_texture_addr_map)); glTexParameteri(binding->gl_target, GL_TEXTURE_WRAP_R, pgraph_texture_addr_map[addrp]); }