summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/build_gles2_cmd_buffer.py
Commit message (Collapse)AuthorAgeFilesLines
* dds some docs about the command buffer andgman@chromium.org2010-03-311-1/+61
| | | | | | | | | | | | 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
* Calling OpenGL from the renderer processapatrick@chromium.org2010-03-251-5/+5
| | | | | | | | | | | | | | - 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 the remaining bucket commands, switches thegman@chromium.org2010-03-241-256/+188
| | | | | | | | | | | | 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
* Refactored glGet commands to use a SizedResult forgman@chromium.org2010-03-171-41/+232
| | | | | | | | | | | 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
* Fixed bugs in glActiveTexture. Added real implementationgman@chromium.org2010-03-161-9/+43
| | | | | | | | | | | | | 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
* Track the bound framebuffer and renderbuffer andgman@chromium.org2010-03-111-7/+43
| | | | | | | | | | | | 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
* Resubmittinggman@chromium.org2010-03-051-34/+65
| | | | | | | | | | | http://codereview.chromium.org/668131 TEST=none BUG=none Review URL: http://codereview.chromium.org/668139 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40721 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting previous CL.gman@chromium.org2010-03-051-65/+34
| | | | | | | | | | Sure would be nice if the trybots actually worked TEST=none BUG=none Review URL: http://codereview.chromium.org/668136 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40715 0039d316-1c4b-4281-b951-d872f2087c98
* Implements index validation for DrawElements.gman@chromium.org2010-03-051-34/+65
| | | | | | | | | | | | | (note: I also forgot to check in the changes to build_gles2_cmd_buffer.py from my last CL so that's in here as well) TEST=various unit tests BUG=26101 Review URL: http://codereview.chromium.org/668131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40713 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt to submit this CL for the 3rd time. No changes.gman@chromium.org2010-03-021-72/+207
| | | | | | | | | | | http://src.chromium.org/viewvc/chrome?view=rev&revision=40212 TEST=none BUG=none Review URL: http://codereview.chromium.org/661309 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40329 0039d316-1c4b-4281-b951-d872f2087c98
* Bullshit CL to get the buildbots to try againgman@chromium.org2010-02-271-1/+1
| | | | | | | | | | | because the chrome's flaky ass tests that break random builds TEST=flaky BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40221 0039d316-1c4b-4281-b951-d872f2087c98
* Revert http://codereview.chromium.org/660238gman@chromium.org2010-02-271-207/+72
| | | | | | | | | TEST=none BUG=none TBR=gman@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40217 0039d316-1c4b-4281-b951-d872f2087c98
* Resumitting reverted CLgman@chromium.org2010-02-271-72/+207
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/660238 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40212 0039d316-1c4b-4281-b951-d872f2087c98
* "/b/slave/chromium-rel-linux/build/src/gpu/command_buffer/client/gles2_demo_ ↵thakis@chromium.org2010-02-271-207/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cc.cc:50:warning: 'length' may be used uninitialized in this function" Revert 40193 - Added support for glGetString, glGetShaderSource, glGetProgramInfoLog and glGetShaderInfoLog This turned up lots of issues. * glGetShaderiv needed to be wrapped so it returns the size of the shader the user passed in. Not the munged shader sent to GL. * Another issue that came up is that client side validation is needed to ensure that the client side GLES2Implementation does not generate bad commands. For example, calling glUniform1iv with a negative count would generate a bad command. The service side would see that and think the program was malicious and stop processing commands. So, that means I had to add some client side validation and wrap glGetError on the client side so I can synthisize GL errors there. TEST=lots of unit tests. BUG=none Review URL: http://codereview.chromium.org/661220 TBR=gman@chromium.org Review URL: http://codereview.chromium.org/660229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40198 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for glGetString, glGetShaderSource,gman@chromium.org2010-02-271-72/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glGetProgramInfoLog and glGetShaderInfoLog This turned up lots of issues. * glGetShaderiv needed to be wrapped so it returns the size of the shader the user passed in. Not the munged shader sent to GL. * Another issue that came up is that client side validation is needed to ensure that the client side GLES2Implementation does not generate bad commands. For example, calling glUniform1iv with a negative count would generate a bad command. The service side would see that and think the program was malicious and stop processing commands. So, that means I had to add some client side validation and wrap glGetError on the client side so I can synthisize GL errors there. TEST=lots of unit tests. BUG=none Review URL: http://codereview.chromium.org/661220 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40193 0039d316-1c4b-4281-b951-d872f2087c98
* Adds validation for GLsizei and GLsizeiptr types.gman@chromium.org2010-02-251-12/+40
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/660105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40048 0039d316-1c4b-4281-b951-d872f2087c98
* Reorangizing the GLES2 code to handle sharedgman@chromium.org2010-02-251-78/+115
| | | | | | | | | | | | | | resources and non-renderable texture situations. I haven't written enough unit tests for this but the CL is already too big. TEST=none BUG=none Review URL: http://codereview.chromium.org/646070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39984 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes ReadPixel to have a result so the clientgman@chromium.org2010-02-241-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | side can know if it should or should not copy the results. This is the way the spec is. If ReadPixels fails it's not supposed to modify client side memory. Unfortunately that makes it slow because it stalls the GPU pipeline 3 times. The service side has to call glGetError to save up any current errors. That's one stall. Then it calls ReadPixels, another stall, finally calls glGetError a 3rd time to see if ReadPixels succeeded so that it can tell the client side implementation of ReadPixels whether or not to copy memory. We could decide to change the behavior of ReadPixels so it always copies. That wouldn't be spec complient but suspect most developers never expect it to fail and don't count on it not always writing to their memory. TEST=none BUG=none Review URL: http://codereview.chromium.org/652213 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39930 0039d316-1c4b-4281-b951-d872f2087c98
* Adds texture tracking.gman@chromium.org2010-02-161-22/+22
| | | | | | | | | | | | | | | | | | 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-121-2/+4
| | | | | | | | | | | | | | | 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
* Fixed GPU unit tests on Mac OS X.kbr@google.com2010-02-091-2/+5
| | | | | | | | | | | | | | | - 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-051-11/+92
| | | | | | | | | | | | | | | | | 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
* This file was missing from the last CL as it was sittinggman@chromium.org2010-02-021-1/+2
| | | | | | | | | | | | 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
* Renamed ParseError -> Error, parse_error -> error, kParseNoError -> ↵apatrick@chromium.org2010-02-011-50/+50
| | | | | | | | | | | | 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
* Implements glGetVertexAttribPointervgman@chromium.org2010-01-291-81/+0
| | | | | | | | | 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
* Adds unit tests for glDrawArrays and glDrawBuffersgman@chromium.org2010-01-131-2/+11
| | | | | | | | | | | | | | | | | | | 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-131-2/+8
| | | | | | | | | | 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
* A bunch of unit tests for GLES2gman@chromium.org2010-01-051-470/+1202
| | | | | | | | | 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
* Adds a GLMock object so we can check the code isgman@chromium.org2009-12-231-4/+1
| | | | | | | | | | | | | | | | 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
* Add Immediate command data size validation.gman@chromium.org2009-12-221-58/+121
| | | | | | | | | | | | | | | | | | | | | | | 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
* Implements Validation for all GLenum arguments and gman@chromium.org2009-12-161-182/+625
| | | | | | | | | | | | | | GLint arguments that have specific valid values. Will add unit tests in separate CL as I expect to be able to auto generate unit tests. TEST=none BUG=none Review URL: http://codereview.chromium.org/505016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34726 0039d316-1c4b-4281-b951-d872f2087c98
* Another round of gcc fixes for GPU command buffers.scherkus@chromium.org2009-12-151-20/+49
| | | | | | | | | | | | This actually gets command_buffer_common_unittests building and passing. BUG=n/a TEST=n/a Review URL: http://codereview.chromium.org/488011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34595 0039d316-1c4b-4281-b951-d872f2087c98
* Added CommandBufferProxy, CommandBufferStub. Replaced NPAPI with IPC for ↵apatrick@google.com2009-12-121-4/+4
| | | | | | | | | | | synchronous messages. WebPluginDelegateImpl can instantiate a command buffer. Removed remaining dependencies on NPAPI. TEST=none BUG=none Review URL: http://codereview.chromium.org/465040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34397 0039d316-1c4b-4281-b951-d872f2087c98
* Setting some svn properties for /src/gpu files.scherkus@chromium.org2009-12-101-0/+0
| | | | | | | | | BUG=n/a TEST=n/a TBR=apatrick Review URL: http://codereview.chromium.org/491017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34289 0039d316-1c4b-4281-b951-d872f2087c98
* TBR=apatrick@chromium.orggman@chromium.org2009-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | TEST=none BUG=none NOTE: This CL was already reviewed. See: http://codereview.chromium.org/437044/show Add ids and stubs for new common commands and change it so command ids are 11 bits and the size is 21 bits. Since size is in command elements and 1 command element is 4 bytes that allows you to pass 2^23rd bytes inside the command buffer which is 8meg. Review URL: http://codereview.chromium.org/465013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33634 0039d316-1c4b-4281-b951-d872f2087c98
* Merged in recent changes to command buffer code.apatrick@google.com2009-11-251-152/+276
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/434063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33095 0039d316-1c4b-4281-b951-d872f2087c98
* Landing the GPU process and command buffer code again, this time with a DEPS ↵apatrick@google.com2009-11-251-0/+2577
| | | | | | | | | | file with the necessary include rules. TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33006 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting the rest of 32952apatrick@google.com2009-11-241-2577/+0
| | | | | | | | TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32970 0039d316-1c4b-4281-b951-d872f2087c98
* Branched gpu process and command buffer code into Chrome tree. Fixed up ↵apatrick@google.com2009-11-241-0/+2577
paths and other minor changes to make it work in the Chrome tree. Will remove copy from O3D tree shortly. Only works in Windows currently. TEST=none BUG=none Review URL: http://codereview.chromium.org/436017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32952 0039d316-1c4b-4281-b951-d872f2087c98