summaryrefslogtreecommitdiffstats
path: root/gpu
Commit message (Collapse)AuthorAgeFilesLines
* 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
* linux: enable pepper_test_pluginpiman@chromium.org2010-01-151-1/+1
| | | | | | | | This includes a way to build it with full support on x64 (and arm ?), by specifying linux_fpic=1 in GYP_DEFINES and re-running gyp. Review URL: http://codereview.chromium.org/551041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36399 0039d316-1c4b-4281-b951-d872f2087c98
* Added texture wrap demo.alokp@chromium.org2010-01-152-0/+75
| | | | | | | | BUG=26099 TEST=Run texture_wrap executable. You should see three quads, each with a different texture wrapping mode. Review URL: http://codereview.chromium.org/552012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36394 0039d316-1c4b-4281-b951-d872f2087c98
* Added variable name as required by style guide.alokp@chromium.org2010-01-153-6/+6
| | | | | | Review URL: http://codereview.chromium.org/549071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36387 0039d316-1c4b-4281-b951-d872f2087c98
* Added cubemap demo.alokp@chromium.org2010-01-152-0/+74
| | | | | | | BUG=26099 Review URL: http://codereview.chromium.org/549063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36356 0039d316-1c4b-4281-b951-d872f2087c98
* Resubmitting r36268 with a fix for mac:apatrick@chromium.org2010-01-155-0/+410
| | | | | | | | | | | Implemented PGL library, an EGL like API for Pepper. Updated Pepper test plugin to use it. TEST=trybots BUG=none Review URL: http://codereview.chromium.org/552007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36318 0039d316-1c4b-4281-b951-d872f2087c98
* Set disabled style on GPU window and plugin intermediate window so mouse ↵apatrick@chromium.org2010-01-151-0/+57
| | | | | | | | | | | messages pass through to the browser window. TEST=trybots BUG=none Review URL: http://codereview.chromium.org/549025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36311 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 36268 - Implemented PGL library, an EGL like API for Pepper. Updated ↵apatrick@chromium.org2010-01-145-410/+0
| | | | | | | | | | | | | | Pepper test plugin to use it. TEST=none yet BUG=none Review URL: http://codereview.chromium.org/545052 TBR=alokp@chromium.org Review URL: http://codereview.chromium.org/550048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36270 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented PGL library, an EGL like API for Pepper. Updated Pepper test ↵apatrick@chromium.org2010-01-145-0/+410
| | | | | | | | | | | plugin to use it. TEST=none yet BUG=none Review URL: http://codereview.chromium.org/545052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36268 0039d316-1c4b-4281-b951-d872f2087c98
* Added simple texture demo.alokp@chromium.org2010-01-142-0/+76
| | | | | | | | BUG=26099 TEST=Run simple_texture_2d executable. You should see a square with checker-board pattern. Review URL: http://codereview.chromium.org/543063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36267 0039d316-1c4b-4281-b951-d872f2087c98
* Added mip-mapping demo.alokp@chromium.org2010-01-142-0/+75
| | | | | | | | BUG=26099 TEST=Run mip_map_2d executable. You should see two quads with checker-board pattern. The left will exhibit aliasing but right one will be anti-aliased. Review URL: http://codereview.chromium.org/542067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36209 0039d316-1c4b-4281-b951-d872f2087c98
* Adds unit tests for glDrawArrays and glDrawBuffersgman@chromium.org2010-01-136-194/+778
| | | | | | | | | | | | | | | | | | | in the GLES2Decoder class of command buffers. Also fixes a few bugs related to validating buffer access and reporting GL errors I also separated out the id mapping, buffer tracking and program tracking into separate classes as different decoders will need to share instances of those classes once we allow sharing of resources. TEST=none BUG=none Review URL: http://codereview.chromium.org/546026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36178 0039d316-1c4b-4281-b951-d872f2087c98
* Adds a sync to glFinish and SwapBuffers at thegman@chromium.org2010-01-133-8/+20
| | | | | | | | | | GLES2Implementation level. You can still call these async from a gh GLES2Helper level. Review URL: http://codereview.chromium.org/545041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36160 0039d316-1c4b-4281-b951-d872f2087c98
* Changed the signature of Application::Draw to accept elapsed time. It will ↵alokp@chromium.org2010-01-134-7/+26
| | | | | | | | be used to update key frames or making the application frame-rate independent. However I think there is some bug somewhere. It takes an eternity for the cube in simple-vertex-shader demo to start rotating. Even when the cube starts rotatiing the performance is quite choppy. Review URL: http://codereview.chromium.org/551011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36156 0039d316-1c4b-4281-b951-d872f2087c98
* Added simple vertex shader demo. I had to make the following modifications ↵alokp@chromium.org2010-01-132-0/+78
| | | | | | | | | | | | to third-party code: - Changed client-side vertex array to VBO - Used GL_UNSIGNED_SHORT instead of GL_UNSIGNED_INT in glDrawElements because GL_UNSIGNED_INT is not supported for by OpenGL ES 2.0 for indices BUG=26099 TEST=Run simple_vertex_shader executable, you should see a rotating cube. Review URL: http://codereview.chromium.org/543015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36127 0039d316-1c4b-4281-b951-d872f2087c98
* Renamed gles_book_examples.gyp to gles2_book.gyp and hooked eveything back ↵alokp@chromium.org2010-01-091-1/+1
| | | | | | | | together. TBR=apatrick git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35876 0039d316-1c4b-4281-b951-d872f2087c98
* Renamed gles_book_examples to gles2_book to make it shorter and more ↵alokp@chromium.org2010-01-093-3/+3
| | | | | | | | | correct. I still need to rename gles_book_examples.gyp to gles2_book.gyp. I will do it in another CL as svn does not like changes in renamed directories. TBR=apatrick Review URL: http://codereview.chromium.org/543002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35875 0039d316-1c4b-4281-b951-d872f2087c98
* Added hello-triangle demo.alokp@chromium.org2010-01-093-0/+80
| | | | | | | | BUG=26099 TEST=Try running hello_triangle executable, you should see a red triangle Review URL: http://codereview.chromium.org/539001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35873 0039d316-1c4b-4281-b951-d872f2087c98
* linux: dynamically load libGL.so.1, and use glew to dynamically resolve symbolspiman@chromium.org2010-01-093-2/+40
| | | | | | | | | | This is to workaround NVIDIA's broken dlsym hook. BUG=16800 Review URL: http://codereview.chromium.org/525109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35863 0039d316-1c4b-4281-b951-d872f2087c98
* Removing the dependency of command-buffer client on base/task.h. This file ↵alokp@chromium.org2010-01-095-20/+19
| | | | | | | | | | includes base/logging.h which is difficult to compile under nacl. base-logging is stubbed in gpu by gpu/common/logging.h. BUG=26104 Review URL: http://codereview.chromium.org/527009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35860 0039d316-1c4b-4281-b951-d872f2087c98