Get rid of most of the HAVE_FBO usage

This commit is contained in:
twinaphex 2017-11-13 06:20:30 +01:00
parent 6fa5fcfa1f
commit ec123ef6ca
4 changed files with 21 additions and 24 deletions

View File

@ -92,14 +92,10 @@
#define glGenerateMipmap glGenerateMipmapOES #define glGenerateMipmap glGenerateMipmapOES
#endif #endif
#ifdef HAVE_FBO
#if defined(__APPLE__) || defined(HAVE_PSGL) #if defined(__APPLE__) || defined(HAVE_PSGL)
#define GL_RGBA32F GL_RGBA32F_ARB #define GL_RGBA32F GL_RGBA32F_ARB
#endif #endif
#endif
#if defined(HAVE_PSGL) #if defined(HAVE_PSGL)
#define RARCH_GL_INTERNAL_FORMAT32 GL_ARGB_SCE #define RARCH_GL_INTERNAL_FORMAT32 GL_ARGB_SCE
#define RARCH_GL_INTERNAL_FORMAT16 GL_RGB5 /* TODO: Verify if this is really 565 or just 555. */ #define RARCH_GL_INTERNAL_FORMAT16 GL_RGB5 /* TODO: Verify if this is really 565 or just 555. */

View File

@ -743,7 +743,6 @@ static void gl2_renderchain_start_render(void *data,
void gl2_renderchain_init( void gl2_renderchain_init(
void *data, unsigned fbo_width, unsigned fbo_height) void *data, unsigned fbo_width, unsigned fbo_height)
{ {
#ifdef HAVE_FBO
int i; int i;
unsigned width, height; unsigned width, height;
video_shader_ctx_scale_t scaler; video_shader_ctx_scale_t scaler;
@ -846,7 +845,6 @@ void gl2_renderchain_init(
} }
gl->fbo_inited = true; gl->fbo_inited = true;
#endif
} }
static bool gl2_renderchain_init_hw_render( static bool gl2_renderchain_init_hw_render(

View File

@ -1796,21 +1796,21 @@ bool video_driver_find_driver(void)
current_video = NULL; current_video = NULL;
#if defined(HAVE_VULKAN)
if (hwr && hw_render_context_is_vulkan(hwr->context_type)) if (hwr && hw_render_context_is_vulkan(hwr->context_type))
{ {
#if defined(HAVE_VULKAN)
RARCH_LOG("[Video]: Using HW render, Vulkan driver forced.\n"); RARCH_LOG("[Video]: Using HW render, Vulkan driver forced.\n");
current_video = &video_vulkan; current_video = &video_vulkan;
#endif
} }
#endif
#if defined(HAVE_OPENGL)
if (hwr && hw_render_context_is_gl(hwr->context_type)) if (hwr && hw_render_context_is_gl(hwr->context_type))
{ {
#if defined(HAVE_OPENGL) && defined(HAVE_FBO)
RARCH_LOG("[Video]: Using HW render, OpenGL driver forced.\n"); RARCH_LOG("[Video]: Using HW render, OpenGL driver forced.\n");
current_video = &video_gl; current_video = &video_gl;
#endif
} }
#endif
if (current_video) if (current_video)
return true; return true;

View File

@ -173,8 +173,9 @@ bool gl_check_capability(enum gl_capability_enum enum_idx)
case GL_CAPS_FBO: case GL_CAPS_FBO:
#if defined(HAVE_PSGL) || defined(HAVE_OPENGLES2) || defined(HAVE_OPENGLES3) || defined(HAVE_OPENGLES_3_1) || defined(HAVE_OPENGLES_3_2) #if defined(HAVE_PSGL) || defined(HAVE_OPENGLES2) || defined(HAVE_OPENGLES3) || defined(HAVE_OPENGLES_3_1) || defined(HAVE_OPENGLES_3_2)
return true; return true;
#elif defined(HAVE_FBO) #else
if (!gl_query_core_context_in_use() && !gl_query_extension("ARB_framebuffer_object") if ( !gl_query_core_context_in_use()
&& !gl_query_extension("ARB_framebuffer_object")
&& !gl_query_extension("EXT_framebuffer_object")) && !gl_query_extension("EXT_framebuffer_object"))
return false; return false;
@ -190,8 +191,6 @@ bool gl_check_capability(enum gl_capability_enum enum_idx)
&& glDeleteRenderbuffers) && glDeleteRenderbuffers)
return true; return true;
break; break;
#else
break;
#endif #endif
case GL_CAPS_ARGB8: case GL_CAPS_ARGB8:
#ifdef HAVE_OPENGLES #ifdef HAVE_OPENGLES
@ -280,21 +279,25 @@ bool gl_check_capability(enum gl_capability_enum enum_idx)
#if defined(HAVE_OPENGLES) #if defined(HAVE_OPENGLES)
if (major >= 3 || gl_query_extension("EXT_sRGB")) if (major >= 3 || gl_query_extension("EXT_sRGB"))
return true; return true;
#elif defined(HAVE_FBO) #endif
if (gl_check_capability(GL_CAPS_FBO))
{
if ( gl_query_core_context_in_use() || if ( gl_query_core_context_in_use() ||
(gl_query_extension("EXT_texture_sRGB") (gl_query_extension("EXT_texture_sRGB")
&& gl_query_extension("ARB_framebuffer_sRGB"))) && gl_query_extension("ARB_framebuffer_sRGB"))
)
return true; return true;
#endif }
break; break;
case GL_CAPS_FP_FBO: case GL_CAPS_FP_FBO:
/* GLES - No extensions for float FBO currently. */ /* GLES - No extensions for float FBO currently. */
#ifndef HAVE_OPENGLES #ifndef HAVE_OPENGLES
#ifdef HAVE_FBO if (gl_check_capability(GL_CAPS_FBO))
{
/* Float FBO is core in 3.2. */ /* Float FBO is core in 3.2. */
if (gl_query_core_context_in_use() || gl_query_extension("ARB_texture_float")) if (gl_query_core_context_in_use() || gl_query_extension("ARB_texture_float"))
return true; return true;
#endif }
#endif #endif
break; break;
case GL_CAPS_BGRA8888: case GL_CAPS_BGRA8888: