• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

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

Explorer ,
Mar 08, 2018 Mar 08, 2018

Copy link to clipboard

Copied

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.

TOPICS
Development

Views

830

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Mar 08, 2018 Mar 08, 2018

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

...

Votes

Translate

Translate
Advocate ,
Mar 08, 2018 Mar 08, 2018

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 08, 2018 Mar 08, 2018

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 08, 2018 Mar 08, 2018

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 08, 2018 Mar 08, 2018

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines