mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
Revert "Fix issue #2791 black bug"
This commit is contained in:
parent
992d221af9
commit
1aee59f9f4
@ -2502,12 +2502,6 @@ static void video_texture_load_gl(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void video_texture_unload_gl(
|
|
||||||
uintptr_t *id)
|
|
||||||
{
|
|
||||||
glDeleteTextures(1, (GLuint*)id);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
static int video_texture_load_wrap_gl_mipmap(void *data)
|
static int video_texture_load_wrap_gl_mipmap(void *data)
|
||||||
{
|
{
|
||||||
@ -2530,14 +2524,6 @@ static int video_texture_load_wrap_gl(void *data)
|
|||||||
TEXTURE_FILTER_LINEAR, &id);
|
TEXTURE_FILTER_LINEAR, &id);
|
||||||
return (int)id;
|
return (int)id;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int video_texture_unload_wrap_gl(void *data)
|
|
||||||
{
|
|
||||||
if (!data)
|
|
||||||
return 0;
|
|
||||||
video_texture_unload_gl((uintptr_t *)data);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static uintptr_t gl_load_texture(void *video_data, void *data,
|
static uintptr_t gl_load_texture(void *video_data, void *data,
|
||||||
@ -2559,7 +2545,7 @@ static uintptr_t gl_load_texture(void *video_data, void *data,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return video_thread_custom_cmd(data, func);
|
return video_thread_texture_load(data, func);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2567,23 +2553,14 @@ static uintptr_t gl_load_texture(void *video_data, void *data,
|
|||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gl_unload_texture(void *data, uintptr_t id, bool threaded)
|
static void gl_unload_texture(void *data, uintptr_t id)
|
||||||
{
|
{
|
||||||
GLuint glid;
|
GLuint glid;
|
||||||
if (!id)
|
if (!id)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
glid = (GLuint)id;
|
glid = (GLuint)id;
|
||||||
|
glDeleteTextures(1, &glid);
|
||||||
#ifdef HAVE_THREADS
|
|
||||||
if (threaded)
|
|
||||||
{
|
|
||||||
custom_command_method_t func = video_texture_unload_wrap_gl;
|
|
||||||
video_thread_custom_cmd(&glid, func);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
video_texture_unload_gl(&glid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gl_set_coords(void *handle_data, void *shader_data,
|
static void gl_set_coords(void *handle_data, void *shader_data,
|
||||||
|
@ -1425,7 +1425,7 @@ bool video_thread_font_init(const void **font_driver, void **font_handle,
|
|||||||
return pkt.data.font_init.return_value;
|
return pkt.data.font_init.return_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned video_thread_custom_cmd(void *data,
|
unsigned video_thread_texture_load(void *data,
|
||||||
custom_command_method_t func)
|
custom_command_method_t func)
|
||||||
{
|
{
|
||||||
thread_video_t *thr = (thread_video_t*)video_driver_get_ptr(true);
|
thread_video_t *thr = (thread_video_t*)video_driver_get_ptr(true);
|
||||||
|
@ -83,7 +83,7 @@ bool video_thread_font_init(
|
|||||||
custom_font_command_method_t func,
|
custom_font_command_method_t func,
|
||||||
bool is_threaded);
|
bool is_threaded);
|
||||||
|
|
||||||
unsigned video_thread_custom_cmd(void *data,
|
unsigned video_thread_texture_load(void *data,
|
||||||
custom_command_method_t func);
|
custom_command_method_t func);
|
||||||
|
|
||||||
RETRO_END_DECLS
|
RETRO_END_DECLS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user