summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer
Commit message (Collapse)AuthorAgeFilesLines
* Code cleanup: rename DisallowedExtensions to DisallowedFeature.zmo@google.com2011-09-2211-29/+29
| | | | | | | | BUG=none TEST=bots green Review URL: http://codereview.chromium.org/7979031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102213 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes issues where WGC3D based on OSMesa GL implementation isn't allowing ↵bsalomon@google.com2011-09-211-5/+3
| | | | | | | | | | OES extensions that are supported. TEST=none BUG=none Review URL: http://codereview.chromium.org/7980034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102135 0039d316-1c4b-4281-b951-d872f2087c98
* Turn on glsl built-in function emulation in ANGLE shader translator.zmo@google.com2011-09-206-23/+89
| | | | | | | | | | | | At the moment we need to turn it on for ATI/Mac and also Windows/D3D. Also, added the switch to turn of driver bug workaround, although this CL doesn't hook it up with all workarounds yet. BUG=96293 TEST=failing webgl glsl feature tests passing, with the switch, these tests fail. Review URL: http://codereview.chromium.org/7923002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101880 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 101545 - Moved code not relating to GPU scheduling out of ↵apatrick@chromium.org2011-09-2016-1259/+46
| | | | | | | | | | | | | | | | | | GpuScheduler and into GpuCommandBufferStub. Reason for revert: Compile failure on Arm. This was mostly a refactor because the code was awkward. I also deleted the original gles2_demo since we have the gles2 book demos now. THings still to do are a common way of setting up the few objects involved in initializing a command buffer that is now more-or-less duplicated in the gles2 conformance tests, the gles2 demos, the command buffer stub and the in-process webgl context. I also want to completely remove the reference to the decoder from the scheduler. I tested WebGL on both windows and mac and saw no regressions. I checked the conformance tests, the gpu tests and am running by the try bots now. The gles2 demos still work. Review URL: http://codereview.chromium.org/7782041 Review URL: http://codereview.chromium.org/7951008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101873 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 101545 - Moved code not relating to GPU scheduling out of ↵rsimha@chromium.org2011-09-1616-46/+1259
| | | | | | | | | | | | | | | | | | | | GpuScheduler and into GpuCommandBufferStub. Reason for revert: Compile failure on Arm. This was mostly a refactor because the code was awkward. I also deleted the original gles2_demo since we have the gles2 book demos now. THings still to do are a common way of setting up the few objects involved in initializing a command buffer that is now more-or-less duplicated in the gles2 conformance tests, the gles2 demos, the command buffer stub and the in-process webgl context. I also want to completely remove the reference to the decoder from the scheduler. I tested WebGL on both windows and mac and saw no regressions. I checked the conformance tests, the gpu tests and am running by the try bots now. The gles2 demos still work. Review URL: http://codereview.chromium.org/7782041 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7920015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101547 0039d316-1c4b-4281-b951-d872f2087c98
* Moved code not relating to GPU scheduling out of GpuScheduler and into ↵apatrick@chromium.org2011-09-1616-1259/+46
| | | | | | | | | | | | | | | GpuCommandBufferStub. This was mostly a refactor because the code was awkward. I also deleted the original gles2_demo since we have the gles2 book demos now. THings still to do are a common way of setting up the few objects involved in initializing a command buffer that is now more-or-less duplicated in the gles2 conformance tests, the gles2 demos, the command buffer stub and the in-process webgl context. I also want to completely remove the reference to the decoder from the scheduler. I tested WebGL on both windows and mac and saw no regressions. I checked the conformance tests, the gpu tests and am running by the try bots now. The gles2 demos still work. Review URL: http://codereview.chromium.org/7782041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101545 0039d316-1c4b-4281-b951-d872f2087c98
* Renamed ppb_opengles.h to ppb_opengles2.h.alokp@chromium.org2011-09-151-3/+11
| | | | | | Review URL: http://codereview.chromium.org/7888051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101308 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 100801 - Ensure that compositor does not block the renderer process ↵apatrick@chromium.org2011-09-131-2/+3
| | | | | | | | | by issuing too many SwapBuffers. This might have regressed with r84372. It caused there to be one additional token queued in the swap buffers token queue than before. Review URL: http://codereview.chromium.org/7876010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100978 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 100801 - Ensure that compositor does not block the renderer process ↵apatrick@chromium.org2011-09-121-3/+2
| | | | | | | | | | | | | | by issuing too many SwapBuffers. This might have regressed with r84372. It caused there to be one additional token queued in the swap buffers token queue than before. BUG=95649 Review URL: http://codereview.chromium.org/7867053 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7880009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100803 0039d316-1c4b-4281-b951-d872f2087c98
* Ensure that compositor does not block the renderer process by issuing too ↵apatrick@chromium.org2011-09-121-2/+3
| | | | | | | | | | | many SwapBuffers. This might have regressed with r84372. It caused there to be one additional token queued in the swap buffers token queue than before. BUG=95649 Review URL: http://codereview.chromium.org/7867053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100801 0039d316-1c4b-4281-b951-d872f2087c98
* Keep track of the current per-thread context and surface. Addkbr@google.com2011-09-091-6/+2
| | | | | | | | | | | | | | | | ScopedMakeCurrent to make it easier to briefly make another context current. Use it in AcceleratedSurface implementation and verify in the caller that it is working. This infrastructure would have made it possible to catch http://crbug.com/95492 and similar bugs where the wrong context was current. BUG=95962 TEST=ran CSS 3D example poster-circle; no assertion failures Review URL: http://codereview.chromium.org/7787022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100528 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Revert 100494 - Fix bug in SimulateAttrib0."""gman@chromium.org2011-09-092-42/+137
| | | | | | | | | | TEST=none BUG=95625 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7796016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100507 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 100494 - Revert "Revert 100453 - Revert "Revert 100384 - Fix bug in ↵dmichael@chromium.org2011-09-092-137/+42
| | | | | | | | | | | | | | | | | SimulateAttrib0."" The bug was a unsigned->signed conversion issue. Clang truncates, gcc/vc overflow TEST=unit tests BUG=95625 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7863007 TBR=gman@chromium.org Review URL: http://codereview.chromium.org/7796015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100498 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Revert 100453 - Revert "Revert 100384 - Fix bug in SimulateAttrib0.""gman@chromium.org2011-09-092-42/+137
| | | | | | | | | | | | The bug was a unsigned->signed conversion issue. Clang truncates, gcc/vc overflow TEST=unit tests BUG=95625 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7863007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100494 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 100453 - Revert "Revert 100384 - Fix bug in SimulateAttrib0 that did ↵dpapad@chromium.org2011-09-092-125/+32
| | | | | | | | | | | | | | | not check for out of memory." TEST=unit tests and run on linux touch (where bug was) BUG=95625 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7841067 TBR=gman@chromium.org Review URL: http://codereview.chromium.org/7866006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100473 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Revert 100384 - Fix bug in SimulateAttrib0 that did not check for ↵gman@chromium.org2011-09-092-32/+125
| | | | | | | | | | | | out of memory." TEST=unit tests and run on linux touch (where bug was) BUG=95625 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/7841067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100453 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 100384 - Fix bug in SimulateAttrib0 that did not check for out of memory.nsylvain@chromium.org2011-09-092-121/+32
| | | | | | | | | | | | | | | | | | It also did not correctly check for math overflow. Also fixed similar bugs in SimulateFixedAttribs TEST=unit tests BUG=95625 R=apatrick@chromium.org Review URL: http://codereview.chromium.org/7845017 TBR=gman@chromium.org Review URL: http://codereview.chromium.org/7857037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100411 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug in SimulateAttrib0 that did not check for out of memory.gman@chromium.org2011-09-092-32/+121
| | | | | | | | | | | | | | | It also did not correctly check for math overflow. Also fixed similar bugs in SimulateFixedAttribs TEST=unit tests BUG=95625 R=apatrick@chromium.org Review URL: http://codereview.chromium.org/7845017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100384 0039d316-1c4b-4281-b951-d872f2087c98
* A less-mysterious fix for b95492: Restore the GL context after resize.nduca@chromium.org2011-09-092-4/+9
| | | | | | | | | BUG=95492 TEST=crash reports do not reappear in canary Review URL: http://codereview.chromium.org/7847016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100350 0039d316-1c4b-4281-b951-d872f2087c98
* Destroy resolved framebuffers on resize, not swap.piman@chromium.org2011-09-081-8/+9
| | | | | | | | | | | | This fixes a regression introduced by http://codereview.chromium.org/7795015 BUG=95611 TEST=viewport-unchanged-upon-resize.html, read-pixels-test.html Review URL: http://codereview.chromium.org/7841047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100277 0039d316-1c4b-4281-b951-d872f2087c98
* Fix GPU cmd tests so they pass ASANgman@chromium.org2011-09-084-976/+925
| | | | | | | | | | | | TEST=unit tests BUG=95115 R=apatrick@chromium.org Review URL: http://codereview.chromium.org/7789021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100116 0039d316-1c4b-4281-b951-d872f2087c98
* Fix early flush logic.jbauman@chromium.org2011-09-082-8/+16
| | | | | | | | | | | | | Use clock() instead of time() to determine how much time has passed, as that likely has a higher resolution. Also add back in the old flush logic, as a backup in case clock() doesn't have a high-enough resolution to cause it to flush before the entire command buffer is used up. BUG= TEST= Review URL: http://codereview.chromium.org/7789023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100057 0039d316-1c4b-4281-b951-d872f2087c98
* Flush after resize to try to work around mac crashjamesr@chromium.org2011-09-071-0/+3
| | | | | | | | | BUG=95492 TEST=launch chrome to http://www.webkit.org/blog-files/3d-transforms/poster-circle.html Review URL: http://codereview.chromium.org/7839037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99978 0039d316-1c4b-4281-b951-d872f2087c98
* reconstitute moving 3d out of dev CL. (previous attempt was reverted)nfullagar@google.com2011-09-071-7/+7
| | | | | | | | | previous CL: http://codereview.chromium.org/7737013/ BUG= http://code.google.com/p/chromium/issues/detail?id=94320 TEST= try bots, manual testing Review URL: http://codereview.chromium.org/7837018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99968 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 99855 - Move PPAPI graphics3d and opengles interfaces out of Dev.nfullagar@google.com2011-09-061-7/+7
| | | | | | | | | | | BUG= http://code.google.com/p/chromium/issues/detail?id=94320 TEST= various nacl exmaples, try bots Review URL: http://codereview.chromium.org/7737013 TBR=nfullagar@google.com Review URL: http://codereview.chromium.org/7782020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99861 0039d316-1c4b-4281-b951-d872f2087c98
* Move PPAPI graphics3d and opengles interfaces out of Dev.nfullagar@google.com2011-09-061-7/+7
| | | | | | | | BUG= http://code.google.com/p/chromium/issues/detail?id=94320 TEST= various nacl exmaples, try bots Review URL: http://codereview.chromium.org/7737013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99855 0039d316-1c4b-4281-b951-d872f2087c98
* Fix an out of bound access in GLES2DecoderWithShaderTest.VertexAttribPointerglider@chromium.org2011-09-061-1/+1
| | | | | | | | | This bug was found by AddressSanitizer TBR=gman Review URL: http://codereview.chromium.org/7828094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99704 0039d316-1c4b-4281-b951-d872f2087c98
* Remove support for switching draw surfaces on a context.This was originally ↵apatrick@chromium.org2011-09-0224-241/+62
| | | | | | | | intended to share canvas "back buffers" between the GPU process and the browser process. The plan is to issue all the GL calls in the GPU process now, with the browser process just doing the final present. Removing the redundant code. Review URL: http://codereview.chromium.org/7701021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99424 0039d316-1c4b-4281-b951-d872f2087c98
* Static initializers: Remove <iostream> include from GPU logging system.erg@google.com2011-09-012-10/+32
| | | | | | | | | | | | | | | | | GPU can't rely on base because of nacl so it has its own logger. The logger includes <iostream> in the header, so most gles2 and command buffer files have std::__ioinit static initializers. Create a common logging.cc which has a simple method that just returns std::cerr so all the __ioinits collapse down to one. BUG=94794 TEST=compiles R=apatrick TBR=noelallen Review URL: http://codereview.chromium.org/7821004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99229 0039d316-1c4b-4281-b951-d872f2087c98
* Delay resize of the front buffer until the swap for offscreen buffers.piman@chromium.org2011-08-311-43/+46
| | | | | | | | | | | | | | Previous code was resizing, and clearing the front buffer as soon as the back buffer was resized. It can lead to race conditions where the compositor draws a black texture if it triggers between the resize and the swap. BUG=None TEST=Pepper Flash Review URL: http://codereview.chromium.org/7795015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98905 0039d316-1c4b-4281-b951-d872f2087c98
* Added GPU process "echo" IPC message.apatrick@chromium.org2011-08-307-26/+33
| | | | | | | | | | | The echo message is essentially an async fence with event based notification. The client gets a notification when the GPU process has completed all the work up to the last flush. I used it to replace the SwapBuffers / OnSwapBuffers synchronization and got rid of some of the callbacks in the lower layers of the stack. The SwapBuffers callbacks in the GPU process are only needed on mac now and I will replace them with something more generic soon. Review URL: http://codereview.chromium.org/7762013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98747 0039d316-1c4b-4281-b951-d872f2087c98
* Call glFinish just before reallocating offscreen_saved_color_texture_kbr@google.com2011-08-291-2/+4
| | | | | | | | | | | as possible workaround for crash in NVIDIA driver on Mac. Also fixed bug ID in comment. BUG=94103 TEST=none (manually tested some WebGL content) Review URL: http://codereview.chromium.org/7800006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98729 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 98355 (was semantically incorrect, caused assertion failures in Debug ↵kbr@google.com2011-08-291-4/+1
| | | | | | | | | | | | | | | | builds with some apps) - Further attempted workarounds for Mac- and NVIDIA-specific crash. Can not reproduce this crash in house any more, so adding more code along the lines of the earlier fix which was known to work on some hardware. BUG=94103 TEST=none (tested manually to verify no regression) Review URL: http://codereview.chromium.org/7756001 TBR=kbr@google.com Review URL: http://codereview.chromium.org/7795006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98694 0039d316-1c4b-4281-b951-d872f2087c98
* Further attempted workarounds for Mac- and NVIDIA-specific crash. Cankbr@google.com2011-08-251-1/+4
| | | | | | | | | | | not reproduce this crash in house any more, so adding more code along the lines of the earlier fix which was known to work on some hardware. BUG=94103 TEST=none (tested manually to verify no regression) Review URL: http://codereview.chromium.org/7756001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98355 0039d316-1c4b-4281-b951-d872f2087c98
* Use workaround for Mac NVIDIA driver bug on Lion as well.kbr@google.com2011-08-241-6/+4
| | | | | | | | BUG=94103 TEST=none Review URL: http://codereview.chromium.org/7740010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98146 0039d316-1c4b-4281-b951-d872f2087c98
* Switch nacl proxy code auto-gen to graphics3d interface.nfullagar@google.com2011-08-241-7/+10
| | | | | | | | BUG=none TEST=rolled output into NaCl Review URL: http://codereview.chromium.org/7669034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98083 0039d316-1c4b-4281-b951-d872f2087c98
* Work around NVIDIA driver bug on Mac OS X 10.6 causing GPU processkbr@google.com2011-08-222-1/+25
| | | | | | | | | | | | | | | crashes during resizing. Explicitly delete and re-create the FBO associated with the "saved texture", to give the driver a hint that drawing commands targeting the old texture must be flushed. (Re-land of http://codereview.chromium.org/7685024/ with gpu_unittest fixes.) BUG=89557 TEST=none (manually resized window with test case from bug; no crashes) Review URL: http://codereview.chromium.org/7711020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97776 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 97744 (broke gpu_unittests on Mac) - Work around NVIDIA driver bug on ↵kbr@google.com2011-08-221-18/+1
| | | | | | | | | | | | | | | | | Mac OS X 10.6 causing GPU process crashes during resizing. Explicitly delete and re-create the FBO associated with the "saved texture", to give the driver a hint that drawing commands targeting the old texture must be flushed. BUG=89557 TEST=none (manually resized window with test case from bug; no crashes) Review URL: http://codereview.chromium.org/7685024 TBR=kbr@google.com Review URL: http://codereview.chromium.org/7708022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97768 0039d316-1c4b-4281-b951-d872f2087c98
* Work around NVIDIA driver bug on Mac OS X 10.6 causing GPU processkbr@google.com2011-08-221-1/+18
| | | | | | | | | | | | crashes during resizing. Explicitly delete and re-create the FBO associated with the "saved texture", to give the driver a hint that drawing commands targeting the old texture must be flushed. BUG=89557 TEST=none (manually resized window with test case from bug; no crashes) Review URL: http://codereview.chromium.org/7685024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97744 0039d316-1c4b-4281-b951-d872f2087c98
* Unify MacOS resizing path with glResizeCHROMIUM.nduca@chromium.org2011-08-2210-204/+174
| | | | | | | | Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=97644 Review URL: http://codereview.chromium.org/7671035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97668 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 97644 - Unify MacOS resizing path with glResizeCHROMIUM.nduca@chromium.org2011-08-2210-174/+204
| | | | | | | | | Review URL: http://codereview.chromium.org/7671035 TBR=nduca@chromium.org Review URL: http://codereview.chromium.org/7713001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97645 0039d316-1c4b-4281-b951-d872f2087c98
* Unify MacOS resizing path with glResizeCHROMIUM.nduca@chromium.org2011-08-2210-204/+174
| | | | | | Review URL: http://codereview.chromium.org/7671035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97644 0039d316-1c4b-4281-b951-d872f2087c98
* Clear tex_image_2d_failed_ flag during new early return path inkbr@chromium.org2011-08-172-0/+36
| | | | | | | | | | | | | | DoTexImage2D. This fixes a regression where redefinition using glTexImage2D of a texture that did not fit in the command buffer would be silently skipped. Thanks to gman for help with the unit test. BUG=93150 TEST=GLES2DecoderTest.TexImage2DRedefinitionSucceeds Review URL: http://codereview.chromium.org/7670033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97175 0039d316-1c4b-4281-b951-d872f2087c98
* Add option to not generate resources on bind in OpenGL ESgman@chromium.org2011-08-1614-138/+526
| | | | | | | | | | | | | | | | | | | This allowes us to more efficiently manage ids. It is not OpenGL ES 2.0 compatible though it probably fits most OpenGL ES programs. Note that we need to turn this off on Pepper and/or probably provide a way for Pepper to turn on on. I'm not sure of the path Pepper takes to setup. Assuming it goes through GraphicsContext3D then changes to webkit will be needed to get the flag all the way down through IPC to the GPU process. TEST=unit tests and ran a few pages in a chrome build BUG=92260 Review URL: http://codereview.chromium.org/7633060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96904 0039d316-1c4b-4281-b951-d872f2087c98
* Rename and document glCommandBufferEnableCHROMIUMgman@chromium.org2011-08-1226-63/+69
| | | | | | | | | | | moved to gl2ext.h. Got rid of gles2_command_buffer.h BUG=none TEST=none Review URL: http://codereview.chromium.org/7623001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96507 0039d316-1c4b-4281-b951-d872f2087c98
* Expose DXT3 and DXT5 through ANGLEgman@chromium.org2011-08-113-7/+186
| | | | | | | | | TEST=made demo and tested it. BUG=91046 Review URL: http://codereview.chromium.org/7604027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96317 0039d316-1c4b-4281-b951-d872f2087c98
* Delete copy_texture_to_parent_texture from GPU command buffer code.apatrick@chromium.org2011-08-1016-163/+209
| | | | | | | Because we aren't using it for anything anymore. Review URL: http://codereview.chromium.org/7538008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96238 0039d316-1c4b-4281-b951-d872f2087c98
* Fix 2 Dr. Memory issuesgman@chromium.org2011-08-082-5/+7
| | | | | | | | | | | | | | 1) Unit tests were incorrectly using TextureInfo 2) GLES2Implementation::TexSubImageImpl was reading 1-7 bytes too many. TEST=ran with Dr.Memory BUG=91786 Review URL: http://codereview.chromium.org/7541074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95906 0039d316-1c4b-4281-b951-d872f2087c98
* Cache OpenGL program info on the client side of the command buffer.gman@chromium.org2011-08-0810-96/+750
| | | | | | | | | | | | | | For contexts not sharing resources this means the 3 to 30 calls to get link status and attrib/uniform locations will go from 3-30 sync calls to 1 sync call. TEST=unit tests and ran OpenGL ES 2.0 conformance tests BUG=85966 Review URL: http://codereview.chromium.org/7358006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95836 0039d316-1c4b-4281-b951-d872f2087c98
* Flush command streams after deleting resourcesjamesr@chromium.org2011-08-053-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When share groups and pooled IDs are in use, a race condition exists when destroying resources since the IDs are marked as free before the resource is actually freed. Consider: Context A creates a framebuffer with id 1 Context B is created in the same sharegroup as A Context A destroys its framebuffer: - the ID is freed (via FreeIDs(), which is a synchronous call) - a DeleteFrameBuffersImmediate command is entered into A's command buffer but does not immediately execute Context B creates a framebuffer - genFramebuffer() makes a sync call to the service side, which reports that id 1 is available At this point, if the service side processes and commands in context B's command stream, it will throw kInvalidArguments because as far as the service side is concerned framebuffer 1 has never been released. This patch adds a Flush() after destroying a resource so that the service side will process the resource destruction command before servicing other command streams. There's still a potential race condition if multiple contexts in the same share groups are making calls from different threads, but today all contexts in the same share group are on the same thread. BUG=80703 TEST=none Review URL: http://codereview.chromium.org/7574024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95576 0039d316-1c4b-4281-b951-d872f2087c98