Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Support / RetroArch #25

Closed
jet082 opened this issue Sep 6, 2019 · 2 comments
Closed

iOS Support / RetroArch #25

jet082 opened this issue Sep 6, 2019 · 2 comments

Comments

@jet082
Copy link

jet082 commented Sep 6, 2019

XProger#15

This seems to suggest that the only things left for iOS support are keyboard/mouse support. However, trying to build the libretro core shows that openlara relies upon EGL

Error here:

./../../gapi_gl.h:26:14: fatal error: 'EGL/egl.h' file not found

I attempted to include https://github.com/alco/EGL_mac_ios but that did not seem to be sufficient.

@jet082
Copy link
Author

jet082 commented Oct 9, 2019

You can fix this by doing the following:

  1. In src/platform/libretro/Makefile
CFLAGS += -DHAVE_OPENGLES -DHAVE_OPENGLES2 $(DEFINES)

to

EXTRA_GL_LIBS := -framework OpenGLES
CFLAGS += -DHAVE_OPENGLES -DHAVE_OPENGLES2 -Wno-error=implicit-function-declaration $(DEFINES)

----

CC = cc -arch armv7 -isysroot $(IOSSDK)

to

CC = cc -arch arm64 -isysroot $(IOSSDK)

----

CXX = c++ -arch armv7 -isysroot $(IOSSDK)

to

CXX = c++ -arch arm64 -isysroot $(IOSSDK)

----

ifeq ($(platform),ios9)

to

ifeq ($(platform),ios-arm64)

----

Remove these lines beneath ifeq ($(GLES), 1):

LIBS += -lGLESv2 # Still link against GLESv2 when using GLES3 API, at least on desktop Linux.
LIBS += -lEGL
  1. In src/gapi_gl.h
#elif __LIBRETRO_GLES__

to

#elif __LIBRETRO_GLES__ && false

----

#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
#include <OpenGLES/ES3/glext.h>

to

#include <OpenGLES/ES3/gl.h>

----

Remove the line:

#undef  GL_RG

@jet082
Copy link
Author

jet082 commented Oct 9, 2019

This compiled version does not currently work. The debug log is below.

2019-10-10 05:50:26.916373+0900 RetroArch[1720:309116] Metal GPU Frame Capture Enabled
2019-10-10 05:50:26.916572+0900 RetroArch[1720:309116] Metal API Validation Enabled
[openlara]: Saves should be in: /private/var/mobile/Containers/Data/Application/FD78187B-CFEA-4670-8C93-21CCB15493DA/Documents/RetroArch/saves/openlara/
[openlara]: Got size: 320 x 240.
[openlara]: contentDir: /private/var/mobile/Containers/Data/Application/FD78187B-CFEA-4670-8C93-21CCB15493DA/Documents/ROMs/
Loaded game!
Context reset!
OpenLara (Oct  9 2019)
Vendor   : Apple Inc.
Renderer : Apple A12X GPU
Version  : OpenGL ES 2.0 Metal - 66.6
cache    : /private/var/mobile/Containers/Data/Application/FD78187B-CFEA-4670-8C93-21CCB15493DA/Documents/RetroArch/system/openlara/cache/
supports :
  variyngs count : 8
  binary shaders : false
  vertex arrays  : true
  depth texture  : true
  shadow sampler : true
  discard frame  : true
  NPOT textures  : false
  3D   textures  : false
  RG   textures  : true
  border color   : false
  clip distance  : false
  anisotropic    : 16
  float textures : float = nearest, half = full

shader: cache warm-up...
! program: WARNING: Output of vertex shader 'vLight' not read by fragment shader
WARNING: Output of vertex shader 'vCoord' not read by fragment shader

! program: WARNING: Output of vertex shader 'vViewVec' not read by fragment shader

! program: WARNING: Output of vertex shader 'vViewVec' not read by fragment shader

! program: WARNING: Output of vertex shader 'vViewVec' not read by fragment shader

! program: WARNING: Output of vertex shader 'vViewVec' not read by fragment shader

! program: WARNING: Output of vertex shader 'vLightMap' not read by fragment shader

! program: WARNING: Output of vertex shader 'vLightMap' not read by fragment shader

! program: WARNING: Output of vertex shader 'vLightMap' not read by fragment shader

! program: WARNING: Output of vertex shader 'vLightMap' not read by fragment shader

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Output of vertex shader 'vViewVec' not read by fragment shader

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Output of vertex shader 'vViewVec' not read by fragment shader

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aLight' to match BindAttributeLocation request.
WARNING: Output of vertex shader 'vViewVec' not read by fragment shader

! program: WARNING: Output of vertex shader 'vLight' not read by fragment shader
WARNING: Output of vertex shader 'vCoord' not read by fragment shader

! program: WARNING: Output of vertex shader 'vLightMap' not read by fragment shader

! program: WARNING: Output of vertex shader 'vLightMap' not read by fragment shader

! program: WARNING: Output of vertex shader 'vLightMap' not read by fragment shader

! program: WARNING: Output of vertex shader 'vLightMap' not read by fragment shader

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aLight' to match BindAttributeLocation request.

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aLight' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aTexCoord' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aColor' to match BindAttributeLocation request.

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aLight' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aTexCoord' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aColor' to match BindAttributeLocation request.

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aLight' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aColor' to match BindAttributeLocation request.

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aLight' to match BindAttributeLocation request.

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aLight' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aTexCoord' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aColor' to match BindAttributeLocation request.
WARNING: Output of vertex shader 'vViewVec' not read by fragment shader
WARNING: Output of vertex shader 'vTexCoord' not read by fragment shader
WARNING: Output of vertex shader 'vLightVec' not read by fragment shader
WARNING: Output of vertex shader 'vCoord' not read by fragment shader
WARNING: Output of vertex shader 'vProjCoord' not read by fragment shader

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aLight' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aTexCoord' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aColor' to match BindAttributeLocation request.
WARNING: Output of vertex shader 'vViewVec' not read by fragment shader
WARNING: Output of vertex shader 'vLightVec' not read by fragment shader
WARNING: Output of vertex shader 'vCoord' not read by fragment shader
WARNING: Output of vertex shader 'vProjCoord' not read by fragment shader

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aLight' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aTexCoord' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aColor' to match BindAttributeLocation request.
WARNING: Output of vertex shader 'vViewVec' not read by fragment shader
WARNING: Output of vertex shader 'vLightVec' not read by fragment shader
WARNING: Output of vertex shader 'vCoord' not read by fragment shader
WARNING: Output of vertex shader 'vProjCoord' not read by fragment shader

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aLight' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aTexCoord' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aColor' to match BindAttributeLocation request.
WARNING: Output of vertex shader 'vTexCoord' not read by fragment shader
WARNING: Output of vertex shader 'vLightVec' not read by fragment shader
WARNING: Output of vertex shader 'vProjCoord' not read by fragment shader

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aLight' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aTexCoord' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aColor' to match BindAttributeLocation request.
WARNING: Output of vertex shader 'vViewVec' not read by fragment shader
WARNING: Output of vertex shader 'vTexCoord' not read by fragment shader
WARNING: Output of vertex shader 'vLightVec' not read by fragment shader
WARNING: Output of vertex shader 'vCoord' not read by fragment shader
WARNING: Output of vertex shader 'vProjCoord' not read by fragment shader

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aLight' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aTexCoord' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aColor' to match BindAttributeLocation request.

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aColor' to match BindAttributeLocation request.

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aColor' to match BindAttributeLocation request.

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aColor' to match BindAttributeLocation request.

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aColor' to match BindAttributeLocation request.

! program: WARNING: Could not find vertex shader attribute 'aNormal' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aColor' to match BindAttributeLocation request.

shader: cache is ready
meshes: 171
atlas: 2048 x 1024
MegaMesh (i:114666 v:50379 a:3, size:1841460)
error loading file "level/1/AZTECLOA.PNG"
error loading file "audio/1/003.ogg"
Read Slots...
notify_list_pushed: old size should not be larger
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIViewController setTitle:]
PID: 1720, TID: 309474, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   RetroArch                           0x00000001027b1a14 -[RAMainMenu willReloadData] + 412
5   RetroArch                           0x00000001027b0fec -[RAMenuBase reloadData] + 40
6   RetroArch                           0x00000001027b4660 -[RetroArch_iOS mainMenuRefresh] + 76
7   RetroArch                           0x00000001027b4fc0 ui_companion_cocoatouch_notify_refresh + 72
8   RetroArch                           0x0000000102841320 ui_companion_driver_notify_refresh + 76
9   RetroArch                           0x00000001029d4b74 task_database_handler + 1088
10  RetroArch                           0x0000000102ad89c8 threaded_worker + 168
11  RetroArch                           0x00000001029b6d1c thread_wrap + 64
12  libsystem_pthread.dylib             0x00000001c1c2fd5c _pthread_start + 128
13  libsystem_pthread.dylib             0x00000001c1c37c84 thread_start + 8
2019-10-10 05:50:37.675952+0900 RetroArch[1720:309474] [reports] Main Thread Checker: UI API called on a background thread: -[UIViewController setTitle:]
PID: 1720, TID: 309474, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   RetroArch                           0x00000001027b1a14 -[RAMainMenu willReloadData] + 412
5   RetroArch                           0x00000001027b0fec -[RAMenuBase reloadData] + 40
6   RetroArch                           0x00000001027b4660 -[RetroArch_iOS mainMenuRefresh] + 76
7   RetroArch                           0x00000001027b4fc0 ui_companion_cocoatouch_notify_refresh + 72
8   RetroArch                           0x0000000102841320 ui_companion_driver_notify_refresh + 76
9   RetroArch                           0x00000001029d4b74 task_database_handler + 1088
10  RetroArch                           0x0000000102ad89c8 threaded_worker + 168
11  RetroArch                           0x00000001029b6d1c thread_wrap + 64
12  libsystem_pthread.dylib             0x00000001c1c2fd5c _pthread_start + 128
13  libsystem_pthread.dylib             0x00000001c1c37c84 thread_start + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UITableViewController tableView]
PID: 1720, TID: 309474, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   RetroArch                           0x00000001027b1000 -[RAMenuBase reloadData] + 60
5   RetroArch                           0x00000001027b4660 -[RetroArch_iOS mainMenuRefresh] + 76
6   RetroArch                           0x00000001027b4fc0 ui_companion_cocoatouch_notify_refresh + 72
7   RetroArch                           0x0000000102841320 ui_companion_driver_notify_refresh + 76
8   RetroArch                           0x00000001029d4b74 task_database_handler + 1088
9   RetroArch                           0x0000000102ad89c8 threaded_worker + 168
10  RetroArch                           0x00000001029b6d1c thread_wrap + 64
11  libsystem_pthread.dylib             0x00000001c1c2fd5c _pthread_start + 128
12  libsystem_pthread.dylib             0x00000001c1c37c84 thread_start + 8
2019-10-10 05:50:47.836496+0900 RetroArch[1720:309474] [reports] Main Thread Checker: UI API called on a background thread: -[UITableViewController tableView]
PID: 1720, TID: 309474, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   RetroArch                           0x00000001027b1000 -[RAMenuBase reloadData] + 60
5   RetroArch                           0x00000001027b4660 -[RetroArch_iOS mainMenuRefresh] + 76
6   RetroArch                           0x00000001027b4fc0 ui_companion_cocoatouch_notify_refresh + 72
7   RetroArch                           0x0000000102841320 ui_companion_driver_notify_refresh + 76
8   RetroArch                           0x00000001029d4b74 task_database_handler + 1088
9   RetroArch                           0x0000000102ad89c8 threaded_worker + 168
10  RetroArch                           0x00000001029b6d1c thread_wrap + 64
11  libsystem_pthread.dylib             0x00000001c1c2fd5c _pthread_start + 128
12  libsystem_pthread.dylib             0x00000001c1c37c84 thread_start + 8
2019-10-10 05:50:47.929200+0900 RetroArch[1720:309474] [Assert] Unsupported use of UIKit view-customization API off the main thread. -setBackgroundColor: sent to <UITableView: 0x10800fa00; frame = (0 0; 1366 1024); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x2813a8270>; layer = <CALayer: 0x281dfc1a0>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}; dataSource: (null)>
2019-10-10 05:50:47.931302+0900 RetroArch[1720:309474] [Assert] Unsupported use of UIKit view-customization API off the main thread. -_setBackgroundEffects: sent to <UITableView: 0x10800fa00; frame = (0 0; 1366 1024); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x2813a8270>; layer = <CALayer: 0x281dfc1a0>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}; dataSource: (null)>
2019-10-10 05:50:47.931610+0900 RetroArch[1720:309474] [Assert] Unsupported use of UIKit view-customization API off the main thread. -setSeparatorColor: sent to <UITableView: 0x10800fa00; frame = (0 0; 1366 1024); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x2813a8270>; layer = <CALayer: 0x281dfc1a0>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}; dataSource: (null)>
2019-10-10 05:50:47.931918+0900 RetroArch[1720:309474] [Assert] Unsupported use of UIKit view-customization API off the main thread. -_setSeparatorsDrawInVibrantLightModeUIAppearance: sent to <UITableView: 0x10800fa00; frame = (0 0; 1366 1024); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x2813a8270>; layer = <CALayer: 0x281dfc1a0>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}; dataSource: (null)>
2019-10-10 05:50:47.932277+0900 RetroArch[1720:309474] [Assert] Unsupported use of UIKit view-customization API off the main thread. -setSeparatorStyle: sent to <UITableView: 0x10800fa00; frame = (0 0; 1366 1024); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x2813a8270>; layer = <CALayer: 0x281dfc1a0>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}; dataSource: (null)>
2019-10-10 05:50:47.933520+0900 RetroArch[1720:309474] [Assert] Cannot be called with asCopy = NO on non-main thread.

I believe this relates to XProger#171

@jet082 jet082 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant