mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
Cleanups
This commit is contained in:
parent
aa40dbd337
commit
e48ffd14cd
@ -386,6 +386,7 @@ void vulkan_copy_staging_to_dynamic(vk_t *vk, VkCommandBuffer cmd,
|
||||
#ifdef VULKAN_DEBUG_TEXTURE_ALLOC
|
||||
static VkImage vk_images[4 * 1024];
|
||||
static unsigned vk_count;
|
||||
static unsigned track_seq;
|
||||
|
||||
void vulkan_log_textures(void)
|
||||
{
|
||||
@ -398,7 +399,6 @@ void vulkan_log_textures(void)
|
||||
vk_count = 0;
|
||||
}
|
||||
|
||||
static unsigned track_seq;
|
||||
static void vulkan_track_alloc(VkImage image)
|
||||
{
|
||||
vk_images[vk_count++] = image;
|
||||
|
@ -42,14 +42,7 @@
|
||||
#include "../../verbosity.h"
|
||||
#include "../../configuration.h"
|
||||
|
||||
static enum gfx_ctx_api android_api = GFX_CTX_NONE;
|
||||
|
||||
/* forward declaration */
|
||||
int system_property_get(const char *cmd, const char *args, char *value);
|
||||
|
||||
#ifdef HAVE_OPENGLES
|
||||
static bool g_es3 = false;
|
||||
|
||||
#ifndef EGL_OPENGL_ES3_BIT_KHR
|
||||
#define EGL_OPENGL_ES3_BIT_KHR 0x0040
|
||||
#endif
|
||||
@ -68,6 +61,16 @@ typedef struct
|
||||
#endif
|
||||
} android_ctx_data_t;
|
||||
|
||||
|
||||
/* Forward declaration */
|
||||
int system_property_get(const char *cmd, const char *args, char *value);
|
||||
|
||||
/* TODO/FIXME - static global */
|
||||
static enum gfx_ctx_api android_api = GFX_CTX_NONE;
|
||||
#ifdef HAVE_OPENGLES
|
||||
static bool g_es3 = false;
|
||||
#endif
|
||||
|
||||
static void android_gfx_ctx_destroy(void *data)
|
||||
{
|
||||
android_ctx_data_t *and = (android_ctx_data_t*)data;
|
||||
|
@ -189,16 +189,16 @@ static bool wgl_has_extension(const char *extension, const char *extensions)
|
||||
static void create_gl_context(HWND hwnd, bool *quit)
|
||||
{
|
||||
struct retro_hw_render_callback *hwr = video_driver_get_hw_context();
|
||||
bool debug = hwr->debug_context;
|
||||
bool core_context = (win32_major * 1000 + win32_minor) >= 3001;
|
||||
win32_hdc = GetDC(hwnd);
|
||||
#ifdef GL_DEBUG
|
||||
bool debug = true;
|
||||
#else
|
||||
bool debug = hwr->debug_context;
|
||||
#endif
|
||||
|
||||
win32_setup_pixel_format(win32_hdc, true);
|
||||
|
||||
#ifdef GL_DEBUG
|
||||
debug = true;
|
||||
#endif
|
||||
|
||||
if (win32_hrc)
|
||||
{
|
||||
RARCH_LOG("[WGL]: Using cached GL context.\n");
|
||||
@ -272,21 +272,24 @@ static void create_gl_context(HWND hwnd, bool *quit)
|
||||
if (!pcreate_context)
|
||||
pcreate_context = (wglCreateContextAttribsProc)gfx_ctx_wgl_get_proc_address("wglCreateContextAttribsARB");
|
||||
|
||||
/* In order to support the core info "required_hw_api" field correctly, we should try to init the highest available
|
||||
* version GL context possible. This means trying successively lower versions until it works, because GL has
|
||||
* no facility for determining the highest possible supported version.
|
||||
/* In order to support the core info "required_hw_api"
|
||||
* field correctly, we should try to init the highest available
|
||||
* version GL context possible. This means trying successively
|
||||
* lower versions until it works, because GL has
|
||||
* no facility for determining the highest possible
|
||||
* supported version.
|
||||
*/
|
||||
if (pcreate_context)
|
||||
{
|
||||
int i;
|
||||
int gl_versions[][2] = {{4, 6}, {4, 5}, {4, 4}, {4, 3}, {4, 2}, {4, 1}, {4, 0}, {3, 3}, {3, 2}, {3, 1}, {3, 0}};
|
||||
int gl_version_rows = ARRAY_SIZE(gl_versions);
|
||||
int (*versions)[2];
|
||||
int version_rows = 0;
|
||||
HGLRC context = NULL;
|
||||
int gl_versions[][2] = {{4, 6}, {4, 5}, {4, 4}, {4, 3}, {4, 2}, {4, 1}, {4, 0}, {3, 3}, {3, 2}, {3, 1}, {3, 0}};
|
||||
int gl_version_rows = ARRAY_SIZE(gl_versions);
|
||||
int version_rows = 0;
|
||||
HGLRC context = NULL;
|
||||
int version_rows = gl_version_rows;
|
||||
|
||||
versions = gl_versions;
|
||||
version_rows = gl_version_rows;
|
||||
versions = gl_versions;
|
||||
|
||||
/* only try higher versions when core_context is true */
|
||||
if (!core_context)
|
||||
@ -330,9 +333,13 @@ static void create_gl_context(HWND hwnd, bool *quit)
|
||||
/* found a suitable version that is high enough, we can stop now */
|
||||
break;
|
||||
}
|
||||
else if (versions[i][0] == win32_major && versions[i][1] == win32_minor)
|
||||
else if (
|
||||
versions[i][0] == win32_major &&
|
||||
versions[i][1] == win32_minor)
|
||||
{
|
||||
/* The requested version was tried and is not supported, go ahead and fail since everything else will be lower than that. */
|
||||
/* The requested version was tried and
|
||||
* is not supported, go ahead and fail
|
||||
* since everything else will be lower than that. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -65,8 +65,6 @@ static task_queue_t tasks_finished = {NULL, NULL};
|
||||
static struct retro_task_impl *impl_current = NULL;
|
||||
static bool task_threaded_enable = false;
|
||||
|
||||
static uint32_t task_count = 0;
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
static slock_t *running_lock = NULL;
|
||||
static slock_t *finished_lock = NULL;
|
||||
@ -890,7 +888,9 @@ char* task_get_title(retro_task_t *task)
|
||||
|
||||
retro_task_t *task_init(void)
|
||||
{
|
||||
retro_task_t *task = (retro_task_t*)malloc(sizeof(*task));
|
||||
/* TODO/FIXME - static local global */
|
||||
static uint32_t task_count = 0;
|
||||
retro_task_t *task = (retro_task_t*)malloc(sizeof(*task));
|
||||
|
||||
if (!task)
|
||||
return NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user