PDA

View Full Version : PVRSRVAllocDeviceMem: Error 3 returned



suleac
07-06-2015, 09:53 AM
Hi everyone, I'm getting the error from title on a Samsung S4 while drawing a small vertex buffer. So far I wasn't able to identify anything special on that buffer (it's a small buffer, 16 vertices, 8 triangles as list, indexed, stride 40, position, normal and two sets of UV), same vertex and fragment shaders are used on other buffers, two textures are used, a 4x4 and a 256x256, both etc1, full mipmap chains.

There are some freezes when the error occurs (about half a second or so), also the same apk does not have the issue on any other device than Samsung S4 I9500.

Does anyone knows what that error means, or what might trigger it?

Thanks in advance,
/C0mas

Dark Photon
07-06-2015, 07:20 PM
Hi everyone, I'm getting the error ("PVRSRVAllocDeviceMem: Error 3 returned") from title on a Samsung S4 ... the same apk does not have the issue on any other device than Samsung S4 I9500.

Does anyone knows what that error means, or what might trigger it?

Are you getting any other errors on adjacent lines? For instance:


PVR:(Error): glBufferData: Can't allocate memory for object [786, /bufobj.c]

According to:

* https://en.wikipedia.org/wiki/Samsung_Galaxy_S4

the GT-I9500 model is the only S4 with a Imagination Tech PowerVR GPU (a PowerVR SGX 544MP3 specifically). The PVR in the error message likely refers to "PowerVR", which is the GPU series. And if you search, you find that this symbol/error is probably from the Android PowerVR GPU driver, possibly from the file bridged_pvr_glue.c.

Best guess: you're either running out of GPU memory, or you're providing bad arguments to your GL calls.

suleac
07-07-2015, 05:44 AM
Are you getting any other errors on adjacent lines? For instance:


PVR:(Error): glBufferData: Can't allocate memory for object [786, /bufobj.c]

According to:

* https://en.wikipedia.org/wiki/Samsung_Galaxy_S4

the GT-I9500 model is the only S4 with a Imagination Tech PowerVR GPU (a PowerVR SGX 544MP3 specifically). The PVR in the error message likely refers to "PowerVR", which is the GPU series. And if you search, you find that this symbol/error is probably from the Android PowerVR GPU driver, possibly from the file bridged_pvr_glue.c.

Best guess: you're either running out of GPU memory, or you're providing bad arguments to your GL calls.

Hi, I just checked and I don't have
PVR:(Error): glBufferData: Can't allocate memory for object [786, /bufobj.c] reported anywhere.
Also, I have no error reported by glGetError.

Any idea how to track it?

Dark Photon
07-07-2015, 06:33 AM
Any idea how to track it?

First step would be to websearch for your error message and see if you can find any tips that way. You've probably already done that as have I.

Next: I'd post a question to the Imagination Technologies' PowerVR Insider Graphics forum (http://community.imgtec.com/forums/cat/powervr-insider-graphics/). They'll likely be able to give you some tips.

Do you have a way to report how much GPU memory is available on your device? That may provide clues.

Do you have any metrics in your application that track estimated GPU memory usage (textures, buffer objects, etc.). You can compare that against how much GPU memory you're allowed to use.

Failing that, I would try running your application on a Win32 GLES emulator (e.g. ImgTech's PVRVFrame). That may help point out usage errors in your application. You can easily run memory debugging tools such as Dr. Memory on this platform as well to look for rogue pointers or out-of-bounds memory reads.

Running it on a PC emulator will give you a better idea of how much GPU memory you're using. The primary exception being that some of the compressed texture formats available on mobile GPUs are often emulated on desktop GPUs.

suleac
07-08-2015, 01:25 AM
First step would be to websearch for your error message and see if you can find any tips that way. You've probably already done that as have I.

Next: I'd post a question to the Imagination Technologies' . They'll likely be able to give you some tips.

Do you have a way to report how much GPU memory is available on your device? That may provide clues.

Do you have any metrics in your application that track estimated GPU memory usage (textures, buffer objects, etc.). You can compare that against how much GPU memory you're allowed to use.

Failing that, I would try running your application on a Win32 GLES emulator (e.g. ImgTech's PVRVFrame). That may help point out usage errors in your application. You can easily run memory debugging tools such as Dr. Memory on this platform as well to look for rogue pointers or out-of-bounds memory reads.

Running it on a PC emulator will give you a better idea of how much GPU memory you're using. The primary exception being that some of the compressed texture formats available on mobile GPUs are often emulated on desktop GPUs.

Yes :-) nothing on the web ... at least nothing helpful, but a good thing that it happened to other people as well.

About memory tracking, yes, I have some tools to estimate what I allocate (GPU wise) also I have used some adreno tools (with a different device) to see what the driver is reporting as allocated and I'm not close to the limit. Also, to be 200% it's not out of GPU memory, I have removed most of the rest of the geometry and textures and left only the problematic ones (really small 640 bytes vertex buffer, 48 bytes index buffer, 4x4 pvr and 128x128 pvr textures).
I will try the Dr. Memory ... maybe it shows something interesting.

I can run it on PC emulator (with PowerVR OpenGL ES drivers) but the issue is not occurring.

:-)