Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(552)

Issue 4449064: Implemented semantics for eglDestroySurface when surface is current on thread. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years ago by apatrick1
Modified:
13 years ago
Reviewers:
dgkoch, nicolas
CC:
angleproject-review_googlegroups.com
Base URL:
http://angleproject.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Implemented semantics for eglDestroySurface when surface is current on thread. The spec has this to say. " All resources associated with surface which were allocated by EGL are marked for deletion as soon as possible. If surface is current to any thread (see section 3.7.3), resources are not actually released while the surface remains current. Future references to surface remain valid only so long as it is current; it will be destroyed, and all future references to it will become invalid, as soon as any otherwise valid eglMakeCurrent call is made from the thread it is bound to." Committed: http://code.google.com/p/angleproject/source/detail?r=632

Patch Set 1 : '' #

Patch Set 2 : '' #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -49 lines) Patch
M src/libEGL/Display.cpp View 1 2 chunks +10 lines, -3 lines 0 comments Download
M src/libEGL/Surface.h View 2 chunks +4 lines, -0 lines 0 comments Download
M src/libEGL/Surface.cpp View 3 chunks +13 lines, -0 lines 0 comments Download
M src/libEGL/libEGL.cpp View 1 32 chunks +63 lines, -46 lines 6 comments Download

Messages

Total messages: 7
apatrick1
Daniel. Please review. Thanks, Al
13 years ago (2011-04-26 23:29:59 UTC) #1
dgkoch
Hi Al, You need to use the EGL 1.4 spec, not the EGL 1.3 spec. ...
13 years ago (2011-04-28 03:36:24 UTC) #2
apatrick1
I think if I do as you suggest then the current surface will not be ...
13 years ago (2011-04-28 19:53:36 UTC) #3
dgkoch
http://codereview.appspot.com/4449064/diff/5001/src/libEGL/libEGL.cpp File src/libEGL/libEGL.cpp (right): http://codereview.appspot.com/4449064/diff/5001/src/libEGL/libEGL.cpp#newcode552 src/libEGL/libEGL.cpp:552: if (surface == EGL_NO_SURFACE) the EGL_NO_SURFACE check should be ...
13 years ago (2011-04-29 03:56:01 UTC) #4
dgkoch
On 2011/04/28 19:53:36, apatrick1 wrote: > I think if I do as you suggest then ...
13 years ago (2011-04-29 03:57:40 UTC) #5
apatrick1
> > Also, am I being crazy or is there some handle validation missing in ...
13 years ago (2011-04-29 20:44:07 UTC) #6
nicolas
13 years ago (2011-05-18 15:07:14 UTC) #7
It looks like this caused a regression. The PowerVR sample applications call
eglTerminate() when the device is lost, and then it hangs (losing the device can
happen either when running on Windows XP or when ENABLE_D3D9EX is set to 0, and
you lock/unlock the screen).

What happens is that Display::terminate() calls destroySurface() on every
surface in the mSurfaceSet, but destroySurface() does not actually remove the
surface from the set if it is the current draw or read surface, but only flags
it for a pending destroy. And so it keeps looping.

Since eglTerminate() should destroy everything anyhow, we could either add a
'terminate' parameter to destroySurface() to really delete/erase it, or
alternatively call setCurrentDrawSurface(EGL_NO_SURFACE) and
setCurrentReadSurface(EGL_NO_SURFACE) at the top of Display::terminate().
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b