Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
A
angle
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • angle
  • Repository

Switch branch/tag
  • angle
  • src
  • libEGL
  • Surface.cpp
Find file
BlameHistoryPermalink
  • apatrick@chromium.org's avatar
    Fix crash after reseting device. · 9f0d91d1
    apatrick@chromium.org authored Mar 13, 2013
    After calling Reset in testDeviceLost to acknowledge a display mode change, D3D sometimes crashes on the next Present call on an existing swap chain. I couldn't get it to happen with nVidia. The stack looks like this with the debug runtime:
    
     	ntdll.dll!_ZwRaiseException@12()  + 0x12 bytes	
     	ntdll.dll!_ZwRaiseException@12()  + 0x12 bytes	
     	d3d9d.dll!__DDAssert()  + 0x1ca bytes	
     	d3d9d.dll!CSwapChain::PresentMain()  + 0xf52 bytes	
     	d3d9d.dll!CSwapChain::Present()  + 0x24 bytes	
     	libEGL.dll!egl::Surface::swapRect(int x, int y, int width, int height)  Line 458 + 0x2a bytes	C++
    >	libEGL.dll!egl::Surface::swap()  Line 605	C++
     	libEGL.dll!eglSwapBuffers(void * dpy, void * surface)  Line 1063 + 0x8 bytes	C++
     	gl_wrapper.dll!gfx::EGLApiBase::eglSwapBuffersFn(void * dpy, void * surface)  Line 813 + 0x18 bytes	C++
     	gl_wrapper.dll!gfx::NativeViewGLSurfaceEGL::SwapBuffers()  Line 363 + 0x35 bytes	C++
     	gl_wrapper.dll!gfx::GLSurfaceAdapter::SwapBuffers()  Line 201 + 0x1d bytes	C++
     	content.dll!content::PassThroughImageTransportSurface::SwapBuffers()  Line 216 + 0xb bytes	C++
    
    The error is "BitBlt or StretchBlt failed in Present".
    
    With the release runtime either Present continually fails with E_INVALIDARG or, less commonly, crashes.
    
    It seems that by recreating all the swap chains after reset, it recovers. I didn't call resetSwapChain because there is no need to recreate all the other surfaces.
    
    As far as I know, this should not be necessary with WDDM.
    Review URL: https://codereview.appspot.com/7567045
    
    git-svn-id: https://angleproject.googlecode.com/svn/trunk@1993 736b8ea6-26fd-11df-bfd4-992fa37f6226
    9f0d91d1
Surface.cpp 19.1 KB
EditWeb IDE
×

Replace Surface.cpp

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.