Forums - Adreno 305 under Windows Phone 8

9 posts / 0 new
Last post
Adreno 305 under Windows Phone 8
RelativeGames
Profile picture
Join Date: 16 Apr 13
Posts: 40
Posted: Tue, 2013-04-16 22:44

 

Ok, first I have to say that I was initially impressed by the Adreno GPUs under OpenGL ES. It supports 32 bit indices, depth textures for shadow mapping, and usually provides a high performance.

 

But I have no idea what happened when you made the DirectX 11 Level 9.3 drivers for Windows Phone 8. I recently bought an HTC 8S because my WP8 app failed submission repeatedly while working flawlessly in the X86 emulator. The problem however had something to do with a namespace rename. Apparently the device is a bit more picky about the number of namespaces allowed in an app.

Ok, so to move on, I have a benchmark app available under Android ( RE3 Benchmark ), iOS ( Relative Benchmark  ) and Windows 8 ( Relative Benchmark ). GL Shader compilation is really fast. It compiles ~50 shaders in under 3 seconds. On DirectX, it takes a lot more time to just call the Create*Shader functions (the HTC 8s takes about 5 times more time to load all shaders, compared to an Xperia Play and GL), and then when the first frame of rendering comes, there is something definetely wrong. It takes 5 MINUTES to render 1 frame ! Sure, It's 100 drawcalls and ~300 000 polygons with ~100 distinct shaders (Afterwards it runs with 14-18 FPS ), but most of the time when I debug break the process I see it is doing allocations in a qcacompiler dll. How could it do so many allocations that a single frame would take so much to "warm-up" ?

Sample stack :

     NTDLL.DLL!RtlCompareMemoryUlong() + 38 bytes    Unknown
     NTDLL.DLL!RtlAllocateHeap() + 5364 bytes    Unknown
     NTDLL.DLL!RtlAllocateHeap() + 254 bytes    Unknown
     NTDLL.DLL!RtlTraceDatabaseDestroy() + 3718 bytes    Unknown
     NTDLL.DLL!RtlAllocateHeap() + 3416 bytes    Unknown
     NTDLL.DLL!RtlAllocateHeap() + 254 bytes    Unknown
     Msvcr110.dll!malloc(unsigned int size=768) Line 91    C
     Msvcr110.dll!operator new(unsigned int size=768) Line 59    C++
     qca3xxcompiler8930.dll!73417148()    Unknown
     qca3xxcompiler8930.dll!7340f7c6()    Unknown
     qca3xxcompiler8930.dll!7340ff36()    Unknown
     qca3xxcompiler8930.dll!733163a0()    Unknown
     qca3xxcompiler8930.dll!731266da()    Unknown
     qca3xxcompiler8930.dll!73125de8()    Unknown
     qca3xxcompiler8930.dll!7303c19a()    Unknown
     qca3xxcompiler8930.dll!7301f47e()    Unknown
     qca3xxcompiler8930.dll!72fb224a()    Unknown
     qca3xxcompiler8930.dll!72f44f24()    Unknown
     qca3xxcompiler8930.dll!SCQueryInterface() + 12104 bytes    Unknown
     qca3xxcompiler8930.dll!72f4114a()    Unknown
     qcdx9um8930.dll!7374c2e6()    Unknown
     qcdx9um8930.dll!7374c042()    Unknown
     qcdx9um8930.dll!73755458()    Unknown
     qcdx9um8930.dll!73761390()    Unknown
     qcdx9um8930.dll!7374f1dc()    Unknown
     qcdx9um8930.dll!7370eed4()    Unknown
     qcdx9um8930.dll!737127bc()    Unknown
     qcdx9um8930.dll!73727dba()    Unknown
     D3D10LEVEL9.DLL!RetrieveFilteredOpenAdapter() + 10464 bytes    Unknown
     D3D10LEVEL9.DLL!OpenAdapter10_2() + 14400 bytes    Unknown
     D3D11.DLL!73893bb4()    Unknown
     D3D11.DLL!738d74c2()    Unknown
     D3D11.DLL!738d7218()    Unknown
     D3D11.DLL!7388f128()    Unknown
     d3d11_1SDKLayers.dll!6dc6a05e()    Unknown
 

Then I tried to work around this by loading all my resources in a separate thread BUT! Whenever I load shaders in a parallel thread, the current rendering on the main/UI thread is being stopped. I have a progress bar animation that literally stops for every couple of shaders that I load (and this take ~15 seconds to load all ~50 shaders). This is nothing though compared to the fact that I can't make the "warm-up" happen in a deferred context. Rendering on the deffered context just creates the render list, the warm-up only happens in the immediate context. If you know it takes a long time to warm-up I think you should let developers make the warm-up in a deferred context. I have tried though to render from a different thread in the immediate context and this is a 50-50 situation. It sometimes works, but other times results in a hang in the driver, which is undetectable even by the OS (nothing happened after it hanged, I had to stop it using the debugger).

What happened to DirectX 11 resource creation which was supposed to be context independent ? it looks to me that it's actually a GL driver under the hood or that the DirectX driver is extremely poor.

 

UPDATE : After an update I did to the phone today, I now get this more often :

D3D11: Removing Device.
D3D11 WARNING: ID3D11Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_DRIVER_INTERNAL_ERROR: There is strong evidence that the driver has performed an undefined operation; but it may be because the application performed an illegal or undefined operation to begin with.). [ EXECUTION WARNING #379: DEVICE_REMOVAL_PROCESS_POSSIBLY_AT_FAULT]

Related Tags: 

  • Up0
  • Down0
RelativeGames
Profile picture
Join Date: 16 Apr 13
Posts: 40
Posted: Wed, 2013-04-17 01:50

 

Ok, so a couple hours later I'm noticing that the high times spent in loading and rendering are apparently due to the debugger (on both debug and release builds). If I run the app without the debugger attached I get way better times. The first rendered frame is now 4 seconds, wow so, so fast ! *sarcasm*

However, now my app is crashing more often, like after 10 seconds of rendering at 14 FPS it gets a "removed device" issue while I don't think it goes past 150MB of space. I only use ~50 and I can't see how I could get to 150 from only a 23MB XAP. (given compressed textures & stuff).

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 117
Posted: Wed, 2013-05-01 06:57

As per our development schedules, we continuously evolve our driver and compiler source code for our products and in some cases (very likely in this one) it could make a difference in the user experience that you are having. But if you could share your app with us, we’ll be glad to evaluate in the newer driver and share our results.

  • Up0
  • Down0
RelativeGames
Profile picture
Join Date: 16 Apr 13
Posts: 40
Posted: Thu, 2013-05-02 09:58

Seems like I can't send PMs on this forum, so do you have an email address where I can send an XAP ? The app will probably go live in about a week (I had to put the flag for requiring 300MB though, hope it doesn't crash on other devices).

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 117
Posted: Thu, 2013-05-02 10:45

You can put on a dropbox for us to download.

 

Alternatively you can send to me (mhfeldma@qti.qualcomm.com) at:

http://me2u.qualcomm.com

 

 

  • Up0
  • Down0
RelativeGames
Profile picture
Join Date: 16 Apr 13
Posts: 40
Posted: Mon, 2013-05-06 07:43

I've sent it directly to that e-mail address, not sure if it arrived though, can you confirm that ?

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 117
Posted: Mon, 2013-05-06 10:43

Confirmed..we're in the process of taking a closer look...

 

 

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 117
Posted: Thu, 2013-05-09 06:50

We're not able to reproduce on our current driver.  Can you tell us the OS and firmware of the device you're using (it should read something like: 1030.xxxx.xxxx)?

 

thanks...

  • Up0
  • Down0
RelativeGames
Profile picture
Join Date: 16 Apr 13
Posts: 40
Posted: Thu, 2013-05-09 15:48

The app is now live here btw : Relative Benchmark | Windows Phone Apps+Games Store (United States) but it won't be available for 512 MB ram devices due to the issues stated in the first/second post.

 

The driver is

OS version 8.0.10211.204

Firmware revision number :1030.54.20001.70

 

And I've updated the phone when posting this so it's the latest version. I just checked for an update and there's none. I should note that my carrier's logo appears when booting ( Orange Romania ) so not sure how up to date this driver is compared to other builds.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.