From 38d785984f1d15b9fab911fdfce4fb086dcfdb71 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Dec 2013 19:10:21 +0100 Subject: [PATCH] Add RETRO_ENVIRONMENT_GET_PERF_INTERFACE to libretro.h --- Makefile | 2 +- Makefile.emscripten | 2 +- Makefile.ngc | 2 +- Makefile.openpandora | 2 +- Makefile.ps3 | 2 +- Makefile.ps3.rgl | 2 +- Makefile.ps3.salamander | 2 +- Makefile.psp1 | 2 +- Makefile.wii | 2 +- Makefile.win | 2 +- Makefile.xenon | 2 +- audio/sinc.c | 1 + blackberry-qnx/playbook/.cproject | 1 + driver.c | 9 ++- dynamic.c | 10 +++ frontend/frontend.c | 2 - frontend/frontend_emscripten.c | 2 - frontend/menu/menu_common.c | 2 +- frontend/menu/menu_common.h | 2 +- general.h | 6 +- gfx/gfx_common.c | 8 +- gfx/scaler/scaler.c | 1 + gfx/thread_wrapper.c | 12 +-- libretro.h | 81 +++++++++++++++++++++ msvc/RetroArch-360/RetroArch-360.vcxproj | 12 +-- msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj | 14 ++-- msvc/msvc-2010/RetroArch-msvc2010.vcxproj | 8 +- performance.c | 57 +++++++-------- performance.h | 59 ++------------- retroarch.c | 20 ++--- retroarch_logger.h | 2 - 31 files changed, 185 insertions(+), 146 deletions(-) diff --git a/Makefile b/Makefile index 0f17e39454..1a6149a05c 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ ifeq ($(findstring Haiku,$(OS)),) LIBS = -lm endif -DEFINES = -DHAVE_CONFIG_H -DHAVE_SCREENSHOTS +DEFINES = -DHAVE_CONFIG_H -DHAVE_SCREENSHOTS -DRARCH_INTERNAL ifeq ($(GLOBAL_CONFIG_DIR),) GLOBAL_CONFIG_DIR = /etc diff --git a/Makefile.emscripten b/Makefile.emscripten index 7622aefa4c..47a63996e3 100644 --- a/Makefile.emscripten +++ b/Makefile.emscripten @@ -59,7 +59,7 @@ endif libretro = libretro_emscripten.bc LIBS = -lm -DEFINES = -DHAVE_SCREENSHOTS -DHAVE_CAMERA -DHAVE_NULLAUDIO -DHAVE_BSV_MOVIE +DEFINES = -DHAVE_SCREENSHOTS -DHAVE_CAMERA -DHAVE_NULLAUDIO -DHAVE_BSV_MOVIE -DRARCH_INTERNAL LDFLAGS = -L. -s TOTAL_MEMORY=$(MEMORY) -s OUTLINING_LIMIT=50000 --js-library emscripten/library_rwebaudio.js --js-library emscripten/library_rwebinput.js --js-library emscripten/library_rwebcam.js --no-heap-copy ifeq ($(PERF_TEST), 1) diff --git a/Makefile.ngc b/Makefile.ngc index 8efed26865..efd87bfa54 100644 --- a/Makefile.ngc +++ b/Makefile.ngc @@ -62,7 +62,7 @@ CFLAGS += -DHAVE_FILE_LOGGER CFLAGS += -Iconsole/logger endif -CFLAGS += -std=gnu99 -DHAVE_RGUI -DHAVE_MENU -DRARCH_CONSOLE -DGEKKO -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_RARCH_MAIN_WRAP -DHAVE_RARCH_MAIN_IMPLEMENTATION -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DHAVE_RSOUND -Wno-char-subscripts +CFLAGS += -std=gnu99 -DHAVE_RGUI -DHAVE_MENU -DRARCH_CONSOLE -DGEKKO -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_RARCH_MAIN_WRAP -DHAVE_RARCH_MAIN_IMPLEMENTATION -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DHAVE_RSOUND -Wno-char-subscripts -DRARCH_INTERNAL ifeq ($(DEBUG), 1) CFLAGS += -O0 -g diff --git a/Makefile.openpandora b/Makefile.openpandora index 6c0038f01a..fd227f19fa 100644 --- a/Makefile.openpandora +++ b/Makefile.openpandora @@ -14,7 +14,7 @@ OBJ = griffin/griffin.o audio/sinc_neon.o audio/utils_neon.o LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound -DEFINES = -std=gnu99 -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN +DEFINES = -std=gnu99 -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -DRARCH_INTERNAL DEFINES += -D__ARM_ARCH_6__ -DHAVE_NEON -DSINC_LOWER_QUALITY -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DWANT_RPNG -DWANT_MINIZ -DHAVE_OVERLAY -DHAVE_ALSA -DHAVE_ZLIB -D__linux__ DEFINES += $(INCDIRS) DEFINES += -D__OPENPANDORA__ -DPANDORA diff --git a/Makefile.ps3 b/Makefile.ps3 index 8d2a1cc0f6..d179bfeb77 100644 --- a/Makefile.ps3 +++ b/Makefile.ps3 @@ -73,7 +73,7 @@ ifeq ($(HAVE_RLAUNCH), 1) DEFINES += -DHAVE_RLAUNCH endif -DEFINES += -DHAVE_RMENU -DHAVE_MENU +DEFINES += -DHAVE_RMENU -DHAVE_MENU -DRARCH_INTERNAL ifeq ($(HAVE_RGL), 1) DEFINES += -DHAVE_RGL diff --git a/Makefile.ps3.rgl b/Makefile.ps3.rgl index f41c531726..4b44367ef2 100644 --- a/Makefile.ps3.rgl +++ b/Makefile.ps3.rgl @@ -42,7 +42,7 @@ PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe PPU_LDLIBS = -lio_stub -DEFINES += -D__CELLOS_LV2__ +DEFINES += -D__CELLOS_LV2__ -DRARCH_INTERNAL ifeq ($(DEBUG), 1) PPU_OPTIMIZE_LV := -O0 -g diff --git a/Makefile.ps3.salamander b/Makefile.ps3.salamander index 7fa10f2b61..2eb908e966 100644 --- a/Makefile.ps3.salamander +++ b/Makefile.ps3.salamander @@ -18,7 +18,7 @@ endif STRIP = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-strip.exe -PPU_CFLAGS += -I. -D__CELLOS_LV2__ -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_SYSUTILS -DHAVE_SYSMODULES -DHAVE_RARCH_EXEC +PPU_CFLAGS += -I. -D__CELLOS_LV2__ -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_SYSUTILS -DHAVE_SYSMODULES -DHAVE_RARCH_EXEC -DRARCH_INTERNAL PPU_SRCS = frontend/frontend_salamander.c frontend/frontend_context.c file_path.c compat/compat.c conf/config_file.c ifeq ($(HAVE_LOGGER), 1) diff --git a/Makefile.psp1 b/Makefile.psp1 index 42d5de7279..199ed86299 100644 --- a/Makefile.psp1 +++ b/Makefile.psp1 @@ -8,7 +8,7 @@ INCDIR = CFLAGS = -O2 -G0 -g -std=gnu99 -ffast-math ASFLAGS = $(CFLAGS) -RARCH_DEFINES = -DPSP -DHAVE_RARCH_MAIN_WRAP -DHAVE_RARCH_MAIN_IMPLEMENTATION -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_GRIFFIN=1 -DHAVE_NULLVIDEO -DHAVE_NULLAUDIO +RARCH_DEFINES = -DPSP -DHAVE_RARCH_MAIN_WRAP -DHAVE_RARCH_MAIN_IMPLEMENTATION -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_GRIFFIN=1 -DHAVE_NULLVIDEO -DHAVE_NULLAUDIO -DRARCH_INTERNAL ifeq ($(HAVE_FILE_LOGGER), 1) CFLAGS += -DHAVE_FILE_LOGGER diff --git a/Makefile.wii b/Makefile.wii index 3b2531be37..1e0f72abe1 100644 --- a/Makefile.wii +++ b/Makefile.wii @@ -63,7 +63,7 @@ CFLAGS += -Iconsole/logger endif -CFLAGS += -std=gnu99 -DSINC_LOWER_QUALITY -DHAVE_RGUI -DHAVE_MENU -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DGEKKO -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_RARCH_MAIN_WRAP -DHAVE_RARCH_MAIN_IMPLEMENTATION -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DHAVE_THREADS -DHAVE_RSOUND -Wno-char-subscripts +CFLAGS += -std=gnu99 -DSINC_LOWER_QUALITY -DHAVE_RGUI -DHAVE_MENU -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DGEKKO -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_RARCH_MAIN_WRAP -DHAVE_RARCH_MAIN_IMPLEMENTATION -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DHAVE_THREADS -DHAVE_RSOUND -Wno-char-subscripts -DRARCH_INTERNAL ifeq ($(DEBUG), 1) CFLAGS += -O0 -g -DDEBUG diff --git a/Makefile.win b/Makefile.win index 6b5d3168e9..faf81dc7c0 100644 --- a/Makefile.win +++ b/Makefile.win @@ -85,7 +85,7 @@ endif libretro ?= -lretro LIBS = -lm -DEFINES = -I. -DHAVE_SCREENSHOTS -DHAVE_BSV_MOVIE -DHAVE_BUILTIN_AUTOCONFIG +DEFINES = -I. -DHAVE_SCREENSHOTS -DHAVE_BSV_MOVIE -DHAVE_BUILTIN_AUTOCONFIG -DRARCH_INTERNAL LDFLAGS = -L. -static-libgcc ifeq ($(TDM_GCC),) diff --git a/Makefile.xenon b/Makefile.xenon index a3d1a887ee..3de9ede7b0 100644 --- a/Makefile.xenon +++ b/Makefile.xenon @@ -16,7 +16,7 @@ INCDIRS = -I. -I$(DEVKITXENON)/usr/include OBJ = griffin/griffin.o LIBS = -lretro_xenon360 -lxenon -lm -lc -DEFINES = -std=gnu99 -DRARCH_CONSOLE -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN +DEFINES = -std=gnu99 -DRARCH_CONSOLE -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -DRARCH_INTERNAL DEFINES += -maltivec -mhard-float -m32 -mpowerpc64 -mcpu=cell -mtune=cell -fno-pic -g -Wall -DXENON $(INCDIRS) -Wno-char-subscripts DEFINES += -u read -u _start -u exc_base diff --git a/audio/sinc.c b/audio/sinc.c index 1c7a406d24..6931c61ba3 100644 --- a/audio/sinc.c +++ b/audio/sinc.c @@ -17,6 +17,7 @@ // Only suitable as an upsampler, as cutoff frequency isn't dynamically configurable (yet). #include "resampler.h" +#include "../libretro.h" #include "../performance.h" #include #include diff --git a/blackberry-qnx/playbook/.cproject b/blackberry-qnx/playbook/.cproject index b3c52b8b66..82f30ba825 100644 --- a/blackberry-qnx/playbook/.cproject +++ b/blackberry-qnx/playbook/.cproject @@ -34,6 +34,7 @@ + diff --git a/driver.c b/driver.c index e839afb05d..6048bd8299 100644 --- a/driver.c +++ b/driver.c @@ -17,6 +17,7 @@ #include "driver.h" #include "general.h" #include "file.h" +#include "libretro.h" #include #include #include @@ -1017,7 +1018,7 @@ bool driver_monitor_fps_statistics(double *refresh_rate, double *deviation, unsi return false; // Measure statistics on frame time (microsecs), *not* FPS. - rarch_time_t accum = 0; + retro_time_t accum = 0; for (i = 0; i < samples; i++) accum += g_extern.measure_data.frame_time_samples[i]; @@ -1027,13 +1028,13 @@ bool driver_monitor_fps_statistics(double *refresh_rate, double *deviation, unsi i, (int)g_extern.measure_data.frame_time_samples[i]); #endif - rarch_time_t avg = accum / samples; - rarch_time_t accum_var = 0; + retro_time_t avg = accum / samples; + retro_time_t accum_var = 0; // Drop first measurement. It is likely to be bad. for (i = 0; i < samples; i++) { - rarch_time_t diff = g_extern.measure_data.frame_time_samples[i] - avg; + retro_time_t diff = g_extern.measure_data.frame_time_samples[i] - avg; accum_var += diff * diff; } diff --git a/dynamic.c b/dynamic.c index ee1eb01e6d..9df7803470 100644 --- a/dynamic.c +++ b/dynamic.c @@ -840,6 +840,16 @@ bool rarch_environment_cb(unsigned cmd, void *data) break; } + case RETRO_ENVIRONMENT_GET_PERF_INTERFACE: + { + RARCH_LOG("Environ GET_PERF_INTERFACE.\n"); + struct retro_perf_callback *cb = (struct retro_perf_callback*)data; + cb->get_perf_counter = rarch_get_perf_counter; + cb->get_time_usec = rarch_get_time_usec; + cb->get_cpu_features = rarch_get_cpu_features; + break; + } + // Private extensions for internal use, not part of libretro API. case RETRO_ENVIRONMENT_SET_LIBRETRO_PATH: RARCH_LOG("Environ (Private) SET_LIBRETRO_PATH.\n"); diff --git a/frontend/frontend.c b/frontend/frontend.c index 0c3fe8bfc9..ed20b03f76 100644 --- a/frontend/frontend.c +++ b/frontend/frontend.c @@ -366,9 +366,7 @@ returntype main_entry(signature()) rarch_deinit_msg_queue(); global_uninit_drivers(); -#ifdef PERF_TEST rarch_perf_log(); -#endif #if defined(HAVE_LOGGER) && !defined(ANDROID) logger_shutdown(); diff --git a/frontend/frontend_emscripten.c b/frontend/frontend_emscripten.c index 5c2a044180..f289c85d77 100644 --- a/frontend/frontend_emscripten.c +++ b/frontend/frontend_emscripten.c @@ -40,9 +40,7 @@ static void endloop(void) rarch_deinit_msg_queue(); -#ifdef PERF_TEST rarch_perf_log(); -#endif rarch_main_clear_state(); diff --git a/frontend/menu/menu_common.c b/frontend/menu/menu_common.c index 4870c6d74f..ea36082395 100644 --- a/frontend/menu/menu_common.c +++ b/frontend/menu/menu_common.c @@ -1372,7 +1372,7 @@ static int menu_iterate_func(void *data, unsigned action) bool menu_iterate(void) { - rarch_time_t time, delta, target_msec, sleep_msec; + retro_time_t time, delta, target_msec, sleep_msec; unsigned action; static bool initial_held = true; static bool first_held = false; diff --git a/frontend/menu/menu_common.h b/frontend/menu/menu_common.h index 5f8513382f..fcda08fe10 100644 --- a/frontend/menu/menu_common.h +++ b/frontend/menu/menu_common.h @@ -322,7 +322,7 @@ typedef struct unsigned current_pad; rom_history_t *history; - rarch_time_t last_time; // Used to throttle RGUI in case VSync is broken. + retro_time_t last_time; // Used to throttle RGUI in case VSync is broken. struct rgui_bind_state binds; struct diff --git a/general.h b/general.h index 4a8367d775..9e9bcde0fe 100644 --- a/general.h +++ b/general.h @@ -386,8 +386,8 @@ struct global struct { - rarch_time_t minimum_frame_time; - rarch_time_t last_frame_time; + retro_time_t minimum_frame_time; + retro_time_t last_frame_time; } frame_limit; struct @@ -465,7 +465,7 @@ struct global uint64_t buffer_free_samples_count; #define MEASURE_FRAME_TIME_SAMPLES_COUNT (2 * 1024) - rarch_time_t frame_time_samples[MEASURE_FRAME_TIME_SAMPLES_COUNT]; + retro_time_t frame_time_samples[MEASURE_FRAME_TIME_SAMPLES_COUNT]; uint64_t frame_time_samples_count; } measure_data; diff --git a/gfx/gfx_common.c b/gfx/gfx_common.c index 9dfe684cd0..1cefc302ed 100644 --- a/gfx/gfx_common.c +++ b/gfx/gfx_common.c @@ -18,7 +18,7 @@ #include "../general.h" #include "../performance.h" -static inline float time_to_fps(rarch_time_t last_time, rarch_time_t new_time, int frames) +static inline float time_to_fps(retro_time_t last_time, retro_time_t new_time, int frames) { return (1000000.0f * frames) / (new_time - last_time); } @@ -26,13 +26,13 @@ static inline float time_to_fps(rarch_time_t last_time, rarch_time_t new_time, i #define FPS_UPDATE_INTERVAL 256 bool gfx_get_fps(char *buf, size_t size, char *buf_fps, size_t size_fps) { - static rarch_time_t time; - static rarch_time_t fps_time; + static retro_time_t time; + static retro_time_t fps_time; static float last_fps; bool ret = false; *buf = '\0'; - rarch_time_t new_time = rarch_get_time_usec(); + retro_time_t new_time = rarch_get_time_usec(); if (g_extern.frame_count) { unsigned write_index = g_extern.measure_data.frame_time_samples_count++ & diff --git a/gfx/scaler/scaler.c b/gfx/scaler/scaler.c index 695c479a32..b847e17ebb 100644 --- a/gfx/scaler/scaler.c +++ b/gfx/scaler/scaler.c @@ -21,6 +21,7 @@ #include #include #include +#include "../../libretro.h" #include "../../performance.h" // In case aligned allocs are needed later ... diff --git a/gfx/thread_wrapper.c b/gfx/thread_wrapper.c index 782b832e3b..2de5a0c830 100644 --- a/gfx/thread_wrapper.c +++ b/gfx/thread_wrapper.c @@ -89,8 +89,8 @@ typedef struct thread_video bool focus; bool nonblock; - rarch_time_t last_time; - rarch_time_t target_frame_time; + retro_time_t last_time; + retro_time_t target_frame_time; unsigned hit_count; unsigned miss_count; @@ -409,12 +409,12 @@ static bool thread_frame(void *data, const void *frame_, #ifndef RARCH_CONSOLE if (!thr->nonblock) { - rarch_time_t target = thr->last_time + thr->target_frame_time; + retro_time_t target = thr->last_time + thr->target_frame_time; // Ideally, use absolute time, but that is only a good idea on POSIX. while (thr->frame.updated) { - rarch_time_t current = rarch_get_time_usec(); - rarch_time_t delta = target - current; + retro_time_t current = rarch_get_time_usec(); + retro_time_t delta = target - current; if (delta <= 0) break; @@ -495,7 +495,7 @@ static bool thread_init(thread_video_t *thr, const video_info_t *info, const inp memset(thr->frame.buffer, 0x80, max_size); - thr->target_frame_time = (rarch_time_t)roundf(1000000LL / g_settings.video.refresh_rate); + thr->target_frame_time = (retro_time_t)roundf(1000000LL / g_settings.video.refresh_rate); thr->last_time = rarch_get_time_usec(); thr->thread = sthread_create(thread_loop, thr); diff --git a/libretro.h b/libretro.h index aaff348497..ff64814768 100755 --- a/libretro.h +++ b/libretro.h @@ -564,6 +564,10 @@ enum retro_mod // as certain platforms cannot use use stderr for logging. It also allows the frontend to // show logging information in a more suitable way. // If this interface is not used, libretro cores should log to stderr as desired. +#define RETRO_ENVIRONMENT_GET_PERF_INTERFACE 28 + // struct retro_perf_callback * -- + // Gets an interface for performance counters. This is useful for performance logging in a + // cross-platform way and for detecting architecture-specific features, such as SIMD support. enum retro_log_level { @@ -583,6 +587,83 @@ struct retro_log_callback retro_log_printf_t log; }; +// Performance functions +// +// Id values for SIMD CPU features +#define RETRO_SIMD_SSE (1 << 0) +#define RETRO_SIMD_SSE2 (1 << 1) +#define RETRO_SIMD_VMX (1 << 2) +#define RETRO_SIMD_VMX128 (1 << 3) +#define RETRO_SIMD_AVX (1 << 4) +#define RETRO_SIMD_NEON (1 << 5) +#define RETRO_SIMD_SSE3 (1 << 6) +#define RETRO_SIMD_SSSE3 (1 << 7) + +typedef unsigned long long retro_perf_tick_t; +typedef int64_t retro_time_t; + +typedef struct retro_perf_counter +{ + const char *ident; + retro_perf_tick_t start; + retro_perf_tick_t total; + retro_perf_tick_t call_cnt; + + bool registered; +} retro_perf_counter_t; + + +typedef retro_time_t (*retro_perf_get_time_usec_t)(void); +typedef retro_perf_tick_t (*retro_perf_get_counter_t)(void); +typedef void (*retro_get_cpu_features_t)(unsigned*); + +struct retro_perf_callback +{ + retro_perf_get_time_usec_t get_time_usec; + retro_perf_get_counter_t get_perf_counter; + retro_get_cpu_features_t get_cpu_features; +}; + +#if defined(PERF_TEST) + +#define RARCH_PERFORMANCE_INIT(X) \ + static retro_perf_counter_t X = {#X}; \ + do { \ + if (!(X).registered) \ + rarch_perf_register(&(X)); \ + } while(0) + +#define RARCH_PERFORMANCE_START(X) do { \ + (X).call_cnt++; \ + (X).start = rarch_get_perf_counter(); \ +} while(0) + +#define RARCH_PERFORMANCE_STOP(X) do { \ + (X).total += rarch_get_perf_counter() - (X).start; \ +} while(0) + +#elif !defined(RARCH_INTERNAL) + +#define RARCH_PERFORMANCE_INIT(X, perf_register_cb) static retro_perf_counter_t X = {#X}; \ + do { \ + if (!(X).registered) \ + perf_register_cb(&(X)); \ + } while(0) + +#define RARCH_PERFORMANCE_START(X, get_perf_counter_cb) do { \ + (X).call_cnt++; \ + (X).start = get_perf_counter_cb(); \ +} while(0) + +#define RARCH_PERFORMANCE_STOP(X, get_perf_counter_cb) do { \ + (X).total += get_perf_counter_cb() - (X).start; \ +} while(0) +#else +#define RARCH_PERFORMANCE_INIT(X) +#define RARCH_PERFORMANCE_START(X) +#define RARCH_PERFORMANCE_STOP(X) +#endif + // FIXME: Document the sensor API and work out behavior. // It will be marked as experimental until then. enum retro_sensor_action diff --git a/msvc/RetroArch-360/RetroArch-360.vcxproj b/msvc/RetroArch-360/RetroArch-360.vcxproj index 6fe8b05f04..984c574c0b 100644 --- a/msvc/RetroArch-360/RetroArch-360.vcxproj +++ b/msvc/RetroArch-360/RetroArch-360.vcxproj @@ -113,7 +113,7 @@ true false MultiThreadedDebug - _DEBUG;_XBOX;HAVE_XINPUT2;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;HAVE_RARCH_MAIN_IMPLEMENTATION;RARCH_CONSOLE;HAVE_RMENU_XUI;HAVE_MENU;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_XAUDIO;WANT_RPNG + _DEBUG;_XBOX;HAVE_XINPUT2;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;HAVE_RARCH_MAIN_IMPLEMENTATION;RARCH_CONSOLE;HAVE_RMENU_XUI;HAVE_MENU;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;RARCH_INTERNAL;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_XAUDIO;WANT_RPNG Callcap @@ -151,7 +151,7 @@ AnalyzeOnly false MultiThreadedDebug - _DEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;HAVE_RARCH_MAIN_IMPLEMENTATION;RARCH_CONSOLE;HAVE_RMENU_XUI;HAVE_MENU;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;SINC_LOWER_QUALITY;WANT_RPNG + _DEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;HAVE_RARCH_MAIN_IMPLEMENTATION;RARCH_CONSOLE;HAVE_RMENU_XUI;HAVE_MENU;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;RARCH_INTERNAL;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;SINC_LOWER_QUALITY;WANT_RPNG Callcap @@ -190,7 +190,7 @@ Size false MultiThreaded - NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_RMENU_XUI;HAVE_MENU;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_XAUDIO;WANT_RPNG + NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_RMENU_XUI;HAVE_MENU;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;RARCH_INTERNAL;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_XAUDIO;WANT_RPNG Callcap @@ -234,7 +234,7 @@ Size false MultiThreaded - NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_RMENU_XUI;HAVE_MENU;HAVE_XAUDIO;WANT_RPNG + NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;RARCH_INTERNAL;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_RMENU_XUI;HAVE_MENU;HAVE_XAUDIO;WANT_RPNG true @@ -275,7 +275,7 @@ false false MultiThreaded - NDEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;HAVE_RARCH_MAIN_IMPLEMENTATION;RARCH_CONSOLE=1;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_RMENU_XUI;HAVE_MENU;HAVE_XAUDIO;WANT_RPNG + NDEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;HAVE_RARCH_MAIN_IMPLEMENTATION;RARCH_CONSOLE=1;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;RARCH_INTERNAL;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_RMENU_XUI;HAVE_MENU;HAVE_XAUDIO;WANT_RPNG true @@ -316,7 +316,7 @@ false false MultiThreaded - NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_RMENU_XUI;HAVE_MENU;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_XAUDIO;WANT_RPNG + NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);HAVE_XINPUT2;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_RMENU_XUI;HAVE_MENU;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;RARCH_INTERNAL;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;SINC_LOWER_QUALITY;HAVE_XAUDIO;WANT_RPNG true diff --git a/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj b/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj index 0a2f623fea..d9ba30046b 100644 --- a/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj +++ b/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj @@ -22,7 +22,7 @@ Optimization="3" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;WANT_MINIZ;SINC_LOWER_QUALITY" + PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY" MinimalRebuild="TRUE" BasicRuntimeChecks="0" RuntimeLibrary="1" @@ -72,7 +72,7 @@ OmitFramePointers="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;WANT_MINIZ;SINC_LOWER_QUALITY" + PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" @@ -127,7 +127,7 @@ OmitFramePointers="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;FASTCAP;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;WANT_MINIZ;SINC_LOWER_QUALITY" + PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;FASTCAP;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" @@ -188,7 +188,7 @@ EnableFiberSafeOptimizations="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;inline=_inline;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;WANT_MINIZ;SINC_LOWER_QUALITY" + PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;inline=_inline;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" @@ -241,7 +241,7 @@ OmitFramePointers="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;WANT_MINIZ;SINC_LOWER_QUALITY" + PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" @@ -300,7 +300,7 @@ EnableFiberSafeOptimizations="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;inline=_inline;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;WANT_MINIZ;SINC_LOWER_QUALITY" + PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;inline=_inline;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" @@ -353,7 +353,7 @@ OmitFramePointers="TRUE" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71"" - PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;WANT_MINIZ;SINC_LOWER_QUALITY" + PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_MAIN_IMPLEMENTATION;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;RARCH_INTERNAL;WANT_MINIZ;SINC_LOWER_QUALITY" StringPooling="TRUE" RuntimeLibrary="0" BufferSecurityCheck="TRUE" diff --git a/msvc/msvc-2010/RetroArch-msvc2010.vcxproj b/msvc/msvc-2010/RetroArch-msvc2010.vcxproj index 2d052f5eef..f136602104 100644 --- a/msvc/msvc-2010/RetroArch-msvc2010.vcxproj +++ b/msvc/msvc-2010/RetroArch-msvc2010.vcxproj @@ -88,7 +88,7 @@ Level3 Disabled - WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_FBO;HAVE_ZLIB;WANT_MINIZ;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_BUILTIN_AUTOCONFIG;HAVE_DINPUT;HAVE_WINXINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC + WIN32;RARCH_INTERNAL;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_FBO;HAVE_ZLIB;WANT_MINIZ;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_BUILTIN_AUTOCONFIG;HAVE_DINPUT;HAVE_WINXINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\;$(CG_INC_PATH);%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp @@ -108,7 +108,7 @@ Level3 Disabled - WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_FBO;HAVE_ZLIB;WANT_MINIZ;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_BUILTIN_AUTOCONFIG;HAVE_DINPUT;HAVE_WINXINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC + WIN32;RARCH_INTERNAL;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_FBO;HAVE_ZLIB;WANT_MINIZ;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_BUILTIN_AUTOCONFIG;HAVE_DINPUT;HAVE_WINXINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\;$(CG_INC_PATH);%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp @@ -130,7 +130,7 @@ MaxSpeed true true - WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_FBO;HAVE_ZLIB;WANT_MINIZ;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_BUILTIN_AUTOCONFIG;HAVE_DINPUT;HAVE_WINXINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC + WIN32;RARCH_INTERNAL;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_FBO;HAVE_ZLIB;WANT_MINIZ;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_BUILTIN_AUTOCONFIG;HAVE_DINPUT;HAVE_WINXINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\;$(CG_INC_PATH);%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp @@ -154,7 +154,7 @@ MaxSpeed true true - WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_FBO;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_BUILTIN_AUTOCONFIG;HAVE_DINPUT;HAVE_WINXINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_ZLIB;WANT_MINIZ;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC + WIN32;RARCH_INTERNAL;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_FBO;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_BUILTIN_AUTOCONFIG;HAVE_DINPUT;HAVE_WINXINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_ZLIB;WANT_MINIZ;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC $(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\;$(CG_INC_PATH);%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp diff --git a/performance.c b/performance.c index 6f438ea74b..c06c2ab3f7 100644 --- a/performance.c +++ b/performance.c @@ -15,6 +15,7 @@ */ #include +#include "libretro.h" #include "performance.h" #include "general.h" @@ -69,12 +70,11 @@ #include -#ifdef PERF_TEST #define MAX_COUNTERS 64 -static struct rarch_perf_counter *perf_counters[MAX_COUNTERS]; +static struct retro_perf_counter *perf_counters[MAX_COUNTERS]; static unsigned perf_ptr; -void rarch_perf_register(struct rarch_perf_counter *perf) +void rarch_perf_register(struct retro_perf_counter *perf) { if (perf_ptr >= MAX_COUNTERS) return; @@ -91,9 +91,9 @@ void rarch_perf_log(void) RARCH_PERFORMANCE_LOG(perf_counters[i]->ident, *perf_counters[i]); } -rarch_perf_tick_t rarch_get_perf_counter(void) +retro_perf_tick_t rarch_get_perf_counter(void) { - rarch_perf_tick_t time = 0; + retro_perf_tick_t time = 0; #ifdef _XBOX1 #define rdtsc __asm __emit 0fh __asm __emit 031h @@ -106,7 +106,7 @@ rarch_perf_tick_t rarch_get_perf_counter(void) #elif defined(__linux__) || defined(__QNX__) struct timespec tv; if (clock_gettime(CLOCK_MONOTONIC, &tv) == 0) - time = (rarch_perf_tick_t)tv.tv_sec * 1000000000 + (rarch_perf_tick_t)tv.tv_nsec; + time = (retro_perf_tick_t)tv.tv_sec * 1000000000 + (retro_perf_tick_t)tv.tv_nsec; else time = 0; @@ -117,7 +117,7 @@ rarch_perf_tick_t rarch_get_perf_counter(void) #elif defined(__x86_64__) unsigned a, d; asm volatile ("rdtsc" : "=a" (a), "=d" (d)); - time = (rarch_perf_tick_t)a | ((rarch_perf_tick_t)d << 32); + time = (retro_perf_tick_t)a | ((retro_perf_tick_t)d << 32); #endif #elif defined(__ARM_ARCH_6__) @@ -128,9 +128,8 @@ rarch_perf_tick_t rarch_get_perf_counter(void) return time; } -#endif -rarch_time_t rarch_get_time_usec(void) +retro_time_t rarch_get_time_usec(void) { #if defined(_WIN32) static LARGE_INTEGER freq; @@ -201,9 +200,9 @@ static void x86_cpuid(int func, int flags[4]) } #endif -void rarch_get_cpu_features(struct rarch_cpu_features *cpu) +void rarch_get_cpu_features(unsigned *cpu) { - memset(cpu, 0, sizeof(*cpu)); + *cpu = 0; #if defined(CPU_X86) int flags[4]; @@ -220,41 +219,41 @@ void rarch_get_cpu_features(struct rarch_cpu_features *cpu) x86_cpuid(1, flags); if (flags[3] & (1 << 25)) - cpu->simd |= RARCH_SIMD_SSE; + *cpu |= RETRO_SIMD_SSE; if (flags[3] & (1 << 26)) - cpu->simd |= RARCH_SIMD_SSE2; + *cpu |= RETRO_SIMD_SSE2; if (flags[2] & (1 << 0)) - cpu->simd |= RARCH_SIMD_SSE3; + *cpu |= RETRO_SIMD_SSE3; if (flags[2] & (1 << 9)) - cpu->simd |= RARCH_SIMD_SSSE3; + *cpu |= RETRO_SIMD_SSSE3; const int avx_flags = (1 << 27) | (1 << 28); if ((flags[2] & avx_flags) == avx_flags) - cpu->simd |= RARCH_SIMD_AVX; + *cpu |= RETRO_SIMD_AVX; - RARCH_LOG("[CPUID]: SSE: %u\n", !!(cpu->simd & RARCH_SIMD_SSE)); - RARCH_LOG("[CPUID]: SSE2: %u\n", !!(cpu->simd & RARCH_SIMD_SSE2)); - RARCH_LOG("[CPUID]: SSE3: %u\n", !!(cpu->simd & RARCH_SIMD_SSE3)); - RARCH_LOG("[CPUID]: SSSE3: %u\n", !!(cpu->simd & RARCH_SIMD_SSSE3)); - RARCH_LOG("[CPUID]: AVX: %u\n", !!(cpu->simd & RARCH_SIMD_AVX)); + RARCH_LOG("[CPUID]: SSE: %u\n", !!(*cpu & RETRO_SIMD_SSE)); + RARCH_LOG("[CPUID]: SSE2: %u\n", !!(*cpu & RETRO_SIMD_SSE2)); + RARCH_LOG("[CPUID]: SSE3: %u\n", !!(*cpu & RETRO_SIMD_SSE3)); + RARCH_LOG("[CPUID]: SSSE3: %u\n", !!(*cpu & RETRO_SIMD_SSSE3)); + RARCH_LOG("[CPUID]: AVX: %u\n", !!(*cpu & RETRO_SIMD_AVX)); #elif defined(ANDROID) && defined(ANDROID_ARM) uint64_t cpu_flags = android_getCpuFeatures(); if (cpu_flags & ANDROID_CPU_ARM_FEATURE_NEON) - cpu->simd |= RARCH_SIMD_NEON; + *cpu |= RETRO_SIMD_NEON; - RARCH_LOG("[CPUID]: NEON: %u\n", !!(cpu->simd & RARCH_SIMD_NEON)); + RARCH_LOG("[CPUID]: NEON: %u\n", !!(*cpu & RETRO_SIMD_NEON)); #elif defined(HAVE_NEON) - cpu->simd |= RARCH_SIMD_NEON; - RARCH_LOG("[CPUID]: NEON: %u\n", !!(cpu->simd & RARCH_SIMD_NEON)); + *cpu |= RETRO_SIMD_NEON; + RARCH_LOG("[CPUID]: NEON: %u\n", !!(*cpu & RETRO_SIMD_NEON)); #elif defined(__CELLOS_LV2__) - cpu->simd |= RARCH_SIMD_VMX; - RARCH_LOG("[CPUID]: VMX: %u\n", !!(cpu->simd & RARCH_SIMD_VMX)); + *cpu |= RETRO_SIMD_VMX; + RARCH_LOG("[CPUID]: VMX: %u\n", !!(*cpu & RETRO_SIMD_VMX)); #elif defined(XBOX360) - cpu->simd |= RARCH_SIMD_VMX128; - RARCH_LOG("[CPUID]: VMX128: %u\n", !!(cpu->simd & RARCH_SIMD_VMX128)); + *cpu |= RETRO_SIMD_VMX128; + RARCH_LOG("[CPUID]: VMX128: %u\n", !!(*cpu & RETRO_SIMD_VMX128)); #endif } diff --git a/performance.h b/performance.h index 3bc5992c20..77121538f8 100644 --- a/performance.h +++ b/performance.h @@ -27,58 +27,15 @@ extern "C" { #include "boolean.h" #include -typedef unsigned long long rarch_perf_tick_t; -typedef int64_t rarch_time_t; -typedef struct rarch_perf_counter -{ - const char *ident; - rarch_perf_tick_t start; - rarch_perf_tick_t total; - rarch_perf_tick_t call_cnt; - - bool registered; -} rarch_perf_counter_t; - -rarch_perf_tick_t rarch_get_perf_counter(void); -rarch_time_t rarch_get_time_usec(void); -void rarch_perf_register(struct rarch_perf_counter *perf); +retro_perf_tick_t rarch_get_perf_counter(void); +retro_time_t rarch_get_time_usec(void); +void rarch_perf_register(struct retro_perf_counter *perf); void rarch_perf_log(void); -struct rarch_cpu_features -{ - unsigned simd; -}; - -// Id values for SIMD CPU features -#define RARCH_SIMD_SSE (1 << 0) -#define RARCH_SIMD_SSE2 (1 << 1) -#define RARCH_SIMD_VMX (1 << 2) -#define RARCH_SIMD_VMX128 (1 << 3) -#define RARCH_SIMD_AVX (1 << 4) -#define RARCH_SIMD_NEON (1 << 5) -#define RARCH_SIMD_SSE3 (1 << 6) -#define RARCH_SIMD_SSSE3 (1 << 7) - -void rarch_get_cpu_features(struct rarch_cpu_features *cpu); - -#ifdef PERF_TEST - -#define RARCH_PERFORMANCE_INIT(X) static rarch_perf_counter_t X = {#X}; \ - do { \ - if (!(X).registered) \ - rarch_perf_register(&(X)); \ - } while(0) - -#define RARCH_PERFORMANCE_START(X) do { \ - (X).call_cnt++; \ - (X).start = rarch_get_perf_counter(); \ -} while(0) - -#define RARCH_PERFORMANCE_STOP(X) do { \ - (X).total += rarch_get_perf_counter() - (X).start; \ -} while(0) +void rarch_get_cpu_features(unsigned *cpu); +#if defined(PERF_TEST) || !defined(RARCH_INTERNAL) #ifdef _WIN32 #define RARCH_PERFORMANCE_LOG(functionname, X) RARCH_LOG("[PERF]: Avg (%s): %I64u ticks, %I64u runs.\n", \ functionname, \ @@ -90,14 +47,8 @@ void rarch_get_cpu_features(struct rarch_cpu_features *cpu); (X).total / (X).call_cnt, \ (X).call_cnt) #endif - #else - -#define RARCH_PERFORMANCE_INIT(X) -#define RARCH_PERFORMANCE_START(X) -#define RARCH_PERFORMANCE_STOP(X) #define RARCH_PERFORMANCE_LOG(functionname, X) - #endif #ifdef __cplusplus diff --git a/retroarch.c b/retroarch.c index 4be598231b..1af1aca6b2 100644 --- a/retroarch.c +++ b/retroarch.c @@ -2868,7 +2868,7 @@ static void init_system_av_info(void) { pretro_get_system_av_info(&g_extern.system.av_info); g_extern.frame_limit.last_frame_time = rarch_get_time_usec(); - g_extern.frame_limit.minimum_frame_time = (rarch_time_t)roundf(1000000.0f / (g_extern.system.av_info.timing.fps * g_settings.fastforward_ratio)); + g_extern.frame_limit.minimum_frame_time = (retro_time_t)roundf(1000000.0f / (g_extern.system.av_info.timing.fps * g_settings.fastforward_ratio)); } static void verify_api_version(void) @@ -2883,7 +2883,7 @@ static void verify_api_version(void) // Ideally, code would get swapped out depending on CPU support, but this will do for now. static void validate_cpu_features(void) { - struct rarch_cpu_features cpu; + unsigned cpu; rarch_get_cpu_features(&cpu); #define FAIL_CPU(simd_type) do { \ @@ -2892,15 +2892,15 @@ static void validate_cpu_features(void) } while(0) #ifdef __SSE__ - if (!(cpu.simd & RARCH_SIMD_SSE)) + if (!(cpu & RETRO_SIMD_SSE)) FAIL_CPU("SSE"); #endif #ifdef __SSE2__ - if (!(cpu.simd & RARCH_SIMD_SSE2)) + if (!(cpu & RETRO_SIMD_SSE2)) FAIL_CPU("SSE2"); #endif #ifdef __AVX__ - if (!(cpu.simd & RARCH_SIMD_AVX)) + if (!(cpu & RETRO_SIMD_AVX)) FAIL_CPU("AVX"); #endif } @@ -3051,8 +3051,8 @@ static inline void update_frame_time(void) if (!g_extern.system.frame_time.callback) return; - rarch_time_t time = rarch_get_time_usec(); - rarch_time_t delta = 0; + retro_time_t time = rarch_get_time_usec(); + retro_time_t delta = 0; bool is_locked_fps = g_extern.is_paused || driver.nonblock_state; #ifdef HAVE_FFMPEG @@ -3076,9 +3076,9 @@ static inline void limit_frame_time(void) if (g_settings.fastforward_ratio < 0.0f) return; - rarch_time_t current = rarch_get_time_usec(); - rarch_time_t target = g_extern.frame_limit.last_frame_time + g_extern.frame_limit.minimum_frame_time; - rarch_time_t to_sleep_ms = (target - current) / 1000; + retro_time_t current = rarch_get_time_usec(); + retro_time_t target = g_extern.frame_limit.last_frame_time + g_extern.frame_limit.minimum_frame_time; + retro_time_t to_sleep_ms = (target - current) / 1000; if (to_sleep_ms > 0) { rarch_sleep((unsigned int)to_sleep_ms); diff --git a/retroarch_logger.h b/retroarch_logger.h index 7de674eb4f..727b7a72fe 100644 --- a/retroarch_logger.h +++ b/retroarch_logger.h @@ -19,8 +19,6 @@ #include -#define RARCH_INTERNAL - #if defined(ANDROID) && defined(HAVE_LOGGER) #include #endif