summaryrefslogtreecommitdiffstats
path: root/gpu
Commit message (Collapse)AuthorAgeFilesLines
* Connects tracking renderbuffers and framebuffersgman@chromium.org2010-04-125-57/+278
| | | | | | | | | | | | and changes glBindXXX to auto-create gl resources to match the spec. TEST=unit tests BUG=none Review URL: http://codereview.chromium.org/1618010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44231 0039d316-1c4b-4281-b951-d872f2087c98
* - Extracted platform specific code from GLES2 command decoder to platform ↵apatrick@chromium.org2010-04-0925-1117/+1381
| | | | | | | | | | | | | specific GLContext classes. - GLContext encapsulates management of GL contexts on each platform. - ReadPixels uses actual current window size to validate source rectangle. TEST=trybots, running Pepper 3D and WebGL demos on all platforms BUG=none Review URL: http://codereview.chromium.org/1605014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44129 0039d316-1c4b-4281-b951-d872f2087c98
* Enable GL_VERTEX_PROGRAM_POINT_SIZE during initialization to matchkbr@google.com2010-04-073-0/+14
| | | | | | | | | | | OpenGL ES 2.0 semantics. BUG=40172 TEST=ran Worlds of WebGL demo and verified point sprites change size Review URL: http://codereview.chromium.org/1567027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43878 0039d316-1c4b-4281-b951-d872f2087c98
* Fix uniform array support.gman@chromium.org2010-04-075-24/+89
| | | | | | | | | | | | | | | | | The issues fixed are 2 fold. 1) OpenGL ES 2.0 requires that array names be returned as "name[0]" where as OpenGL implementations sometimes return just "name" 2) When the name is an array name as in "array[0]" we need to match both "array" and "array[0]" TEST=various unit tests BUG=40172 Review URL: http://codereview.chromium.org/1607007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43805 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate unnecessary dependencies on OpenGL.framework.mark@chromium.org2010-04-021-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | I'm only making this change for the Mac because I can't test it for other platforms right now, but as a general rule, libraries belong inside link_settings sections, not all_dependent_settings (or both). all_dependent_settings says that anyone that depends on a given target, even transitively through a long chain, inherits the enclsoed settings. In this case, chrome_exe and helper_app would inappropriately be linked against OpenGL.framework, even though they did not need to be. It is enough for chrome_dll to link against OpenGL.framework. For that matter, the non-library uses of all_dependent_settings in this file are probably wrong, too. Generally, they should be replaced with direct_dependent_settings. Inappropriate use of all_dependent_settings results in -Defines and -Includes leaking, and can cause problems for remote downstream targets. BUG=none TEST=otool -L GC.app/Contents/MacOS/GC should not show OpenGL.framework Review URL: http://codereview.chromium.org/1604009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43533 0039d316-1c4b-4281-b951-d872f2087c98
* 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
* Added GPU unit tests to win, mac and linux builds. They aren't running yet.apatrick@chromium.org2010-03-291-82/+66
| | | | | | | | | TEST=trybots BUG=none Review URL: http://codereview.chromium.org/1577001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43013 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-2520-122/+820
| | | | | | | | | | | | | | - 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-2512-103/+475
| | | | | | | | | | | | | | | 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-193-6/+5
| | | | | | | | 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
* 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