summaryrefslogtreecommitdiffstats
path: root/gpu
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fix for build breakagegman@chromium.org2010-02-161-7/+7
| | | | | | | | | TEST=none BUG=none TBR=apatrick@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39156 0039d316-1c4b-4281-b951-d872f2087c98
* Adds texture tracking.gman@chromium.org2010-02-1621-538/+1955
| | | | | | | | | | | | | | | | | | I need to add a bunch more unit tests for the TextureManager but this CL is getting large so if you don't mind I'll do that in the next CL. I still need to use the texture tracking at draw time but that's going to require uniform tracking! UGH! Also breaks out a bunch of the tracking classes into their own files. TEST=none BUG=none Review URL: http://codereview.chromium.org/605018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39153 0039d316-1c4b-4281-b951-d872f2087c98
* Reimplemented glShaderSource in preparation for shadergman@chromium.org2010-02-129-97/+284
| | | | | | | | | | | | | | | compiler to make GLSL shaders DesktopGL complient. Shader source is now saved by the decoder because when glGetShaderSource is called we must return the source that was passed, not the munged source. TEST=none BUG=none Review URL: http://codereview.chromium.org/594037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38858 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented linux-specific NPAPI interface for pepper demos.alokp@chromium.org2010-02-111-7/+46
| | | | | | | BUG=26099 Review URL: http://codereview.chromium.org/599020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38727 0039d316-1c4b-4281-b951-d872f2087c98
* A few minor changes to windows implementation on windows.alokp@chromium.org2010-02-101-2/+5
| | | | | | Review URL: http://codereview.chromium.org/601016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38582 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented async flushes for Pepper 3D.apatrick@chromium.org2010-02-091-0/+5
| | | | | | | | | | | Added waitForProgress field to NPDeviceContext3D to select between a flush (that pushes more work to the GPU process and waits for at least some of it to have been completed) and getting the current state as quickly as possible. The previous method of checking to see if the put offset had advanced was incorrect. TEST=trybots BUG=none Review URL: http://codereview.chromium.org/561058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38540 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed GPU unit tests on Mac OS X.kbr@google.com2010-02-0910-28/+67
| | | | | | | | | | | | | | | - Fixed remaining issues with signed/unsigned comparisons, linkage of constants, and unused variables. - Fixed nasty bug where vtbl for GLES2Decoder was changing size during compilation, causing bizarre test failures. - Cleaned up AppKit warnings about no NSAutoreleasePool being present. BUG=none TEST=none (ran GPU unit tests on Mac OS X) Review URL: http://codereview.chromium.org/594004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38473 0039d316-1c4b-4281-b951-d872f2087c98
* Addsgman@chromium.org2010-02-0516-507/+1359
| | | | | | | | | | | | | | | | | glGetActiveAttrib glGetActiveUniform glGetAttachedShaders glGetShaderPrecision TEST=none BUG=none Review URL: http://codereview.chromium.org/577017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38270 0039d316-1c4b-4281-b951-d872f2087c98
* PGL was relying on pthread_key_create not returning zero, which does notsehr@google.com2010-02-051-6/+9
| | | | | | | | | seem to conform to the documented interface. I have added an allocated flag. This is needed to fix NaCl PGL. Review URL: http://codereview.chromium.org/576002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38186 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented window class on linux. Standalone demos are working on linux now.alokp@chromium.org2010-02-043-8/+63
| | | | | | Review URL: http://codereview.chromium.org/565041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38106 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for lost context recovery on the client side. None of our ↵apatrick@chromium.org2010-02-0312-87/+164
| | | | | | | | | | | | | | | | | | | service side GL implementations actually report lost contexts (yet). Added pglGetError to PGL library. pglSwapBuffers returns false on a lost context or other non-recoverable error and pglGetError reports PGL_CONTEXT_LOST. Updated demo plugins to reset their PGL contexts on context lost. Standalone plugins cannot currently recover from lost context because they don't use PGL. Added error code to NPDeviceContext3D for lost context. TEST=none BUG=none Review URL: http://codereview.chromium.org/566021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38039 0039d316-1c4b-4281-b951-d872f2087c98
* Changes necessary to compile gpu demos on linux. It is not functional yet ↵alokp@chromium.org2010-02-037-247/+329
| | | | | | | | | just compiling. BUG=26099 Review URL: http://codereview.chromium.org/552240 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37977 0039d316-1c4b-4281-b951-d872f2087c98
* [GPU] Get GPU process running on the mackbr@google.com2010-02-0313-18/+381
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial port of GPU process / plugin to Mac OS X. Uses new IOSurface APIs and therefore currently runs only on 10.6. Alternate strategy will need to be devised for 10.5. Slight UI issues remain such as GPU plugins initially showing up in the wrong place on the page. These will be fixed in follow-on bugs. Minimal changes made to command buffer code to get it to compile on Mac OS X. Commented out use of nested anonymous namespaces in gles2_cmd_decoder.cc which were causing the linker to crash with a seg fault. Refactored gyp files so the OS test enabling the GPU plugin is in one place, common.gypi, and other files test only the variable enable_gpu. Slight change to gles2_demo_cc.cc to add some simple animation to verify that updates from the GPU plugin are reaching the screen. Changed Pepper test plugin to use 3D view by default and commented out use of audio context because of recent issues. TEST=none (ran Pepper Test Plugin with 3D view enabled) BUG=http://crbug.com/25988 Review URL: http://codereview.chromium.org/558035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37934 0039d316-1c4b-4281-b951-d872f2087c98
* Implements glGetUniformiv and glGetUniformfv.gman@chromium.org2010-02-036-28/+413
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/566019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37918 0039d316-1c4b-4281-b951-d872f2087c98
* This file was missing from the last CL as it was sittinggman@chromium.org2010-02-022-2/+3
| | | | | | | | | | | | in another CL. Fortunately it didn't seem to break the build. TEST=none BUG=none Review URL: http://codereview.chromium.org/568024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37892 0039d316-1c4b-4281-b951-d872f2087c98
* Change the GLES2Implementation Flush and Finish functionsgman@chromium.org2010-02-022-8/+17
| | | | | | | | | | | | | | | | | | to emluate the GLES2 glFlush and glFinish more correctly. I don't like the fact that the GLES2CmdHelper::Finish autogeneated from glFinish overrides CommandBufferHelper::Finish but I'm not sure I'm feeling like making all those functions start with gl or something and all the fixes required just to avoid that. TEST=none BUG=none Review URL: http://codereview.chromium.org/561012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37863 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed compile/link errors for gpu unit-tests. I had to mostly fix ↵alokp@chromium.org2010-02-025-27/+66
| | | | | | | | signed/unsigned mismatch and link failures due to non-definition of static member variables. I still do not understand why gcc is behaving arbitrarily for only a few static member variables. AFAIK the standard says that static const numeric types do not need to be defined anymore. Review URL: http://codereview.chromium.org/560002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37837 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed compile error for unit-tests on linux. We do not include any glew file ↵alokp@chromium.org2010-02-023-5/+9
| | | | | | | | for unitests. They are mocked in gl_mock.h. gles2_cmd_decoder.cc included x_utils.h which in turn included glxew.h. Review URL: http://codereview.chromium.org/557087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37834 0039d316-1c4b-4281-b951-d872f2087c98
* Moved the initialization of static variable outside the class declaration. ↵alokp@chromium.org2010-02-022-1/+3
| | | | | | | | Necessary to make gcc happy. Review URL: http://codereview.chromium.org/567005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37766 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes a broken build (missing newline).rohitrao@chromium.org2010-02-011-1/+1
| | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/562002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37756 0039d316-1c4b-4281-b951-d872f2087c98
* Renamed ParseError -> Error, parse_error -> error, kParseNoError -> ↵apatrick@chromium.org2010-02-0131-1410/+1410
| | | | | | | | | | | | kNoError, commandBufferEntries -> commandBufferSize. Added NPDevice3DContextError enumeration. TEST=none BUG=none Review URL: http://codereview.chromium.org/558054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37751 0039d316-1c4b-4281-b951-d872f2087c98
* Remove trailing comma to allow compilation with Native Client's higher ↵sehr@google.com2010-02-011-1/+1
| | | | | | | | warning level. Review URL: http://codereview.chromium.org/552266 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37749 0039d316-1c4b-4281-b951-d872f2087c98
* Redesigned CommandBuffer and NPDevice3D interfaces.apatrick@chromium.org2010-01-2914-364/+237
| | | | | | | | | | | | All status is now in the Device3D context. It can be retreived with fewer IPC messages. It can be now be accessed off the main plugin thread, which is necessary to run OpenGL in another thread. TEST=none BUG=none Review URL: http://codereview.chromium.org/555020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37545 0039d316-1c4b-4281-b951-d872f2087c98
* Implements glGetVertexAttribPointervgman@chromium.org2010-01-298-164/+185
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/549201 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37496 0039d316-1c4b-4281-b951-d872f2087c98
* Add commands Jump, Call and Returngman@chromium.org2010-01-2813-112/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the minimal change version. There were 3 possible solution: #1) Remove these commands #2) Change the command buffers so the client side can not see the "get" pointer and therefore force the client side to use tokens to say in sync. It's the cleaner solution. It lets you put commands in any shared memory thereby getting rid of the ring buffer commands. But, it required major changes. After going down that path for an entire day I punted for... #3) Implement the commands assuming there is only one buffer the commands can be in (what is currently called the ring_buffer). With the jump commands available it no longer has to be used as a ring buffer. A Pepper or NaCl app can use it however they want but, unlike solution #2 they only get the one buffer. TEST=none BUG=none Review URL: http://codereview.chromium.org/555129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37446 0039d316-1c4b-4281-b951-d872f2087c98
* Windows now uses the TLS API instead of __declspec(thread) for client side ↵apatrick@chromium.org2010-01-2711-26/+158
| | | | | | | | | | | | | | | | | command buffer code compiled into DLLs. Other platforms use the pthreads API. This is because the __declspec(thread) approach does not on some platforms, including Windows XP and Mac. This is used for thread local pointers to the GL and PGL contexts. This unfortunate because the PGL and GL APIs do not generally explicitly reference a context. The current context is set with a call to pglMakeCurrent. An unfortunate consequence is that now in Pepper plugins, every call to a GL function will call TlsGetValue to get the thread's current context, which could have performance issues. I can't use base::ThreadLocalPointer because this code is compiled into an untrusted NaCl module and we don't want Chromium dependencies. TEST=try BUG=none Review URL: http://codereview.chromium.org/553050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37300 0039d316-1c4b-4281-b951-d872f2087c98
* Hooked all demos to gpu/demos.gyp. Now all demos run as both - standalone ↵alokp@chromium.org2010-01-268-97/+263
| | | | | | | | | executables and pepper plugin. BUG=26099 Review URL: http://codereview.chromium.org/549159 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37119 0039d316-1c4b-4281-b951-d872f2087c98
* Added infrastructure to run gpu demos under Pepper3D. Created a Demo class ↵alokp@chromium.org2010-01-2617-256/+781
| | | | | | | | | | | | | | | | | that can be run as both standalone apps (exe) or pepper plugins (dll). Created entry points and framework classes for both platforms - exe and pepper. A demo application has three layers: 1. Entry point - standalone (main_exe.cc): Contains the main function for console applications. Instantiates and runs a window. - pepper (main_pepper.cc): Contains NPAPI entry points. Instantiates pepper plugin object. 2. Framework that hosts demo - standalone: Window - pepper: Plugin 3. Demo - One demo class for all platforms. This does all the rendering and event handling. BUG=26099 Review URL: http://codereview.chromium.org/554053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37082 0039d316-1c4b-4281-b951-d872f2087c98
* linux: enable pepper pluginpiman@chromium.org2010-01-251-1/+1
| | | | | | | | | This is CL 36399 that was reverted in 36969 because it caused an ICE on the official builders. This adds a workaround for the ICE. Review URL: http://codereview.chromium.org/546136 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37055 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 36399 - linux: enable pepper_test_plugin laforge@chromium.org2010-01-231-1/+1
| | | | | | | | | | | | | | | | | This is breaking official x64 builds, notified team of break earlier in the week, but haven't seen a fix. I'm reverting now. Please fix before re-enabling. Original message: This includes a way to build it with full support on x64 (and arm ?), by specifying linux_fpic=1 in GYP_DEFINES and rerunning gyp. Review URL: http://codereview.chromium.org/551041 TBR=piman@chromium.org Review URL: http://codereview.chromium.org/548133 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36969 0039d316-1c4b-4281-b951-d872f2087c98
* Call xglMakeCurrent for each command buffer to allow for multiple GL contexts.apatrick@chromium.org2010-01-206-28/+108
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/551073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36683 0039d316-1c4b-4281-b951-d872f2087c98
* Added pglGetCurrentContext. Make gles2 implementation pointer global ↵apatrick@chromium.org2010-01-194-21/+36
| | | | | | | | | | | variable thread local. TEST=none BUG=none Review URL: http://codereview.chromium.org/549090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36560 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed gles2 demo by switching it from a console application to a windowed ↵apatrick@chromium.org2010-01-192-11/+26
| | | | | | | | | | | one. The HINSTANCE it was getting from the console was invalid for some reason. TEST=none BUG=none Review URL: http://codereview.chromium.org/542119 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36558 0039d316-1c4b-4281-b951-d872f2087c98
* Converted all demos to use gpu::demos::Example base class.alokp@chromium.org2010-01-196-302/+90
| | | | | | Review URL: http://codereview.chromium.org/542120 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36551 0039d316-1c4b-4281-b951-d872f2087c98
* Created a base class for examples taken from gles2 book. It encapsulates the ↵alokp@chromium.org2010-01-192-50/+90
| | | | | | | | well-defined pattern followed by the examples to eliminate duplicated code. Once we finalize this CL, I will go ahead and change all demos to use this base class. Review URL: http://codereview.chromium.org/543110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36542 0039d316-1c4b-4281-b951-d872f2087c98
* Change some paths, include files to make the sources build on Native Client.sehr@google.com2010-01-162-2/+10
| | | | | | | | Needed for Pepper progress. Review URL: http://codereview.chromium.org/552024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36458 0039d316-1c4b-4281-b951-d872f2087c98
* Added stencil-test demo.alokp@chromium.org2010-01-152-0/+74
| | | | | | | | | PS: I have not moved the repeated code to the base class for this demo because this is the last one I intend to submit before starting to port the demos to pepper. I will refactor all the demos to eliminate repeating code in light of pepper framework. BUG=26099 TEST=Run stencil_test executable. You should see four different-colored quads. Review URL: http://codereview.chromium.org/545092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36410 0039d316-1c4b-4281-b951-d872f2087c98