summaryrefslogtreecommitdiffstats
path: root/gpu
Commit message (Collapse)AuthorAgeFilesLines
* amend DEPS now files have movedben@chromium.org2010-03-171-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41815 0039d316-1c4b-4281-b951-d872f2087c98
* Move some more files to toplevel gfx dir.ben@chromium.org2010-03-172-2/+2
| | | | | | | | | 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
* Remove redundant nphostapi.h from webkit/glue/plugins, update source files asdspringer@google.com2010-03-154-4/+4
| | | | | | | | | | | | | | needed. Note that this change is required for the Native Client SDK, because comman_buffer_pepper.h erroneously references nphostpis.h from webkit/glue. BUG=none TEST=none Review URL: http://codereview.chromium.org/1000001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41631 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-0835-676/+226
| | | | | | | | | | | 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-083-4/+26
| | | | | | | | | | | | 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
* Make the pepper 2D flush callback actually function as advertised. It will nowbrettw@chromium.org2010-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | get called asynchronously when the bits are actually copied to the screen, rather than synchronously from inside the paint function. This makes it useful for plugins to use the callback for rate limiting. This also adds a lot of infrastructure for running tests on pepper devices, and includes a unit test for the new flush behavior. I made the existing RenderProcess object an abstract interface and made the existing MockProcess (renamed to be more clear) implement that. This avoids a static cast that would actually crash during a unit test because some code was hardcoded to expect a RenderProcess object. This fixes base's IDMap iterator which has apparently never been used for an IDMap with ownership semantics. TEST=Unit test included BUG=none Original review URL: http://codereview.chromium.org/661124 Review URL: http://codereview.chromium.org/664001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40813 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for opening a GPU command buffer from a renderer processes ↵apatrick@chromium.org2010-03-053-88/+157
| | | | | | | | | | | | 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
* Revert 40490 - Make the pepper 2D flush callback actually function as ↵brettw@chromium.org2010-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | advertised. It will now get called asynchronously when the bits are actually copied to the screen, rather than synchronously from inside the paint function. This makes it useful for plugins to use the callback for rate limiting. This also adds a lot of infrastructure for running tests on pepper devices, and includes a unit test for the new flush behavior. I made the existing RenderProcess object an abstract interface and made the existing MockProcess (renamed to be more clear) implement that. This avoids a static cast that would actually crash during a unit test because some code was hardcoded to expect a RenderProcess object. This fixes base's IDMap iterator which has apparently never been used for an IDMap with ownership semantics. TEST=Unit test included BUG=none Review URL: http://codereview.chromium.org/661124 TBR=brettw@chromium.org Review URL: http://codereview.chromium.org/660439 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40494 0039d316-1c4b-4281-b951-d872f2087c98
* Make the pepper 2D flush callback actually function as advertised. It will nowbrettw@chromium.org2010-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | get called asynchronously when the bits are actually copied to the screen, rather than synchronously from inside the paint function. This makes it useful for plugins to use the callback for rate limiting. This also adds a lot of infrastructure for running tests on pepper devices, and includes a unit test for the new flush behavior. I made the existing RenderProcess object an abstract interface and made the existing MockProcess (renamed to be more clear) implement that. This avoids a static cast that would actually crash during a unit test because some code was hardcoded to expect a RenderProcess object. This fixes base's IDMap iterator which has apparently never been used for an IDMap with ownership semantics. TEST=Unit test included BUG=none Review URL: http://codereview.chromium.org/661124 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40490 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-2533-3692/+4664
| | | | | | | | | | | | | | 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
* I just put the code that does not compile on ARM. Trybots will fail because ↵apatrick@chromium.org2010-02-249-19/+59
| | | | | | | | | | | | | | I had to remove these from the CL to make gcl upload properly accept it. A + base\scoped_open_process.h A + chrome\plugin\command_buffer_stub_win.cc TEST=try BUG=none Review URL: http://codereview.chromium.org/661022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39937 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 '-ldl' to Linux targets that use dynamic loader functions.mmoss@google.com2010-02-231-0/+2
| | | | | | | | | | | | | This fixes compilation errors on Karmic, where dlopen() and friends were undefined: http://chrome-buildbot.corp.google.com:8016/builders/Chromium%20Linux%20Builder%20(dbg-shlib)/builds/7777/steps/compile/logs/stdio The missing '-ldl' is papered over on Hardy because pretty much everything depends on gtk, which brings that in through pkg-config, but pkg-config gtk no longer includes '-ldl' on Karmic. Review URL: http://codereview.chromium.org/656014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39754 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
* Add build rules for Pepper 3D demos on the Mac.dspringer@google.com2010-02-232-14/+83
| | | | | | | | | BUG=none TEST=cd gpu.demos; open demos.xcodeproj; select any of the "Run *" targets, then use cmd-b (build). Review URL: http://codereview.chromium.org/652031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39731 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
* Revert 39530 - GPU plugin forwards repaint events to Pepper plugin.apatrick@chromium.org2010-02-209-59/+19
| | | | | | | | | | | | | | | | WM_PAINT results in a call to Pepper repaint callback. Implemented WM_ERASEBKGND to prevent flickering on repaint. Implemented PGL_NO_CONTEXT (copied from EGL spec). This is already reviewed by alokp but unfortunately got entangled with this CL. TEST=none BUG=none Review URL: http://codereview.chromium.org/571018 TBR=alokp@chromium.org Review URL: http://codereview.chromium.org/650100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39535 0039d316-1c4b-4281-b951-d872f2087c98
* GPU plugin forwards repaint events to Pepper plugin.apatrick@chromium.org2010-02-209-19/+59
| | | | | | | | | | | | | WM_PAINT results in a call to Pepper repaint callback. Implemented WM_ERASEBKGND to prevent flickering on repaint. Implemented PGL_NO_CONTEXT (copied from EGL spec). This is already reviewed by alokp but unfortunately got entangled with this CL. TEST=none BUG=none Review URL: http://codereview.chromium.org/571018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39530 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed integer overflow.apatrick@chromium.org2010-02-193-0/+16
| | | | | | | | | TEST=regression tests BUG=35931 Review URL: http://codereview.chromium.org/628004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39503 0039d316-1c4b-4281-b951-d872f2087c98
* Pulled out Callback code into base/callback.h. This is the first step ↵akalin@chromium.org2010-02-1912-2/+12
| | | | | | | | | | | | | towards redoing the Callback interfaces. Added and removed includes as needed. BUG=35223 TEST=trybots Review URL: http://codereview.chromium.org/646061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39419 0039d316-1c4b-4281-b951-d872f2087c98
* Removed redundant conditionals from gpu/demos.gyp.alokp@chromium.org2010-02-171-20/+13
| | | | | | Review URL: http://codereview.chromium.org/601085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39226 0039d316-1c4b-4281-b951-d872f2087c98
* Updates many commands to require the client to set the gman@chromium.org2010-02-177-23/+383
| | | | | | | | | | | | result->size to 0 or result->success to false before calling the command. TEST=none BUG=none Review URL: http://codereview.chromium.org/612006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39193 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes the issues with Jump, JumpRel, Call, CallRelgman@chromium.org2010-02-172-2/+6
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/614006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39192 0039d316-1c4b-4281-b951-d872f2087c98
* Make SharedMemory use uint32 instead of size_t. This removes the remaining ↵jam@chromium.org2010-02-161-1/+1
| | | | | | | | size_t's from the IPC code. Review URL: http://codereview.chromium.org/581001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39164 0039d316-1c4b-4281-b951-d872f2087c98