Skip to content

SDL_HINT_GPU_DRIVER vulkan unsupported #13046

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

Closed
mhnaufal opened this issue May 15, 2025 · 7 comments
Closed

SDL_HINT_GPU_DRIVER vulkan unsupported #13046

mhnaufal opened this issue May 15, 2025 · 7 comments
Milestone

Comments

@mhnaufal
Copy link

Hi!
I tried to create an Android app that uses Vulkan from SDL3. I stumbled with the issue SDL_HINT_GPU_DRIVER vulkan unsupported when calling SDL_CreateGPUDevice().
I already installed vulkanCapsViewer app and built the vulkan android example (https://developer.android.com/ndk/guides/graphics/getting-started), and both are working on my phone, but not for the SDL3. Do you have any idea how to solve this? Thanks

I called SDL_GetGPUDriver() and get "vulkan" as result.

Image

My repo code: SDL_CreateGPUDevice(SDL_GPU_SHADERFORMAT_SPIRV, false, temp_driver_name.c_str());

interaction: PackageSetting{37ce512 org.libsdl.SDL_Helloworld/10462} -> PackageSetting{7024750 org.libsdl.bubuk/10476} BLOCKED
interaction: PackageSetting{139bec1 org.libsdl.SDL_Helloworld/10462} -> PackageSetting{236b09b org.libsdl.bubuk/10476} BLOCKED
interaction: PackageSetting{139bec1 org.libsdl.SDL_Helloworld/10462} -> PackageSetting{236b09b org.libsdl.bubuk/10476} BLOCKED
interaction: PackageSetting{139bec1 org.libsdl.SDL_Helloworld/10462} -> PackageSetting{3ea8b5a org.libsdl.bubuk/10476} BLOCKED
interaction: PackageSetting{139bec1 org.libsdl.SDL_Helloworld/10462} -> PackageSetting{3ea8b5a org.libsdl.bubuk/10476} BLOCKED
interaction: PackageSetting{139bec1 org.libsdl.SDL_Helloworld/10462} -> PackageSetting{3ea8b5a org.libsdl.bubuk/10476} BLOCKED
SystemEventSubscribe: onPublishData {"type":"desktop_apps","time":1747313482394,"data":"{\"pkgList\":[\"com.android.chrome\",\"com.android.settings\",\"com.android.vending\",\"com.funbase.xradio\",\"com.gallery20\",\"com.google.android.apps.maps\",\"com.google.android.apps.tachyon\",\"com.google.android.gm\",\"com.google.android.youtube\",\"com.rlk.weathers\",\"com.sh.smart.caller\",\"com.sh.smart.caller\",\"com.transsion.calendar\",\"com.transsion.camera\",\"com.transsion.deskclock\",\"com.transsion.gamespace.app\",\"com.transsion.healthlife\",\"com.transsion.notebook\",\"com.transsion.smartmessage\",\"com.transsion.soundrecorder\",\"com.bareksa.app\",\"com.google.android.apps.docs\",\"com.google.android.apps.docs.editors.docs\",\"com.google.android.apps.docs.editors.sheets\",\"com.paypal.android.p2pmobile\",\"cn.wps.moffice_eng\",\"com.android.stk\",\"com.google.android.apps.googleassistant\",\"com.google.android.apps.nbu.files\",\"com.google.android.apps.safetyhub\",\"com.google.android.googlequicksearchbox\",\"com.google.audio.hearing.visualization.accessibility.scribe\",\"com.infinix.xpark\",\"com.talpa.hibrowser\",\"com.transsion.calculator\",\"com.transsion.carlcare\",\"com.transsion.compass\",\"com.transsion.filemanagerx\",\"com.transsion.folax\",\"com.transsion.letswitch\",\"com.transsion.magicshow\",\"com.transsion.phonemaster\",\"com.transsnet.store\",\"com.trassion.infinix.xclub\",\"net.bat.store\",\"app.bpjs.mobile\",\"co.id.ajsmsig.cs.simpel\",\"com.Hypemasters.rts\",\"com.andi.alquran.id\",\"com.android1939.kards\",\"com.authy.authy\",\"com.azure.authenticator\",\"com.blizzard.diablo.immortal\",\"com.bstar.intl\",\"com.cdprojektred.gwent\",\"com.chillyroom.xenocmd\",\"com.corrodinggames.rts\",\"com.deepseek.chat\",\"com.dhxmedia.slugitout2\",\"com.discord\",\"com.duolingo\",\"com.example.flutter_application_1\",\"com.fansipan.nightfall.tower.simulation.strategy.td.game\",\"com.feralinteractive.medieval2_android\",\"com.git.mami.kos\",\"com.gojek.app\",\"com.gojek.gopay\",\"com.grabtaxi.passenger\",\"com.instagram.android\",\"com.internet.speed.meter.lite\",\"com.intsig.camscanner\",\"com.jrzheng.supervpnfree\",\"com.khronos.vulkan_samples\",\"com.krafton.defensederby\",\"com.linkedin.android\",\"com.ludo.king\",\"com.mymedical\",\"com.outerdawn.grimguard\",\"com.playstack.balatro.android\",\"com.privygate.privyid\",\"com.proximabeta.aoemobile\",\"com.riotgames.league.wildrift\",\"com.shopee.id\",\"com.snappytouch.subterfuge\",\"com.ticktick.task\",\"com.tokopedia.tkpd\",\"com.traveloka.android\",\"com.ubisoft.princeofpersia.thelostcrown.mobile.action.adventure.platform\",\"com.udemy.android\",\"com.valvesoftware.android.steam.community\",\"com.valvesoftware.steamlink\",\"com.whatsapp\",\"com.zotiger.accountbook\",\"de.saschawillems.vulkancapsviewer\",\"id.bni.wondr\",\"id.co.bri.brimo\",\"id.go.pajak.djp\",\"info.flowersoft.theotown.theotown\",\"org.libsdl.SDL_Helloworld\",\"org.libsdl.bubuk\",\"org.mozilla.fenix\",\"org.telegram.messenger\",\"src.com.bni\",\"us.zoom.videomeetings\"]}","provider":"dc","dc_version":2030300000,"data_version":1,"user_id":0}
interaction: PackageSetting{37ce512 org.libsdl.SDL_Helloworld/10462} -> PackageSetting{14d2e16 org.libsdl.bubuk/10476} BLOCKED
SystemEventSubscribe: onPublishData {"type":"desktop_apps","time":1747313482627,"data":"{\"pkgList\":[\"com.android.chrome\",\"com.android.settings\",\"com.android.vending\",\"com.funbase.xradio\",\"com.gallery20\",\"com.google.android.apps.maps\",\"com.google.android.apps.tachyon\",\"com.google.android.gm\",\"com.google.android.youtube\",\"com.rlk.weathers\",\"com.sh.smart.caller\",\"com.sh.smart.caller\",\"com.transsion.calendar\",\"com.transsion.camera\",\"com.transsion.deskclock\",\"com.transsion.gamespace.app\",\"com.transsion.healthlife\",\"com.transsion.notebook\",\"com.transsion.smartmessage\",\"com.transsion.soundrecorder\",\"com.bareksa.app\",\"com.google.android.apps.docs\",\"com.google.android.apps.docs.editors.docs\",\"com.google.android.apps.docs.editors.sheets\",\"com.paypal.android.p2pmobile\",\"cn.wps.moffice_eng\",\"com.android.stk\",\"com.google.android.apps.googleassistant\",\"com.google.android.apps.nbu.files\",\"com.google.android.apps.safetyhub\",\"com.google.android.googlequicksearchbox\",\"com.google.audio.hearing.visualization.accessibility.scribe\",\"com.infinix.xpark\",\"com.talpa.hibrowser\",\"com.transsion.calculator\",\"com.transsion.carlcare\",\"com.transsion.compass\",\"com.transsion.filemanagerx\",\"com.transsion.folax\",\"com.transsion.letswitch\",\"com.transsion.magicshow\",\"com.transsion.phonemaster\",\"com.transsnet.store\",\"com.trassion.infinix.xclub\",\"net.bat.store\",\"app.bpjs.mobile\",\"co.id.ajsmsig.cs.simpel\",\"com.Hypemasters.rts\",\"com.andi.alquran.id\",\"com.android1939.kards\",\"com.authy.authy\",\"com.azure.authenticator\",\"com.blizzard.diablo.immortal\",\"com.bstar.intl\",\"com.cdprojektred.gwent\",\"com.chillyroom.xenocmd\",\"com.corrodinggames.rts\",\"com.deepseek.chat\",\"com.dhxmedia.slugitout2\",\"com.discord\",\"com.duolingo\",\"com.example.flutter_application_1\",\"com.fansipan.nightfall.tower.simulation.strategy.td.game\",\"com.feralinteractive.medieval2_android\",\"com.git.mami.kos\",\"com.gojek.app\",\"com.gojek.gopay\",\"com.grabtaxi.passenger\",\"com.instagram.android\",\"com.internet.speed.meter.lite\",\"com.intsig.camscanner\",\"com.jrzheng.supervpnfree\",\"com.khronos.vulkan_samples\",\"com.krafton.defensederby\",\"com.linkedin.android\",\"com.ludo.king\",\"com.mymedical\",\"com.outerdawn.grimguard\",\"com.playstack.balatro.android\",\"com.privygate.privyid\",\"com.proximabeta.aoemobile\",\"com.riotgames.league.wildrift\",\"com.shopee.id\",\"com.snappytouch.subterfuge\",\"com.ticktick.task\",\"com.tokopedia.tkpd\",\"com.traveloka.android\",\"com.ubisoft.princeofpersia.thelostcrown.mobile.action.adventure.platform\",\"com.udemy.android\",\"com.valvesoftware.android.steam.community\",\"com.valvesoftware.steamlink\",\"com.whatsapp\",\"com.zotiger.accountbook\",\"de.saschawillems.vulkancapsviewer\",\"id.bni.wondr\",\"id.co.bri.brimo\",\"id.go.pajak.djp\",\"info.flowersoft.theotown.theotown\",\"org.libsdl.SDL_Helloworld\",\"org.libsdl.bubuk\",\"org.mozilla.fenix\",\"org.telegram.messenger\",\"src.com.bni\",\"us.zoom.videomeetings\"]}","provider":"dc","dc_version":2030300000,"data_version":1,"user_id":0}
---------------------------- PROCESS STARTED (16342) for package org.libsdl.bubuk ----------------------------
Manufacturer: INFINIX
Device: Infinix-X6833B
Model: Infinix X6833B
onCreate()
Load /data/app/~~S5iWX26dmo8GbTyGhyvEDA==/org.libsdl.bubuk-Xgt939gBJvkKZ1UMo4W8dQ==/base.apk!/lib/arm64-v8a/libSDL3.so using ns clns-4 from class loader (caller=/data/app/~~S5iWX26dmo8GbTyGhyvEDA==/org.libsdl.bubuk-Xgt939gBJvkKZ1UMo4W8dQ==/base.apk!classes3.dex): ok
nativeSetupJNI()
AUDIO nativeSetupJNI()
CONTROLLER nativeSetupJNI()
onStart()
onResume()
surfaceCreated()
surfaceChanged()
Window size: 1080x2352
Device size: 1080x2460
nativeInitSDLThread() 1 time
Running main function SDL_main from library /data/app/~~S5iWX26dmo8GbTyGhyvEDA==/org.libsdl.bubuk-Xgt939gBJvkKZ1UMo4W8dQ==/lib/arm64/libbubuk.so
setOrientation() requestedOrientation=6 width=1280 height=720 resizable=false hint=
onConfigurationChanged()
Failed to create the GPU device: SDL_HINT_GPU_DRIVER vulkan unsupported!
setOrientation() requestedOrientation=6 width=1280 height=720 resizable=false hint=
pixel format wanted SDL_PIXELFORMAT_RGBA8888 (1), got SDL_PIXELFORMAT_RGBA8888 (1)
surfaceChanged()
Window size: 2352x1008
Device size: 2460x1080
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10 in tid 23670 (SDLThread), pid 16342 (SDLActivity)
---------------------------- PROCESS STARTED (23697) for package org.libsdl.bubuk ----------------------------
onWindowFocusChanged(): true
nativeFocusChanged()
pid: 16342, tid: 23670, name: SDLThread  >>> org.libsdl.bubuk <<<
      #03 pc 000000000002b4f0  /data/app/~~S5iWX26dmo8GbTyGhyvEDA==/org.libsdl.bubuk-Xgt939gBJvkKZ1UMo4W8dQ==/base.apk!libbubuk.so (offset 0xa4000) (SDL_AppQuit+72) (BuildId: 9f5654cd9137c555d25c0da3db1db5290481c8ce)
      #04 pc 0000000000107f44  /data/app/~~S5iWX26dmo8GbTyGhyvEDA==/org.libsdl.bubuk-Xgt939gBJvkKZ1UMo4W8dQ==/base.apk!libSDL3.so (offset 0x124000) (BuildId: bc666b395256f86869656508e018f91db768aab3)
      #05 pc 00000000002c3910  /data/app/~~S5iWX26dmo8GbTyGhyvEDA==/org.libsdl.bubuk-Xgt939gBJvkKZ1UMo4W8dQ==/base.apk!libSDL3.so (offset 0x124000) (SDL_EnterAppMainCallbacks+328) (BuildId: bc666b395256f86869656508e018f91db768aab3)
      #06 pc 000000000002b2ac  /data/app/~~S5iWX26dmo8GbTyGhyvEDA==/org.libsdl.bubuk-Xgt939gBJvkKZ1UMo4W8dQ==/base.apk!libbubuk.so (offset 0xa4000) (SDL_main+60) (BuildId: 9f5654cd9137c555d25c0da3db1db5290481c8ce)
      #07 pc 0000000000260d10  /data/app/~~S5iWX26dmo8GbTyGhyvEDA==/org.libsdl.bubuk-Xgt939gBJvkKZ1UMo4W8dQ==/base.apk!libSDL3.so (offset 0x124000) (BuildId: bc666b395256f86869656508e018f91db768aab3)
      #13 pc 000000000000a6b0  /data/app/~~S5iWX26dmo8GbTyGhyvEDA==/org.libsdl.bubuk-Xgt939gBJvkKZ1UMo4W8dQ==/base.apk (org.libsdl.app.SDLActivity.main+0)
      #18 pc 000000000000d038  /data/app/~~S5iWX26dmo8GbTyGhyvEDA==/org.libsdl.bubuk-Xgt939gBJvkKZ1UMo4W8dQ==/base.apk (org.libsdl.app.SDLMain.run+0)
---------------------------- PROCESS ENDED (16342) for package org.libsdl.bubuk ----------------------------
---------------------------- PROCESS ENDED (23697) for package org.libsdl.bubuk ----------------------------
ApkAssets: Deleting an ApkAssets object '<empty> and /data/app/~~IRO-OqocQL0ZAHeqwapbqg==/org.libsdl.SDL_Helloworld-PLFTbWC6EO_EVdM854qJnA==/base.apk' with 1 weak references
@thatcosmonaut
Copy link
Collaborator

thatcosmonaut commented May 15, 2025

As per the wiki: https://wiki.libsdl.org/SDL3/CategoryGPU#system-requirements

Requires Vulkan 1.0 with the following extensions and device features:
- VK_KHR_swapchain
- VK_KHR_maintenance1
- independentBlend
- imageCubeArray
- depthClamp
- shaderClipDistance
- drawIndirectFirstInstance
- sampleRateShading

We recently merged a PR that allows some of these features to be turned off: #13016

So you could try disabling the features that your device does not support and making sure your app does not use the disabled features.

@slouken slouken added this to the 3.x milestone May 15, 2025
@mhnaufal
Copy link
Author

Thanks! Is there an ETA for when that PR will be included in a Release?

@thatcosmonaut
Copy link
Collaborator

Probably some time next week.

@slouken slouken modified the milestones: 3.x, 3.4.0 May 28, 2025
@slouken
Copy link
Collaborator

slouken commented May 28, 2025

This PR was merged for the 3.4.0 release which currently doesn't have an ETA. We could potentially backport it to 3.2.x if it's important, but we'd need to fix #13138 and http://github.com/libsdl-org/SDL/issues/13139 first.

@thatcosmonaut
Copy link
Collaborator

Ah my mistake, I didn't realize this wasn't backported.

@slouken
Copy link
Collaborator

slouken commented May 28, 2025

Ah my mistake, I didn't realize this wasn't backported.

Do you think it's worthwhile to backport?

@thatcosmonaut
Copy link
Collaborator

I think it's fine to leave it until 3.4 honestly.

@slouken slouken closed this as completed May 29, 2025
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

3 participants