Skip to main content
ExpendibleMan
Inspiring
March 8, 2018
Answered

GPU rendering works in Flash Player 26, but not Desktop AIR 26 or 28.0.0.125

  • March 8, 2018
  • 1 reply
  • 1249 views

This is driving me bonkers, but I can't get hardware acceleration working in my AIR application, but if I publish it as a Flash application it works great.

I am using Starling 2.3 in my application and it runs like butter when targeting Flash Player, not so much in the needed desktop AIR target.

I'm running this on a Windows 10 64-bit machine with a Nvidia GTX 960. It fails to use hardware acceleration both in ADL and when published.

Things I've tried:

  • Set renderMode to direct
  • Set gpuPreference to discrete (and published, not just ADL)
  • Set HW accelerated in Chrome, FireFox and IE (was already set)
  • StageVideoAvailabilityEvent.driver gives me "GDI,NVIDIA GeForce GTX 960,"
  • Waved my hands in circles and recited the arcane runes (mostly swear words)

I'm hoping this is just me missing something super obvious.

This topic has been closed for replies.
Correct answer ExpendibleMan

Yeah but that's only Starling falling back automatically to software mode if you let it do it. You have the option to force Starling to not fall back to software mode then you might get some useful information if Starling completely fails to render or maybe it will render just fine. You can already tell your system works just fine in direct mode so it's very likely the Starling autodetect GPU/Software system has a bug and Starling can run on GPU just fine if you force it.


I figured it out!

If the Window Style is set to Custom Chrome (transparent) and you request a context of a stage3D you get:

Error #2044: Unhandled ErrorEvent:. text=Error #3702: Context3D not available.

This was happening in an empty AIR project where all I did was request the Context3D using:

stage.stage3Ds[0].requestContext3D( Context3DRenderMode.AUTO, Context3DProfile.STANDARD_EXTENDED );

But Custom Chrome (opaque) and System Chrome work fine.

So I was sort of right in assuming that it was a stupid setting that I was screwing up. I'm sure this is documented somewhere, but my Google-fu failed me.

1 reply

Inspiring
March 8, 2018

"it doesn't work" is not much to go on, what exactly happens? Nothing shows, Errors?, ect ...?

ExpendibleMan
Inspiring
March 8, 2018

Well my game runs without errors, but I can't get it to use the hardware acceleration in AIR.

Starling reports: [Starling] Context ready. Display Driver: Software Hw_disabled=unavailable (Baseline Constrained)

and nothing I do seems to change it.

If I run it in with Flash Player as the target I get: [Starling] Context ready. Display Driver: DirectX11 (Standard Extended)

So rather than running on the GPU it's using CPU rendering despite the Flash Player target working fine (while breaking all of my file management).

I'm hoping that there's just a configuration option that I'm missing when publishing the AIR captive runtime or using the ADL.

Inspiring
March 8, 2018

Yeah but that's only Starling falling back automatically to software mode if you let it do it. You have the option to force Starling to not fall back to software mode then you might get some useful information if Starling completely fails to render or maybe it will render just fine. You can already tell your system works just fine in direct mode so it's very likely the Starling autodetect GPU/Software system has a bug and Starling can run on GPU just fine if you force it.