summaryrefslogtreecommitdiffstats
path: root/gpu
Commit message (Collapse)AuthorAgeFilesLines
* Add more trace events related to latch usage and to track RendererGlContext ↵jbates@chromium.org2011-06-221-2/+2
| | | | | | | | destruction. Review URL: http://codereview.chromium.org/7237005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90131 0039d316-1c4b-4281-b951-d872f2087c98
* Convert most remaining resources to use the API/thunk system. The significantbrettw@chromium.org2011-06-221-17/+32
| | | | | | | | | | | | | | | changes here are around the 3D API. Having separate files for the texture mapping interface is no longer necessary for the proxy and the implementation. This also removes the uses of the "old" dynamic casting system (using "GetAs") for other resources that I could find. TEST=ui tests BUG=none Review URL: http://codereview.chromium.org/7206016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90096 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Pass by reference in CommandBufferHelper::SynchronizeState.thestig@chromium.org2011-06-222-2/+2
| | | | | | | | | | BUG=none TEST=none CID=8387 Review URL: http://codereview.chromium.org/7216035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89981 0039d316-1c4b-4281-b951-d872f2087c98
* Reapply Enforce-RGB patch with bugs fixedgman@chromium.org2011-06-2014-162/+1482
| | | | | | | | TEST=ran layout tests BUG=85385 TBR=apatrick@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89751 0039d316-1c4b-4281-b951-d872f2087c98
* RendererGLContext supports reparenting a GL context.apatrick@chromium.org2011-06-2012-98/+67
| | | | | | | | | | | | This will allow the parenting of offscreen canvas contexts to be deferred until the compositor's view context exists, which in some cases needs to be deferred until the window is asynchronously created by the browser's UI thread. An example is JavaScript opening a popup window and then immediately using canvas to attempt to render to it. This patch alone does not fix the bug. BUG=80703 Review URL: http://codereview.chromium.org/7205012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89715 0039d316-1c4b-4281-b951-d872f2087c98
* Automatically put all GL contexts associated with a particular GPU channel ↵apatrick@chromium.org2011-06-167-31/+26
| | | | | | | | | | | | | (and renderer process) in the same share group. This is work towards allowing offscreen canvas contexts to be allocated before compositor view contexts are created. This is a problem because a canvas might be created before the window it will be displayed in exists. This does not fix the bug on its own. BUG=80703 Review URL: http://codereview.chromium.org/7104148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89395 0039d316-1c4b-4281-b951-d872f2087c98
* Release current context before destroying, so that it properly releases its ↵piman@google.com2011-06-161-1/+3
| | | | | | | | | | | resources BUG=chromium-os:85082 TEST=see bug Review URL: http://codereview.chromium.org/7182003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89392 0039d316-1c4b-4281-b951-d872f2087c98
* Uninitialized member in RingBufferWrapper.finnur@chromium.org2011-06-161-1/+0
| | | | | | | | | BUG=None TEST=None CID=8592 Review URL: http://codereview.chromium.org/6995133 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89347 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: base/scoped_ptr.h -> base/memory/scoped_ptr.h. (part 2)thestig@chromium.org2011-06-151-4/+4
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7149008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89131 0039d316-1c4b-4281-b951-d872f2087c98
* Fix loading a component buildsadrul@chromium.org2011-06-151-0/+1
| | | | | | | | | | | | The error message: symbol lookup error: libwebkit.so: undefined symbol: _ZN8switches23kEnableGPUClientLoggingE BUG=none TEST=chrome built with component=shared_library starts up OK Review URL: http://codereview.chromium.org/7168005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89116 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Revert of 89054 so it builds on win_sharedgman@chromium.org2011-06-1414-341/+1940
| | | | | | | | | TEST=builds on win_shared BUG=none Review URL: http://codereview.chromium.org/7167001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89096 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 89054 - Add lots of client side OpenGL logging.asargent@chromium.org2011-06-1413-1939/+341
| | | | | | | | | | | | | | TEST=ran chrome, ran OpenGL ES 2.0 conformance tests BUG=none R=apatrick@chromium.org Review URL: http://codereview.chromium.org/7003103 TBR=gman@chromium.org Review URL: http://codereview.chromium.org/7150022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89067 0039d316-1c4b-4281-b951-d872f2087c98
* Add lots of client side OpenGL logging.gman@chromium.org2011-06-1413-341/+1939
| | | | | | | | | | | TEST=ran chrome, ran OpenGL ES 2.0 conformance tests BUG=none R=apatrick@chromium.org Review URL: http://codereview.chromium.org/7003103 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89054 0039d316-1c4b-4281-b951-d872f2087c98
* Add tracing for various functions significant in compositor startupjamesr@chromium.org2011-06-142-0/+4
| | | | | | | | | | BUG=85961 TEST=none Review URL: http://codereview.chromium.org/7149012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89048 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 89002 - Enforce RGB even on buggy drivers.asargent@chromium.org2011-06-1412-839/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also STENCIL and DEPTH. This might not be a complete solution. It assumes that if we ask for an RGB backbuffer or renderbuffer and the driver gives us RGBA that we can still clear that RGBA to 1,1,1,1. After that it sets the masks so that alpha can never be rendered to. Similarly for DEPTH and STENCILS. It's possible we should just always ask for RGBA, at least for Renderbuffers. TEST=unit tests, ran OpenGL ES 2.0 conformance test and WebGL conformance tests. BUG=85385 R=apatrick@chromium.org Review URL: http://codereview.chromium.org/7099007 TBR=gman@chromium.org Review URL: http://codereview.chromium.org/7158002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89014 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up with Angle shader translator backend.zmo@google.com2011-06-141-18/+11
| | | | | | | | | | Using the newly implemented Angle shader translator backend selection. Before, we ignore the translated text if we run on top of Angle due to the lack of a GLSL ES backend. Now we output GLSL ES source code and feed it to Angle instead of the original source code. This allows us to perform processing during translation, for example, long variable name mapping. BUG=84753 TEST=conformance/glsl-conformance.html passes on Windows/Angle Review URL: http://codereview.chromium.org/7108049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89003 0039d316-1c4b-4281-b951-d872f2087c98
* Enforce RGB even on buggy drivers.gman@chromium.org2011-06-1412-125/+839
| | | | | | | | | | | | | | | | | | | | | | | | Also STENCIL and DEPTH. This might not be a complete solution. It assumes that if we ask for an RGB backbuffer or renderbuffer and the driver gives us RGBA that we can still clear that RGBA to 1,1,1,1. After that it sets the masks so that alpha can never be rendered to. Similarly for DEPTH and STENCILS. It's possible we should just always ask for RGBA, at least for Renderbuffers. TEST=unit tests, ran OpenGL ES 2.0 conformance test and WebGL conformance tests. BUG=85385 R=apatrick@chromium.org Review URL: http://codereview.chromium.org/7099007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89002 0039d316-1c4b-4281-b951-d872f2087c98
* Previously, the DisplayLink would never start until a software draw was done ↵jbates@chromium.org2011-06-131-4/+6
| | | | | | | | | | | | | | | | | at least once. With force-compositing-mode, the software draw was never done, causing tabs to lockup indefinitely waiting for the swap acknowledgement. This fix ensures that the DisplayLink is running immediately. The Cocoa setUpGState callback was required to avoid "invalid drawable" errors when setView was called on the NSOpenGLContext. Another deadlock cause could be the GpuChannel route getting removed while the renderer is blocked on a FlushSync. For this, a method has been added to GpuCommandBufferStub to unblock/cleanup that is called from GpuChannel before the IPC route is removed. Trace events have been added in places that will help debug related issues in the future. BUG=84343 TEST=launch with --force-compositing-mode; open about:flags; in the same tab, open ycombinator.com and it should not hang. Review URL: http://codereview.chromium.org/6993043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88877 0039d316-1c4b-4281-b951-d872f2087c98
* Resubmit http://codereview.chromium.org/7046057gman@chromium.org2011-06-093-1/+101
| | | | | | | | | | | | that was reverted http://codereview.chromium.org/6995100/ TEST=unit tests BUG=85046 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/6995114 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88584 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 88452 (broke gpu_unittests) - Fix LUMANINCE_ALPHA issuersleevi@chromium.org2011-06-093-101/+1
| | | | | | | | | | | | TEST=unit tests BUG=85046 Review URL: http://codereview.chromium.org/7046057 TBR=gman@chromium.org Review URL: http://codereview.chromium.org/6995100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88457 0039d316-1c4b-4281-b951-d872f2087c98
* Fix LUMANINCE_ALPHA issuegman@chromium.org2011-06-093-1/+101
| | | | | | | | | TEST=unit tests BUG=85046 Review URL: http://codereview.chromium.org/7046057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88452 0039d316-1c4b-4281-b951-d872f2087c98
* Plumbing: Cache the resize callback so that we can call it later.backer@chromium.org2011-06-082-1/+15
| | | | | | | | | | | I am working towards having two surfaces that the GpuScheduler alternates between on SwapBuffers. Each surface should be resized once it is the backbuffer (via SwapBuffers). By caching the resize callback, I can (a) resize of the backbuffer immediately when the callback is initiated from the GLES2Decoder and (b) resize the frontbuffer once it becomes the backbuffer after a SwapBuffers. BUG=none TEST=none (should be no-op on all platforms) Review URL: http://codereview.chromium.org/6982060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88327 0039d316-1c4b-4281-b951-d872f2087c98
* Added stddef.h to cmd_buffer_common.h to build with gcc-4.6.0.asharif@chromium.org2011-06-071-0/+1
| | | | | | Review URL: http://codereview.chromium.org/7118001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88173 0039d316-1c4b-4281-b951-d872f2087c98
* Send message to renderer on command buffer errorjbauman@chromium.org2011-06-072-0/+9
| | | | | | | | | | | If there's a command buffer error, no more swap buffers callbacks will be sent, which could cause the renderer to hang forever. Prevent that by sending a message to the renderer, which will invoke the lost context callback. BUG= TEST= Review URL: http://codereview.chromium.org/7024011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88097 0039d316-1c4b-4281-b951-d872f2087c98
* Optimize TexSubImage2D and BufferSubDatagman@chromium.org2011-06-076-39/+123
| | | | | | | | | | | | | They now call TexImage2D and BufferData if possible. TEST=some unit test, ran conformance tests BUG=84977 R=apatrick@chromium.org Review URL: http://codereview.chromium.org/6993049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88078 0039d316-1c4b-4281-b951-d872f2087c98
* Optimize TexImage2D.gman@chromium.org2011-06-071-5/+20
| | | | | | | | | | | TEST=none BUG=none R=apatrick@chromium.org Review URL: http://codereview.chromium.org/7111024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88077 0039d316-1c4b-4281-b951-d872f2087c98
* Optimize BufferDatagman@chromium.org2011-06-071-6/+17
| | | | | | | | | | | TEST=none BUG=none R=apatrick@chromium.org Review URL: http://codereview.chromium.org/7111025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88076 0039d316-1c4b-4281-b951-d872f2087c98
* IWYU: Add missing header. Under GCC 4.6, this is a hard error now.rsleevi@chromium.org2011-06-071-1/+2
| | | | | | | | | | BUG=80071 TEST=none Review URL: http://codereview.chromium.org/7112027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88064 0039d316-1c4b-4281-b951-d872f2087c98
* Remove debug assertions for redundant FreeID calls.husky@google.com2011-06-062-4/+19
| | | | | | | | The GLES conformance tests use double frees. Checking the specs, redundant free calls should be silently ignored. Review URL: http://codereview.chromium.org/7056067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87995 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up shader long variable name mapping with GPU command buffer port.zmo@google.com2011-06-047-35/+55
| | | | | | | | | | shader long variable name mapping is implemented in Angle shader translator. We should hook up the feature with GPU command buffer so long names won't cause shader compile/link failure or crashes. BUG=84753 TEST=tree green, webgl's conformance/glsl-conformance.html and conformance/glsl-long-variable-names pass on all platforms (Mac/Win/Linux), gles2 conformance test suites run ok. Review URL: http://codereview.chromium.org/6969100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87899 0039d316-1c4b-4281-b951-d872f2087c98
* GpuScheduler fix:jbates@chromium.org2011-06-035-28/+87
| | | | | | | | | | | - Ganesh generates a lot of cheap GL commands, so 100 commands were executing in 50us, causing us to spin on PostTask(ProcessCommands) 60+ times per frame. This change simply tracks the elapsed time after each 100 commands - if the time is less than 2ms, it continues on to the next 100 commands. BUG=83628 TEST=trace FishIE demo with 500 fish, check that ProcessCommands is not called ~60 times per frame. Review URL: http://codereview.chromium.org/6993032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87895 0039d316-1c4b-4281-b951-d872f2087c98
* Remove canvas throttling in GLES2Implementation::CopyTextureToParentTexture.jbates@chromium.org2011-06-031-7/+0
| | | | | | | | | BUG=83628 TEST=run FishIE demo, verify that FlushSync is not called multiple times every frame during DoDeferredUpdate Review URL: http://codereview.chromium.org/7024028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87876 0039d316-1c4b-4281-b951-d872f2087c98
* More POSIX support for Chromium, consisting mostly of broadening ifdefs. Thistony@chromium.org2011-06-025-13/+13
| | | | | | | | | | | | | | patch cuts across modules, as there's only a handful necessary for each, with the most in chrome/test/. ALSA is enabled on FreeBSD and Solaris, as libasound has been ported to those two platforms, and I moved resolv.h in host_resolver_proc.cc, because it depends on headers from sys_addrinfo.h on FreeBSD. Patch by ruben (chromium@hybridsource.org) Review URL: http://codereview.chromium.org/6976055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87641 0039d316-1c4b-4281-b951-d872f2087c98
* Fix clang build failure introduced by r87408.apatrick@chromium.org2011-06-013-1/+20
| | | | | | Review URL: http://codereview.chromium.org/7027020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87416 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 87371 - Support for glSetSurfaceCHROMIUM.apatrick@chromium.org2011-06-0128-50/+275
| | | | | | | | This command allows a previously created GPU surface to be made current for a command buffer. There are no surfaces registered at this point so this command is currently a no-op. Review URL: http://codereview.chromium.org/7077001 Review URL: http://codereview.chromium.org/7006019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87408 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 87371 - Broke Compile - Support for glSetSurfaceCHROMIUM.rsesek@chromium.org2011-05-3127-280/+50
| | | | | | | | | | This command allows a previously created GPU surface to be made current for a command buffer. There are no surfaces registered at this point so this command is currently a no-op. Review URL: http://codereview.chromium.org/7077001 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7027008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87373 0039d316-1c4b-4281-b951-d872f2087c98
* Support for glSetSurfaceCHROMIUM.apatrick@chromium.org2011-05-3127-50/+280
| | | | | | | This command allows a previously created GPU surface to be made current for a command buffer. There are no surfaces registered at this point so this command is currently a no-op. Review URL: http://codereview.chromium.org/7077001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87371 0039d316-1c4b-4281-b951-d872f2087c98
* Speed up IdAllocator.husky@google.com2011-05-273-11/+64
| | | | | | | | | | | | | | | | | | | | I noticed while debugging that FindFirstFree() was iterating through all existing IDs, so it's O(n^2). This CL makes most operations constant time by adding an explicit freelist (but we need to fall back to a linear search in the worst case). This will increase memory usage slightly, but only by as much as the maximum number of IDs that were in use at any one time. We won't get "garbage IDs" building up over time. MarkAsUsed and FreeID both do an erase/insert pair. The erase could be optimised out (as we've already done the lookup by this point) but I figured it was clearer and simpler this way. TEST=Existing Review URL: http://codereview.chromium.org/7077006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87026 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ShaderTranslator not resetting the info_log on success.gman@chromium.org2011-05-262-3/+15
| | | | | | | | | | | TEST=added unit test BUG=none R=apatrick@chromium.org Review URL: http://codereview.chromium.org/7062030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86934 0039d316-1c4b-4281-b951-d872f2087c98
* Apply setInterval to new surface-context pairsnduca@chromium.org2011-05-251-0/+12
| | | | | | | | BUG=83832 Review URL: http://codereview.chromium.org/6987025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86720 0039d316-1c4b-4281-b951-d872f2087c98
* Resubmit CL 86306gman@chromium.org2011-05-2418-0/+2034
| | | | | | | | TEST=ran locally BUG=83382 Review URL: http://codereview.chromium.org/7066028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86468 0039d316-1c4b-4281-b951-d872f2087c98
* Final gyp patch to make use of the new cross-platform POSIX defines ↵tony@chromium.org2011-05-232-2/+2
| | | | | | | | toolkit_uses_gtk, os_posix, and use_x11. For lists of source files that use a mix of POSIX and Gtk APIs, toolkit_uses_gtk was given precedence. Solaris was made to use ALSA also, as libasound has been ported to FreeBSD and Solaris as a wrapper around the native OSS. Review URL: http://codereview.chromium.org/7055003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86352 0039d316-1c4b-4281-b951-d872f2087c98
* GLContext no longer holds a pointer to a GLSurface.apatrick@chromium.org2011-05-2311-27/+65
| | | | | | | | | | This is part of an ongoing effort to treat GL contexts and GL surfaces as independent entities. TEST=run WebGL on mac, windows and linux, trybots BUG=none Review URL: http://codereview.chromium.org/7021014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86332 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 86306 (failed compile on win builder) - Move OpenGL ES 2.0 ↵mattm@chromium.org2011-05-2317-2030/+0
| | | | | | | | | | | | | | | | | | | | | conformance test support into main tree This support breaks often because it is not built but the buildbots. This CL adds it to the main tree so it will be built by the buildbots. Not sure where to add it in all.gyp but I need to make sure it's built TEST=opengl es 2.0 conformance tests still build BUG=83382 R=apatrick@chromium.org Review URL: http://codereview.chromium.org/7057033 TBR=gman@chromium.org Review URL: http://codereview.chromium.org/7066003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86316 0039d316-1c4b-4281-b951-d872f2087c98
* Move OpenGL ES 2.0 conformance test support into main treegman@chromium.org2011-05-2317-0/+2030
| | | | | | | | | | | | | | | | This support breaks often because it is not built but the buildbots. This CL adds it to the main tree so it will be built by the buildbots. Not sure where to add it in all.gyp but I need to make sure it's built TEST=opengl es 2.0 conformance tests still build BUG=83382 R=apatrick@chromium.org Review URL: http://codereview.chromium.org/7057033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86306 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ringbuffer test.jbauman@chromium.org2011-05-202-3/+28
| | | | | | | | | | | | The SetToken mock was using the command header as the token value. Also, the ringbuffer test didn't support the jump command, so if the number of entries in the command buffer is too small then the test breaks. BUG= TEST= Review URL: http://codereview.chromium.org/6990002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86167 0039d316-1c4b-4281-b951-d872f2087c98
* Added more trace info to SwapBuffers, traced some functions in ↵jbates@chromium.org2011-05-191-4/+7
| | | | | | | | | | | WebGraphicsContext3D. SwapBuffers now traces frame count for both offscreen and onscreen contexts. An offscreen bool is also traced. BUG=none TEST=observe more trace info in SwapBuffers calls Review URL: http://codereview.chromium.org/7037042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85980 0039d316-1c4b-4281-b951-d872f2087c98
* Changes to help optimizer eliminate redundant code in GPU logging.apatrick@chromium.org2011-05-181-24/+47
| | | | | | | | | | Even in release builds, there was often a fair amount of overhead for DCHECK and friends. It was showing up quite high in my CodeAnalyst profiles and was not necessary in release mode. TEST=trybots, step through DCHECK code and check it doesn't do anything DCHECK related in release. BUG=none Review URL: http://codereview.chromium.org/7032016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85783 0039d316-1c4b-4281-b951-d872f2087c98
* Call SwapBuffersCallback multiple times if a frame was dropped.nduca@chromium.org2011-05-182-0/+5
| | | | | | | | BUG=82084 Review URL: http://codereview.chromium.org/7031028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85710 0039d316-1c4b-4281-b951-d872f2087c98
* Add more stubbed out defines so nacl can bump chrome rev.nfullagar@google.com2011-05-161-0/+3
| | | | | | | | TEST=trybots BUG=none Review URL: http://codereview.chromium.org/7032007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85544 0039d316-1c4b-4281-b951-d872f2087c98