summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer
Commit message (Collapse)AuthorAgeFilesLines
* Fixed GPU process startup crash on Linux. Because there was no currentkbr@google.com2010-04-021-10/+8
| | | | | | | | | | | | | | | | OpenGL context, glXGetCurrentDisplay() was returning NULL, leading to crashes in glXQueryVersion. Exposed a new glxewContextInitWithDisplay from GLEW allowing the caller to supply the display connection. Built both with and without GLEW_MX to ensure GLEW changes compile in both scenarios. BUG=40148 TEST=ran WebGL demos in debugger, verified Display* passed to glXQueryVersion Review URL: http://codereview.chromium.org/1556015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43507 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes client side of readpixels so it doesn't writegman@chromium.org2010-04-011-5/+21
| | | | | | | | | | | | | | | pad bytes. Am working on framework for unit tests for the client side but it still needs work so tested this in the debugger by hand for now. TEST=none BUG=none Review URL: http://codereview.chromium.org/1578006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43317 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented offscreen rendering path for GLES2CmdDecoder on Linux.kbr@google.com2010-03-315-83/+298
| | | | | | | | | | | With these changes, WebGL runs in the sandbox on Linux. BUG=29120 TEST=ran WebGL demos in sandbox on Linux Review URL: http://codereview.chromium.org/1540004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43235 0039d316-1c4b-4281-b951-d872f2087c98
* Disable more GPU tests.nsylvain@chromium.org2010-03-311-9/+18
| | | | | | Review URL: http://codereview.chromium.org/1575009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43218 0039d316-1c4b-4281-b951-d872f2087c98
* Disable the ProcessorDoesNothingIfRingBufferIsEmpty because it crashesnsylvain@chromium.org2010-03-311-1/+2
| | | | | | | | gpu_unittests. Review URL: http://codereview.chromium.org/1575008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43215 0039d316-1c4b-4281-b951-d872f2087c98
* dds some docs about the command buffer andgman@chromium.org2010-03-312-1/+2207
| | | | | | | | | | | | adds an option to the autogen tool to make a docs friendly version of the commands formats. TEST=none BUG=none Review URL: http://codereview.chromium.org/1568007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43173 0039d316-1c4b-4281-b951-d872f2087c98
* Increased arbitrary ReadPixels size limit so pepper tests can pass.apatrick@chromium.org2010-03-291-1/+1
| | | | | | | | | TEST=trybots, npapi_pepper_test_plugin BUG=none Review URL: http://codereview.chromium.org/1575002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43010 0039d316-1c4b-4281-b951-d872f2087c98
* Added command buffer implementation of WebGL which runs in the sandbox.kbr@google.com2010-03-271-5/+68
| | | | | | | | | | | | | | | | | | | | | | Added synchronous initialization of the channel to the GPU process, needed to obey WebGL startup semantics. There are problems with this on the Windows platform which will be addressed via refactoring in the GpuProcessHost in a subsequent CL. Implemented offscreen rendering code path in GGL / GLES2CmdDecoder for Mac OS X. This new code path is not yet complete for all platforms and is still being stress tested. The previous in-process WebGL implementation is currently used when the sandbox is disabled; it will be removed in a subsequent CL. A one-line code change in WebKit is needed after this CL lands to enable the new code path. BUG=29120 TEST=ran WebGL demos on command buffer implementation on Mac Review URL: http://codereview.chromium.org/1328001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42879 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed GPU unit tests on Mac.kbr@google.com2010-03-267-3/+118
| | | | | | | | | | | | | - Added mocks for Mac-specific methods - Conditionally declared storage for static const integer values in classes - Deleted unused variables BUG=none TEST=ran GPU unit tests on Mac Review URL: http://codereview.chromium.org/1376002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42787 0039d316-1c4b-4281-b951-d872f2087c98
* Calling OpenGL from the renderer processapatrick@chromium.org2010-03-2518-119/+813
| | | | | | | | | | | | | | - Added ability for renderer processes to render to a real window (Windows only so far). - Added ability to create offscreen frame buffer objects that can be resized later. - OpenGL context can have a "parent" context that can access its last swapped back buffer through a texture ID. - Moved code to establish GPU channel from RenderWidget to RenderThread. - Changed way service size command buffer object lifetimes are managed. TEST=trybot and visual verification that OpenGL can clear the browser window to magenta. BUG=none Review URL: http://codereview.chromium.org/1136006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42679 0039d316-1c4b-4281-b951-d872f2087c98
* Adds renderbuffer and framebuffer tracking so we cangman@chromium.org2010-03-2511-103/+469
| | | | | | | | | | | | | | | clear the buffers. Note: I did not actually write the clearing code or the binding code. Will do in another CL after Al checks in his code. TEST=unit tests BUG=none Review URL: http://codereview.chromium.org/1243002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42577 0039d316-1c4b-4281-b951-d872f2087c98
* Adds the remaining bucket commands, switches thegman@chromium.org2010-03-2425-426/+1212
| | | | | | | | | | | | GLES2Implementation to use the bucket versions of the commands and fixes a bunch of gcc warnings TEST=various unit tests BUG=none Review URL: http://codereview.chromium.org/1173001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42438 0039d316-1c4b-4281-b951-d872f2087c98
* Remove dependency from webkit on chrome/common by moving files to src/app.pinkerton@chromium.org2010-03-192-2/+2
| | | | | | | | BUG=37985 TEST=no functional change. Review URL: http://codereview.chromium.org/1060001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42101 0039d316-1c4b-4281-b951-d872f2087c98
* Made glReadPixels handle out of range areas.gman@chromium.org2010-03-196-8/+486
| | | | | | | | | TEST=unit tests BUG=none Review URL: http://codereview.chromium.org/1081006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42065 0039d316-1c4b-4281-b951-d872f2087c98
* Stub out a define GPU_LOG and GPU_CHECK for native client builds.sehr@google.com2010-03-191-0/+2
| | | | | | Review URL: http://codereview.chromium.org/1141002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42043 0039d316-1c4b-4281-b951-d872f2087c98
* Refactored glGet commands to use a SizedResult forgman@chromium.org2010-03-1713-226/+1099
| | | | | | | | | | | safer operation and consistancy. Added more tests. TEST=even more unit tests BUG=none Review URL: http://codereview.chromium.org/1003005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41880 0039d316-1c4b-4281-b951-d872f2087c98
* Move some more files to toplevel gfx dir.ben@chromium.org2010-03-171-1/+1
| | | | | | | | | TBR=darin BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41812 0039d316-1c4b-4281-b951-d872f2087c98
* Change a couple of LOG/CHECK macros to GPU_LOG/GPU_CHECK, which means I candspringer@google.com2010-03-162-2/+13
| | | | | | | | | | use this code as-is to build a GPU client outside of the Chromium tree. This is required for debugging NaCl modules as trusted plugins in the NaCl SDK. Review URL: http://codereview.chromium.org/1000002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41719 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed bugs in glActiveTexture. Added real implementationgman@chromium.org2010-03-1616-41/+556
| | | | | | | | | | | | | for glCheckFramebufferStatus. Added support for hiding ID 0 for all functions that reference a framebuffer or renderbuffer. TEST=unit tests BUG=none Review URL: http://codereview.chromium.org/1023002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41692 0039d316-1c4b-4281-b951-d872f2087c98
* Track the bound framebuffer and renderbuffer andgman@chromium.org2010-03-113-19/+90
| | | | | | | | | | | | allow ID = 0 to make it through to the glBindXXX functions. TEST=none BUG=none Review URL: http://codereview.chromium.org/783002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41226 0039d316-1c4b-4281-b951-d872f2087c98
* First step on the way to a native GLES2 backend for commandgman@chromium.org2010-03-113-25/+81
| | | | | | | | | | | | | buffers. I mostly just copied the macros from O3D and make sure it compiled using our own GLES2 emu backend. It should theoretically compile on real native GLES2 but the setup in service/gles2_cmd_decoder.cc needs work. TEST=none BUG=none Review URL: http://codereview.chromium.org/799002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41224 0039d316-1c4b-4281-b951-d872f2087c98
* Implement the CoreAnimation drawing model for plug-ins, sharing IPC and some ↵pinkerton@chromium.org2010-03-101-335/+11
| | | | | | | | | rendering code with the GPU Plug-in. The drawing model negotiation is currently disabled so this should have no visible impact to plug-ins. BUG=32012 TEST=make sure the pepper GPU plug-ins still work. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41194 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 41158 - Implement the CoreAnimation drawing model for plugins, ↵pinkerton@chromium.org2010-03-101-11/+335
| | | | | | | | | | | | sharing IPC and some rendering code with the GPU Plugin. The drawing model negotiation is currently disabled so this should have no visible impact to plugins. BUG=32012 TEST=make sure the pepper GPU plugins still work. Review URL: http://codereview.chromium.org/673001 TBR=pinkerton@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41159 0039d316-1c4b-4281-b951-d872f2087c98
* Implement the CoreAnimation drawing model for plug-ins, sharing IPC and some ↵pinkerton@chromium.org2010-03-101-335/+11
| | | | | | | | | | rendering code with the GPU Plug-in. The drawing model negotiation is currently disabled so this should have no visible impact to plug-ins. BUG=32012 TEST=make sure the pepper GPU plug-ins still work. Review URL: http://codereview.chromium.org/673001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41158 0039d316-1c4b-4281-b951-d872f2087c98
* Another #include of <string.h> so that the nacl-g++ compiler will build Nativedspringer@google.com2010-03-101-0/+2
| | | | | | | | Client on 64-bit platforms. Review URL: http://codereview.chromium.org/777004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41117 0039d316-1c4b-4281-b951-d872f2087c98
* Add #include <string.h> so that the 64-bit nacl-g++ compiler has a definitiondspringer@google.com2010-03-101-0/+2
| | | | | | | | | | | | | | | for memcpy in gles2_cmd_format.h. This fixes a build breakage in native client. Initialize |command_buffer_| to NULL to prevent a random crash during load of a Pepper plugin on the Mac. BUG=none TEST=none Review URL: http://codereview.chromium.org/777003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41104 0039d316-1c4b-4281-b951-d872f2087c98
* Minor tweaks to get the NaCl tool-chain to build with the latest GPU stuff.dspringer@google.com2010-03-092-0/+3
| | | | | | | | | BUG=none TEST=none (Build the NaCl tool chain). Review URL: http://codereview.chromium.org/741001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41069 0039d316-1c4b-4281-b951-d872f2087c98
* Add command buffer test for case where command insertedgman@chromium.org2010-03-091-1/+25
| | | | | | | | | | | exactly matches the space left in the command buffer. TEST=unit test BUG=none Review URL: http://codereview.chromium.org/672009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41066 0039d316-1c4b-4281-b951-d872f2087c98
* Rearrange GLES2 files so they are easier to usegman@chromium.org2010-03-0833-1769/+217
| | | | | | | | | | | from native client and pepper. TEST=none BUG=none Review URL: http://codereview.chromium.org/668205 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40956 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed a command buffer wrap around bug.gman@chromium.org2010-03-082-1/+5
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/668212 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40910 0039d316-1c4b-4281-b951-d872f2087c98
* Change gl2.h to default to C bindingsgman@chromium.org2010-03-082-4/+25
| | | | | | | | | | | | This is a smaller change than rearranging the files under gpu. That will be the next step. TEST=none BUG=none Review URL: http://codereview.chromium.org/669258 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40909 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for opening a GPU command buffer from a renderer processes ↵apatrick@chromium.org2010-03-052-87/+156
| | | | | | | | | | | | through a GPU channel. Probably only works in windows only so far. TEST=none BUG=none Review URL: http://codereview.chromium.org/657046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40783 0039d316-1c4b-4281-b951-d872f2087c98
* Resubmittinggman@chromium.org2010-03-058-117/+407
| | | | | | | | | | | http://codereview.chromium.org/668131 TEST=none BUG=none Review URL: http://codereview.chromium.org/668139 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40721 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting previous CL.gman@chromium.org2010-03-058-407/+117
| | | | | | | | | | Sure would be nice if the trybots actually worked TEST=none BUG=none Review URL: http://codereview.chromium.org/668136 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40715 0039d316-1c4b-4281-b951-d872f2087c98
* Implements index validation for DrawElements.gman@chromium.org2010-03-058-117/+407
| | | | | | | | | | | | | (note: I also forgot to check in the changes to build_gles2_cmd_buffer.py from my last CL so that's in here as well) TEST=various unit tests BUG=26101 Review URL: http://codereview.chromium.org/668131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40713 0039d316-1c4b-4281-b951-d872f2087c98
* Added SafeMultiply and SafeAdd to check for overflowsgman@chromium.org2010-03-057-164/+497
| | | | | | | | | | | | | | | | | | | | | | | | | | in math calculations related to memory access. Refactored code to use them where appropriate. One issue that has come up is we need to make sure that no GLES2 client call can crash the GPU process. In other words, the GLES2Implementation must never generate a command the service side will see as malicious. For example: glTexImage2d(..width = 0x7fffffff, height = 0x7fffffff) should return an gl error rather than pass it through to the service side which will currently return a parse error and stop the GPU process. It does make me wonder if the service side should return GL errors for more things rather than parse errors. TEST=none BUG=35942,35943,35941,35938 Review URL: http://codereview.chromium.org/669011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40696 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt to submit this CL for the 3rd time. No changes.gman@chromium.org2010-03-0218-559/+747
| | | | | | | | | | | http://src.chromium.org/viewvc/chrome?view=rev&revision=40212 TEST=none BUG=none Review URL: http://codereview.chromium.org/661309 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40329 0039d316-1c4b-4281-b951-d872f2087c98
* Bullshit CL to get the buildbots to try againgman@chromium.org2010-02-271-1/+1
| | | | | | | | | | | because the chrome's flaky ass tests that break random builds TEST=flaky BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40221 0039d316-1c4b-4281-b951-d872f2087c98
* Revert http://codereview.chromium.org/660238gman@chromium.org2010-02-2718-747/+559
| | | | | | | | | TEST=none BUG=none TBR=gman@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40217 0039d316-1c4b-4281-b951-d872f2087c98
* Try again.gman@chromium.org2010-02-271-1/+1
| | | | | | | | | | | It sure would be nice if the trybots caught these issues :-( TBR=apatrick@chromium.org TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40216 0039d316-1c4b-4281-b951-d872f2087c98
* Resumitting reverted CLgman@chromium.org2010-02-2718-559/+747
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/660238 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40212 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for GL break on Linux build.gman@chromium.org2010-02-271-1/+1
| | | | | | | | | TBR=apatrick@google.com TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40204 0039d316-1c4b-4281-b951-d872f2087c98
* "/b/slave/chromium-rel-linux/build/src/gpu/command_buffer/client/gles2_demo_ ↵thakis@chromium.org2010-02-2718-747/+559
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cc.cc:50:warning: 'length' may be used uninitialized in this function" Revert 40193 - Added support for glGetString, glGetShaderSource, glGetProgramInfoLog and glGetShaderInfoLog This turned up lots of issues. * glGetShaderiv needed to be wrapped so it returns the size of the shader the user passed in. Not the munged shader sent to GL. * Another issue that came up is that client side validation is needed to ensure that the client side GLES2Implementation does not generate bad commands. For example, calling glUniform1iv with a negative count would generate a bad command. The service side would see that and think the program was malicious and stop processing commands. So, that means I had to add some client side validation and wrap glGetError on the client side so I can synthisize GL errors there. TEST=lots of unit tests. BUG=none Review URL: http://codereview.chromium.org/661220 TBR=gman@chromium.org Review URL: http://codereview.chromium.org/660229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40198 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for glGetString, glGetShaderSource,gman@chromium.org2010-02-2718-559/+747
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glGetProgramInfoLog and glGetShaderInfoLog This turned up lots of issues. * glGetShaderiv needed to be wrapped so it returns the size of the shader the user passed in. Not the munged shader sent to GL. * Another issue that came up is that client side validation is needed to ensure that the client side GLES2Implementation does not generate bad commands. For example, calling glUniform1iv with a negative count would generate a bad command. The service side would see that and think the program was malicious and stop processing commands. So, that means I had to add some client side validation and wrap glGetError on the client side so I can synthisize GL errors there. TEST=lots of unit tests. BUG=none Review URL: http://codereview.chromium.org/661220 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40193 0039d316-1c4b-4281-b951-d872f2087c98
* Adds validation for GLsizei and GLsizeiptr types.gman@chromium.org2010-02-255-24/+671
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/660105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40048 0039d316-1c4b-4281-b951-d872f2087c98
* Reorangizing the GLES2 code to handle sharedgman@chromium.org2010-02-2532-3689/+4653
| | | | | | | | | | | | | | resources and non-renderable texture situations. I haven't written enough unit tests for this but the CL is already too big. TEST=none BUG=none Review URL: http://codereview.chromium.org/646070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39984 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes ReadPixel to have a result so the clientgman@chromium.org2010-02-246-20/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | side can know if it should or should not copy the results. This is the way the spec is. If ReadPixels fails it's not supposed to modify client side memory. Unfortunately that makes it slow because it stalls the GPU pipeline 3 times. The service side has to call glGetError to save up any current errors. That's one stall. Then it calls ReadPixels, another stall, finally calls glGetError a 3rd time to see if ReadPixels succeeded so that it can tell the client side implementation of ReadPixels whether or not to copy memory. We could decide to change the behavior of ReadPixels so it always copies. That wouldn't be spec complient but suspect most developers never expect it to fail and don't count on it not always writing to their memory. TEST=none BUG=none Review URL: http://codereview.chromium.org/652213 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39930 0039d316-1c4b-4281-b951-d872f2087c98
* Client side implementation of ReadPixelsgman@chromium.org2010-02-241-4/+58
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/657032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39826 0039d316-1c4b-4281-b951-d872f2087c98
* Add 3D support for the Mac on Leopard (OS X 10.5) and earlier. This CL usesdspringer@google.com2010-02-235-65/+267
| | | | | | | | | | | | | | | | | FBO rendering with glGetTexImage() into a TransportDIB that is then used as a texture for rendering the final image in the render view in the browser. While not optimal, it works and can be optimized later, after the new GPU process work is completed. This CL also enables stencil buffer support on the Mac. All the Pepper3D demos run on the Mac with these changes. BUG=none TEST=3D rendering unit tests. Review URL: http://codereview.chromium.org/647043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39744 0039d316-1c4b-4281-b951-d872f2087c98
* Added check for negative size to CommandBufferService.apatrick@chromium.org2010-02-222-1/+6
| | | | | | | | | TEST=regression test BUG=35931 Review URL: http://codereview.chromium.org/652064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39635 0039d316-1c4b-4281-b951-d872f2087c98