summaryrefslogtreecommitdiffstats
path: root/gpu
Commit message (Collapse)AuthorAgeFilesLines
* Adds error messages for synthesized gl errors.gman@chromium.org2010-04-297-428/+583
| | | | | | | | | | | | | The next step would be to expose the service side once to the client but this step just adds the strings. TEST=none BUG=none Review URL: http://codereview.chromium.org/1699022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45909 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed off-by-one bug in returned name length in glGetActiveAttrib andkbr@google.com2010-04-291-2/+4
| | | | | | | | | | | glGetActiveUniform. BUG=none TEST=ran o3d-webgl tests Review URL: http://codereview.chromium.org/1748014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45905 0039d316-1c4b-4281-b951-d872f2087c98
* Changes the GLES2Implementation to use a RingBuffergman@chromium.org2010-04-286-18/+576
| | | | | | | | | | | | to manage the transfer buffer. This is significantly faster than the FencedAllocator for our purposes. TEST=some unit tests BUG=none Review URL: http://codereview.chromium.org/1796002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45844 0039d316-1c4b-4281-b951-d872f2087c98
* Added shader type to shader info.alokp@chromium.org2010-04-284-13/+30
| | | | | | Review URL: http://codereview.chromium.org/1696012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45823 0039d316-1c4b-4281-b951-d872f2087c98
* Temporarily removed references to angleproject. It will be added back when ↵alokp@chromium.org2010-04-271-7/+7
| | | | | | | | | angleproject is added. Still fighting with gclient to make it forget about previous references to angleproject. TBR=kbr@chromium.org Review URL: http://codereview.chromium.org/1739013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45746 0039d316-1c4b-4281-b951-d872f2087c98
* Add eglGetProcAddress to pgl.gman@chromium.org2010-04-274-312/+319
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/1797001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45734 0039d316-1c4b-4281-b951-d872f2087c98
* glGetProgramiv was returning incorrect values for ↵alokp@chromium.org2010-04-272-3/+6
| | | | | | | | GL_ACTIVE_UNIFORM_MAX_LENGTH and GL_ACTIVE_ATTRIBUTE_MAX_LENGTH. It was not adjusting for NULL terminator. Review URL: http://codereview.chromium.org/1750015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45732 0039d316-1c4b-4281-b951-d872f2087c98
* GPU service interprets glFinish as glFlush.apatrick@chromium.org2010-04-273-3/+7
| | | | | | | | | | | | | This is so the single threaded GPU service does not get delayed executing glFinish, which could prevent progress in rendering all other GL contexts. Instead just issue a glFlush to ensure that the pending commands will be processed in the future. From a client side perspective the semantics of glFlush and glFinish are still different. glFlush is asynchronous whereas glFinish is synchronous. The latter waits for the service to acknowledge that it has issued the glFlush. glFinish can therefore be used to synchronize multiple threads that are issuing commands to GL contexts that share a common namespace. TEST=trybots BUG=none Review URL: http://codereview.chromium.org/1719019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45724 0039d316-1c4b-4281-b951-d872f2087c98
* Changes the code to use separate ids namspacesgman@chromium.org2010-04-2733-1013/+903
| | | | | | | | | | | | for buffers, textures, programs, etc.. This is needed to pass GLES2 conformance tests. TEST=old unit tests BUG=none Review URL: http://codereview.chromium.org/1747013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45654 0039d316-1c4b-4281-b951-d872f2087c98
* Added third_party/angleproject to gpu/DEPS to pass checkdeps.alokp@chromium.org2010-04-261-0/+1
| | | | | | Review URL: http://codereview.chromium.org/1745015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45620 0039d316-1c4b-4281-b951-d872f2087c98
* Made gpu demo framework plugins fail without crashing if pepper 3D cannot be ↵apatrick@chromium.org2010-04-262-11/+33
| | | | | | | | | | | initialized. TEST=trybots BUG=none Review URL: http://codereview.chromium.org/1775001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45617 0039d316-1c4b-4281-b951-d872f2087c98
* An implementation of eglProcAddressgman@chromium.org2010-04-261-0/+312
| | | | | | | | | | | | | I don't auto-generate this because it seems like we should make sure to expressly expose only those functions we want to expose. TEST=none BUG=none Review URL: http://codereview.chromium.org/1700015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45614 0039d316-1c4b-4281-b951-d872f2087c98
* Integrated glsl translator with command-buffer service.alokp@chromium.org2010-04-232-6/+71
| | | | | | Review URL: http://codereview.chromium.org/1773001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45485 0039d316-1c4b-4281-b951-d872f2087c98
* 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