# glReadPixels performance problem @Samsung Galaxy S4 LTE, PowerVR SGX 544 MP

**URL:** <https://forums.imgtec.com/t/glreadpixels-performance-problem-samsung-galaxy-s4-lte-powervr-sgx-544-mp/1932>\
**Category:** PowerVR Insider\
**Created:** [October 30, 2013, 1:54am UTC](https://forums.imgtec.com/t/glreadpixels-performance-problem-samsung-galaxy-s4-lte-powervr-sgx-544-mp/1932 "2013-10-30T01:54:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kwangsu-kim](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/kwangsu-kim/32/205_2.png) [@kwangsu-kim](https://forums.imgtec.com/u/kwangsu-kim)\
**Post date:** [October 30, 2013, 1:54am UTC](https://forums.imgtec.com/t/glreadpixels-performance-problem-samsung-galaxy-s4-lte-powervr-sgx-544-mp/1932/1 "2013-10-30T01:54:19Z")

</div>

Hi,  
  
I make Video Filter Application using OpenGL ES 2.0 Shader at Android  
(Samsung Galaxy S4 LTE, PowerVR SGX 544 MP, Android 4.2.2)  
  
1) glReadPixels is so slow. (than Mali, Adreno)  
  
2) I increased the performance in Mali, Adreno using GraphicBuffer.  
But..  
"new GraphicBuffer" Allocation is not working on PowerVR SGX 544 MP ?  
  
graphicBuffer\_ = new GraphicBuffer(640, 480,  
HAL\_PIXEL\_FORMAT\_RGBA\_8888,  
GraphicBuffer::USAGE\_HW\_TEXTURE |  
GraphicBuffer::USAGE\_HW\_2D |  
GRALLOC\_USAGE\_SW\_READ\_OFTEN |  
GRALLOC\_USAGE\_SW\_WRITE\_OFTEN);  
  
10-29 21:47:08.156: E/IMGSRV(26821): :0: gralloc\_device\_alloc: Unsupported usage bits (0xP...FHWR=0x00000533) for allocation  
10-29 21:47:08.156: W/GraphicBufferAllocator(26821): WOW! gralloc alloc failed, waiting for pending frees!  
10-29 21:47:08.156: E/IMGSRV(26821): :0: gralloc\_device\_alloc: Unsupported usage bits (0xP...FHWR=0x00000533) for allocation  
  
What can I do to get fast the rendered data using OpenGL ES 2.0 from GPU to CPU @PowerVR SGX 544 MP?  
  
ps.  
https://www.imgtec.com/index.php/powervr/instagram-like-computational-photography-powervr-sgx-gpus  
Can I use SDK mentioned in this article?  
Can this SDK solve my problem?  
  
Please Help me.  
Thank you!  
Kwangsu Kim

---

<div class="post-metadata">

**Author:** ![guillemv](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/guillemv/32/177_2.png) [@guillemv](https://forums.imgtec.com/u/guillemv)\
**Post date:** [October 30, 2013, 9:35am UTC](https://forums.imgtec.com/t/glreadpixels-performance-problem-samsung-galaxy-s4-lte-powervr-sgx-544-mp/1932/2 "2013-10-30T09:35:30Z")

</div>

Hi,  
  
  
  
The GraphicBuffer you are trying to allocate seems fine to me. I’ve checked the driver sources and we do support the usage flags you are using.  
  
  
  
Can I get a code sample that reproduces the issue so I can try to work it out from my side? I suspect that the driver may have been modified by Samsung but is too early for me to tell.  
  
  
  
Thanks,  
  
Guillem

---

<div class="post-metadata">

**Author:** ![kwangsu-kim](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/kwangsu-kim/32/205_2.png) [@kwangsu-kim](https://forums.imgtec.com/u/kwangsu-kim)\
**Post date:** [October 31, 2013, 1:19am UTC](https://forums.imgtec.com/t/glreadpixels-performance-problem-samsung-galaxy-s4-lte-powervr-sgx-544-mp/1932/3 "2013-10-31T01:19:02Z")

</div>

Hi,  
  
  
  
I’ll prepare a code sample project soon.  
  
Do you know another way that get the rendered RGBA data using opengl es 2.0?  
  
  
  
Thank you.  
  
Kwangsu

---

<div class="post-metadata">

**Author:** ![kwangsu-kim](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/kwangsu-kim/32/205_2.png) [@kwangsu-kim](https://forums.imgtec.com/u/kwangsu-kim)\
**Post date:** [November 4, 2013, 8:30am UTC](https://forums.imgtec.com/t/glreadpixels-performance-problem-samsung-galaxy-s4-lte-powervr-sgx-544-mp/1932/4 "2013-11-04T08:30:56Z")

</div>

Hi, Guillem  
  
  
  
Galaxy Nexus uses “PowerVR SGX 540” @Android 4.3  
  
When I allocate Graphic Buffer, the same error occurs.  
  
  
  
Thank you  
  
Kwangsu
