Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
Android Build for MAME - Enabling bgfx Shaders #116829 02/06/20 08:33 PM
Joined: Jan 2020
Posts: 8
Y
Yash Anand Offline OP
Member
OP Offline
Member
Y
Joined: Jan 2020
Posts: 8
Hello All,

I am trying to enable video bgfx for my Android buil of MAME on Ubuntu 18.04 but unfortunately there is a crash (shown below).
I have a reference board with HDMI out and am setting the mame.ini file with the settings from here and MAME documentation -
https://forums.launchbox-app.com/topic/33564-mame-bgfx-shaders-tutorial/
Using clang and have set the NDK/SDK paths.

video auto (software) is working fine. I would like to introduce some shaders and make the output look better.

So I have some doubts -
*************************** (multiplcation effect)
1. Can bgfx get enabled for Android?

2. It needs a backend to execute the same? I guess it is OpenGL? If yes then when I am trying to enable OpenGL with NO_OPENGL=0 MAME is not getting built (I hack the Makefile for this as the default for android-arm64 has NO_OPENGL=1)
/home/yash/Android/Sdk/ndk/21.0.6113669/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: cannot find -lGL
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

ON ANOTHER PLANE
+++++++++++++++++
3. I tried to use video OpenGL but because USE_OPENGL is not defined due to NO_OPENGL (different build) the system falls back to software mode (Video.cpp:242)
Invalid video value opengl; reverting to software
I know the documentation does not say so but the code speaks a different story...

#if (USE_OPENGL)
else if (strcmp(stemp, SDLOPTVAL_OPENGL) == 0)
video_config.mode = VIDEO_MODE_OPENGL;
#endif

4. The system folder in the device also does not have a LibGL.so and neither does the NDK (obviously that's the post). The stupid thought of downloading a bionic libGL.so came to my mind and trying to force link it but thought to ask for the right advice before I advent on the journey of insanity.

5. For bgfx enabling I have for testing manually copied the bgfx folder into a place in the device and then give that path in bgfx_path.


Any pointers wud be great help....

Pros - Highly Motivated for resolving this smile
Cons - New to Open Source, First ever Build in Open Source frown


CRASH REPORT for when video bgfx

2019-07-16 13:13:36.965 14064-14159/? V/SDL/APP: Available videodrivers:
2019-07-16 13:13:36.965 14064-14159/? V/SDL/APP: Android
2019-07-16 13:13:36.965 14064-14159/? V/SDL/APP: Current Videodriver: Android
2019-07-16 13:13:36.965 14064-14159/? V/SDL/APP: Display #0
2019-07-16 13:13:36.965 14064-14159/? V/SDL/APP: Renderdrivers:
2019-07-16 13:13:36.965 14064-14159/? V/SDL/APP: opengles2 (0x0)
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: opengles (0x0)
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: software (0x0)
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: Available audio drivers:
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: dummy
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: android
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: Build version: 0.216 (mame0216-dirty)
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: Build architecure:
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: Build defines 1:
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: SDLMAME_UNIX=1
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: SDLMAME_LINUX=1
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: Build defines 1:
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: LSB_FIRST=1
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: PTR64=1
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: MAME_NOASM=1
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: SDL/OpenGL defines:
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: SDL_COMPILEDVERSION=2005
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: USE_OPENGL=0
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: Compiler defines A:
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: __GNUC__=4
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: __GNUC_MINOR__=2
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: __GNUC_PATCHLEVEL__=1
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: __VERSION__="4.2.1 Compatible Android (5900059 based on r365631c) Clang 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 207d7abc1a2abf3ef8d4301736d6a7ebc224a290)"
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: Compiler defines B:
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: __unix__=1
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: Compiler defines C:
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: Enter init_monitors
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: Adding monitor screen0 (1920 x 1080)
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: Leave init_monitors
2019-07-16 13:13:36.966 14064-14159/? V/SDL/APP: Enter sdlwindow_init
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: Hints:
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_FRAMEBUFFER_ACCELERATION (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_RENDER_DRIVER (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_RENDER_OPENGL_SHADERS (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_RENDER_SCALE_QUALITY (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_RENDER_VSYNC (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_VIDEO_X11_XVIDMODE (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_VIDEO_X11_XINERAMA (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_VIDEO_X11_XRANDR (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_GRAB_KEYBOARD (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_IOS_IDLE_TIMER_DISABLED (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_IOS_ORIENTATIONS (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_XINPUT_ENABLED (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_GAMECONTROLLERCONFIG (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_ALLOW_TOPMOST (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_TIMER_RESOLUTION (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_RENDER_DIRECT3D_THREADSAFE (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_VIDEO_ALLOW_SCREENSAVER (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_ACCELEROMETER_AS_JOYSTICK (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_VIDEO_WIN_D3DCOMPILER (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_VIDEO_MAC_FULLSCREEN_SPACES (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_MOUSE_RELATIVE_MODE_WARP (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_RENDER_DIRECT3D11_DEBUG (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_VIDEO_HIGHDPI_DISABLED (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_WINRT_PRIVACY_POLICY_URL (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_WINRT_PRIVACY_POLICY_LABEL (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: SDL_WINRT_HANDLE_BACK_BUTTON (NULL)
2019-07-16 13:13:36.967 14064-14159/? V/SDL/APP: Leave sdlwindow_init
2019-07-16 13:13:36.968 14064-14159/? V/SDL/APP: Enter sdl_info::create
2019-07-16 13:13:36.970 14064-14159/? V/SDL: getNativeSurface()
2019-07-16 13:13:36.971 14064-14159/? D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000

--------- beginning of crash
2019-07-16 13:13:36.974 14064-14160/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x98 in tid 14160 (SDLThread), pid 14064 (rg.mamedev.mame)
2019-07-16 13:13:37.023 14163-14163/? I/crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
2019-07-16 13:13:37.024 406-406/? I//system/bin/tombstoned: received crash request for pid 14064
2019-07-16 13:13:37.026 14163-14163/? I/crash_dump64: performing dump of process 14064 (target tid = 14160)
2019-07-16 13:13:37.026 14163-14163/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2019-07-16 13:13:37.026 14163-14163/? A/DEBUG: Revision: '0'
2019-07-16 13:13:37.026 14163-14163/? A/DEBUG: ABI: 'arm64'
2019-07-16 13:13:37.026 14163-14163/? A/DEBUG: pid: 14064, tid: 14160, name: SDLThread >>> org.mamedev.mame <<<
2019-07-16 13:13:37.026 14163-14163/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x98
2019-07-16 13:13:37.026 14163-14163/? A/DEBUG: Cause: null pointer dereference
2019-07-16 13:13:37.026 14163-14163/? A/DEBUG: x0 0000000000000000 x1 0000000000000780 x2 0000000000000438 x3 0000000000000001
2019-07-16 13:13:37.026 14163-14163/? A/DEBUG: x4 0000006f27d01d60 x5 0000006f27876510 x6 0000000000003026 x7 0000000003ba6fb2
2019-07-16 13:13:37.026 14163-14163/? A/DEBUG: x8 56dc3bcf91e0ef1c x9 56dc3bcf91e0ef1c x10 0000000000000000 x11 0000000000000001
2019-07-16 13:13:37.027 14163-14163/? A/DEBUG: x12 0000006f3b78c148 x13 0000000000000004 x14 000000000000308f x15 ffffffffffffffff
2019-07-16 13:13:37.027 14163-14163/? A/DEBUG: x16 0000006f2b6ab9a0 x17 0000006f3e116888 x18 0000000000000004 x19 0000000000000000
2019-07-16 13:13:37.027 14163-14163/? A/DEBUG: x20 0000000000000438 x21 0000000000000780 x22 0000000000000780 x23 0000006f3b7af000
2019-07-16 13:13:37.027 14163-14163/? A/DEBUG: x24 0000006f2afef42a x25 0000006f27d02588 x26 0000006f2ae76073 x27 0000006f2b90af58
2019-07-16 13:13:37.027 14163-14163/? A/DEBUG: x28 0000006f27d01fc0 x29 0000006f27d01f10 x30 0000006f2acd69c0
2019-07-16 13:13:37.027 14163-14163/? A/DEBUG: sp 0000006f27d01ef0 pc 0000006f3e1168a4 pstate 0000000060000000
2019-07-16 13:13:37.049 14163-14163/? A/DEBUG: backtrace:
2019-07-16 13:13:37.049 14163-14163/? A/DEBUG: #00 pc 00000000000148a4 /system/lib64/libandroid.so (ANativeWindow_setBuffersGeometry+28)
2019-07-16 13:13:37.049 14163-14163/? A/DEBUG: #01 pc 0000000002ed59bc /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::gl::GlContext::create(unsigned int, unsigned int)+500)
2019-07-16 13:13:37.049 14163-14163/? A/DEBUG: #02 pc 0000000002eba038 /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::gl::RendererContextGL::setRenderContextSize(unsigned int, unsigned int, unsigned int)+232)
2019-07-16 13:13:37.049 14163-14163/? A/DEBUG: #03 pc 0000000002ead430 /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::gl::RendererContextGL::init(bgfx::Init const&)+160)
2019-07-16 13:13:37.049 14163-14163/? A/DEBUG: #04 pc 0000000002eac9f0 /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::gl::rendererCreate(bgfx::Init const&)+100)
2019-07-16 13:13:37.049 14163-14163/? A/DEBUG: #05 pc 0000000002e97afc /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::rendererCreate(bgfx::Init const&)+584)
2019-07-16 13:13:37.049 14163-14163/? A/DEBUG: #06 pc 0000000002e98d90 /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::Context::rendererExecCommands(bgfx::CommandBuffer&)+4680)
2019-07-16 13:13:37.049 14163-14163/? A/DEBUG: #07 pc 0000000002e93f98 /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::Context::renderFrame(int)+212)
2019-07-16 13:13:37.049 14163-14163/? A/DEBUG: #08 pc 0000000002e93de8 /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::renderFrame(int)+48)
2019-07-16 13:13:37.049 14163-14163/? A/DEBUG: #09 pc 0000000002e95130 /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::Context::renderThread(bx::Thread*, void*)+12)
2019-07-16 13:13:37.049 14163-14163/? A/DEBUG: #10 pc 0000000002f13164 /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bx::ThreadInternal::threadFunc(void*)+36)
2019-07-16 13:13:37.049 14163-14163/? A/DEBUG: #11 pc 0000000000067d80 /system/lib64/libc.so (__pthread_start(void*)+36)
2019-07-16 13:13:37.049 14163-14163/? A/DEBUG: #12 pc 000000000001ec18 /system/lib64/libc.so (__start_thread+68)
2019-07-16 13:13:37.093 14164-14164/? I/sh: type=1400 audit(0.0:73): avc: denied { execute_no_trans } for path="/vendor/bin/toybox_vendor" dev="dm-1" ino=416 scontext=u:r:pwm_fan_autorun:s0 tcontext=u:object_r:vendor_toolbox_exec:s0 tclass=file permissive=1
2019-07-16 13:13:37.785 406-406/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_39





I did a crash dump with ndk-stack of the tombstone data spit and got this
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

ndk-stack -sym ~/programs/mame/android-project/app/build/intermediates/jniLibs/debug/arm64-v8a -dump tombstone_39
********** Crash dump: **********
Build fingerprint: 'Android/nanopc_t4/nanopc-t4:8.1.0/OPM8.181005.003/144606:userdebug/test-keys'
#00 0x00000000000148a4 /system/lib64/libandroid.so (ANativeWindow_setBuffersGeometry+28)
#01 0x0000000002ed59bc /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::gl::GlContext::create(unsigned int, unsigned int)+500)
device_finder<samples_device, false>::device_finder(device_t&, char const*)
/home/yash/programs/mame/build/projects/sdl/mametiny/gmake-android-arm64/../../../../../src/emu/devfind.h:544:51
#02 0x0000000002eba038 /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::gl::RendererContextGL::setRenderContextSize(unsigned int, unsigned int, unsigned int)+232)
ym2610_write(void*, int, unsigned char)
/home/yash/programs/mame/build/projects/sdl/mametiny/gmake-android-arm64/../../../../../src/devices/sound/fm.cpp:3829:20
#03 0x0000000002ead430 /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::gl::RendererContextGL::init(bgfx::Init const&)+160)
dac_device<dac_code_twos_complement<8u> >::device_start()
/home/yash/programs/mame/build/projects/sdl/mametiny/gmake-android-arm64/../../../../../src/devices/sound/dac.h:193:3
#04 0x0000000002eac9f0 /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::gl::rendererCreate(bgfx::Init const&)+100)
non-virtual thunk to dac_8bit_r2r_device::~dac_8bit_r2r_device()
??:0:0
#05 0x0000000002e97afc /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::rendererCreate(bgfx::Init const&)+584)
std::__ndk1::unique_ptr<ad7521_device, std::__ndk1::default_delete<ad7521_device> >::release()
/home/yash/Android/Sdk/ndk/21.0.6113669/sources/cxx-stl/llvm-libc++/include/memory:2584:20
#06 0x0000000002e98d90 /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::Context::rendererExecCommands(bgfx::CommandBuffer&)+4680)
std::__ndk1::unique_ptr<ad7528_device, std::__ndk1::default_delete<ad7528_device> >::release()
/home/yash/Android/Sdk/ndk/21.0.6113669/sources/cxx-stl/llvm-libc++/include/memory:2583:26
#07 0x0000000002e93f98 /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::Context::renderFrame(int)+212)
object_finder_base<mc3410_device, true>::end_configuration()
/home/yash/programs/mame/build/projects/sdl/mametiny/gmake-android-arm64/../../../../../src/emu/devfind.h:465:0
#08 0x0000000002e93de8 /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::renderFrame(int)+48)
device_finder<mc3408_device, false>::~device_finder()
/home/yash/programs/mame/build/projects/sdl/mametiny/gmake-android-arm64/../../../../../src/devices/sound/dac.h:282:1
#09 0x0000000002e95130 /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bgfx::Context::renderThread(bx::Thread*, void*)+12)
object_finder_base<dac_6bit_r2r_device, true>::operator->() const
/home/yash/programs/mame/build/projects/sdl/mametiny/gmake-android-arm64/../../../../../src/emu/devfind.h:491:0
#10 0x0000000002f13164 /data/app/org.mamedev.mame-J9SVJLxhTvGUaAo6KrgXtg==/lib/arm64/libmain.so (bx::ThreadInternal::threadFunc(void*)+36)
util::basic_ovectorstream<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >::off_type util::stream_format<util::basic_ovectorstream<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, char [66]>(util::basic_ovectorstream<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >&, char const (&) [66])
/home/yash/programs/mame/build/projects/sdl/mametiny/gmake-android-arm64/../../../../../src/lib/util/strformat.h:1662:9
#11 0x0000000000067d80 /system/lib64/libc.so (__pthread_start(void*)+36)
#12 0x000000000001ec18 /system/lib64/libc.so (__start_thread+68)
Crash dump is completed


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Thanks for reading.

Regards
Yash

Re: Android Build for MAME - Enabling bgfx Shaders [Re: Yash Anand] #116830 02/06/20 08:46 PM
Joined: Mar 2001
Posts: 16,499
R
R. Belmont Offline
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,499
I believe Android uses OpenGL ES rather than plain OpenGL. BGFX and SDL2 both support that, but I don't know if anyone's gotten it to work with MAME.

Re: Android Build for MAME - Enabling bgfx Shaders [Re: R. Belmont] #116831 02/07/20 01:31 AM
Joined: Jan 2020
Posts: 8
Y
Yash Anand Offline OP
Member
OP Offline
Member
Y
Joined: Jan 2020
Posts: 8
Thanks for the reply... OPenGL ES is getting loaded and I can see some commands running through...

Runing the command for libmain.so without the -lGL runs into rough weather but these functions are'nt supported in any of the libGLES*.so files in ~/Android/Sdk/ndk/21.0.6113669/platforms/android-24/arch-x86_64/usr/lib64 by running nm -C -A command

libGLESv1_CM.so
libGLESv2.so
libGLESv3.so

../../../../android/bin/arm64/Release/mame_tiny/libosd_sdl.a(drawogl.o): In function `renderer_ogl::draw(int)':
drawogl.cpp:(.text._ZN12renderer_ogl4drawEi+0x124): undefined reference to `glClearDepth'
drawogl.cpp:(.text._ZN12renderer_ogl4drawEi+0x24c): undefined reference to `glOrtho'
drawogl.cpp:(.text._ZN12renderer_ogl4drawEi+0x390): undefined reference to `glEnd'
drawogl.cpp:(.text._ZN12renderer_ogl4drawEi+0x3a0): undefined reference to `glEnd'
drawogl.cpp:(.text._ZN12renderer_ogl4drawEi+0x5b4): undefined reference to `glBegin'
drawogl.cpp:(.text._ZN12renderer_ogl4drawEi+0x5c8): undefined reference to `glVertex2f'
drawogl.cpp:(.text._ZN12renderer_ogl4drawEi+0x5d8): undefined reference to `glVertex2f'
drawogl.cpp:(.text._ZN12renderer_ogl4drawEi+0x5ec): undefined reference to `glVertex2f'
drawogl.cpp:(.text._ZN12renderer_ogl4drawEi+0x644): undefined reference to `glEnd'
../../../../android/bin/arm64/Release/mame_tiny/libosd_sdl.a(drawogl.o): In function `renderer_ogl::texture_mpass_flip(ogl_texture_info*, int)':
drawogl.cpp:(.text._ZN12renderer_ogl18texture_mpass_flipEP16ogl_texture_infoi+0x180): undefined reference to `glPopAttrib'
drawogl.cpp:(.text._ZN12renderer_ogl18texture_mpass_flipEP16ogl_texture_infoi+0x1ec): undefined reference to `glPushAttrib'
drawogl.cpp:(.text._ZN12renderer_ogl18texture_mpass_flipEP16ogl_texture_infoi+0x220): undefined reference to `glPopAttrib'

Re: Android Build for MAME - Enabling bgfx Shaders [Re: Yash Anand] #116832 02/07/20 02:45 AM
Joined: Mar 2001
Posts: 16,499
R
R. Belmont Offline
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,499
Yeah, you need to disable MAME's built-in "-video OpenGL" renderer, it won't link on systems with only GLES. Add NO_OPENGL=1 to the make command line (and REGENIE=1 to regenerate the build files).

Re: Android Build for MAME - Enabling bgfx Shaders [Re: Yash Anand] #116833 02/07/20 01:45 PM
Joined: Apr 2006
Posts: 680
D
Dullaron Offline
Senior Member
Offline
Senior Member
D
Joined: Apr 2006
Posts: 680
MAME for Android is pain in the butt to deal with. Last time I mess with the builds that I compile from the official MAME source (Long time ago.) the touch screen menu after MAME load up doesn't work right. Also there is sounds issue for example Defender. I don't know those things gotten fix or not ever since then. Least Defender is playable at the time. smile


Windows 10 Pro 64-bit / Intel Core i5-4460 3.20 GHz / 8.00 GB RAM / AMD Radeon R9 200 Series
Re: Android Build for MAME - Enabling bgfx Shaders [Re: Yash Anand] #116850 02/10/20 11:51 AM
Joined: Jan 2020
Posts: 8
Y
Yash Anand Offline OP
Member
OP Offline
Member
Y
Joined: Jan 2020
Posts: 8
Thanks RB. Will keep working on these lines and updating the thread.
D - I am not planning to use touch... planning to use a joystick interface hence the touchy part of touch gets kind of resolved.

Guys keep sharing any recipe that you want me to try or if you find might be helpful to me.

Re: Android Build for MAME - Enabling bgfx Shaders [Re: R. Belmont] #117064 03/20/20 01:40 PM
Joined: Jan 2020
Posts: 8
Y
Yash Anand Offline OP
Member
OP Offline
Member
Y
Joined: Jan 2020
Posts: 8
So, after a brief flurry of other tasks I am back on this smile
RB if I understand correctly I have to make sure that the VIDEO_MODE_BGFX ( osd_renderer::make_for_type --- src/osd/modules/osdwindow.cpp) is being chosen and further the init in renderer_vk.cpp gets called.

Further in renderer_vk.cpp I am stuck as vkCreateAndroidSurfaceKHR is crashing with a SIGSEGV frown
func7 never comes and func6 gives the output as -

../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1652): BGFX func6 m_instance - c9aa5900 m_allocatorCb - 0 sci.window - 0x0
which land the suspects as the nwh (sci.window) and the allocatorcallbacks which is coming as 0x0
Before this I am able to get these values fine - Shared library functions, Instance Functions, Physical Device (Mali-T860) Device functions

#elif BX_PLATFORM_ANDROID
_BX_TRACE("func5");
{
VkAndroidSurfaceCreateInfoKHR sci;
sci.sType = VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR;
sci.pNext = NULL;
sci.flags = 0;
sci.window = (ANativeWindow*)g_platformData.nwh;
_BX_TRACE("func6 m_instance - %x m_allocatorCb - %x sci.window - 0x%x\n", m_instance, m_allocatorCb,sci.window);
result = vkCreateAndroidSurfaceKHR(m_instance, &sci, m_allocatorCb, &m_surface);
_BX_TRACE("func7");
}

Any help is welcome as I seemed to have hit the wall here.

PS - Another scan at the output I am going to take a stab at this. Add ACCESS_SURFACE_FLINGER in the manifest file and try to make it a system app


03-20 09:07:23.742 489 525 I ActivityManager: Start proc 2082:org.mamedev.mame/u0a45 for activity org.mamedev.mame/.MAME
03-20 09:07:23.804 2082 2082 I rg.mamedev.mam: The ClassLoaderContext is a special shared library.
03-20 09:07:23.839 2082 2082 V SDL : onCreate(): null
03-20 09:07:23.843 2082 2082 E libsigchain: Warning: Unexpected sigaction action found 0xededda95
03-20 09:07:24.041 2082 2082 D OpenGLRenderer: Skia GL Pipeline
03-20 09:07:24.061 2082 2082 V MAME : MAME onCreate:
03-20 09:07:24.064 2082 2082 V MAME : copy from Asset:/storage/emulated/0/Android/data/org.mamedev.mame/files/mame.ini
03-20 09:07:24.088 2082 2082 V SDL : onResume()
03-20 09:07:24.115 257 580 W ServiceManager: Permission failure: android.permission.ACCESS_SURFACE_FLINGER from uid=10045 pid=2082
03-20 09:07:24.115 257 580 D PermissionCache: checking android.permission.ACCESS_SURFACE_FLINGER for uid=10045 => denied (1824 us)
03-20 09:07:24.117 2082 2110 I mali_so : [File] : hardware/XXXXX/mali_so/driver/product/base/src/mali_base_kbase.c; [Line] : 876; [Func] : base_context_deal_with_version_affairs_rk_ext;
03-20 09:07:24.117 2082 2110 I mali_so : arm_release_ver of this mali_so is 'r18p0-01rel0', rk_so_ver is '3@0'.
03-20 09:07:24.118 2082 2110 D mali_so : [File] : hardware/XXXXXX/mali_so/driver/product/base/src/mali_base_kbase.c; [Line] : 881; [Func] : base_context_deal_with_version_affairs_rk_ext;
03-20 09:07:24.118 2082 2110 D mali_so : current process is NOT sf, to bail out.
03-20 09:07:24.121 2082 2082 V SDL : surfaceCreated()
03-20 09:07:24.121 2082 2082 V SDL : surfaceChanged()
03-20 09:07:24.121 2082 2082 V SDL : pixel format RGB_565
03-20 09:07:24.125 253 253 D Sensors : set batch: handle = 2, period_ns = 20000000ns, timeout = 0ns
03-20 09:07:24.125 253 253 D Sensors : setDelay : 20000000 ns, (50.00 Hz)
03-20 09:07:24.125 253 253 D Sensors : set flush: handle = 2
03-20 09:07:24.126 253 568 I Sensors : report 1 flush event
03-20 09:07:24.136 2082 2122 I SDL : SDL_Android_Init()
03-20 09:07:24.136 2082 2122 I SDL : SDL_Android_Init() finished!
03-20 09:07:24.143 2082 2110 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
03-20 09:07:24.143 2082 2110 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
03-20 09:07:24.143 2082 2122 V SDL/APP : Attempting load of mame.ini
03-20 09:07:24.144 2082 2122 V SDL/APP : Parsing mame.ini
03-20 09:07:24.143 2082 2110 I OpenGLRenderer: Initialized EGL, version 1.4
03-20 09:07:24.144 2082 2110 D OpenGLRenderer: Swap behavior 2

03-20 09:07:24.167 2082 2110 D mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
03-20 09:07:24.170 2082 2122 V SDL/APP : Available videodrivers:
03-20 09:07:24.172 2082 2122 V SDL/APP : Android
03-20 09:07:24.172 2082 2122 V SDL/APP :
03-20 09:07:24.172 2082 2122 V SDL/APP : Current Videodriver: Android
03-20 09:07:24.172 2082 2122 V SDL/APP : Display #0
03-20 09:07:24.172 2082 2122 V SDL/APP : Renderdrivers:
03-20 09:07:24.172 2082 2122 V SDL/APP : opengles2 (0x0)
03-20 09:07:24.173 2082 2122 V SDL/APP : opengles (0x0)
03-20 09:07:24.173 2082 2122 V SDL/APP : software (0x0)
03-20 09:07:24.173 2082 2122 V SDL/APP : Available audio drivers:
03-20 09:07:24.173 2082 2122 V SDL/APP : dummy
03-20 09:07:24.175 2082 2122 V SDL/APP : android
03-20 09:07:24.175 2082 2122 V SDL/APP : Build version: 0.218 (mame0218-123-ge32eb4a36f-dirty)
03-20 09:07:24.175 2082 2122 V SDL/APP : Build architecure:
03-20 09:07:24.175 2082 2122 V SDL/APP :
03-20 09:07:24.175 2082 2122 V SDL/APP : Build defines 1:
03-20 09:07:24.175 2082 2122 V SDL/APP : SDLMAME_UNIX=1
03-20 09:07:24.175 2082 2122 V SDL/APP : SDLMAME_LINUX=1
03-20 09:07:24.176 2082 2122 V SDL/APP :
03-20 09:07:24.176 2082 2122 V SDL/APP : Build defines 1:
03-20 09:07:24.176 2082 2122 V SDL/APP : LSB_FIRST=1
03-20 09:07:24.176 2082 2122 V SDL/APP : MAME_NOASM=1
03-20 09:07:24.176 2082 2122 V SDL/APP : MAME_DEBUG=1
03-20 09:07:24.177 2082 2122 V SDL/APP :
03-20 09:07:24.177 2082 2122 V SDL/APP : SDL/OpenGL defines:
03-20 09:07:24.177 2082 2122 V SDL/APP : SDL_COMPILEDVERSION=2005
03-20 09:07:24.177 2082 2122 V SDL/APP : USE_OPENGL=0
03-20 09:07:24.177 2082 2122 V SDL/APP :
03-20 09:07:24.177 2082 2122 V SDL/APP : Compiler defines A:
03-20 09:07:24.177 2082 2122 V SDL/APP : __GNUC__=4
03-20 09:07:24.177 2082 2122 V SDL/APP : __GNUC_MINOR__=2
03-20 09:07:24.178 2082 2122 V SDL/APP : __GNUC_PATCHLEVEL__=1
03-20 09:07:24.178 2082 2122 V SDL/APP : __VERSION__="4.2.1 Compatible Android (5900059 based on r365631c) Clang 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 207d7abc1a2abf3ef8d4301736d6a7ebc224a290)"
03-20 09:07:24.178 2082 2122 V SDL/APP :
03-20 09:07:24.179 2082 2122 V SDL/APP : Compiler defines B:
03-20 09:07:24.179 2082 2122 V SDL/APP : __unix__=1
03-20 09:07:24.179 2082 2122 V SDL/APP :
03-20 09:07:24.179 2082 2122 V SDL/APP : Compiler defines C:
03-20 09:07:24.179 2082 2122 V SDL/APP :
03-20 09:07:24.179 2082 2122 V SDL/APP : Enter init_monitors
03-20 09:07:24.179 2082 2122 V SDL/APP : Adding monitor screen0 (1280 x 1024)
03-20 09:07:24.179 2082 2122 V SDL/APP : Leave init_monitors
03-20 09:07:24.180 2082 2122 V SDL/APP : Enter sdlwindow_init
03-20 09:07:24.181 2082 2122 V SDL/APP : Unable to find the /storage/emulated/0/Game/bgfx folder. Please reinstall it to use the BGFX renderer
03-20 09:07:24.181 2082 2122 V SDL/APP :
03-20 09:07:24.181 2082 2122 V SDL/APP : Hints:

03-20 09:07:24.184 2082 2122 V SDL/APP : Leave sdlwindow_init
03-20 09:07:24.217 2082 2082 V SDL : onWindowFocusChanged(): true
03-20 09:07:24.218 2082 2122 V SDL/APP : Enter sdl_info::create
03-20 09:07:24.224 489 531 I chatty : uid=1000(system) android.display expire 1 line
03-20 09:07:24.228 2082 2122 V SDL : getNativeSurface()
03-20 09:07:24.229 2082 2122 D mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
03-20 09:07:24.229 2082 2122 V SDL/APP : int renderer_bgfx::create()
03-20 09:07:24.229 2082 2122 V SDL/APP : width 1280 height 1024
03-20 09:07:24.229 2082 2122 V SDL/APP : backend as vulkan
03-20 09:07:24.229 2082 2122 V SDL/APP : Calling bgfx::INIT 888
03-20 09:07:24.230 2082 2122 D : BGFX bgfx init
03-20 09:07:24.230 2082 2122 D : BGFX NULL == _init.allocator calling BX_NEW
03-20 09:07:24.230 2082 2122 D : BGFX NULL == _init.callback calling stub
03-20 09:07:24.230 2082 2122 D : ../../../../../3rdparty/bgfx/src/bgfx.cpp (3371): BGFX bgfx platform data like window handle or backbuffer is not set, creating headless device.
03-20 09:07:24.230 2082 2122 D : ../../../../../3rdparty/bgfx/src/bgfx.cpp (3402): BGFX Init...
03-20 09:07:24.230 2082 2122 D : ../../../../../3rdparty/bgfx/src/bgfx.cpp (1761): BGFX g_platformData is NULL - 0x0 0x0 0x0 0x0 0x0
03-20 09:07:24.231 2082 2122 D : ../../../../../3rdparty/bgfx/src/bgfx.cpp (1791): BGFX Creating rendering thread.
03-20 09:07:24.232 2082 2122 D : ../../../../../3rdparty/bgfx/src/bgfx.cpp (1800): BGFX Running in multi-threaded mode
03-20 09:07:24.232 2082 2124 D : ../../../../../3rdparty/bgfx/src/bgfx.cpp (2572): BGFX Scoring in BX_PLATFORM_ANDROID
03-20 09:07:24.232 2082 2124 D :
03-20 09:07:24.232 2082 2124 D : ../../../../../3rdparty/bgfx/src/bgfx.cpp (2572): BGFX Scoring in BX_PLATFORM_ANDROID
03-20 09:07:24.232 2082 2124 D :
03-20 09:07:24.232 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (4190): BGFX RendererContextI* rendererCreate(const Init& _init)
03-20 09:07:24.235 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (4192): BGFX s_renderVK -
03-20 09:07:24.235 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1105): BGFX INIT CALLED
03-20 09:07:24.235 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1124): BGFX 1
03-20 09:07:24.235 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1130): BGFX 2
03-20 09:07:24.235 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1141): BGFX 3
03-20 09:07:24.235 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1153): BGFX 4
03-20 09:07:24.235 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1162): BGFX Shared library functions:
03-20 09:07:24.235 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1167): BGFX 0xeba2986d vkCreateInstance
03-20 09:07:24.235 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1167): BGFX 0xeba299bd vkGetInstanceProcAddr
03-20 09:07:24.235 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1167): BGFX 0xeba2987b vkGetDeviceProcAddr
03-20 09:07:24.235 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1167): BGFX 0xeba29b59 vkEnumerateInstanceExtensionProperties
03-20 09:07:24.235 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1167): BGFX 0xeba29b55 vkEnumerateInstanceLayerProperties
03-20 09:07:24.238 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (576): BGFX ENTERING DUMPEXTENSIONS
03-20 09:07:24.238 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (579): BGFX ENTERING DUMPEXTENSIONS1
03-20 09:07:24.243 2082 2124 D vulkan : searching for layers in '/data/app/org.mamedev.mame-FTGcdIQJrHLGRwuuNuwHlA==/lib/arm'
03-20 09:07:24.243 2082 2124 D vulkan : searching for layers in '/system/fake-libs'
03-20 09:07:24.244 2082 2124 D vulkan : searching for layers in '/data/app/org.mamedev.mame-FTGcdIQJrHLGRwuuNuwHlA==/base.apk!/lib/armeabi-v7a'
03-20 09:07:24.245 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (585): BGFX ENTERING DUMPEXTENSIONS2
03-20 09:07:24.245 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (599): BGFX Global extensions (6):
03-20 09:07:24.245 2082 2124 D :
03-20 09:07:24.245 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (290): BGFX v25 VK_KHR_surface
03-20 09:07:24.245 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (290): BGFX v6 VK_KHR_android_surface
03-20 09:07:24.245 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (290): BGFX v3 VK_EXT_swapchain_colorspace
03-20 09:07:24.245 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (290): BGFX v1 VK_KHR_get_surface_capabilities2
03-20 09:07:24.245 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (290): BGFX v9 VK_EXT_debug_report
03-20 09:07:24.245 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (290): BGFX v1 VK_KHR_get_physical_device_properties2 (supported)
03-20 09:07:24.246 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (614): BGFX 2enumerateLayerProperties
03-20 09:07:24.246 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (616): BGFX 1enumerateLayerProperties - 0, result - 0
03-20 09:07:24.246 2082 2124 D :
03-20 09:07:24.246 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (669): BGFX EXITING DUMPEXTENSIONS
03-20 09:07:24.246 2082 2124 D :
03-20 09:07:24.246 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1224): BGFX numEnabledExtensions - 3: extension.m_name - VK_KHR_get_physical_device_properties2
03-20 09:07:24.243 2082 2082 I SDLThread: type=1400 audit(0.0:137): avc: denied { open } for path="/dev/__properties__/u:object_r:bluetooth_a2dp_offload_prop:s0" dev="tmpfs" ino=9414 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:bluetooth_a2dp_offload_prop:s0 tclass=file permissive=1
03-20 09:07:24.243 2082 2082 I SDLThread: type=1400 audit(0.0:138): avc: denied { getattr } for path="/dev/__properties__/u:object_r:bluetooth_a2dp_offload_prop:s0" dev="tmpfs" ino=9414 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:bluetooth_a2dp_offload_prop:s0 tclass=file permissive=1
03-20 09:07:24.243 2082 2082 I SDLThread: type=1400 audit(0.0:139): avc: denied { open } for path="/dev/__properties__/u:object_r:bluetooth_prop:s0" dev="tmpfs" ino=9415 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:bluetooth_prop:s0 tclass=file permissive=1
03-20 09:07:24.243 2082 2082 I SDLThread: type=1400 audit(0.0:140): avc: denied { getattr } for path="/dev/__properties__/u:object_r:bluetooth_prop:s0" dev="tmpfs" ino=9415 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:bluetooth_prop:s0 tclass=file permissive=1
03-20 09:07:24.243 2082 2082 I SDLThread: type=1400 audit(0.0:141): avc: denied { open } for path="/dev/__properties__/u:object_r:bootloader_boot_reason_prop:s0" dev="tmpfs" ino=9416 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:bootloader_boot_reason_prop:s0 tclass=file permissive=1
03-20 09:07:24.262 2082 2124 I mali_so : [File] : hardware/XXXXXX/mali_so/driver/product/base/src/mali_base_kbase.c; [Line] : 876; [Func] : base_context_deal_with_version_affairs_rk_ext;
03-20 09:07:24.262 2082 2124 I mali_so : arm_release_ver of this mali_so is 'r18p0-01rel0', rk_so_ver is '3@0'.
03-20 09:07:24.263 2082 2124 D mali_so : [File] : hardware/XXXXXX/mali_so/driver/product/base/src/mali_base_kbase.c; [Line] : 881; [Func] : base_context_deal_with_version_affairs_rk_ext;
03-20 09:07:24.263 2082 2124 D mali_so : current process is NOT sf, to bail out.
03-20 09:07:24.282 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1249): BGFX vkCreateinstance result - 0 m_instance - -365055928
03-20 09:07:24.282 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1258): BGFX Instance functions:
03-20 09:07:24.282 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xeba25b25 vkDestroyInstance
03-20 09:07:24.282 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xeba2ba29 vkEnumeratePhysicalDevices
03-20 09:07:24.282 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xeba2626d vkEnumerateDeviceExtensionProperties
03-20 09:07:24.282 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xeba26211 vkEnumerateDeviceLayerProperties
03-20 09:07:24.282 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xdb5e25b8 vkGetPhysicalDeviceProperties
03-20 09:07:24.282 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xdb5e2af0 vkGetPhysicalDeviceFormatProperties
03-20 09:07:24.282 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xdb5e3020 vkGetPhysicalDeviceFeatures
03-20 09:07:24.282 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xdb5e2b70 vkGetPhysicalDeviceImageFormatProperties
03-20 09:07:24.282 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xdb5e2a38 vkGetPhysicalDeviceMemoryProperties
03-20 09:07:24.282 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xdb5e2a94 vkGetPhysicalDeviceMemoryProperties2KHR
03-20 09:07:24.283 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xdb5e2f58 vkGetPhysicalDeviceQueueFamilyProperties
03-20 09:07:24.283 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xeba2f921 vkGetPhysicalDeviceSurfaceCapabilitiesKHR
03-20 09:07:24.283 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xeba2fa8d vkGetPhysicalDeviceSurfaceFormatsKHR
03-20 09:07:24.283 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xeba2fcc1 vkGetPhysicalDeviceSurfacePresentModesKHR
03-20 09:07:24.283 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xeba2f875 vkGetPhysicalDeviceSurfaceSupportKHR
03-20 09:07:24.283 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xeba25bb9 vkCreateDevice
03-20 09:07:24.283 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xeba2604d vkDestroyDevice
03-20 09:07:24.283 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xeba2f83d vkDestroySurfaceKHR
03-20 09:07:24.283 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0x0 vkCreateDebugReportCallbackEXT
03-20 09:07:24.283 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0x0 vkDestroyDebugReportCallbackEXT
03-20 09:07:24.283 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0x0 vkDebugReportMessageEXT
03-20 09:07:24.283 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xeba2f72d vkCreateAndroidSurfaceKHR
03-20 09:07:24.283 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1295): BGFX ---
03-20 09:07:24.283 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1328): BGFX Physical device 0:
03-20 09:07:24.284 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1329): BGFX Name: Mali-T860
03-20 09:07:24.284 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1330): BGFX API version: 400027
03-20 09:07:24.284 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1331): BGFX Driver version: e7ca91ce
03-20 09:07:24.284 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1332): BGFX VendorId: 13b5
03-20 09:07:24.284 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1333): BGFX DeviceId: 8602000
03-20 09:07:24.284 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1334): BGFX Type: 1
03-20 09:07:24.284 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1350): BGFX Memory type count: 3
03-20 09:07:24.284 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1357): BGFX 0: flags 0x00000007, index 0
03-20 09:07:24.284 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1357): BGFX 1: flags 0x0000000b, index 0
03-20 09:07:24.284 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1357): BGFX 2: flags 0x00000011, index 0
03-20 09:07:24.284 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1360): BGFX Memory heap count: 1
03-20 09:07:24.284 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1369): BGFX 0: flags 0x00000001, size 3.75 GiB
03-20 09:07:24.284 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (576): BGFX ENTERING DUMPEXTENSIONS
03-20 09:07:24.284 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (579): BGFX ENTERING DUMPEXTENSIONS1
03-20 09:07:24.287 2082 2124 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
03-20 09:07:24.288 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (585): BGFX ENTERING DUMPEXTENSIONS2
03-20 09:07:24.288 2082 2124 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
03-20 09:07:24.288 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (599): BGFX Global extensions (2):
03-20 09:07:24.288 2082 2124 D :
03-20 09:07:24.288 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (290): BGFX v1 VK_KHR_incremental_present
03-20 09:07:24.288 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (290): BGFX v70 VK_KHR_swapchain
03-20 09:07:24.288 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (614): BGFX 2enumerateLayerProperties
03-20 09:07:24.288 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (616): BGFX 1enumerateLayerProperties - 0, result - 0
03-20 09:07:24.288 2082 2124 D :
03-20 09:07:24.288 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (669): BGFX EXITING DUMPEXTENSIONS
03-20 09:07:24.288 2082 2124 D :
03-20 09:07:24.288 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1377): BGFX VK_NULL_HANDLE == m_physicalDevice
03-20 09:07:24.288 2082 2124 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1455): BGFX Supported 8

03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0x0 vkCreateDebugReportCallbackEXT
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0x0 vkDestroyDebugReportCallbackEXT
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0x0 vkDebugReportMessageEXT
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1264): BGFX 0xeba2f72d vkCreateAndroidSurfaceKHR
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1295): BGFX ---
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1328): BGFX Physical device 0:
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1329): BGFX Name: Mali-T860
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1330): BGFX API version: 400027
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1331): BGFX Driver version: e7ca91ce
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1332): BGFX VendorId: 13b5
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1333): BGFX DeviceId: 8602000
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1334): BGFX Type: 1
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1350): BGFX Memory type count: 3
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1357): BGFX 0: flags 0x00000007, index 0
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1357): BGFX 1: flags 0x0000000b, index 0
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1357): BGFX 2: flags 0x00000011, index 0
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1360): BGFX Memory heap count: 1
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1369): BGFX 0: flags 0x00000001, size 3.75 GiB
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (576): BGFX ENTERING DUMPEXTENSIONS
03-20 10:50:36.566 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (579): BGFX ENTERING DUMPEXTENSIONS1
03-20 10:50:36.570 2222 2263 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
03-20 10:50:36.571 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (585): BGFX ENTERING DUMPEXTENSIONS2
03-20 10:50:36.571 2222 2263 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
03-20 10:50:36.571 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (599): BGFX Global extensions (2):
03-20 10:50:36.571 2222 2263 D :
03-20 10:50:36.571 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (290): BGFX v1 VK_KHR_incremental_present
03-20 10:50:36.571 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (290): BGFX v70 VK_KHR_swapchain
03-20 10:50:36.571 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (614): BGFX 2enumerateLayerProperties
03-20 10:50:36.571 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (616): BGFX 1enumerateLayerProperties - 0, result - 0
03-20 10:50:36.571 2222 2263 D :
03-20 10:50:36.571 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (669): BGFX EXITING DUMPEXTENSIONS
03-20 10:50:36.571 2222 2263 D :
03-20 10:50:36.571 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1377): BGFX VK_NULL_HANDLE == m_physicalDevice
03-20 10:50:36.571 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1455): BGFX Supported 8
03-20 10:50:36.571 2222 2263 I chatty : uid=10045(u0_a45) org.mamedev.mame identical 145 lines
03-20 10:50:36.578 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1495): BGFX Queue family property 0:
03-20 10:50:36.579 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1496): BGFX Queue flags: 0x00000007
03-20 10:50:36.579 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1497): BGFX Queue count: 2
03-20 10:50:36.579 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1498): BGFX TS valid bits: 0x00000000
03-20 10:50:36.579 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1503): BGFX Min image: 1 x 1 x 1
03-20 10:50:36.579 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1564): BGFX Extension::Count - 4
03-20 10:50:36.579 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1598): BGFX Device being created+++++++++++++++
03-20 10:50:36.579 2222 2263 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
03-20 10:50:36.579 2222 2263 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
03-20 10:50:36.594 2222 2263 I mali_so : [File] : hardware/XXXXXX/mali_so/driver/product/base/src/mali_base_kbase.c; [Line] : 876; [Func] : base_context_deal_with_version_affairs_rk_ext;
03-20 10:50:36.594 2222 2263 I mali_so : arm_release_ver of this mali_so is 'r18p0-01rel0', rk_so_ver is '3@0'.
03-20 10:50:36.594 2222 2263 D mali_so : [File] : hardware/rXXXXXX/mali_so/driver/product/base/src/mali_base_kbase.c; [Line] : 881; [Func] : base_context_deal_with_version_affairs_rk_ext;
03-20 10:50:36.594 2222 2263 D mali_so : current process is NOT sf, to bail out.
03-20 10:50:36.612 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1605): BGFX Device created++++++++++++++
03-20 10:50:36.612 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1615): BGFX Device functions:
03-20 10:50:36.612 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1620): BGFX 0xeba2bced vkGetDeviceQueue

TOO MANY HERE

03-20 10:50:36.615 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1622): BGFX func1
03-20 10:50:36.615 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1628): BGFX func2
03-20 10:50:36.615 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1630): BGFX func3
03-20 10:50:36.615 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1632): BGFX func4
03-20 10:50:36.615 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1645): BGFX func5
03-20 10:50:36.615 2222 2263 D : ../../../../../3rdparty/bgfx/src/renderer_vk.cpp (1652): BGFX func6 m_instance - c9aa5900 m_allocatorCb - 0 sci.window - 0x0
A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x58

Re: Android Build for MAME - Enabling bgfx Shaders [Re: Yash Anand] #117181 04/15/20 04:11 PM
Joined: Jan 2020
Posts: 8
Y
Yash Anand Offline OP
Member
OP Offline
Member
Y
Joined: Jan 2020
Posts: 8
Guys was able to get some traction on this in getting vulkan enabled as a backend for bgfx on Android. But enabling the same reduces the sound quality a bit. Any pointers will be great..

Re: Android Build for MAME - Enabling bgfx Shaders [Re: Yash Anand] #117183 04/15/20 06:40 PM
Joined: Mar 2001
Posts: 16,499
R
R. Belmont Offline
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,499
I assume you mean the emulation speed is dropping below 100% (which will cause the sound to break up)? If so, there's nothing we can do about it, the device you're on just can't handle the shaders.

Re: Android Build for MAME - Enabling bgfx Shaders [Re: Yash Anand] #117192 04/16/20 05:05 AM
Joined: Apr 2006
Posts: 680
D
Dullaron Offline
Senior Member
Offline
Senior Member
D
Joined: Apr 2006
Posts: 680
Don't use shaders on Android and iPad/iPhone. laugh


Windows 10 Pro 64-bit / Intel Core i5-4460 3.20 GHz / 8.00 GB RAM / AMD Radeon R9 200 Series
Page 1 of 2 1 2

Moderated by  R. Belmont 

Who's Online Now
3 registered members (Dam0, Stick, 1 invisible), 51 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,775
Posts115,465
Members4,899
Most Online890
Jan 17th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.3