summaryrefslogtreecommitdiffstats
path: root/gpu
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fixed some bugs that prevented the GPU plugin from shutting down without ↵apatrick@google.com2010-01-083-2/+7
| | | | | | | | | | | crashing. TEST=trybots BUG=none Review URL: http://codereview.chromium.org/529004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35819 0039d316-1c4b-4281-b951-d872f2087c98
* White space change to trigger a build.maruel@chromium.org2010-01-081-0/+1
| | | | | | | TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35799 0039d316-1c4b-4281-b951-d872f2087c98
* Dummy whitespace change to force a build.maruel@chromium.org2010-01-081-1/+2
| | | | | | | TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35797 0039d316-1c4b-4281-b951-d872f2087c98
* Added an application framework for demos. This framework currently only ↵alokp@chromium.org2010-01-084-0/+275
| | | | | | | | | supports stand-alone apps. It will be extended to support trusted pepper and untrusted nacl apps. BUG=26099 Review URL: http://codereview.chromium.org/525083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35758 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Resubmit 35500: Added an application framework for demos. Ported ↵ajwong@chromium.org2010-01-068-448/+0
| | | | | | | | | | hellotriangle example in OpenGL ES book to use the application framework." This reverts commit r35647. TBR: alok git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35665 0039d316-1c4b-4281-b951-d872f2087c98
* Resubmit 35500: Added an application framework for demos. Ported ↵alokp@chromium.org2010-01-068-0/+448
| | | | | | | | | | | hellotriangle example in OpenGL ES book to use the application framework. BUG=26099 TEST=Try running hello_triangle executable, you should see a red triangle. Review URL: http://codereview.chromium.org/525070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35647 0039d316-1c4b-4281-b951-d872f2087c98
* Add missing stdio.h include for printf.craig.schlenter@chromium.org2010-01-061-0/+3
| | | | | | Review URL: http://codereview.chromium.org/518047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35637 0039d316-1c4b-4281-b951-d872f2087c98
* linux: implement gpu pluginpiman@chromium.org2010-01-067-26/+90
| | | | | | | | Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=35509 Review URL: http://codereview.chromium.org/500132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35612 0039d316-1c4b-4281-b951-d872f2087c98
* Minor fix for GLES2gman@chromium.org2010-01-061-1/+1
| | | | | | | | | | | | | Needs unit test but unfortunately that unit test needs some rather large setup to test so for now just checking in the fix. TEST=none BUG=none Review URL: http://codereview.chromium.org/525039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35608 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 35509 - linux: implement gpu pluginpiman@chromium.org2010-01-057-91/+27
| | | | | | | | | Review URL: http://codereview.chromium.org/500132 TBR=piman@chromium.org Review URL: http://codereview.chromium.org/525022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35511 0039d316-1c4b-4281-b951-d872f2087c98
* linux: fix uninitialized variablepiman@chromium.org2010-01-051-1/+1
| | | | | | | | TBR=apatrick Review URL: http://codereview.chromium.org/521027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35510 0039d316-1c4b-4281-b951-d872f2087c98
* linux: implement gpu pluginpiman@chromium.org2010-01-057-27/+91
| | | | | | Review URL: http://codereview.chromium.org/500132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35509 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 35500 - Added an application framework for demos. Ported ↵rsesek@chromium.org2010-01-057-445/+0
| | | | | | | | | | | | | hellotriangle example in OpenGL ES book to use the application framework. BUG=26099 TEST=Try running hello_triangle executable, you should see a red triangle. Review URL: http://codereview.chromium.org/465051 TBR=alokp@chromium.org Review URL: http://codereview.chromium.org/525019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35505 0039d316-1c4b-4281-b951-d872f2087c98
* Added an application framework for demos. Ported hello-triangle example in ↵alokp@chromium.org2010-01-057-0/+445
| | | | | | | | | | OpenGL ES book to use the application framework. BUG=26099 TEST=Try running hello_triangle executable, you should see a red triangle. Review URL: http://codereview.chromium.org/465051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35500 0039d316-1c4b-4281-b951-d872f2087c98
* A bunch of unit tests for GLES2gman@chromium.org2010-01-0518-889/+4527
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/521018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35495 0039d316-1c4b-4281-b951-d872f2087c98
* Changes needed to compile command-buffer code with nacl gcc. This CL just ↵alokp@chromium.org2010-01-041-0/+4
| | | | | | | | | adds unhandled enums in switch statements. BUG=26104 Review URL: http://codereview.chromium.org/515051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35485 0039d316-1c4b-4281-b951-d872f2087c98
* linux: gles2 client fixespiman@chromium.org2009-12-232-5/+4
| | | | | | Review URL: http://codereview.chromium.org/518011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35236 0039d316-1c4b-4281-b951-d872f2087c98
* Adds a GLMock object so we can check the code isgman@chromium.org2009-12-2312-119/+1174
| | | | | | | | | | | | | | | | correctly calling GL Rather than make a GLBase with all virtual functions I made it compile twice, once for shipping code where it includes the local platform's gl.h and again for unit tests where it includes gl_mock.h. TEST=none BUG=none Review URL: http://codereview.chromium.org/511001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35210 0039d316-1c4b-4281-b951-d872f2087c98
* Added Pepper 3D device that instantiates the GPU plugin and sends GLES2 ↵apatrick@google.com2009-12-2229-257/+247
| | | | | | | | | | | | | | | | | | | | | | | commands to it via a command buffer. Added API for managing buffers to Pepper 3D device. Removed DCHECK from WebPluginImpl::SetWindow that checks against a windowless plugin being given a window handle. Please check this! Now an initially windowless plugin instance gets a handle when it requests a Pepper 3D context. Perhaps the window handle should be concealed from the underlying plugin isntance. Removed enable_gpu gyp variable and C macro. GPU code is always built on windows but not mac or linux. It is enabled at runtime with the --enable-gpu-plugin switch. Redesigned CommandBuffer interface so it exposes shared memory through a Buffer. This was necessary because Pepper has no notion of shared memory handles. The Buffer exposes the shared memory as both a handle (through base::SharedMemory) and the mapped address and size. Refactored CommandBufferEngine so mapped shared memory addresses and sizes are returned with a single call rather than two separate calls. Added 3D demo to pepper test plugin. TEST=try servers BUG=none Review URL: http://codereview.chromium.org/367002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35185 0039d316-1c4b-4281-b951-d872f2087c98
* Add Immediate command data size validation.gman@chromium.org2009-12-223-542/+895
| | | | | | | | | | | | | | | | | | | | | | | Adds checks that Immediate commands all check the sizeo of the data they are going to access is valid. Also adds Vertex Attribute validation for glDrawXXX. In order to accomplish this it must track buffers and their sizes, the settings set with glVertexAttribPointer, program info at glLinkProgram time and which program as active via glUseProgram Given all that info it can validate that is is okay to call glDrawArray or glDrawElements. TEST=none BUG=none Review URL: http://codereview.chromium.org/501097 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35135 0039d316-1c4b-4281-b951-d872f2087c98
* Added chromium source file preamble.apatrick@google.com2009-12-1755-1042/+121
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/501094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34893 0039d316-1c4b-4281-b951-d872f2087c98