2

I'm writing a 3d application for the Playbook, which has a PowerVR SGX 540. I noticed that if I stuff enough data in the VBO through opengl, I can cause the device to crash (not just the application, but the entire device, requiring a hard reboot). To cause the crash, I sent data for a model with ~300k triangles and ~150k vertices. I sent normal data for the vertices as well.

I found that the problem doesn't occur if I send less data (tried another model with half the triangles and vertices). Also, the issue doesn't occur if I use vertex arrays (though it's incredibly slow).

I'd like to know:

  • Is what I'm seeing a common result for mobile hardware? That is, is a 300k tri model with 150k vertices and normals overkill?

  • Can I check how much memory I have available for VBO usage outside of testing a bunch of different model sizes (it takes a good five minutes to recover the device from a crash)?

  • Could anything else be causing this issue? I've provided some additional information:

I'm using Qt for my GUI, and drawing the 3d scene to an FBO before it's painted to the GUI (I haven't checked if redoing all this without a UI by creating an EGL window and drawing to that recreates the problem yet -- that'll take awhile).

To verify it wasn't me using OpenGL poorly, I tried both using raw OpenGL calls for all the 3d stuff, and also doing everything with OpenSceneGraph. Both methods fail in the exact same way (VBO works with less data, vertex arrays work, increased VBO data causes a crash).

The program works fine on my desktop. Unfortunately, I don't have any other mobile devices I can test my application out on.

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
Prismatic
  • 3,338
  • 5
  • 36
  • 59
  • Make sure the drivers are up to date. Nothing your application can do should be able to crash the entire device, at worst it should cause your software to fail. – GManNickG Jul 02 '12 at 04:02
  • Agreed that the device crashing is a horribad thing (somewhat proud I managed to do it on a device that runs 'sandboxed' apps tbh ;)), but this is a Playbook, not a PC so I can't really pick and choose drivers. I'm already running the latest stable OS. The only choice I have is a workaround. – Prismatic Jul 02 '12 at 04:09
  • Ah, right. Well hopefully there's a straightforward solution. – GManNickG Jul 02 '12 at 04:21
  • What about splitting the model data in parts, reducing the effects of fragmentation? – Stefan Hanke Jul 03 '12 at 06:13

1 Answers1

0

OpenGL ES only supports unsigned short (16 bit) as data type for indices, so if you're using an index array, you're over that limit.

foijord
  • 76
  • 4