src/libEGL/Surface.cpp


Log

Author Commit Date CI Message
jacob.benoit.1@gmail.com bde15998 2011-08-24T15:05:37 Issue 199: invalid assertion in Surface.cpp makes debug browser crash on conformance test drawingbuffer-static-canvas-test.html This patch fixes assertions that were wrongly asserting that only OOM errors could occur when allocating a D3D texture/surface. The drawingbuffer-static-canvas-test.html test tries a 32768x150 size, and that fails because of the too large width without being OOM. git-svn-id: https://angleproject.googlecode.com/svn/trunk@739 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 58f76fe0 2011-06-21T14:21:07 Fix 64-bit support. Bug=55 TRAC #15606 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@697 736b8ea6-26fd-11df-bfd4-992fa37f6226
twiz@chromium.org d1c32963 2011-06-10T22:20:29 Correct usage of GetVersion() windows calls. Review: http://codereview.appspot.com/4579049 git-svn-id: https://angleproject.googlecode.com/svn/trunk@688 736b8ea6-26fd-11df-bfd4-992fa37f6226
nduca@chromium.org db5d5f66 2011-06-08T23:50:48 Fix crlf newlines in surface.cpp TBR=apatrick@chromium.org git-svn-id: https://angleproject.googlecode.com/svn/trunk@686 736b8ea6-26fd-11df-bfd4-992fa37f6226
nduca@chromium.org 82e7e9d0 2011-06-08T18:43:16 Recommit r668, which got undone accidentally by r673. Review URL: http://codereview.appspot.com/4589043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@683 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 837dd9ab 2011-06-07T00:40:33 Do not set a WNDPROC on a window created by another thread. It turns out SetWindowLong succeeds for other threads in the same process but we do not want the WNDPROC to be called from threads other than the thread on which EGL is running on. This was one of the reasons --in-process-gpu was not working with ANGLE in Chrome. Review URL: http://codereview.appspot.com/4576045 git-svn-id: https://angleproject.googlecode.com/svn/trunk@677 736b8ea6-26fd-11df-bfd4-992fa37f6226
nduca@chromium.org 79169b5a 2011-06-06T19:01:08 Use DwmAPI, if available, to minimize queueing of presents. Review URL: http://codereview.appspot.com/4559065 git-svn-id: https://angleproject.googlecode.com/svn/trunk@673 736b8ea6-26fd-11df-bfd4-992fa37f6226
baustin@google.com 8106e870 2011-06-03T22:36:47 Handle additional lost device error codes that may be returned when using IDirect3DDevice9Ex. Review URL: http://codereview.appspot.com/4529113 git-svn-id: https://angleproject.googlecode.com/svn/trunk@671 736b8ea6-26fd-11df-bfd4-992fa37f6226
nduca@chromium.org 585b3d0e 2011-06-03T01:48:11 Disable use of FlipEx for problematic use cases. It seems that DWM will, when given an HWND that has an associated FlipEX swap chain, stretch the contents of the HWND to fill the new window IF you don't issue draw calls to that HWND before the WM_PAINT returns. This leads to horrendous sizing artifacts. For Chromium, this is a show stopper. But, FlipEx is definitely a good thing, for regular single process applications. So, is there a clean way to conditionally disable FlipEX for these problem cases? The heuristic in this patch basically says "if your hwnd is not in-process, then you're probably not painting in its HWND, so don't sue FlipEX." This catches the Chromium use case. There is still the possibility of a regular single-process EGL application that tries to draw outside WM_PAINT that would experience sizing artefacts. But, maybe that's OK. Anyways, I'm not married to this technique. Just throwing something out there to start the discussion. :) Review URL: http://codereview.appspot.com/4536102 git-svn-id: https://angleproject.googlecode.com/svn/trunk@668 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com c556fa57 2011-05-26T14:13:29 Revert pending surface destruction (part of revision 632). TRAC #16271 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@656 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 062231c0 2011-05-26T14:12:17 Only use D3DSWAPEFFECT_FLIPEX on D3D9Ex devices. TRAC #16271 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@655 736b8ea6-26fd-11df-bfd4-992fa37f6226
nduca@chromium.org 93c0fce4 2011-05-25T01:55:06 Use D3DSWAPEFFECT_FLIPEX on Windows 7. Reduces frame rate jitters on Windows 7 reported in crbug.com/82925 Review URL: http://codereview.appspot.com/4517096 git-svn-id: https://angleproject.googlecode.com/svn/trunk@654 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 2b720c92 2011-05-13T16:05:22 Fix the order of the error() parameters in Surface.cpp and advertise EGL_ANGLE_d3d_share_handle_client_buffer extension Trac #16711 Also rename the extension file to match the extension name Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@651 736b8ea6-26fd-11df-bfd4-992fa37f6226
jbauman@chromium.org 4e297707 2011-05-12T23:04:07 Add support for eglCreatePbufferFromClientBuffer, taking as input a D3D share handle corresponding to the enum EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE. No spec as of yet, but it does the obvious thing. BUG=129 TEST= Review URL: http://codereview.appspot.com/4325048 git-svn-id: https://angleproject.googlecode.com/svn/trunk@650 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 192a1810 2011-05-05T00:00:30 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." Review URL: http://codereview.appspot.com/4449064 git-svn-id: https://angleproject.googlecode.com/svn/trunk@632 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com a114c273 2011-04-22T04:18:50 Advertise depthbuffer-less surface configs. TRAC #16493 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@617 736b8ea6-26fd-11df-bfd4-992fa37f6226
jbauman@chromium.org ae345807 2011-03-30T22:04:25 Add support for eglBindTexImage and eglReleaseTexImage With this patch we can bind pbuffers as textures. Once we add support for using a sharing handle to create a pbuffer we can use this to allow us to use it as a texture as well. BUG=129 TEST=modified Simple_Texture2D works Review URL: http://codereview.appspot.com/4291066/ git-svn-id: https://angleproject.googlecode.com/svn/trunk@604 736b8ea6-26fd-11df-bfd4-992fa37f6226
vladimirv@gmail.com 721b7f26 2011-02-11T00:54:47 Issue=91 -- implement pbuffers in ANGLE; add D3D share handle support git-svn-id: https://angleproject.googlecode.com/svn/trunk@558 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org b31f532d 2011-01-19T19:02:52 All surfaces follow D3D Y convention, i.e. (0, 0) is "top-left" rather than GL's "bottom-left". This eliminates the need to flip the default FBO to the D3D convention using additional blits when presenting and reduces VRAM usage for redundant window sized surfaces. I took out the gl_Position.y flip from the vertex shader so FBOs are rendered according to D3D conventions. Texture lookups are flipped on Y to compensate. Cube map +Y and -Y faces are swapped. Y is now flipped in various other places, including uploading and reading back texture data from / to system memory, functions that take pixel space coordinates, winding order for culling, the implementation of ddy, the calculation of gl_Position and gl_FragCoord in fragment shaders and the flipping of compressed texture tiles. Review URL: http://codereview.appspot.com/3265041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@536 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org f759f7a4 2011-01-13T21:42:53 Review: http://codereview.appspot.com/3969041/ Fixed dangling pointers in Surface. When the surface is reset, either because of device lost or a window resize, and any of these fail: CreateDepthStencilSurface CreateTexture Some subsset of mSwapChain and/or mDepthStencil would be left uninitialized. This seemed to happen frequently on WIndows XP boxes. Example crash dumps: Thread 0 *CRASHED* ( EXCEPTION_ACCESS_VIOLATION_READ @ 0xffffffff800f0004 ) 0x014f1aac [libegl.dll - surface.cpp:479] egl::Surface::getDepthStencil() 0x1001324c [libglesv2.dll - context.cpp:301] gl::Context::makeCurrent(egl::Display *,egl::Surface *) 0x10018c7e [libglesv2.dll - main.cpp:85] gl::makeCurrent(gl::Context *,egl::Display *,egl::Surface *) 0x10017366 [libglesv2.dll - context.cpp:3524] glMakeCurrent 0x014f607c [libegl.dll - libegl.cpp:884] eglMakeCurrent Thread 0 *CRASHED* ( EXCEPTION_ACCESS_VIOLATION_READ @ 0xffffffffe95b5a5d ) 0x01131a14 [libegl.dll - surface.cpp:433] egl::Surface::swap() 0x01136310 [libegl.dll - libegl.cpp:1043] eglSwapBuffers 0x0214ac64 [chrome.dll - gl_context_egl.cc:240] gfx::NativeViewEGLContext::SwapBuffers() git-svn-id: https://angleproject.googlecode.com/svn/trunk@531 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 83921386 2011-01-08T05:46:00 rewrite buffers implementation to support static buffers more efficiently Bug=89 Trac #13565 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@526 736b8ea6-26fd-11df-bfd4-992fa37f6226
baustin@google.com d2fed1c7 2011-01-06T21:51:20 Fixed compile errors that show up when _UNICODE is not defined. Review URL: http://codereview.appspot.com/3772045 git-svn-id: https://angleproject.googlecode.com/svn/trunk@525 736b8ea6-26fd-11df-bfd4-992fa37f6226
nduca@chromium.org db9cac07 2010-12-09T20:16:17 Don't unsubclass the surface's output window if the window has been destroyed. Review URL: http://codereview.appspot.com/3357041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@499 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com beb2a273 2010-11-26T16:26:16 Render directly to a render target texture. TRAC #14506 This speeds up surface swapping by avoiding an unnecessary StretchRect from a render target surface to a render target texture (anti-aliased surfaces are unsupported so no resolve is needed). Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@493 736b8ea6-26fd-11df-bfd4-992fa37f6226
nduca@chromium.org a6e31e58 2010-11-18T00:24:27 Resize surface on receipt of WM_SIZE to avoid corruption during resize. We hook WM_SIZE using window subclassing. This is a continuation of http://codereview.appspot.com/3038042/ Review URL: http://codereview.appspot.com/3122041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@486 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 74d760bc 2010-11-03T12:27:18 Preserve the scissor and viewport rectangles on swap and blit TRAC #14054 The SetRenderTarget calls used in Blit::boxFilter() and Surface::swap() implicitly reset the scissor and viewport rectangles. So we need to ensure that the original rectangles get captured, and restored afterwards (the Context only keeps track of explicitly changed state). Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/trunk@472 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org e860f079 2010-09-20T19:06:56 Trying to fix bug crash when eglCreateWindowSurface (or any other code that causes createDevice to be invoked) is called and CreateDevice reports DEVICELOST or NOTAVAILABLE. This was a Windows XP service pack 3 box. 0x10002545 [libegl.dll - display.cpp:340] egl::Display::createDevice() 0x10002912 [libegl.dll - display.cpp:468] egl::Display::getDevice() 0x01d6a80f [chrome.dll - gpu_info_collector_win.cc:29] gpu_info_collector::CollectGraphicsInfo(GPUInfo *) 0x01d68eca [chrome.dll - gpu_thread.cc:104] GpuThread::OnEstablishChannel(int) Previously createDevice only checked for out of memory and the ASSERT(SUCCEEDED(result)) has no effect in release builds. I simulated the failure in a debugger and discovered a second place where a null dereference would occur in this case. I don't think this crash is technically correct but it prevents crashes. Review URL: http://codereview.appspot.com/2217043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@428 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 0db0d6c8 2010-08-31T20:00:18 Replaces swap chain lazily when the swap interval is changed. It does not appear to be possible to pass a presentation interval to Present() or change it after creating the swap chain, short of calling Reset(). I decided to try fixing it by replacing the swap chain under the same conditions as a window resize. I tested it with a modified version of the simple vertex shader sample, passing various values to eglSwapInterval. My reading of the EGL spec might be wrong but I believe the interval state should be associated with the surface bound to the current context, rather than the display. Review URL: http://codereview.appspot.com/2036044 git-svn-id: https://angleproject.googlecode.com/svn/trunk@408 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com d36c6a0a 2010-08-31T12:15:09 Implemented recovering from a lost device by context recreation. TRAC #13222 Singed-off-by: Daniel Koch Author: Nicolas Capens <nicolas@transgaming.com> git-svn-id: https://angleproject.googlecode.com/svn/trunk@406 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org b707a3b7 2010-08-23T23:12:51 Added runtime checks for GetClientRect errors. I noticed that if the window handle is invalid, the resulting rect will be uninitialized. This change makes it fail immediately. Review URL: http://codereview.appspot.com/2009042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@386 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com da6e263c 2010-07-28T19:21:18 Support window resizing TRAC #12660 Automatically resize the D3D swap chain when the eglSwapBuffers is called and the presentation window has changed size. Also change D3D device init to be performed once when the Display is created using a hidden 1x1 window. Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Andrew Lewycky git-svn-id: https://angleproject.googlecode.com/svn/trunk@365 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 81655a72 2010-05-20T19:18:17 Use instancing for non-array vertex attributes. TRAC #12303 Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/trunk@314 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com c6c6f027 2010-05-20T19:18:00 Report an EGL_CONTEXT_LOST error on D3DERR_DEVICELOST Trac #11233 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@311 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com db1afef6 2010-05-11T02:29:31 Improve performance in Surface::swap TRAC #12145 - Create the flip RT texture once. - Use state blocks for swap and restore all previous state. Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Andrew Lewycky git-svn-id: https://angleproject.googlecode.com/svn/trunk@256 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 616ffcf4 2010-05-07T19:01:49 Optimized getPresentInterval TRAC #12180 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@252 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com f2f8d3c9 2010-05-05T18:49:29 Don't use a depth buffer on swap TRAC #12160 This prevents the draw call from failing when the depth buffer isn't as large as the render target. Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@238 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com b6bd727d 2010-05-05T18:48:22 Implemented eglSwapInterval TRAC #12137 Signed-off-by: Andrew Lewycky Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@235 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com fc23fe28 2010-05-05T18:48:17 Fixed retrieving a render target interface and not releasing it TRAC #12149 Signed-off-by: Andrew Lewycky Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@234 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com ae072afe 2010-05-05T18:47:28 Minimize BeginScene / EndScene calls TRAC #12139 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@231 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com bbf56f75 2010-04-20T18:52:13 Use directory qualified #include files Trac #11408 Signed-off-by: Andrew Lewycky Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@165 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org ea0e1af4 2010-03-22T19:33:14 Minor reshuffling of directory structure in preparation of ESSL to GLSL compiler work. 1. Added include/GLSLANG which includes compiler API 2. Deleted src/include and moved the header files to the same directory as the corresponding source files 3. Modied include path to be relative to src/. I have only fixed paths for files I moved. We should fix it for all new files at least. It is much easier to see where an included file is coming from. I noticed that a few libGLESv2 source files include headers from libEGL project, which seems wrong. I think we should address this issue. Next step: move compiler source files to compiler/frontend and create two new projects compiler/glsl_backend and compiler/hlsl_backend. Review URL: http://codereview.appspot.com/662042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@62 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com adb5087a 2010-03-21T04:30:52 ANGLE | Don't perform any filtering when swapping TRAC #11513 Author: Nicolas Capens Signed-off-by: Andrew Lewycky Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/trunk@50 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 203934dc 2010-03-17T13:12:52 mv libEGL -> src/libEGL Trac #11406 Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@39 736b8ea6-26fd-11df-bfd4-992fa37f6226