diff --git a/gfx/gl.c b/gfx/gl.c index 61110cd4a3..d11f3609b3 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -988,10 +988,8 @@ static void gl_frame_fbo(gl_t *gl, shader_backend_t *shader, shader->use(gl, i + 1); glBindTexture(GL_TEXTURE_2D, gl->fbo_texture[i - 1]); -#ifndef HAVE_GCMGL if (gl->shader->mipmap_input(i + 1)) glGenerateMipmap(GL_TEXTURE_2D); -#endif glClear(GL_COLOR_BUFFER_BIT); @@ -1036,10 +1034,8 @@ static void gl_frame_fbo(gl_t *gl, shader_backend_t *shader, glBindTexture(GL_TEXTURE_2D, gl->fbo_texture[gl->fbo_pass - 1]); -#ifndef HAVE_GCMGL if (gl->shader->mipmap_input(gl->fbo_pass + 1)) glGenerateMipmap(GL_TEXTURE_2D); -#endif glClear(GL_COLOR_BUFFER_BIT); gl_set_viewport(gl, gl->win_width, gl->win_height, false, true); @@ -1530,12 +1526,10 @@ static bool gl_frame(void *data, const void *frame, gl_copy_frame(gl, frame, width, height, pitch); } -#ifndef HAVE_GCMGL /* No point regenerating mipmaps * if there are no new frames. */ if (gl->tex_mipmap) glGenerateMipmap(GL_TEXTURE_2D); -#endif } /* Have to reset rendering state which libretro core diff --git a/gfx/gl_common.h b/gfx/gl_common.h index 1dd3cb144c..a13aa097c9 100644 --- a/gfx/gl_common.h +++ b/gfx/gl_common.h @@ -87,7 +87,7 @@ #define RARCH_GL_MAX_RENDERBUFFER_SIZE GL_MAX_RENDERBUFFER_SIZE #endif -#if defined(HAVE_PSGL) && !defined(HAVE_GCMGL) +#if defined(HAVE_PSGL) #define glGenerateMipmap glGenerateMipmapOES #endif diff --git a/gfx/shader/shader_gl_cg.c b/gfx/shader/shader_gl_cg.c index fba41ac68b..12a4577bce 100644 --- a/gfx/shader/shader_gl_cg.c +++ b/gfx/shader/shader_gl_cg.c @@ -995,8 +995,10 @@ static unsigned gl_cg_get_prev_textures(void) static bool gl_cg_mipmap_input(unsigned index) { +#ifndef HAVE_GCMGL if (cg_active && index) return cg_shader->pass[index - 1].mipmap; +#endif return false; } diff --git a/ps3/gcmgl/include/export/GLES/glext.h b/ps3/gcmgl/include/export/GLES/glext.h index 9edc8c3b31..4c26d108b3 100644 --- a/ps3/gcmgl/include/export/GLES/glext.h +++ b/ps3/gcmgl/include/export/GLES/glext.h @@ -408,6 +408,7 @@ extern "C" GLAPI void APIENTRY glFramebufferRenderbufferOES( GLenum, GLenum, GLenum, GLuint ); GLAPI void APIENTRY glGetFramebufferAttachmentParameterivOES( GLenum, GLenum, GLenum, GLint * ); GLAPI void APIENTRY glGenerateMipmapOES( GLenum ); + GLAPI void APIENTRY glGenerateMipmap( GLenum target); /* Texture Reference */ GLAPI void APIENTRY glTextureReferenceSCE( GLenum target, GLuint levels, GLuint baseWidth, GLuint baseHeight, GLuint baseDepth, GLenum internalFormat, GLuint pitch, GLintptr offset ); diff --git a/ps3/gcmgl/src/rgl_ps3_raster.cpp b/ps3/gcmgl/src/rgl_ps3_raster.cpp index 8b472f4468..4edac4adf8 100644 --- a/ps3/gcmgl/src/rgl_ps3_raster.cpp +++ b/ps3/gcmgl/src/rgl_ps3_raster.cpp @@ -2658,3 +2658,9 @@ GLAPI void APIENTRY glPixelStorei( GLenum pname, GLint param ) break; } } + +GLAPI void APIENTRY glGenerateMipmapOES(GLenum target) +{ + (void)target; + /* stub */ +}