mirror of
https://github.com/libretro/RetroArch
synced 2025-02-02 05:54:16 +00:00
Move ifndef HAVE_GCMGL checks outside of gl.c and into
shader_gl_cg.c - also implement stub glGenerateMipmapOES for GCMGL
This commit is contained in:
parent
ed928b70be
commit
54bfe360c6
6
gfx/gl.c
6
gfx/gl.c
@ -988,10 +988,8 @@ static void gl_frame_fbo(gl_t *gl, shader_backend_t *shader,
|
|||||||
shader->use(gl, i + 1);
|
shader->use(gl, i + 1);
|
||||||
glBindTexture(GL_TEXTURE_2D, gl->fbo_texture[i - 1]);
|
glBindTexture(GL_TEXTURE_2D, gl->fbo_texture[i - 1]);
|
||||||
|
|
||||||
#ifndef HAVE_GCMGL
|
|
||||||
if (gl->shader->mipmap_input(i + 1))
|
if (gl->shader->mipmap_input(i + 1))
|
||||||
glGenerateMipmap(GL_TEXTURE_2D);
|
glGenerateMipmap(GL_TEXTURE_2D);
|
||||||
#endif
|
|
||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
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]);
|
glBindTexture(GL_TEXTURE_2D, gl->fbo_texture[gl->fbo_pass - 1]);
|
||||||
|
|
||||||
#ifndef HAVE_GCMGL
|
|
||||||
if (gl->shader->mipmap_input(gl->fbo_pass + 1))
|
if (gl->shader->mipmap_input(gl->fbo_pass + 1))
|
||||||
glGenerateMipmap(GL_TEXTURE_2D);
|
glGenerateMipmap(GL_TEXTURE_2D);
|
||||||
#endif
|
|
||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
|
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);
|
gl_copy_frame(gl, frame, width, height, pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_GCMGL
|
|
||||||
/* No point regenerating mipmaps
|
/* No point regenerating mipmaps
|
||||||
* if there are no new frames. */
|
* if there are no new frames. */
|
||||||
if (gl->tex_mipmap)
|
if (gl->tex_mipmap)
|
||||||
glGenerateMipmap(GL_TEXTURE_2D);
|
glGenerateMipmap(GL_TEXTURE_2D);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Have to reset rendering state which libretro core
|
/* Have to reset rendering state which libretro core
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
#define RARCH_GL_MAX_RENDERBUFFER_SIZE GL_MAX_RENDERBUFFER_SIZE
|
#define RARCH_GL_MAX_RENDERBUFFER_SIZE GL_MAX_RENDERBUFFER_SIZE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_PSGL) && !defined(HAVE_GCMGL)
|
#if defined(HAVE_PSGL)
|
||||||
#define glGenerateMipmap glGenerateMipmapOES
|
#define glGenerateMipmap glGenerateMipmapOES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -995,8 +995,10 @@ static unsigned gl_cg_get_prev_textures(void)
|
|||||||
|
|
||||||
static bool gl_cg_mipmap_input(unsigned index)
|
static bool gl_cg_mipmap_input(unsigned index)
|
||||||
{
|
{
|
||||||
|
#ifndef HAVE_GCMGL
|
||||||
if (cg_active && index)
|
if (cg_active && index)
|
||||||
return cg_shader->pass[index - 1].mipmap;
|
return cg_shader->pass[index - 1].mipmap;
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,6 +408,7 @@ extern "C"
|
|||||||
GLAPI void APIENTRY glFramebufferRenderbufferOES( GLenum, GLenum, GLenum, GLuint );
|
GLAPI void APIENTRY glFramebufferRenderbufferOES( GLenum, GLenum, GLenum, GLuint );
|
||||||
GLAPI void APIENTRY glGetFramebufferAttachmentParameterivOES( GLenum, GLenum, GLenum, GLint * );
|
GLAPI void APIENTRY glGetFramebufferAttachmentParameterivOES( GLenum, GLenum, GLenum, GLint * );
|
||||||
GLAPI void APIENTRY glGenerateMipmapOES( GLenum );
|
GLAPI void APIENTRY glGenerateMipmapOES( GLenum );
|
||||||
|
GLAPI void APIENTRY glGenerateMipmap( GLenum target);
|
||||||
|
|
||||||
/* Texture Reference */
|
/* Texture Reference */
|
||||||
GLAPI void APIENTRY glTextureReferenceSCE( GLenum target, GLuint levels, GLuint baseWidth, GLuint baseHeight, GLuint baseDepth, GLenum internalFormat, GLuint pitch, GLintptr offset );
|
GLAPI void APIENTRY glTextureReferenceSCE( GLenum target, GLuint levels, GLuint baseWidth, GLuint baseHeight, GLuint baseDepth, GLenum internalFormat, GLuint pitch, GLintptr offset );
|
||||||
|
@ -2658,3 +2658,9 @@ GLAPI void APIENTRY glPixelStorei( GLenum pname, GLint param )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLAPI void APIENTRY glGenerateMipmapOES(GLenum target)
|
||||||
|
{
|
||||||
|
(void)target;
|
||||||
|
/* stub */
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user