summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/client
Commit message (Collapse)AuthorAgeFilesLines
* Adds support for EXT_framebuffer_multisamplegman@chromium.org2010-08-233-0/+57
| | | | | | | | | | | | | | | I probably need more tests but in order to test I need to figure out how to init the system with different caps enabled from the unit tests and that's probably not a small amount of work so leaving that till later. TEST=some unit tests, ran conformance tests BUG=none Review URL: http://codereview.chromium.org/3122033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57081 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the gles2_demo to work with latest gpu processgman@chromium.org2010-07-192-0/+11
| | | | | | | | | | | stuff. Also added GL_BGRA_EXT to ElementsPerGroup TEST=hand ran gles2_demo BUG=none Review URL: http://codereview.chromium.org/2888016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52887 0039d316-1c4b-4281-b951-d872f2087c98
* Adds MapBufferSubData and MapTexSubImage2D.gman@chromium.org2010-07-1412-17/+992
| | | | | | | | | | | | | | | | | This is only the internal command buffer implementation. Connecting these functions publicly to PPAPI or whatever will happen separate from this CL. It's not clear to me where to put GL_READ_ONLY and GL_WRITE_ONLY Probably the same place we expose these 2 functions to the public. TEST=unit test BUG=none Review URL: http://codereview.chromium.org/2956005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52263 0039d316-1c4b-4281-b951-d872f2087c98
* gpu: add GLES/EGL support on linuxpiman@chromium.org2010-06-213-6/+0
| | | | | | Review URL: http://codereview.chromium.org/2829007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50397 0039d316-1c4b-4281-b951-d872f2087c98
* Added EGL based GLContext.apatrick@chromium.org2010-06-091-0/+3
| | | | | | | | | | | | | | Python script to generate code to dynamically bind to GL functions (native GL, OSMesa, EGL or mock GL for unit tests). This replaces GLEW because GLEW doesn't bind to the GLES dialect of GL. Moved the mock GL code into app/gfx/gl. Updated the GPU code and AcceleratedSurface to use the new GL bindings. TEST=trybots BUG=none Review URL: http://codereview.chromium.org/2134006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49332 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor CommandBufferHelper to use Jump to loopgman@chromium.org2010-06-033-39/+70
| | | | | | | | | | | | | instead of Noop. This makes it actually work if you tell the command buffer helper to use less than the entire command buffer. TEST=modified unit tests and ran GLES2 conformance tests. BUG=NONE Review URL: http://codereview.chromium.org/2509001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48835 0039d316-1c4b-4281-b951-d872f2087c98
* Makes shader translation a runtime switch.gman@chromium.org2010-05-174-7/+18
| | | | | | | | | | | | | | For WebGL the shader translation is off. For Pepper and other processes it is on. This will be removed and the tranlator will always be on at some point in the future TEST=More conformance tests pass, manually ran WebGL demos in Chrome. BUG=none Review URL: http://codereview.chromium.org/2127001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47441 0039d316-1c4b-4281-b951-d872f2087c98
* Adds support for compressed textures. DXT1 only.gman@chromium.org2010-05-172-22/+30
| | | | | | | | | | | | | | | | | | | This is a temporary implementation. The real implementation will require *) glGetString to return "GL_EXT_texture_compression_dxt1" *) CommandBufferEnable("GL_EXT_texture_compression_dxt1") to dynamically modify the validation after it has made sure the "GL_EXT_texture_compression_dxt1" is returned from the system level GL TEST=none BUG=none Review URL: http://codereview.chromium.org/2136003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47417 0039d316-1c4b-4281-b951-d872f2087c98
* Work around bug in gcc's name mangling causing linker to crash on Mackbr@google.com2010-05-141-3/+5
| | | | | | | | | | | | OS X. BUG=40845 TEST=none TBR=gman Review URL: http://codereview.chromium.org/2079003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47225 0039d316-1c4b-4281-b951-d872f2087c98
* Step 1: Changing CommandBufferHelper to only use a portiongman@chromium.org2010-05-127-16/+24
| | | | | | | | | | | | | | | | | of the command buffer. This brought out the fact that there were lots of places in the code mixing size in bytes with num command buffer entries. This fixes most of those issues. No public interface uses num command buffer entries except gpu::CommandBuffer::State where it makes sense. TEST=relying on unit tests, conformance tests and chrome BUG=none Review URL: http://codereview.chromium.org/2008014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47041 0039d316-1c4b-4281-b951-d872f2087c98
* Changes the command buffer code to check that allgman@chromium.org2010-05-121-2/+2
| | | | | | | | | | | | enabled vertex attribs are valid, not just the ones the current program is using. TEST=unit tests BUG=none Review URL: http://codereview.chromium.org/2021007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47040 0039d316-1c4b-4281-b951-d872f2087c98
* Resubmit CL http://codereview.chromium.org/1992008/gman@google.com2010-05-084-0/+44
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/2013010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46793 0039d316-1c4b-4281-b951-d872f2087c98
* Revert gpu CL which broke the Mac build.shess@chromium.org2010-05-084-44/+0
| | | | | | | | | | | | | | | | | | | | Reverting change by gman@chromium.org, Fri 07 May 2010 16:35:41, r46756, original comment: This CL adds the option to support buffers that are bound to more than one target. <snip> original review URL: http://codereview.chromium.org/1992008 TBR=gman@chromium.org BUG=none TEST=Mac waterfall green Review URL: http://codereview.chromium.org/1988007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46762 0039d316-1c4b-4281-b951-d872f2087c98
* This CL adds the option to support buffers that are boundgman@chromium.org2010-05-074-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to more than one target. We had originally decided that this would be an disallowed. glBindBuffer(GL_ARRAY_BUFFER, some_buffer_id); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, some_buffer_id); Unfortunately the GLES2 conformance tests require this behavior. This CL makes this behavior possible but it has to be turned on because it means all buffers have to have CPU side backing (not just ELEMENT_ARRAY_BUFFERs) and it means a slowdown for dynamic vertex related stuff like skinning because an extra copy has to be made every time they are updated. So, by default it will be off but we'll come up with some way to turn it on. Al's suggestion is to use eglCreateContext with a custom intialization attribute. My #1 question: What about the name of the command, the name of the constant and the filename the constant is in. Any thoughts? TEST=none BUG=none Review URL: http://codereview.chromium.org/1992008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46756 0039d316-1c4b-4281-b951-d872f2087c98
* Various fixes for the OpenGL ES 2.0 conformance tests.gman@chromium.org2010-05-062-19/+54
| | | | | | | | | | | | | | Was failing 268 of 1198 Now failing 266 of 1198 ugh! all those changes only fixed 2 tests :-( TEST=some unit test and conformance tests. BUG=none Review URL: http://codereview.chromium.org/1942004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46572 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some memory leaks in GPU tests.estade@chromium.org2010-05-044-30/+13
| | | | | | | | | BUG=42904 TEST=run the tests Review URL: http://codereview.chromium.org/1796010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46303 0039d316-1c4b-4281-b951-d872f2087c98
* Fix readpixels issuegman@chromium.org2010-05-031-1/+1
| | | | | | | | | | | will check in tests when machine is working again TBR=kbr@chromium.org TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46297 0039d316-1c4b-4281-b951-d872f2087c98
* Adds support for shared resources.gman@chromium.org2010-05-0311-248/+229
| | | | | | | | | | | | | | | | It's not clear how to test this easily it seems like we an integration test is needed at some point. I did run the conformance tests with share_resources set to true and it rand without crashing. TEST=unit tests BUG=none Review URL: http://codereview.chromium.org/1817002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46264 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Bug in RingBuffergman@chromium.org2010-04-303-16/+39
| | | | | | | | | TEST=unit test BUG=42859 Review URL: http://codereview.chromium.org/1806003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46017 0039d316-1c4b-4281-b951-d872f2087c98
* Adds error messages for synthesized gl errors.gman@chromium.org2010-04-293-42/+61
| | | | | | | | | | | | | 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-285-18/+573
| | | | | | | | | | | | 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
* Changes the code to use separate ids namspacesgman@chromium.org2010-04-274-50/+47
| | | | | | | | | | | | 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
* A bunch more GLES2 conformance test fixes.gman@chromium.org2010-04-221-0/+6
| | | | | | | | | | | | | | 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
* A few fixes for GLES2 for the conformance tests.gman@chromium.org2010-04-211-3/+17
| | | | | | | | | 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
* Added facility to stub log and check. It is still not ideal but workable.alokp@chromium.org2010-04-211-2/+2
| | | | | | Review URL: http://codereview.chromium.org/1697002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45192 0039d316-1c4b-4281-b951-d872f2087c98
* Resubmit CL#1629004 Support for client side buffersgman@chromium.org2010-04-139-137/+1473
| | | | | | | | 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-139-1473/+137
| | | | | | | | | 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-139-137/+1473
| | | | | | | | | | | | | 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-124-1/+58
| | | | | | | | | | | | 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
* - Extracted platform specific code from GLES2 command decoder to platform ↵apatrick@chromium.org2010-04-091-1/+1
| | | | | | | | | | | | | 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
* 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
* Calling OpenGL from the renderer processapatrick@chromium.org2010-03-254-11/+15
| | | | | | | | | | | | | | - 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-246-24/+82
| | | | | | | | | | | | 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-48/+48
| | | | | | | | | | | 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
* Change a couple of LOG/CHECK macros to GPU_LOG/GPU_CHECK, which means I candspringer@google.com2010-03-161-2/+2
| | | | | | | | | | use this code as-is to build a GPU client outside of the Chromium tree. This is required for debugging NaCl modules as trusted plugins in the NaCl SDK. Review URL: http://codereview.chromium.org/1000002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41719 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed bugs in glActiveTexture. Added real implementationgman@chromium.org2010-03-163-8/+12
| | | | | | | | | | | | | 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
* Another #include of <string.h> so that the nacl-g++ compiler will build Nativedspringer@google.com2010-03-101-0/+2
| | | | | | | | Client on 64-bit platforms. Review URL: http://codereview.chromium.org/777004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41117 0039d316-1c4b-4281-b951-d872f2087c98
* Minor tweaks to get the NaCl tool-chain to build with the latest GPU stuff.dspringer@google.com2010-03-091-0/+1
| | | | | | | | | BUG=none TEST=none (Build the NaCl tool chain). Review URL: http://codereview.chromium.org/741001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41069 0039d316-1c4b-4281-b951-d872f2087c98
* Add command buffer test for case where command insertedgman@chromium.org2010-03-091-1/+25
| | | | | | | | | | | exactly matches the space left in the command buffer. TEST=unit test BUG=none Review URL: http://codereview.chromium.org/672009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41066 0039d316-1c4b-4281-b951-d872f2087c98
* Rearrange GLES2 files so they are easier to usegman@chromium.org2010-03-0814-32/+38
| | | | | | | | | | | from native client and pepper. TEST=none BUG=none Review URL: http://codereview.chromium.org/668205 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40956 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed a command buffer wrap around bug.gman@chromium.org2010-03-081-0/+4
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/668212 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40910 0039d316-1c4b-4281-b951-d872f2087c98
* Change gl2.h to default to C bindingsgman@chromium.org2010-03-081-0/+1
| | | | | | | | | | | | This is a smaller change than rearranging the files under gpu. That will be the next step. TEST=none BUG=none Review URL: http://codereview.chromium.org/669258 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40909 0039d316-1c4b-4281-b951-d872f2087c98
* Added SafeMultiply and SafeAdd to check for overflowsgman@chromium.org2010-03-052-36/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | in math calculations related to memory access. Refactored code to use them where appropriate. One issue that has come up is we need to make sure that no GLES2 client call can crash the GPU process. In other words, the GLES2Implementation must never generate a command the service side will see as malicious. For example: glTexImage2d(..width = 0x7fffffff, height = 0x7fffffff) should return an gl error rather than pass it through to the service side which will currently return a parse error and stop the GPU process. It does make me wonder if the service side should return GL errors for more things rather than parse errors. TEST=none BUG=35942,35943,35941,35938 Review URL: http://codereview.chromium.org/669011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40696 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt to submit this CL for the 3rd time. No changes.gman@chromium.org2010-03-024-74/+275
| | | | | | | | | | | 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
* Revert http://codereview.chromium.org/660238gman@chromium.org2010-02-274-275/+74
| | | | | | | | | TEST=none BUG=none TBR=gman@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40217 0039d316-1c4b-4281-b951-d872f2087c98
* Try again.gman@chromium.org2010-02-271-1/+1
| | | | | | | | | | | It sure would be nice if the trybots caught these issues :-( TBR=apatrick@chromium.org TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40216 0039d316-1c4b-4281-b951-d872f2087c98
* Resumitting reverted CLgman@chromium.org2010-02-274-74/+275
| | | | | | | | | 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
* Fix for GL break on Linux build.gman@chromium.org2010-02-271-1/+1
| | | | | | | | | TBR=apatrick@google.com TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40204 0039d316-1c4b-4281-b951-d872f2087c98
* "/b/slave/chromium-rel-linux/build/src/gpu/command_buffer/client/gles2_demo_ ↵thakis@chromium.org2010-02-274-275/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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