mirror of
https://github.com/libretro/RetroArch
synced 2025-03-27 23:37:39 +00:00
Merge pull request #2811 from Themaister/master
Various collection of fixes
This commit is contained in:
commit
43c8fc50be
@ -1013,6 +1013,8 @@ bool event_cmd_ctl(enum event_command cmd, void *data)
|
||||
|
||||
libretro_get_system_info(settings->libretro, system,
|
||||
ptr);
|
||||
#else
|
||||
libretro_get_system_info_static(system, ptr);
|
||||
#endif
|
||||
info_find.path = settings->libretro;
|
||||
|
||||
|
2
deps/glslang/glslang
vendored
2
deps/glslang/glslang
vendored
@ -1 +1 @@
|
||||
Subproject commit f2d8a5c53fda69a7e19defbda7964f380da54ad1
|
||||
Subproject commit 5ace09a75be02bd32505f1f94b1b49a6aa3498b8
|
3
deps/glslang/glslang.cpp
vendored
3
deps/glslang/glslang.cpp
vendored
@ -356,7 +356,8 @@ bool glslang::compile_spirv(const string &source, Stage stage, std::vector<uint3
|
||||
shader.setStrings(&src, 1);
|
||||
|
||||
string msg;
|
||||
if (!shader.preprocess(&process.GetResources(), 100, ENoProfile, false, false, EShMsgDefault, &msg, TShader::ForbidInclude()))
|
||||
auto forbid_include = TShader::ForbidInclude();
|
||||
if (!shader.preprocess(&process.GetResources(), 100, ENoProfile, false, false, EShMsgDefault, &msg, forbid_include))
|
||||
{
|
||||
fprintf(stderr, "%s\n", msg.c_str());
|
||||
return {};
|
||||
|
7499
deps/glslang/glslang_tab.cpp
vendored
7499
deps/glslang/glslang_tab.cpp
vendored
File diff suppressed because it is too large
Load Diff
357
deps/glslang/glslang_tab.cpp.h
vendored
357
deps/glslang/glslang_tab.cpp.h
vendored
@ -1,357 +0,0 @@
|
||||
/* A Bison parser, made by GNU Bison 3.0.4. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
under terms of your choice, so long as that work isn't itself a
|
||||
parser generator using the skeleton or a modified version thereof
|
||||
as a parser skeleton. Alternatively, if you modify or redistribute
|
||||
the parser skeleton itself, you may (at your option) remove this
|
||||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
#ifndef YY_YY_GLSLANG_TAB_CPP_H_INCLUDED
|
||||
# define YY_YY_GLSLANG_TAB_CPP_H_INCLUDED
|
||||
/* Debug traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 1
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int yydebug;
|
||||
#endif
|
||||
|
||||
/* Token type. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
enum yytokentype
|
||||
{
|
||||
ATTRIBUTE = 258,
|
||||
VARYING = 259,
|
||||
CONST = 260,
|
||||
BOOL = 261,
|
||||
FLOAT = 262,
|
||||
DOUBLE = 263,
|
||||
INT = 264,
|
||||
UINT = 265,
|
||||
BREAK = 266,
|
||||
CONTINUE = 267,
|
||||
DO = 268,
|
||||
ELSE = 269,
|
||||
FOR = 270,
|
||||
IF = 271,
|
||||
DISCARD = 272,
|
||||
RETURN = 273,
|
||||
SWITCH = 274,
|
||||
CASE = 275,
|
||||
DEFAULT = 276,
|
||||
SUBROUTINE = 277,
|
||||
BVEC2 = 278,
|
||||
BVEC3 = 279,
|
||||
BVEC4 = 280,
|
||||
IVEC2 = 281,
|
||||
IVEC3 = 282,
|
||||
IVEC4 = 283,
|
||||
UVEC2 = 284,
|
||||
UVEC3 = 285,
|
||||
UVEC4 = 286,
|
||||
VEC2 = 287,
|
||||
VEC3 = 288,
|
||||
VEC4 = 289,
|
||||
MAT2 = 290,
|
||||
MAT3 = 291,
|
||||
MAT4 = 292,
|
||||
CENTROID = 293,
|
||||
IN = 294,
|
||||
OUT = 295,
|
||||
INOUT = 296,
|
||||
UNIFORM = 297,
|
||||
PATCH = 298,
|
||||
SAMPLE = 299,
|
||||
BUFFER = 300,
|
||||
SHARED = 301,
|
||||
COHERENT = 302,
|
||||
VOLATILE = 303,
|
||||
RESTRICT = 304,
|
||||
READONLY = 305,
|
||||
WRITEONLY = 306,
|
||||
DVEC2 = 307,
|
||||
DVEC3 = 308,
|
||||
DVEC4 = 309,
|
||||
DMAT2 = 310,
|
||||
DMAT3 = 311,
|
||||
DMAT4 = 312,
|
||||
NOPERSPECTIVE = 313,
|
||||
FLAT = 314,
|
||||
SMOOTH = 315,
|
||||
LAYOUT = 316,
|
||||
MAT2X2 = 317,
|
||||
MAT2X3 = 318,
|
||||
MAT2X4 = 319,
|
||||
MAT3X2 = 320,
|
||||
MAT3X3 = 321,
|
||||
MAT3X4 = 322,
|
||||
MAT4X2 = 323,
|
||||
MAT4X3 = 324,
|
||||
MAT4X4 = 325,
|
||||
DMAT2X2 = 326,
|
||||
DMAT2X3 = 327,
|
||||
DMAT2X4 = 328,
|
||||
DMAT3X2 = 329,
|
||||
DMAT3X3 = 330,
|
||||
DMAT3X4 = 331,
|
||||
DMAT4X2 = 332,
|
||||
DMAT4X3 = 333,
|
||||
DMAT4X4 = 334,
|
||||
ATOMIC_UINT = 335,
|
||||
SAMPLER1D = 336,
|
||||
SAMPLER2D = 337,
|
||||
SAMPLER3D = 338,
|
||||
SAMPLERCUBE = 339,
|
||||
SAMPLER1DSHADOW = 340,
|
||||
SAMPLER2DSHADOW = 341,
|
||||
SAMPLERCUBESHADOW = 342,
|
||||
SAMPLER1DARRAY = 343,
|
||||
SAMPLER2DARRAY = 344,
|
||||
SAMPLER1DARRAYSHADOW = 345,
|
||||
SAMPLER2DARRAYSHADOW = 346,
|
||||
ISAMPLER1D = 347,
|
||||
ISAMPLER2D = 348,
|
||||
ISAMPLER3D = 349,
|
||||
ISAMPLERCUBE = 350,
|
||||
ISAMPLER1DARRAY = 351,
|
||||
ISAMPLER2DARRAY = 352,
|
||||
USAMPLER1D = 353,
|
||||
USAMPLER2D = 354,
|
||||
USAMPLER3D = 355,
|
||||
USAMPLERCUBE = 356,
|
||||
USAMPLER1DARRAY = 357,
|
||||
USAMPLER2DARRAY = 358,
|
||||
SAMPLER2DRECT = 359,
|
||||
SAMPLER2DRECTSHADOW = 360,
|
||||
ISAMPLER2DRECT = 361,
|
||||
USAMPLER2DRECT = 362,
|
||||
SAMPLERBUFFER = 363,
|
||||
ISAMPLERBUFFER = 364,
|
||||
USAMPLERBUFFER = 365,
|
||||
SAMPLERCUBEARRAY = 366,
|
||||
SAMPLERCUBEARRAYSHADOW = 367,
|
||||
ISAMPLERCUBEARRAY = 368,
|
||||
USAMPLERCUBEARRAY = 369,
|
||||
SAMPLER2DMS = 370,
|
||||
ISAMPLER2DMS = 371,
|
||||
USAMPLER2DMS = 372,
|
||||
SAMPLER2DMSARRAY = 373,
|
||||
ISAMPLER2DMSARRAY = 374,
|
||||
USAMPLER2DMSARRAY = 375,
|
||||
SAMPLEREXTERNALOES = 376,
|
||||
SAMPLER = 377,
|
||||
SAMPLERSHADOW = 378,
|
||||
TEXTURE1D = 379,
|
||||
TEXTURE2D = 380,
|
||||
TEXTURE3D = 381,
|
||||
TEXTURECUBE = 382,
|
||||
TEXTURE1DARRAY = 383,
|
||||
TEXTURE2DARRAY = 384,
|
||||
ITEXTURE1D = 385,
|
||||
ITEXTURE2D = 386,
|
||||
ITEXTURE3D = 387,
|
||||
ITEXTURECUBE = 388,
|
||||
ITEXTURE1DARRAY = 389,
|
||||
ITEXTURE2DARRAY = 390,
|
||||
UTEXTURE1D = 391,
|
||||
UTEXTURE2D = 392,
|
||||
UTEXTURE3D = 393,
|
||||
UTEXTURECUBE = 394,
|
||||
UTEXTURE1DARRAY = 395,
|
||||
UTEXTURE2DARRAY = 396,
|
||||
TEXTURE2DRECT = 397,
|
||||
ITEXTURE2DRECT = 398,
|
||||
UTEXTURE2DRECT = 399,
|
||||
TEXTUREBUFFER = 400,
|
||||
ITEXTUREBUFFER = 401,
|
||||
UTEXTUREBUFFER = 402,
|
||||
TEXTURECUBEARRAY = 403,
|
||||
ITEXTURECUBEARRAY = 404,
|
||||
UTEXTURECUBEARRAY = 405,
|
||||
TEXTURE2DMS = 406,
|
||||
ITEXTURE2DMS = 407,
|
||||
UTEXTURE2DMS = 408,
|
||||
TEXTURE2DMSARRAY = 409,
|
||||
ITEXTURE2DMSARRAY = 410,
|
||||
UTEXTURE2DMSARRAY = 411,
|
||||
SUBPASSINPUT = 412,
|
||||
SUBPASSINPUTMS = 413,
|
||||
ISUBPASSINPUT = 414,
|
||||
ISUBPASSINPUTMS = 415,
|
||||
USUBPASSINPUT = 416,
|
||||
USUBPASSINPUTMS = 417,
|
||||
IMAGE1D = 418,
|
||||
IIMAGE1D = 419,
|
||||
UIMAGE1D = 420,
|
||||
IMAGE2D = 421,
|
||||
IIMAGE2D = 422,
|
||||
UIMAGE2D = 423,
|
||||
IMAGE3D = 424,
|
||||
IIMAGE3D = 425,
|
||||
UIMAGE3D = 426,
|
||||
IMAGE2DRECT = 427,
|
||||
IIMAGE2DRECT = 428,
|
||||
UIMAGE2DRECT = 429,
|
||||
IMAGECUBE = 430,
|
||||
IIMAGECUBE = 431,
|
||||
UIMAGECUBE = 432,
|
||||
IMAGEBUFFER = 433,
|
||||
IIMAGEBUFFER = 434,
|
||||
UIMAGEBUFFER = 435,
|
||||
IMAGE1DARRAY = 436,
|
||||
IIMAGE1DARRAY = 437,
|
||||
UIMAGE1DARRAY = 438,
|
||||
IMAGE2DARRAY = 439,
|
||||
IIMAGE2DARRAY = 440,
|
||||
UIMAGE2DARRAY = 441,
|
||||
IMAGECUBEARRAY = 442,
|
||||
IIMAGECUBEARRAY = 443,
|
||||
UIMAGECUBEARRAY = 444,
|
||||
IMAGE2DMS = 445,
|
||||
IIMAGE2DMS = 446,
|
||||
UIMAGE2DMS = 447,
|
||||
IMAGE2DMSARRAY = 448,
|
||||
IIMAGE2DMSARRAY = 449,
|
||||
UIMAGE2DMSARRAY = 450,
|
||||
STRUCT = 451,
|
||||
VOID = 452,
|
||||
WHILE = 453,
|
||||
IDENTIFIER = 454,
|
||||
TYPE_NAME = 455,
|
||||
FLOATCONSTANT = 456,
|
||||
DOUBLECONSTANT = 457,
|
||||
INTCONSTANT = 458,
|
||||
UINTCONSTANT = 459,
|
||||
BOOLCONSTANT = 460,
|
||||
LEFT_OP = 461,
|
||||
RIGHT_OP = 462,
|
||||
INC_OP = 463,
|
||||
DEC_OP = 464,
|
||||
LE_OP = 465,
|
||||
GE_OP = 466,
|
||||
EQ_OP = 467,
|
||||
NE_OP = 468,
|
||||
AND_OP = 469,
|
||||
OR_OP = 470,
|
||||
XOR_OP = 471,
|
||||
MUL_ASSIGN = 472,
|
||||
DIV_ASSIGN = 473,
|
||||
ADD_ASSIGN = 474,
|
||||
MOD_ASSIGN = 475,
|
||||
LEFT_ASSIGN = 476,
|
||||
RIGHT_ASSIGN = 477,
|
||||
AND_ASSIGN = 478,
|
||||
XOR_ASSIGN = 479,
|
||||
OR_ASSIGN = 480,
|
||||
SUB_ASSIGN = 481,
|
||||
LEFT_PAREN = 482,
|
||||
RIGHT_PAREN = 483,
|
||||
LEFT_BRACKET = 484,
|
||||
RIGHT_BRACKET = 485,
|
||||
LEFT_BRACE = 486,
|
||||
RIGHT_BRACE = 487,
|
||||
DOT = 488,
|
||||
COMMA = 489,
|
||||
COLON = 490,
|
||||
EQUAL = 491,
|
||||
SEMICOLON = 492,
|
||||
BANG = 493,
|
||||
DASH = 494,
|
||||
TILDE = 495,
|
||||
PLUS = 496,
|
||||
STAR = 497,
|
||||
SLASH = 498,
|
||||
PERCENT = 499,
|
||||
LEFT_ANGLE = 500,
|
||||
RIGHT_ANGLE = 501,
|
||||
VERTICAL_BAR = 502,
|
||||
CARET = 503,
|
||||
AMPERSAND = 504,
|
||||
QUESTION = 505,
|
||||
INVARIANT = 506,
|
||||
PRECISE = 507,
|
||||
HIGH_PRECISION = 508,
|
||||
MEDIUM_PRECISION = 509,
|
||||
LOW_PRECISION = 510,
|
||||
PRECISION = 511,
|
||||
PACKED = 512,
|
||||
RESOURCE = 513,
|
||||
SUPERP = 514
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Value type. */
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
|
||||
union YYSTYPE
|
||||
{
|
||||
#line 66 "glslang/glslang/MachineIndependent/glslang.y" /* yacc.c:1909 */
|
||||
|
||||
struct {
|
||||
glslang::TSourceLoc loc;
|
||||
union {
|
||||
glslang::TString *string;
|
||||
int i;
|
||||
unsigned int u;
|
||||
bool b;
|
||||
double d;
|
||||
};
|
||||
glslang::TSymbol* symbol;
|
||||
} lex;
|
||||
struct {
|
||||
glslang::TSourceLoc loc;
|
||||
glslang::TOperator op;
|
||||
union {
|
||||
TIntermNode* intermNode;
|
||||
glslang::TIntermNodePair nodePair;
|
||||
glslang::TIntermTyped* intermTypedNode;
|
||||
};
|
||||
union {
|
||||
glslang::TPublicType type;
|
||||
glslang::TFunction* function;
|
||||
glslang::TParameter param;
|
||||
glslang::TTypeLoc typeLine;
|
||||
glslang::TTypeList* typeList;
|
||||
glslang::TArraySizes* arraySizes;
|
||||
glslang::TIdentifierList* identifierList;
|
||||
};
|
||||
} interm;
|
||||
|
||||
#line 346 "glslang_tab.cpp.h" /* yacc.c:1909 */
|
||||
};
|
||||
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
int yyparse (glslang::TParseContext* pParseContext);
|
||||
|
||||
#endif /* !YY_YY_GLSLANG_TAB_CPP_H_INCLUDED */
|
2
deps/glslang/update_yacc.sh
vendored
2
deps/glslang/update_yacc.sh
vendored
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
bison --defines=glslang_tab.cpp.h -o glslang_tab.cpp -t glslang/glslang/MachineIndependent/glslang.y
|
4
driver.c
4
driver.c
@ -288,10 +288,6 @@ static void menu_update_libretro_info(void)
|
||||
if (!info)
|
||||
return;
|
||||
|
||||
#ifndef HAVE_DYNAMIC
|
||||
retro_get_system_info(info);
|
||||
#endif
|
||||
|
||||
event_cmd_ctl(EVENT_CMD_CORE_INFO_INIT, NULL);
|
||||
event_cmd_ctl(EVENT_CMD_LOAD_CORE_PERSIST, NULL);
|
||||
}
|
||||
|
70
dynamic.c
70
dynamic.c
@ -113,7 +113,23 @@ libretro_find_controller_description(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
/**
|
||||
* libretro_free_system_info:
|
||||
* @info : Pointer to system info information.
|
||||
*
|
||||
* Frees system information.
|
||||
**/
|
||||
void libretro_free_system_info(struct retro_system_info *info)
|
||||
{
|
||||
if (!info)
|
||||
return;
|
||||
|
||||
free((void*)info->library_name);
|
||||
free((void*)info->library_version);
|
||||
free((void*)info->valid_extensions);
|
||||
memset(info, 0, sizeof(*info));
|
||||
}
|
||||
|
||||
static bool *load_no_content_hook;
|
||||
|
||||
static bool environ_cb_get_system_info(unsigned cmd, void *data)
|
||||
@ -131,6 +147,42 @@ static bool environ_cb_get_system_info(unsigned cmd, void *data)
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifndef HAVE_DYNAMIC
|
||||
bool libretro_get_system_info_static(struct retro_system_info *info,
|
||||
bool *load_no_content)
|
||||
{
|
||||
struct retro_system_info dummy_info = {0};
|
||||
|
||||
if (load_no_content)
|
||||
{
|
||||
load_no_content_hook = load_no_content;
|
||||
|
||||
/* load_no_content gets set in this callback. */
|
||||
retro_set_environment(environ_cb_get_system_info);
|
||||
|
||||
/* It's possible that we just set get_system_info callback
|
||||
* to the currently running core.
|
||||
*
|
||||
* Make sure we reset it to the actual environment callback.
|
||||
* Ignore any environment callbacks here in case we're running
|
||||
* on the non-current core. */
|
||||
ignore_environment_cb = true;
|
||||
retro_set_environment(rarch_environment_cb);
|
||||
ignore_environment_cb = false;
|
||||
}
|
||||
|
||||
retro_get_system_info(&dummy_info);
|
||||
memcpy(info, &dummy_info, sizeof(*info));
|
||||
|
||||
info->library_name = strdup(dummy_info.library_name);
|
||||
info->library_version = strdup(dummy_info.library_version);
|
||||
if (dummy_info.valid_extensions)
|
||||
info->valid_extensions = strdup(dummy_info.valid_extensions);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
/**
|
||||
* libretro_get_environment_info:
|
||||
* @func : Function pointer for get_environment_info.
|
||||
@ -238,22 +290,6 @@ bool libretro_get_system_info(const char *path,
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* libretro_free_system_info:
|
||||
* @info : Pointer to system info information.
|
||||
*
|
||||
* Frees system information.
|
||||
**/
|
||||
void libretro_free_system_info(struct retro_system_info *info)
|
||||
{
|
||||
if (!info)
|
||||
return;
|
||||
|
||||
free((void*)info->library_name);
|
||||
free((void*)info->library_version);
|
||||
free((void*)info->valid_extensions);
|
||||
memset(info, 0, sizeof(*info));
|
||||
}
|
||||
static void load_dynamic_core(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
16
dynamic.h
16
dynamic.h
@ -72,6 +72,21 @@ void libretro_get_environment_info(void (*)(retro_environment_t),
|
||||
**/
|
||||
bool libretro_get_system_info(const char *path,
|
||||
struct retro_system_info *info, bool *load_no_content);
|
||||
#else
|
||||
/**
|
||||
* libretro_get_system_info_static:
|
||||
* @info : System info information.
|
||||
* @load_no_content : If true, core should be able to auto-start
|
||||
* without any content loaded.
|
||||
*
|
||||
* Gets system info from the current statically linked libretro library.
|
||||
* The struct returned must be freed as strings are allocated dynamically.
|
||||
*
|
||||
* Returns: true (1) if successful, otherwise false (0).
|
||||
**/
|
||||
bool libretro_get_system_info_static(struct retro_system_info *info,
|
||||
bool *load_no_content);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* libretro_free_system_info:
|
||||
@ -80,7 +95,6 @@ bool libretro_get_system_info(const char *path,
|
||||
* Frees system information.
|
||||
**/
|
||||
void libretro_free_system_info(struct retro_system_info *info);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* libretro_get_current_core_pathname:
|
||||
|
@ -140,6 +140,8 @@ VIDEO DRIVER
|
||||
#ifdef HAVE_VULKAN
|
||||
#include "../gfx/drivers_shader/shader_vulkan.cpp"
|
||||
#include "../gfx/drivers_shader/glslang_util.cpp"
|
||||
#include "../gfx/drivers_shader/slang_reflection.cpp"
|
||||
#include "../deps/spir2cross/spir2cross.cpp"
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
|
@ -423,10 +423,8 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
}
|
||||
break;
|
||||
case RARCH_MENU_CTL_SYSTEM_INFO_DEINIT:
|
||||
#ifdef HAVE_DYNAMIC
|
||||
libretro_free_system_info(&menu_driver_system);
|
||||
memset(&menu_driver_system, 0, sizeof(struct retro_system_info));
|
||||
#endif
|
||||
break;
|
||||
case RARCH_MENU_CTL_RENDER_MESSAGEBOX:
|
||||
if (menu_driver_ctx->render_messagebox)
|
||||
|
@ -1,5 +1,4 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
RARCH_DIR := ../../../..
|
||||
|
||||
@ -10,77 +9,37 @@ HAVE_VULKAN := 1
|
||||
INCFLAGS :=
|
||||
DEFINES :=
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
ifeq ($(TARGET_ARCH),arm)
|
||||
DEFINES += -DANDROID_ARM -marm
|
||||
LOCAL_ARM_MODE := arm
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_ARCH),x86)
|
||||
DEFINES += -DANDROID_X86 -DHAVE_SSSE3
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||
|
||||
ifeq ($(HAVE_NEON),1)
|
||||
DEFINES += -D__ARM_NEON__
|
||||
LOCAL_SRC_FILES += $(RARCH_DIR)/audio/audio_utils_neon.S.neon
|
||||
LOCAL_SRC_FILES += $(RARCH_DIR)/audio/drivers_resampler/sinc_resampler_neon.S.neon
|
||||
LOCAL_SRC_FILES += $(RARCH_DIR)/audio/drivers_resampler/cc_resampler_neon.S.neon
|
||||
endif
|
||||
DEFINES += -DSINC_LOWER_QUALITY
|
||||
DEFINES += -DANDROID_ARM_V7
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_ARCH),mips)
|
||||
DEFINES += -DANDROID_MIPS -D__mips__ -D__MIPSEL__
|
||||
endif
|
||||
|
||||
LOCAL_MODULE := retroarch-activity
|
||||
|
||||
LOCAL_SRC_FILES += $(RARCH_DIR)/griffin/griffin.c $(RARCH_DIR)/griffin/griffin_cpp.cpp
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
DEFINES += -DHAVE_LOGGER
|
||||
endif
|
||||
LOGGER_LDLIBS := -llog
|
||||
|
||||
ifeq ($(GLES),3)
|
||||
GLES_LIB := -lGLESv3
|
||||
DEFINES += -DHAVE_OPENGLES3
|
||||
else
|
||||
GLES_LIB := -lGLESv2
|
||||
endif
|
||||
|
||||
DEFINES += -DRARCH_MOBILE -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_DYLIB -DHAVE_EGL -DHAVE_GLSL -DHAVE_MENU -DHAVE_RGUI -DHAVE_ZLIB -DHAVE_RPNG -DINLINE=inline -DHAVE_THREADS -D__LIBRETRO__ -DHAVE_RSOUND -DHAVE_NETPLAY -DHAVE_NETWORKING -DRARCH_INTERNAL -DHAVE_FILTERS_BUILTIN -DHAVE_MATERIALUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_STB_FONT
|
||||
DEFINES += -DRARCH_MOBILE -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC \
|
||||
-DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES \
|
||||
-DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_DYLIB \
|
||||
-DHAVE_EGL -DHAVE_GLSL -DHAVE_MENU -DHAVE_RGUI \
|
||||
-DHAVE_ZLIB -DHAVE_RPNG -DINLINE=inline -DHAVE_THREADS \
|
||||
-D__LIBRETRO__ -DHAVE_RSOUND -DHAVE_NETPLAY \
|
||||
-DHAVE_NETWORKING -DRARCH_INTERNAL -DHAVE_FILTERS_BUILTIN \
|
||||
-DHAVE_MATERIALUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_STB_FONT
|
||||
DEFINES += -DWANT_IFADDRS
|
||||
|
||||
ifeq ($(HAVE_VULKAN),1)
|
||||
DEFINES += -DHAVE_VULKAN
|
||||
DEFINES += -DHAVE_VULKAN
|
||||
endif
|
||||
DEFINES += -DHAVE_7ZIP
|
||||
DEFINES += -DHAVE_CHEEVOS
|
||||
DEFINES += -DHAVE_SL
|
||||
|
||||
LOCAL_CFLAGS += -Wall -std=gnu99 -pthread -Wno-unused-function -fno-stack-protector -funroll-loops $(DEFINES)
|
||||
LOCAL_CPPFLAGS := -fno-exceptions -std=gnu++11 -fno-rtti -Wno-reorder $(DEFINES)
|
||||
# glslang
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := glslang
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
# Let ndk-build set the optimization flags but remove -O3 like in cf3c3
|
||||
LOCAL_CFLAGS := $(subst -O3,-O2,$(LOCAL_CFLAGS))
|
||||
|
||||
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -landroid -lEGL $(GLES_LIB) $(LOGGER_LDLIBS) -ldl
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(RARCH_DIR)/libretro-common/include/
|
||||
|
||||
ifeq ($(HAVE_VULKAN),1)
|
||||
INCFLAGS += $(LOCAL_PATH)/$(RARCH_DIR)/gfx/include
|
||||
|
||||
LOCAL_C_INCLUDES += $(INCFLAGS)
|
||||
LOCAL_CPPFLAGS += -I$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang \
|
||||
-I$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang/glslang/glslang/Public \
|
||||
-I$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent \
|
||||
-I$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang/glslang/SPIRV
|
||||
LOCAL_SRC_FILES += $(RARCH_DIR)/deps/glslang/glslang.cpp \
|
||||
$(RARCH_DIR)/deps/glslang/glslang_tab.cpp \
|
||||
LOCAL_SRC_FILES := $(RARCH_DIR)/deps/glslang/glslang.cpp \
|
||||
$(RARCH_DIR)/deps/glslang/glslang/SPIRV/SpvBuilder.cpp \
|
||||
$(RARCH_DIR)/deps/glslang/glslang/SPIRV/SPVRemapper.cpp \
|
||||
$(RARCH_DIR)/deps/glslang/glslang/SPIRV/InReadableOrder.cpp \
|
||||
@ -91,6 +50,7 @@ LOCAL_SRC_FILES += $(RARCH_DIR)/deps/glslang/glslang.cpp \
|
||||
$(RARCH_DIR)/deps/glslang/glslang/glslang/GenericCodeGen/Link.cpp \
|
||||
$(RARCH_DIR)/deps/glslang/glslang/glslang/GenericCodeGen/CodeGen.cpp \
|
||||
$(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/Intermediate.cpp \
|
||||
$(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/glslang_tab.cpp \
|
||||
$(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/Versions.cpp \
|
||||
$(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/RemoveTree.cpp \
|
||||
$(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/limits.cpp \
|
||||
@ -115,6 +75,95 @@ LOCAL_SRC_FILES += $(RARCH_DIR)/deps/glslang/glslang.cpp \
|
||||
$(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpSymbols.cpp \
|
||||
$(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp \
|
||||
$(RARCH_DIR)/deps/glslang/glslang/glslang/OSDependent/Unix/ossource.cpp
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang \
|
||||
$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang/glslang/glslang/Public \
|
||||
$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent \
|
||||
$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang/glslang/SPIRV \
|
||||
$(LOCAL_PATH)/$(RARCH_DIR)/libretro-common/include
|
||||
|
||||
# Permissive works around weird header issues in LLVM on x86.
|
||||
LOCAL_CPPFLAGS := -std=gnu++11 -pthread -Wno-reorder -Wno-sign-compare -fpermissive $(DEFINES)
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
#####
|
||||
|
||||
# retroarch-activity (C++ side)
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := retroarch-activity-cpp
|
||||
LOCAL_SRC_FILES += $(RARCH_DIR)/griffin/griffin_cpp.cpp
|
||||
LOCAL_ARM_MODE := arm
|
||||
LOCAL_CPPFLAGS := -std=gnu++11 -pthread $(DEFINES)
|
||||
LOCAL_CPP_FEATURES += exceptions
|
||||
|
||||
ifeq ($(HAVE_VULKAN), 1)
|
||||
LOCAL_STATIC_LIBRARIES := glslang
|
||||
endif
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(RARCH_DIR)/libretro-common/include
|
||||
|
||||
ifeq ($(HAVE_VULKAN),1)
|
||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(RARCH_DIR)/gfx/include \
|
||||
$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang \
|
||||
$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang/glslang/glslang/Public \
|
||||
$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent \
|
||||
$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang/glslang/SPIRV \
|
||||
$(LOCAL_PATH)/$(RARCH_DIR)/deps/spir2cross
|
||||
endif
|
||||
|
||||
ifneq ($(SANITIZER),)
|
||||
LOCAL_CFLAGS += -g -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
|
||||
LOCAL_CPPFLAGS += -g -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
|
||||
LOCAL_LDFLAGS += -fsanitize=$(SANITIZER)
|
||||
endif
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
#######
|
||||
|
||||
# retroarch-activity
|
||||
include $(CLEAR_VARS)
|
||||
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||
ifeq ($(HAVE_NEON),1)
|
||||
DEFINES += -D__ARM_NEON__
|
||||
LOCAL_SRC_FILES += $(RARCH_DIR)/audio/audio_utils_neon.S.neon
|
||||
LOCAL_SRC_FILES += $(RARCH_DIR)/audio/drivers_resampler/sinc_resampler_neon.S.neon
|
||||
LOCAL_SRC_FILES += $(RARCH_DIR)/audio/drivers_resampler/cc_resampler_neon.S.neon
|
||||
endif
|
||||
DEFINES += -DSINC_LOWER_QUALITY
|
||||
DEFINES += -DANDROID_ARM_V7
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_ARCH),mips)
|
||||
DEFINES += -DANDROID_MIPS -D__mips__ -D__MIPSEL__
|
||||
endif
|
||||
|
||||
LOCAL_MODULE := retroarch-activity
|
||||
LOCAL_STATIC_LIBRARIES := retroarch-activity-cpp
|
||||
LOCAL_ARM_MODE := arm
|
||||
|
||||
LOCAL_SRC_FILES += $(RARCH_DIR)/griffin/griffin.c
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
DEFINES += -DHAVE_LOGGER
|
||||
endif
|
||||
LOGGER_LDLIBS := -llog
|
||||
|
||||
ifeq ($(GLES),3)
|
||||
GLES_LIB := -lGLESv3
|
||||
DEFINES += -DHAVE_OPENGLES3
|
||||
else
|
||||
GLES_LIB := -lGLESv2
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wall -std=gnu99 -pthread -Wno-unused-function -fno-stack-protector -funroll-loops $(DEFINES)
|
||||
|
||||
# Let ndk-build set the optimization flags but remove -O3 like in cf3c3
|
||||
LOCAL_CFLAGS := $(subst -O3,-O2,$(LOCAL_CFLAGS))
|
||||
|
||||
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -landroid -lEGL $(GLES_LIB) $(LOGGER_LDLIBS) -ldl
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(RARCH_DIR)/libretro-common/include
|
||||
|
||||
ifeq ($(HAVE_VULKAN),1)
|
||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(RARCH_DIR)/gfx/include
|
||||
endif
|
||||
|
||||
LOCAL_LDLIBS += -lOpenSLES -lz
|
||||
|
@ -39,4 +39,4 @@ ifeq ($(USE_CLANG),1)
|
||||
APP_CPPFLAGS := -Wno-invalid-source-encoding
|
||||
endif
|
||||
|
||||
APP_STL := gnustl_static
|
||||
APP_STL := c++_static
|
||||
|
Loading…
x
Reference in New Issue
Block a user