summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/client
Commit message (Collapse)AuthorAgeFilesLines
* Fix GLES2Implementation logging of shared idsgman@chromium.org2011-12-021-6/+6
| | | | | | | | | | | | TEST=none BUG=none R=jbates@chromium.org Review URL: http://codereview.chromium.org/8759001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112782 0039d316-1c4b-4281-b951-d872f2087c98
* Make command buffer free transfer buffer when switching tabsgman@chromium.org2011-12-014-238/+507
| | | | | | | | | | | | | | | | | | | | | | Note: another CL will attempt to free the command buffer as well. Also note: I didn't want to change the function signature of GLES2Implementation as that would have been a much larger change. So, the startup code in renderer_gl_context.cc still creates the initial transfer buffer and info about that is passed into GLES2Implementation. A cleaner approach would probably have been to let GLES2Implemetation allocate the initial buffer but that's a much larger change. TEST=unit tests and ran Chrome testing a few pages and stepping in debugger. BUG=103989 R=apatrick@chromium.org Review URL: http://codereview.chromium.org/8536045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112393 0039d316-1c4b-4281-b951-d872f2087c98
* Add GL_ANGLE_pack_reverse_row_order to command bufferbsalomon@google.com2011-11-302-3/+79
| | | | | | | Bug=82559 Review URL: http://codereview.chromium.org/8513017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112245 0039d316-1c4b-4281-b951-d872f2087c98
* Remove default arg from GLES2Implementation's constructorgman@chromium.org2011-11-301-1/+1
| | | | | | | | | | | | | | It was added to pass NaCl integration. TEST=built chrome, gpu_unittests and DRT BUG=93019 R=apatrick@chromium.org Review URL: http://codereview.chromium.org/8588044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112125 0039d316-1c4b-4281-b951-d872f2087c98
* Added minimal support to command buffer for GL_ARB_texture_rectanglekbr@chromium.org2011-11-233-0/+30
| | | | | | | | | | | | | | | | | | | | | | textures, and added Mac OS X-specific extension for binding IOSurfaces to textures. This is infrastructure work for rendering Core Animation plugins via Chrome's compositor. Refactored the texture initialization in the command buffer and associated unit tests. Added unit tests for rectangular textures. These changes will be hooked up in a subsequent CL. They were split off for easier review. There are ongoing discussions about unifying the various mechanisms for sharing textures across processes, but it's been agreed that those should not block this work. BUG=38967 TEST=GPU unit tests; manual testing with forthcoming changes Review URL: http://codereview.chromium.org/8680002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111426 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind() conversion for remaining GPU files.dcheng@chromium.org2011-11-224-14/+15
| | | | | | | | | | BUG=none TEST=trybots Review URL: http://codereview.chromium.org/8586048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111067 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for GL_CHROMIUM_flipy in TexSubImage2D and unit testbsalomon@google.com2011-11-212-3/+71
| | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/8587040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110923 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb through EGL_NV_post_sub_buffer and GLX_MESA_copy_sub_buffer.backer@chromium.org2011-11-114-0/+27
| | | | | | | | | | These two extensions allow a partial swap: just pushing part of the backbuffer to the front buffer. This will allow the WK compositor to push a partial update to the screen instead of a full frame update (https://bugs.webkit.org/show_bug.cgi?id=70533). We should be able to do something similar for TOUCHUI ImageTransportSurfaces (hence the hooks into GLSurface and the glPostSubBufferCHROMIUM command). Review URL: http://codereview.chromium.org/8512005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109625 0039d316-1c4b-4281-b951-d872f2087c98
* Move flush call after resource deletion into SharedIdHandlerjamesr@chromium.org2011-11-101-6/+3
| | | | | | | | | | | | | | The SharedIdHandler is the only id allocator that makes client ids available to other contexts in the share group, so it's the only one that needs a Flush() call on resource deletion. Additionally it only needs a command buffer level flush to ensure execution order and not a glFlush(). BUG=none Review URL: http://codereview.chromium.org/8508043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109472 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor id_handler set in GLES2Implementationjamesr@chromium.org2011-11-103-49/+40
| | | | | | | | | | | I plan to add some logic that will apply to all id handlers, so having these in an array instead of 5 separate objects. BUG=none Review URL: http://codereview.chromium.org/8508034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109450 0039d316-1c4b-4281-b951-d872f2087c98
* Expose the sandbox related code through the content API. I did a bit of ↵jam@chromium.org2011-10-294-4/+24
| | | | | | | | | | | | | cleanup while I was doing this. -got rid of SandboxInitWrapper, since I didn't see a need to expose given that we can just expose sandbox::SandboxInterfaceInfo -got rid of the duplicated code to initialize the broker -since I made MainFunctionParams only have the sandbox struct on Windows, I also made the mac specific auto release pool behind an ifdef as well. It seemed odd to make something so mac specific compile on all platforms to save some #ifdefs. BUG=98716 Review URL: http://codereview.chromium.org/8414020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107863 0039d316-1c4b-4281-b951-d872f2087c98
* Make GLES2Implementation use a larger chunk size for mapping functions.gman@chromium.org2011-10-275-2/+49
| | | | | | | | | | | | | This will make it allocate less shared memory blocks resulting in less file descriptors. BUG=none TEST=unit tests Review URL: http://codereview.chromium.org/8340003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107544 0039d316-1c4b-4281-b951-d872f2087c98
* Add GLES2Implemention::FreeUnusedSharedMemorygman@chromium.org2011-10-249-5/+102
| | | | | | | | | | | | | | This is to help get the compositor free memory when appropritate BUG=none TEST=unit tests R=vangelis@chromium.org Review URL: http://codereview.chromium.org/8369010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106987 0039d316-1c4b-4281-b951-d872f2087c98
* Implement 'ANGLE_translated_shader_source' extension in command-buffer.zmo@google.com2011-10-053-0/+36
| | | | | | | | | | | | This works with ANGLE r780. So if it's on top of ANGLE, query the translated HLSL using ANGLE's GetTranslatedShaderSource extension; otherwise, return the cached translated shader source from ANGLE shader translator. BUG=95531 TEST=unittest Review URL: http://codereview.chromium.org/8120020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104036 0039d316-1c4b-4281-b951-d872f2087c98
* External stream texture support.sievers@chromium.org2011-09-285-0/+83
| | | | | | | | | | | | | | | | | | | | | | This adds a GL_CHROMIUM_stream_texture extension with an abstract interface that can be used to allow a consumer to render from a stream of textures being produced externally. It adds the following functionality: * GLuint glCreateStreamTextureCHROMIUM(GLuint texture) This API takes a texture id and creates a StreamTexture object associated with the texture in the GPU process that can be implemented in a platform-specific way. The returned handle is supposed to identify the stream endpoint. Connecting this to a producer is outside the scope of this change. * GLvoid glDestroyStreamTextureCHROMIUM(GLuint texture) Deletes the StreamTexture object associated with the texture and marks the texture as not special anymore. * BindTexture() will invoke method StreamTexture::Update() if the target is GL_TEXTURE_EXTERNAL_OES and the texture is marked as 'stream texture'. TEST=added unit tests Review URL: http://codereview.chromium.org/7754033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103191 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 101545 - Moved code not relating to GPU scheduling out of ↵apatrick@chromium.org2011-09-209-705/+4
| | | | | | | | | | | | | | | | | | GpuScheduler and into GpuCommandBufferStub. Reason for revert: Compile failure on Arm. This was mostly a refactor because the code was awkward. I also deleted the original gles2_demo since we have the gles2 book demos now. THings still to do are a common way of setting up the few objects involved in initializing a command buffer that is now more-or-less duplicated in the gles2 conformance tests, the gles2 demos, the command buffer stub and the in-process webgl context. I also want to completely remove the reference to the decoder from the scheduler. I tested WebGL on both windows and mac and saw no regressions. I checked the conformance tests, the gpu tests and am running by the try bots now. The gles2 demos still work. Review URL: http://codereview.chromium.org/7782041 Review URL: http://codereview.chromium.org/7951008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101873 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 101545 - Moved code not relating to GPU scheduling out of ↵rsimha@chromium.org2011-09-169-4/+705
| | | | | | | | | | | | | | | | | | | | GpuScheduler and into GpuCommandBufferStub. Reason for revert: Compile failure on Arm. This was mostly a refactor because the code was awkward. I also deleted the original gles2_demo since we have the gles2 book demos now. THings still to do are a common way of setting up the few objects involved in initializing a command buffer that is now more-or-less duplicated in the gles2 conformance tests, the gles2 demos, the command buffer stub and the in-process webgl context. I also want to completely remove the reference to the decoder from the scheduler. I tested WebGL on both windows and mac and saw no regressions. I checked the conformance tests, the gpu tests and am running by the try bots now. The gles2 demos still work. Review URL: http://codereview.chromium.org/7782041 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7920015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101547 0039d316-1c4b-4281-b951-d872f2087c98
* Moved code not relating to GPU scheduling out of GpuScheduler and into ↵apatrick@chromium.org2011-09-169-705/+4
| | | | | | | | | | | | | | | GpuCommandBufferStub. This was mostly a refactor because the code was awkward. I also deleted the original gles2_demo since we have the gles2 book demos now. THings still to do are a common way of setting up the few objects involved in initializing a command buffer that is now more-or-less duplicated in the gles2 conformance tests, the gles2 demos, the command buffer stub and the in-process webgl context. I also want to completely remove the reference to the decoder from the scheduler. I tested WebGL on both windows and mac and saw no regressions. I checked the conformance tests, the gpu tests and am running by the try bots now. The gles2 demos still work. Review URL: http://codereview.chromium.org/7782041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101545 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 100801 - Ensure that compositor does not block the renderer process ↵apatrick@chromium.org2011-09-131-2/+3
| | | | | | | | | by issuing too many SwapBuffers. This might have regressed with r84372. It caused there to be one additional token queued in the swap buffers token queue than before. Review URL: http://codereview.chromium.org/7876010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100978 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 100801 - Ensure that compositor does not block the renderer process ↵apatrick@chromium.org2011-09-121-3/+2
| | | | | | | | | | | | | | by issuing too many SwapBuffers. This might have regressed with r84372. It caused there to be one additional token queued in the swap buffers token queue than before. BUG=95649 Review URL: http://codereview.chromium.org/7867053 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7880009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100803 0039d316-1c4b-4281-b951-d872f2087c98
* Ensure that compositor does not block the renderer process by issuing too ↵apatrick@chromium.org2011-09-121-2/+3
| | | | | | | | | | | many SwapBuffers. This might have regressed with r84372. It caused there to be one additional token queued in the swap buffers token queue than before. BUG=95649 Review URL: http://codereview.chromium.org/7867053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100801 0039d316-1c4b-4281-b951-d872f2087c98
* A less-mysterious fix for b95492: Restore the GL context after resize.nduca@chromium.org2011-09-091-3/+0
| | | | | | | | | BUG=95492 TEST=crash reports do not reappear in canary Review URL: http://codereview.chromium.org/7847016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100350 0039d316-1c4b-4281-b951-d872f2087c98
* Fix early flush logic.jbauman@chromium.org2011-09-082-8/+16
| | | | | | | | | | | | | Use clock() instead of time() to determine how much time has passed, as that likely has a higher resolution. Also add back in the old flush logic, as a backup in case clock() doesn't have a high-enough resolution to cause it to flush before the entire command buffer is used up. BUG= TEST= Review URL: http://codereview.chromium.org/7789023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100057 0039d316-1c4b-4281-b951-d872f2087c98
* Flush after resize to try to work around mac crashjamesr@chromium.org2011-09-071-0/+3
| | | | | | | | | BUG=95492 TEST=launch chrome to http://www.webkit.org/blog-files/3d-transforms/poster-circle.html Review URL: http://codereview.chromium.org/7839037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99978 0039d316-1c4b-4281-b951-d872f2087c98
* Remove support for switching draw surfaces on a context.This was originally ↵apatrick@chromium.org2011-09-024-14/+0
| | | | | | | | intended to share canvas "back buffers" between the GPU process and the browser process. The plan is to issue all the GL calls in the GPU process now, with the browser process just doing the final present. Removing the redundant code. Review URL: http://codereview.chromium.org/7701021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99424 0039d316-1c4b-4281-b951-d872f2087c98
* Unify MacOS resizing path with glResizeCHROMIUM.nduca@chromium.org2011-08-222-5/+7
| | | | | | | | Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=97644 Review URL: http://codereview.chromium.org/7671035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97668 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 97644 - Unify MacOS resizing path with glResizeCHROMIUM.nduca@chromium.org2011-08-222-7/+5
| | | | | | | | | Review URL: http://codereview.chromium.org/7671035 TBR=nduca@chromium.org Review URL: http://codereview.chromium.org/7713001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97645 0039d316-1c4b-4281-b951-d872f2087c98
* Unify MacOS resizing path with glResizeCHROMIUM.nduca@chromium.org2011-08-222-5/+7
| | | | | | Review URL: http://codereview.chromium.org/7671035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97644 0039d316-1c4b-4281-b951-d872f2087c98
* Add option to not generate resources on bind in OpenGL ESgman@chromium.org2011-08-165-96/+403
| | | | | | | | | | | | | | | | | | | This allowes us to more efficiently manage ids. It is not OpenGL ES 2.0 compatible though it probably fits most OpenGL ES programs. Note that we need to turn this off on Pepper and/or probably provide a way for Pepper to turn on on. I'm not sure of the path Pepper takes to setup. Assuming it goes through GraphicsContext3D then changes to webkit will be needed to get the flag all the way down through IPC to the GPU process. TEST=unit tests and ran a few pages in a chrome build BUG=92260 Review URL: http://codereview.chromium.org/7633060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96904 0039d316-1c4b-4281-b951-d872f2087c98
* Rename and document glCommandBufferEnableCHROMIUMgman@chromium.org2011-08-125-13/+11
| | | | | | | | | | | moved to gl2ext.h. Got rid of gles2_command_buffer.h BUG=none TEST=none Review URL: http://codereview.chromium.org/7623001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96507 0039d316-1c4b-4281-b951-d872f2087c98
* Expose DXT3 and DXT5 through ANGLEgman@chromium.org2011-08-112-5/+182
| | | | | | | | | TEST=made demo and tested it. BUG=91046 Review URL: http://codereview.chromium.org/7604027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96317 0039d316-1c4b-4281-b951-d872f2087c98
* Delete copy_texture_to_parent_texture from GPU command buffer code.apatrick@chromium.org2011-08-104-24/+0
| | | | | | | Because we aren't using it for anything anymore. Review URL: http://codereview.chromium.org/7538008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96238 0039d316-1c4b-4281-b951-d872f2087c98
* Fix 2 Dr. Memory issuesgman@chromium.org2011-08-081-3/+4
| | | | | | | | | | | | | | 1) Unit tests were incorrectly using TextureInfo 2) GLES2Implementation::TexSubImageImpl was reading 1-7 bytes too many. TEST=ran with Dr.Memory BUG=91786 Review URL: http://codereview.chromium.org/7541074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95906 0039d316-1c4b-4281-b951-d872f2087c98
* Cache OpenGL program info on the client side of the command buffer.gman@chromium.org2011-08-086-72/+730
| | | | | | | | | | | | | | For contexts not sharing resources this means the 3 to 30 calls to get link status and attrib/uniform locations will go from 3-30 sync calls to 1 sync call. TEST=unit tests and ran OpenGL ES 2.0 conformance tests BUG=85966 Review URL: http://codereview.chromium.org/7358006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95836 0039d316-1c4b-4281-b951-d872f2087c98
* Flush command streams after deleting resourcesjamesr@chromium.org2011-08-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When share groups and pooled IDs are in use, a race condition exists when destroying resources since the IDs are marked as free before the resource is actually freed. Consider: Context A creates a framebuffer with id 1 Context B is created in the same sharegroup as A Context A destroys its framebuffer: - the ID is freed (via FreeIDs(), which is a synchronous call) - a DeleteFrameBuffersImmediate command is entered into A's command buffer but does not immediately execute Context B creates a framebuffer - genFramebuffer() makes a sync call to the service side, which reports that id 1 is available At this point, if the service side processes and commands in context B's command stream, it will throw kInvalidArguments because as far as the service side is concerned framebuffer 1 has never been released. This patch adds a Flush() after destroying a resource so that the service side will process the resource destruction command before servicing other command streams. There's still a potential race condition if multiple contexts in the same share groups are making calls from different threads, but today all contexts in the same share group are on the same thread. BUG=80703 TEST=none Review URL: http://codereview.chromium.org/7574024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95576 0039d316-1c4b-4281-b951-d872f2087c98
* Insert a soft flush into the command buffer on unmapTexSubImage2Djamesr@chromium.org2011-07-281-0/+2
| | | | | | | | | | | | | | | | | | This does a CommandBufferHelper flush in UnmapTexSubImage2DCHROMIUM so the gpu process can start processing texture uploads as soon as the texture is unmapped instead of waiting until the next hard flush or finish. This increase parallelization for tile uploads, especially during compositor startup and when the entire root layer is damaged. On my linux z600, this cuts down on the time taken to initially composite the poster circle page measured from start of RenderWidget::DoDeferredUpdate to the first SwapBuffers completing from 100ms->50ms BUG=none TEST=none Review URL: http://codereview.chromium.org/7492060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94504 0039d316-1c4b-4281-b951-d872f2087c98
* Support GL_OES_EGL_image_externalbulach@chromium.org2011-07-261-2/+2
| | | | | | | | | | | | | Add support for GL_OES_EGL_image_external to the cmdbuffer code. Original patch from http://codereview.chromium.org/7458008/ Landing on behalf of Daniel Sievers <sievers@chromium.org> BUG= TEST=new unit_tests Review URL: http://codereview.chromium.org/7480014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94096 0039d316-1c4b-4281-b951-d872f2087c98
* Adding an empty program_info_manager.cc so I can fix NaClgman@chromium.org2011-07-221-0/+1
| | | | | | | | | | | | | | | | | | I need to make NaCl expect this file so that I can then put the real one on chromium. The steps are #1) check in this blank file #2) make NaCl use this file (update its deps, link in nacl.scons) #3) commit the real file in chromium #4) profit TEST=none BUG=85966 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7491005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93594 0039d316-1c4b-4281-b951-d872f2087c98
* Fix clang buildisherman@chromium.org2011-07-221-1/+3
| | | | | | | | | | BUG=none TEST=none TBR=gman@chromium.org Review URL: http://codereview.chromium.org/7493006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93547 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for warning to error that trybots didn't catch.gman@chromium.org2011-07-221-2/+2
| | | | | | | | | | TEST=none BUG=none TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7488004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93543 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for GL_CHROMIUM_flipygman@chromium.org2011-07-223-22/+470
| | | | | | | | | | | Also fixed a couple of other related things TEST=unit tests BUG=89593 Review URL: http://codereview.chromium.org/7471032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93541 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 93066 - Execute all GL commands up to the put offset reported by a ↵apatrick@chromium.org2011-07-2112-77/+30
| | | | | | | | | | | each flush.This means glFlush is a barrier that prevents reordering of GL commands issued on different command buffers. I used it to replace latches for synchronizing the rendering of WebGL canvas and Pepper 3D with the accelerated compositor. The primary advantage is it is more robust than latches and there is no possibility of deadlock. It should also be possible for WebGL and Pepper 3D to use it whereas exposing SetLatch and WaitLatch would be dangerous. The calls to SetLatch and WaitLatch are still in webkit but they are no-ops. SetLatch and WaitLatch are completely removed elsewhere.I changed CommandBuffer::FlushSync to Finish to reflect the new semantics. Going forward, I will add a synchronous CommandBuffer::WaitForToken and WaitForAvailableEntries, which should eliminate the need to call Finish unless glFinish is called by the client. The Pepper interface is unchanged because I don't want to break binary compatibility.I fixed a bug where the last read token in CmdBufferHelper was stale after receiving a ReportState IPC. That was causing a redundant synchronous flush in the client side SwapBuffers throttling. I removed Yield because it does not make sense with the new semantics. There is no round robin scheduling.Tested with WebGL on Windows and Mac and checked that 72672 did not regress. Review URL: http://codereview.chromium.org/7466022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93479 0039d316-1c4b-4281-b951-d872f2087c98
* Allow creating a gpu channel that uses software renderingjbauman@chromium.org2011-07-211-0/+1
| | | | | | | | | | | | | Where supported (on ANGLE with EGL_ANGLE_software_display), allow for the creation of gpu channels that use software rendering instead of hardware rendering. BUG= TEST=trybots, other later tests TBR=apatrick Review URL: http://codereview.chromium.org/7471042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93449 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 93393 - Crashed Linux Touch build: ↵leandrogracia@chromium.org2011-07-211-1/+0
| | | | | | | | | | | | | | | | | | http://build.chromium.org/p/chromium/builders/Linux%20Touch/builds/2649/steps/compile/logs/stdio Allow creating a gpu channel that uses software rendering Where supported (on ANGLE with EGL_ANGLE_software_display), allow for the creation of gpu channels that use software rendering instead of hardware rendering. BUG= TEST=trybots, other later tests Review URL: http://codereview.chromium.org/7383004 TBR=jbauman@chromium.org Review URL: http://codereview.chromium.org/7468030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93399 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 93397 - Revert 93393 - Revert was broken. Restoring.leandrogracia@chromium.org2011-07-211-0/+1
| | | | | | | | | | | | | | | | | | | | | Crashing on Linux Touch: http://build.chromium.org/p/chromium/builders/Linux%20Touch/builds/2649/steps/compile/logs/stdio Allow creating a gpu channel that uses software rendering Where supported (on ANGLE with EGL_ANGLE_software_display), allow for the creation of gpu channels that use software rendering instead of hardware rendering. BUG= TEST=trybots, other later tests Review URL: http://codereview.chromium.org/7383004 TBR=jbauman@chromium.org Review URL: http://codereview.chromium.org/7468028 TBR=leandrogracia@chromium.org Review URL: http://codereview.chromium.org/7468029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93398 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 93393 - Crashing on Linux Touch: ↵leandrogracia@chromium.org2011-07-211-1/+0
| | | | | | | | | | | | | | | | | | http://build.chromium.org/p/chromium/builders/Linux%20Touch/builds/2649/steps/compile/logs/stdio Allow creating a gpu channel that uses software rendering Where supported (on ANGLE with EGL_ANGLE_software_display), allow for the creation of gpu channels that use software rendering instead of hardware rendering. BUG= TEST=trybots, other later tests Review URL: http://codereview.chromium.org/7383004 TBR=jbauman@chromium.org Review URL: http://codereview.chromium.org/7468028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93397 0039d316-1c4b-4281-b951-d872f2087c98
* Allow creating a gpu channel that uses software renderingjbauman@chromium.org2011-07-211-0/+1
| | | | | | | | | | | Where supported (on ANGLE with EGL_ANGLE_software_display), allow for the creation of gpu channels that use software rendering instead of hardware rendering. BUG= TEST=trybots, other later tests Review URL: http://codereview.chromium.org/7383004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93393 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 93066 - Execute all GL commands up to the put offset reported by a ↵apatrick@chromium.org2011-07-2012-30/+77
| | | | | | | | | | | each flush.This means glFlush is a barrier that prevents reordering of GL commands issued on different command buffers. I used it to replace latches for synchronizing the rendering of WebGL canvas and Pepper 3D with the accelerated compositor. The primary advantage is it is more robust than latches and there is no possibility of deadlock. It should also be possible for WebGL and Pepper 3D to use it whereas exposing SetLatch and WaitLatch would be dangerous.The calls to SetLatch and WaitLatch are still in webkit but they are no-ops. SetLatch and WaitLatch are completely removed elsewhere.I changed CommandBuffer::FlushSync to Finish to reflect the new semantics. Going forward, I will add a synchronous CommandBuffer::WaitForToken and WaitForAvailableEntries, which should eliminate the need to call Finish unless glFinish is called by the client. The Pepper interface is unchanged because I don't want to break binary compatibility.I fixed a bug where the last read token in CmdBufferHelper was stale after receiving a ReportState IPC. That was causing a redundant synchronous flush in the client side SwapBuffers throttling.I removed Yield because it does not make sense with the new semantics. There is no round robin scheduling.Tested with WebGL on Windows and Mac and checked that 72672 did not regress. Review URL: http://codereview.chromium.org/7253052 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7458010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93143 0039d316-1c4b-4281-b951-d872f2087c98
* Execute all GL commands up to the put offset reported by a each flush.This ↵apatrick@chromium.org2011-07-1912-77/+30
| | | | | | | | means glFlush is a barrier that prevents reordering of GL commands issued on different command buffers. I used it to replace latches for synchronizing the rendering of WebGL canvas and Pepper 3D with the accelerated compositor. The primary advantage is it is more robust than latches and there is no possibility of deadlock. It should also be possible for WebGL and Pepper 3D to use it whereas exposing SetLatch and WaitLatch would be dangerous.The calls to SetLatch and WaitLatch are still in webkit but they are no-ops. SetLatch and WaitLatch are completely removed elsewhere.I changed CommandBuffer::FlushSync to Finish to reflect the new semantics. Going forward, I will add a synchronous CommandBuffer::WaitForToken and WaitForAvailableEntries, which should eliminate the need to call Finish unless glFinish is called by the client. The Pepper interface is unchanged because I don't want to break binary compatibility.I fixed a bug where the last read token in CmdBufferHelper was stale after receiving a ReportState IPC. That was causing a redundant synchronous flush in the client side SwapBuffers throttling.I removed Yield because it does not make sense with the new semantics. There is no round robin scheduling.Tested with WebGL on Windows and Mac and checked that 72672 did not regress. Review URL: http://codereview.chromium.org/7253052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93066 0039d316-1c4b-4281-b951-d872f2087c98
* Detect and expose loss of OpenGL context using GL_ARB_robustness.kbr@chromium.org2011-07-143-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (This CL was originally reviewed under http://codereview.chromium.org/7331020/ . The only difference is the removal of an #include from command_buffer.h that was accidentally left in and which caused a significant increase in the number of files containing static initializers, presumably because of the dependent #include of <iostream>.) This initial patch changes the Linux port to use GLX_ARB_create_context_robustness when available, and tests periodically whether the context has been lost after each draw call and when making the context current. The detection of context loss also works with EGL and ANGLE, although it always reports an unknown reset status. WebKit changes will follow which test the reset status and determine what to do in response; for example, the policy might be to never restore a WebGL context which was lost (due to a GPU reset) and which was determined to be the guilty context. Tested manually with WebGL stress tests and verified on Linux and Windows that in at least some situations it is possible to detect guilty contexts and shut down the associated WebGL application. Some precision of this detection was recently lost and will need to be fixed in following CLs. Also updated and ran GPU unit tests. BUG=88106 TEST=none (tested manually; try servers) R=gman,apatrick,piman Review URL: http://codereview.chromium.org/7362005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92453 0039d316-1c4b-4281-b951-d872f2087c98