summaryrefslogtreecommitdiffstats
path: root/gpu
Commit message (Collapse)AuthorAgeFilesLines
* Removed direct inclusion of GL headers from gl_utils.h.apatrick@chromium.org2010-04-221-4/+0
| | | | | | | | | | | Now they are included indirectly via glew. This caused a problem for some people building for linux. TEST=trybots BUG=41039 Review URL: http://codereview.chromium.org/1714004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45338 0039d316-1c4b-4281-b951-d872f2087c98
* Landing 45240 again.apatrick@chromium.org2010-04-2219-1585/+48
| | | | | | | | | | | | | | GLContext implementations were dependent on some stuff in app/. Moved GLContext class to app/gfx/gl. Now it can be used by code outside of the gpu project, for example AcceleratedSurface. TEST=trybots, checkdeps BUG=none Review URL: http://codereview.chromium.org/1689006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45335 0039d316-1c4b-4281-b951-d872f2087c98
* A bunch more GLES2 conformance test fixes.gman@chromium.org2010-04-2211-114/+256
| | | | | | | | | | | | | | 1) All the glIsXXX functions were wrong 2) unlike buffers, renderbuffers, framebuffers, etc texture 0 is valid. 3) UseProgram accepts 0. 4) make glShaderSource fail if passed a NULL pointer (the spec doesn't say this afaict) TEST=conformance tests BUG=none Review URL: http://codereview.chromium.org/1750005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45293 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 45240 - Moved GLContext class to gfx/gl.apatrick@chromium.org2010-04-2119-47/+1585
| | | | | | | | | | | | | | Now it can be used by code outside of the gpu project, for example AcceleratedSurface. TEST=trybots BUG=none Review URL: http://codereview.chromium.org/1694003 TBR=jamesr@chromium.org Review URL: http://codereview.chromium.org/1747007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45244 0039d316-1c4b-4281-b951-d872f2087c98
* Moved GLContext class to gfx/gl.apatrick@chromium.org2010-04-2119-1585/+47
| | | | | | | | | | | Now it can be used by code outside of the gpu project, for example AcceleratedSurface. TEST=trybots BUG=none Review URL: http://codereview.chromium.org/1694003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45240 0039d316-1c4b-4281-b951-d872f2087c98
* A few fixes for GLES2 for the conformance tests.gman@chromium.org2010-04-212-5/+20
| | | | | | | | | TEST=conformance tests BUG=none Review URL: http://codereview.chromium.org/1719003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45215 0039d316-1c4b-4281-b951-d872f2087c98
* Changed NPAPI include path to be absolute. Since we cannot use ANY npapi ↵alokp@chromium.org2010-04-213-8/+4
| | | | | | | | header, keeping the include path as absolute is less confusing. Review URL: http://codereview.chromium.org/1722001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45193 0039d316-1c4b-4281-b951-d872f2087c98
* Added facility to stub log and check. It is still not ideal but workable.alokp@chromium.org2010-04-212-21/+11
| | | | | | Review URL: http://codereview.chromium.org/1697002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45192 0039d316-1c4b-4281-b951-d872f2087c98
* Client side code should include local logging so it can be stubbed out.alokp@chromium.org2010-04-212-7/+3
| | | | | | Review URL: http://codereview.chromium.org/1714001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45191 0039d316-1c4b-4281-b951-d872f2087c98
* Some GL drivers incorrectly return "gl_DepthRange.far" asgman@chromium.org2010-04-216-50/+143
| | | | | | | | | | | | | a uniform when querying the uniforms. This CL checks for that condition and hides that from the client programs. TEST=unit tests BUG=none Review URL: http://codereview.chromium.org/1700002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45131 0039d316-1c4b-4281-b951-d872f2087c98
* Added OSMesa based GLContext.apatrick@chromium.org2010-04-2015-499/+872
| | | | | | | | | | | | - Renders 3D using Mesa offscreen software renderer. - Will be used to run 3D tests on bots that do not support native OpenGL. - Extended glew library to use the osmesa shared library instead of the regular OpenGL one if it is in the search path. - Only works on Windows with this changelist, though other platforms will continue to use native OpenGL. - Added a stub GLContext implementation for use in unit tests. Review URL: http://codereview.chromium.org/1629029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45093 0039d316-1c4b-4281-b951-d872f2087c98
* New experimental Pepper device API.apatrick@chromium.org2010-04-163-0/+97
| | | | | | | | | | | | | | | - makes device contexts opaque to the plugin - can get / set multiple attributes and flush with a single call (and underlying IPC message exchange) - currently works in parallel with old API - adapted pepper test plugin to use new API if use_new_npdevice_api=1 TEST=trybots, visual confirmation that pepper test plugin works with new API BUG=none Review URL: http://codereview.chromium.org/1529005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44840 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing missing newlineapatrick@chromium.org2010-04-141-1/+1
| | | | | | | | | TEST=none BUG=none TBR=kbr@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44546 0039d316-1c4b-4281-b951-d872f2087c98
* Clear GL contexts and frame buffers after creation and resizing.apatrick@chromium.org2010-04-147-88/+171
| | | | | | | | | | Also added a new "default" context so command decoders have a GL context they can rely on the state of. TEST=trybots, verified that buffers were clear. BUG=none Review URL: http://codereview.chromium.org/1593018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44544 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed loss of rendered output on Mac OS X if Pepper 3D application useskbr@google.com2010-04-1410-76/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | framebuffer objects. Conditionalized allocation of FBO in AcceleratedSurface class, and changed SwapBuffers to optionally copy from the current context's back buffer. Changed GPUProcessor on Mac to always use PbufferGLContext, and hooked in optional call to AcceleratedSurface's SwapBufers before calling user's callback. Completely disabled ViewGLContext on Mac OS X. This causes Pepper 3D applications to use the GGL default back buffer on Mac, which is the desired behavior. Ideally the FBO allocation would be factored out of the AcceleratedSurface class, and ideally the pbuffer setup code would not be duplicated between this class and PbufferGLContext. However, these cleanups are being deferred because they require substantial refactorings. Removed accelerated_surface_stub.cc, which isn't needed any more since AcceleratedSurface moved to app/. Tested: - Pepper 3D plugin with glBindFramebuffer(GL_FRAMEBUFFER, 0) in place with both IOSurface and TransportDIB code paths - Unity 3D with IOSurface / Core Animation code path BUG=41004 TEST=none (ran above tests) Review URL: http://codereview.chromium.org/1637007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44507 0039d316-1c4b-4281-b951-d872f2087c98
* Translate a few OpenGL ES values to OpenGL values.gman@chromium.org2010-04-141-4/+20
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/1604031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44431 0039d316-1c4b-4281-b951-d872f2087c98
* Added gl2ext.h for conformance tests to compile.alokp@chromium.org2010-04-131-0/+773
| | | | | | Review URL: http://codereview.chromium.org/1591030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44363 0039d316-1c4b-4281-b951-d872f2087c98
* Resubmit CL#1629004 Support for client side buffersgman@chromium.org2010-04-1324-170/+2178
| | | | | | | | TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44337 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting commit 44334gman@chromium.org2010-04-1324-2178/+170
| | | | | | | | | TEST=none BUG=none TBR=dumi@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44335 0039d316-1c4b-4281-b951-d872f2087c98
* Adds client side arraysgman@chromium.org2010-04-1324-170/+2178
| | | | | | | | | | | | | The code is conditional. I guess my gaming side spidey senses can't stand the overhead but I could be convinced to make it non-conditional. TEST=various unit tests BUG=none Review URL: http://codereview.chromium.org/1629004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44334 0039d316-1c4b-4281-b951-d872f2087c98
* Adds stubs for glShaderBinary and glReleaseShaderCompiler.gman@chromium.org2010-04-1217-14/+414
| | | | | | | | | | | | Also handles certain GLES2 enums passed to glGetXXX that have no corresponding OpenGL enums TEST=none BUG=none Review URL: http://codereview.chromium.org/1609016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44254 0039d316-1c4b-4281-b951-d872f2087c98
* 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