Imagination PowerVR SDK Blog

glMapBuffer function not in libGLESv2_PVRTRACE.so

pvrtrace

#1

Hello,



Apologies for raising this as this might already be a known issue.



I’m trying to use PVRTRACE on an un-rooted Android device and so i’m linking my application with your shim libs. My application the GL extension function glMapBufferOES on devices that support it but as this function isn’t in libGLESv2_PVRTRACE.so i get linker errors.



libGLESv2_PVRTRACE.so does contain glMapBufferRange but as this function isn’t available in Android’s libGLESv2.so this results in having to have a different code path if i intend to use PVRTRACE. This isn’t a problem however it could be useful to make sure your shim libs contain the same functions as the Android libs.



Many thanks,

Andy


#2

Hi Andy,



Thanks for reporting this. I’ve filed the issue as BRN46141 in our internal bug tracker so a member of the PVRTrace team can investigate it.



Joe


#3

Thanks for the quick response Joe.



Just to let you know that i can’t actually use the glMapBufferRange function as an alternative as it causes PVRTRACE startup problems.



If i add the following to my code:


extern "C" {<br />
GL_APICALL void* GL_APIENTRY glMapBufferRange( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);<br />
}<br />

```<br />
<br />
glMapBufferRange(GLenum(0), GLintptr(0), GLsizeiptr(0), GLbitfield(0));<br />
<br />
Then PVRTRACE fails to startup:<br />
<br />

12-12 11:32:15.476: I/PVRTrace(I)(32617): Loading host library '/system/lib/libGLESv2.so’

12-12 11:32:15.476: I/PVRTrace(I)(32617): Host library ‘/system/lib/libGLESv2.so’ loaded

12-12 11:32:15.476: I/PVRTrace(I)(32617): Error loading library glReadBuffer

12-12 11:32:15.476: I/PVRTrace(I)(32617): Error loading library glDrawRangeElements

12-12 11:32:15.476: I/PVRTrace(I)(32617): Error loading library glTexImage3D



12-12 11:32:15.484: I/PVRTrace(I)(32617): Error loading library glInvalidateSubFramebuffer

12-12 11:32:15.484: I/PVRTrace(I)(32617): Error loading library glTexStorage2D

12-12 11:32:15.484: I/PVRTrace(I)(32617): Error loading library glTexStorage3D

12-12 11:32:15.484: I/PVRTrace(I)(32617): Error loading library glGetInternalformativ

12-12 11:32:15.484: I/PVRTrace(I)(32617): PVRTrace ES2 - ERROR: failed to load entry points from host library

12-12 11:32:15.484: I/PVRTrace(I)(32617): Please check library paths in pvrtrace.cfg


#4

Hi Andy,



glMapBufferRange is not supported by PVRTrace. This is because it relies on an extension which is not implemented in our reference driver (GL_EXT_map_buffer_range).



For more information about the OpenGL ES extensions supported in our reference graphics driver, please refer to the “PowerVR Supported Extensions - OpenGL ES and EGL” document in our SDK.



Thanks,

Joe


#5

Hi Andy,



Can you clarify why you’ve rejected my previous post? glMapBufferRange is core functionality in OpenGL ES 3.0, but we have no plans to expose it in our OpenGL ES 2.0 driver as an extension.



Thanks,

Joe