mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 16:39:43 +00:00
(PS3) Take out hacky hack HAVE_GCMGL ifdefs
This commit is contained in:
parent
d6b19f147a
commit
b9a17d0d05
@ -630,7 +630,6 @@ static void gl_init_fbo(gl_t *gl, unsigned width, unsigned height)
|
||||
gl->fbo_inited = true;
|
||||
}
|
||||
|
||||
#ifndef HAVE_GCMGL
|
||||
static void gl_deinit_hw_render(gl_t *gl)
|
||||
{
|
||||
if (!gl)
|
||||
@ -739,7 +738,6 @@ static bool gl_init_hw_render(gl_t *gl, unsigned width, unsigned height)
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static void gl_set_projection(gl_t *gl, struct gl_ortho *ortho, bool allow_rotate)
|
||||
{
|
||||
@ -1767,10 +1765,8 @@ static void gl_free(void *data)
|
||||
|
||||
#ifdef HAVE_FBO
|
||||
gl_deinit_fbo(gl);
|
||||
#ifndef HAVE_GCMGL
|
||||
gl_deinit_hw_render(gl);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_OPENGLES
|
||||
if (gl->core_context)
|
||||
@ -1885,11 +1881,7 @@ static bool resolve_extensions(gl_t *gl)
|
||||
#else
|
||||
#ifdef HAVE_FBO
|
||||
/* Float FBO is core in 3.2. */
|
||||
#ifdef HAVE_GCMGL
|
||||
gl->has_fp_fbo = false; /* FIXME - rewrite GL implementation */
|
||||
#else
|
||||
gl->has_fp_fbo = gl->core_context || gl_query_extension(gl, "ARB_texture_float");
|
||||
#endif
|
||||
gl->has_srgb_fbo = gl->core_context ||
|
||||
(gl_query_extension(gl, "EXT_texture_sRGB")
|
||||
&& gl_query_extension(gl, "ARB_framebuffer_sRGB"));
|
||||
@ -2398,7 +2390,6 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo
|
||||
#ifdef HAVE_FBO
|
||||
gl_init_fbo(gl, gl->tex_w, gl->tex_h);
|
||||
|
||||
#ifndef HAVE_GCMGL
|
||||
if (gl->hw_render_use &&
|
||||
!gl_init_hw_render(gl, gl->tex_w, gl->tex_h))
|
||||
{
|
||||
@ -2406,7 +2397,6 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo
|
||||
free(gl);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (input && input_data)
|
||||
@ -2595,7 +2585,7 @@ static bool gl_set_shader(void *data,
|
||||
|
||||
if (textures > gl->textures) // Have to reinit a bit.
|
||||
{
|
||||
#if defined(HAVE_FBO) && !defined(HAVE_GCMGL)
|
||||
#if defined(HAVE_FBO)
|
||||
gl_deinit_hw_render(gl);
|
||||
#endif
|
||||
|
||||
@ -2610,7 +2600,7 @@ static bool gl_set_shader(void *data,
|
||||
gl_init_textures(gl, &gl->video_info);
|
||||
gl_init_textures_data(gl);
|
||||
|
||||
#if defined(HAVE_FBO) && !defined(HAVE_GCMGL)
|
||||
#if defined(HAVE_FBO)
|
||||
if (gl->hw_render_use)
|
||||
gl_init_hw_render(gl, gl->tex_w, gl->tex_h);
|
||||
#endif
|
||||
|
@ -923,10 +923,8 @@ static bool gl_cg_init(void *data, const char *path)
|
||||
goto error;
|
||||
}
|
||||
|
||||
#ifndef HAVE_GCMGL
|
||||
RARCH_LOG("[Cg]: Vertex profile: %s\n", cgGetProfileString(cg->cgVProf));
|
||||
RARCH_LOG("[Cg]: Fragment profile: %s\n", cgGetProfileString(cg->cgFProf));
|
||||
#endif
|
||||
cgGLSetOptimalOptions(cg->cgFProf);
|
||||
cgGLSetOptimalOptions(cg->cgVProf);
|
||||
cgGLEnableProfile(cg->cgFProf);
|
||||
@ -1046,11 +1044,9 @@ static unsigned gl_cg_get_prev_textures(void)
|
||||
|
||||
static bool gl_cg_mipmap_input(unsigned idx)
|
||||
{
|
||||
#ifndef HAVE_GCMGL
|
||||
cg_shader_data_t *cg = (cg_shader_data_t*)driver.video_shader_data;
|
||||
if (cg && idx)
|
||||
return cg->cg_shader->pass[idx - 1].mipmap;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@
|
||||
#define RARCH_GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_EXT
|
||||
#define RARCH_GL_DEPTH_ATTACHMENT GL_DEPTH_ATTACHMENT_EXT
|
||||
#define RARCH_GL_STENCIL_ATTACHMENT GL_STENCIL_ATTACHMENT_EXT
|
||||
#elif defined(HAVE_PSGL) && !defined(HAVE_GCMGL)
|
||||
#elif defined(HAVE_PSGL)
|
||||
#define RARCH_GL_RENDERBUFFER GL_RENDERBUFFER_OES
|
||||
#define RARCH_GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_SCE
|
||||
#define RARCH_GL_DEPTH_ATTACHMENT GL_DEPTH_ATTACHMENT_OES
|
||||
@ -82,7 +82,7 @@
|
||||
|
||||
#ifdef OSX_PPC
|
||||
#define RARCH_GL_MAX_RENDERBUFFER_SIZE GL_MAX_RENDERBUFFER_SIZE_EXT
|
||||
#elif defined(HAVE_PSGL) && !defined(HAVE_GCMGL)
|
||||
#elif defined(HAVE_PSGL)
|
||||
#define RARCH_GL_MAX_RENDERBUFFER_SIZE GL_MAX_RENDERBUFFER_SIZE_OES
|
||||
#else
|
||||
#define RARCH_GL_MAX_RENDERBUFFER_SIZE GL_MAX_RENDERBUFFER_SIZE
|
||||
@ -154,20 +154,6 @@
|
||||
/* Platform specific workarounds/hacks. */
|
||||
#if defined(__CELLOS_LV2__)
|
||||
#define NO_GL_READ_PIXELS
|
||||
|
||||
/* Performance hacks. */
|
||||
#ifdef HAVE_GCMGL
|
||||
|
||||
extern GLvoid* glMapBufferTextureReferenceRA( GLenum target, GLenum access );
|
||||
|
||||
extern GLboolean glUnmapBufferTextureReferenceRA( GLenum target );
|
||||
|
||||
extern void glBufferSubDataTextureReferenceRA( GLenum target,
|
||||
GLintptr offset, GLsizeiptr size, const GLvoid *data );
|
||||
#define glMapBuffer(target, access) glMapBufferTextureReferenceRA(target, access)
|
||||
#define glUnmapBuffer(target) glUnmapBufferTextureReferenceRA(target)
|
||||
#define glBufferSubData(target, offset, size, data) glBufferSubDataTextureReferenceRA(target, offset, size, data)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OPENGL_MODERN) || defined(HAVE_OPENGLES2) || defined(HAVE_PSGL)
|
||||
|
Loading…
Reference in New Issue
Block a user