Imagination PowerVR SDK Blog

PVRTrace problems handling saving/restoring context when rendering to an offline texture

pvrtrace

#1

At least that is what I think is going on.



I recently added some code where I render to a texture in order to create billboard imposters of a complex 3d model. As part of that I create a new frame buffer and depth buffer bind them and a texture to render to and when I’m done I restore the default frame buffer. The problem is that when I load the pvrt up the image analysis window stops working.



The issue is easy for me to reproduce, I have a capture that shows the issue. The difficult part is getting error messages out of PVRTrace. Depending on order of operations I can get one of two sets of error messages in the output window. (see below)



My questions are: Am I doing something wrong? If so how can I fix the issue?





Opening Trace file: D:Temppvrtcom.novasapiens.Bacchus.bad.pvrt

Trace file open : D:Temppvrtcom.novasapiens.Bacchus.bad.pvrt

Processing File:

TrackRenderState: 1

FullProcessing: 1

fileSize:33337407

Processing File… Done

TraceInfo


Trace version: 3.3@2850432
Format file version: 19
Platform: AndroidLinux 3.0.101-gd859f62 #1 PREEMPT Tue Mar 18 21:56:41 PDT 2014
Recorded data: 1
Recorded FB: 1
Number of frames: 6
Number of calls: 1260
Thread IDs
1: 20641
EGL Windows Surface ID
1: 1386979384
Analyzing Image: Render Scene F(1)

{
Error Code: 0x300d (EGL_BAD_SURFACE), Call= eglMakeCurrent
Play F:1 T:20641 C:94 eglMakeCurrent (EGLDisplay(1) , EGLSurface(1386979384) , EGLSurface(1386979384) , EGLContext(1384700392) , ) => EGL_TRUE :: Error: EGL_SUCCESS
}
{
Error Code: 0x3006 (EGL_BAD_CONTEXT), Call= eglMakeCurrent
Play F:1 T:20641 C:94 eglMakeCurrent (EGLDisplay(1) , EGLSurface(1386979384) , EGLSurface(1386979384) , EGLContext(1384700392) , ) => EGL_TRUE :: Error: EGL_SUCCESS
}
{
Error Code: 0x300d (EGL_BAD_SURFACE), Call= eglMakeCurrent
Play F:1 T:20641 C:94 eglMakeCurrent (EGLDisplay(1) , EGLSurface(1386979384) , EGLSurface(1386979384) , EGLContext(1384700392) , ) => EGL_TRUE :: Error: EGL_SUCCESS
}
{
Error Code: 0x300d (EGL_BAD_SURFACE), Call= eglMakeCurrent
Play F:1 T:20641 C:94 eglMakeCurrent (EGLDisplay(1) , EGLSurface(1386979384) , EGLSurface(1386979384) , EGLContext(1384700392) , ) => EGL_TRUE :: Error: EGL_SUCCESS
}
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
Error: Failed to compile shader 0 (recorded value 70001). 'lÖÿØÖÖÿ6?ØÖ'
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
Error: Failed to compile shader 0 (recorded value 140002). 'ÈÖÿØÖÖÿR?ØÖ'
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
Error: Failed to link program 0 (recorded value 210003). 'BÖÿØÖÖÿè?ØÖ'
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
(Error) There is no context bound to the current thread.
Analyzing Image: Render Scene F(1)....Done
Formating Final Image
ImageAnalysis Image: 800x480






Opening Trace file: D:Temppvrtcom.novasapiens.Bacchus.pvrt
Trace file open : D:Temppvrtcom.novasapiens.Bacchus.pvrt
Processing File:
TrackRenderState: 1
FullProcessing: 1
fileSize:33337407
Processing File... Done
TraceInfo
Trace version: 3.3@2850432
Format file version: 19
Platform: AndroidLinux 3.0.101-gd859f62 #1 PREEMPT Tue Mar 18 21:56:41 PDT 2014
Recorded data: 1
Recorded FB: 1
Number of frames: 6
Number of calls: 1260
Thread IDs
1: 20641
EGL Windows Surface ID
1: 1386979384
Analyzing Image: Render Scene F(1)
Could not determine equivalent EGLConfig: Trying bare config. requestedAPI: 4

Bare config not valid, getting any available configs...

Could not find any valid EGLConfigs. Please try a different playback platform.

Could not determine equivalent EGLConfig: Trying bare config. requestedAPI: 4

Bare config not valid, getting any available configs...

Could not find any valid EGLConfigs. Please try a different playback platform.

{
Error Code: 0x3003 (EGL_BAD_ALLOC), Call= eglMakeCurrent
Play F:1 T:20641 C:94 eglMakeCurrent (EGLDisplay(1) , EGLSurface(1386979384) , EGLSurface(1386979384) , EGLContext(1384700392) , ) => EGL_TRUE :: Error: EGL_SUCCESS
}
Error in MakeCurrent_Helper
Error: Skipping playback of call 95 ('glGetString') as there is no current context bound
RenderState Tracker: Error updating RS. Context not defined. Image Analysis will be disabled
Error: Skipping playback of call 96 ('glGetString') as there is no current context bound
Error: Skipping playback of call 97 ('glGetString') as there is no current context bound
Error: Skipping playback of call 98 ('glGetString') as there is no current context bound
Error: Skipping playback of call 99 ('glGetString') as there is no current context bound
Error: Skipping playback of call 100 ('glGetString') as there is no current context bound
Error: Skipping playback of call 101 ('glGetString') as there is no current context bound
Error: Skipping playback of call 102 ('glEnable') as there is no current context bound
Error: Skipping playback of call 103 ('glCullFace') as there is no current context bound
Error: Skipping playback of call 104 ('glFrontFace') as there is no current context bound
Error: Skipping playback of call 105 ('glClearColor') as there is no current context bound
Error: Skipping playback of call 106 ('glClearDepthf') as there is no current context bound
Error: Skipping playback of call 107 ('glGenTextures') as there is no current context bound
Error: Skipping playback of call 108 ('glBindTexture') as there is no current context bound
Error: Skipping playback of call 109 ('glTexParameteri') as there is no current context bound
Error: Skipping playback of call 110 ('glTexParameteri') as there is no current context bound
Error: Skipping playback of call 111 ('glTexImage2D') as there is no current context bound
Error: Skipping playback of call 112 ('glBindTexture') as there is no current context bound
Error: Skipping playback of call 113 ('glGenBuffers') as there is no current context bound
Error: Skipping playback of call 114 ('glBindBuffer') as there is no current context bound
Error: Skipping playback of call 115 ('glBufferData') as there is no current context bound
Error: Skipping playback of call 116 ('glGenBuffers') as there is no current context bound
Error: Skipping playback of call 117 ('glBindBuffer') as there is no current context bound
Error: Skipping playback of call 118 ('glBufferData') as there is no current context bound
Error: Skipping playback of call 119 ('glCreateShader') as there is no current context bound
Error: Skipping playback of call 120 ('glShaderSource') as there is no current context bound
Error: Skipping playback of call 121 ('glCompileShader') as there is no current context bound
Error: Skipping playback of call 122 ('glGetShaderiv') as there is no current context bound
Error: Skipping playback of call 123 ('glCreateShader') as there is no current context bound
Error: Skipping playback of call 124 ('glShaderSource') as there is no current context bound
Error: Skipping playback of call 125 ('glCompileShader') as there is no current context bound
Error: Skipping playback of call 126 ('glGetShaderiv') as there is no current context bound
Error: Skipping playback of call 127 ('glCreateProgram') as there is no current context bound
Error: Skipping playback of call 128 ('glAttachShader') as there is no current context bound
Error: Skipping playback of call 129 ('glAttachShader') as there is no current context bound
Error: Skipping playback of call 130 ('glLinkProgram') as there is no current context bound
Error: Skipping playback of call 131 ('glUseProgram') as there is no current context bound
Error: Skipping playback of call 132 ('glGetUniformLocation') as there is no current context bound
Error: Skipping playback of call 133 ('glGetUniformLocation') as there is no current context bound
Error: Skipping playback of call 134 ('glGetAttribLocation') as there is no current context bound
Error: Skipping playback of call 135 ('glGetAttribLocation') as there is no current context bound
Error: Skipping playback of call 136 ('glBlendFunc') as there is no current context bound
Error: Skipping playback of call 137 ('glEnable') as there is no current context bound
Error: Skipping playback of call 138 ('glEnable') as there is no current context bound
Error: Skipping playback of call 139 ('glDepthFunc') as there is no current context bound
Error: Skipping playback of call 140 ('glDepthMask') as there is no current context bound
Error: Skipping playback of call 141 ('glActiveTexture') as there is no current context bound
Error: Skipping playback of call 142 ('glBindTexture') as there is no current context bound
Error: Skipping playback of call 143 ('glUniform1i') as there is no current context bound
Error: Skipping playback of call 144 ('glBindBuffer') as there is no current context bound
Error: Skipping playback of call 145 ('glEnableVertexAttribArray') as there is no current context bound
Error: Skipping playback of call 146 ('glVertexAttribPointer') as there is no current context bound
Error: Skipping playback of call 147 ('glBindBuffer') as there is no current context bound
Error: Skipping playback of call 148 ('glEnableVertexAttribArray') as there is no current context bound
Error: Skipping playback of call 149 ('glVertexAttribPointer') as there is no current context bound
Error: Skipping playback of call 150 ('glUniformMatrix4fv') as there is no current context bound
Analyzing Image: Render Scene F(1)....Done
Formating Final Image
ImageAnalysis Image: 800x480




#2

Hi,



It seems like the EGL config selection process of PVRTraceGUI’s Image Analysis is failing. Can you share you PVRT recording with us so we can investigate the issue?



If you would prefer to share the file with us confidentially, you can share a link with us through our confidential ticketing system: https://pvrsupport.imgtec.com/



Thanks,

Joe