summaryrefslogtreecommitdiffstats
path: root/gpu/GLES2
Commit message (Collapse)AuthorAgeFilesLines
* Split GL binding init into core and extension partjoth@chromium.org2011-10-271-40/+364
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change splits the GL binding initialization into to phases: core functions and extension functions. This is motivated by two peculiarities of the EGL window binding layer: 1. Pointers to core GL entry points may not be queried through eglGetProcAddress(). 2. The return value of eglGetProcAddress() is not specified to be NULL for unsupported functions. In light of these limitations, the current strategy of blindly querying all GL entry points from eglGetProcAddress() and falling back to dlsym() results in bogus function pointers on some EGL implementations. This patch fixes the problem as follows: 1. Add GetGLCoreProcAddress() that only queries dlsym() and use it to initialize pointers to all entry points. On EGL based platforms pointers to extension functions will most likely be NULL at this point. 2. When a context is first made current, look up the set of supported extensions and use GetGLProcAddress() to populate the remaining extension function pointers. The reworked GL bindings generator uses the standard Khronos headers to recognize the extension functions and produce appropriate initialization code. Note that the patch also updates gl2ext.h to match the upstream Khronos version and corrects some minor errors in the downstream changes. BUG=5427391 TEST= Review URL: http://codereview.chromium.org/8381001 Patch from Sami Kyostila <skyostil@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107602 0039d316-1c4b-4281-b951-d872f2087c98
* Change the enum GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE to the assigned value.zmo@google.com2011-10-131-1/+1
| | | | | | | | | | The ANGLE side change is in r785, thus, roll ANGLE from r784 to r785. BUG=none TEST=tree green Review URL: http://codereview.chromium.org/8252012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105329 0039d316-1c4b-4281-b951-d872f2087c98
* Implement 'ANGLE_translated_shader_source' extension in command-buffer.zmo@google.com2011-10-051-0/+15
| | | | | | | | | | | | This works with ANGLE r780. So if it's on top of ANGLE, query the translated HLSL using ANGLE's GetTranslatedShaderSource extension; otherwise, return the cached translated shader source from ANGLE shader translator. BUG=95531 TEST=unittest Review URL: http://codereview.chromium.org/8120020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104036 0039d316-1c4b-4281-b951-d872f2087c98
* fix executable bitgman@chromium.org2011-08-121-0/+0
| | | | | | | TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96510 0039d316-1c4b-4281-b951-d872f2087c98
* Rename and document glCommandBufferEnableCHROMIUMgman@chromium.org2011-08-123-38/+80
| | | | | | | | | | | 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-111-0/+12
| | | | | | | | | 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
* Remove executable bit on text files.avi@chromium.org2011-08-016-0/+0
| | | | | | | | | | TBR=gman BUG=none TEST=tree greens Review URL: http://codereview.chromium.org/7518023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94898 0039d316-1c4b-4281-b951-d872f2087c98
* Document CHROMIUM's OpenGL ES 2.0 extensionsgman@chromium.org2011-08-016-0/+462
| | | | | | | | | TEST=NONE BUG=NONE Review URL: http://codereview.chromium.org/7493008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94883 0039d316-1c4b-4281-b951-d872f2087c98
* Support GL_OES_EGL_image_externalbulach@chromium.org2011-07-261-0/+13
| | | | | | | | | | | | | Add support for GL_OES_EGL_image_external to the cmdbuffer code. Original patch from http://codereview.chromium.org/7458008/ Landing on behalf of Daniel Sievers <sievers@chromium.org> BUG= TEST=new unit_tests Review URL: http://codereview.chromium.org/7480014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94096 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for GL_CHROMIUM_flipygman@chromium.org2011-07-221-3/+14
| | | | | | | | | | | Also fixed a couple of other related things TEST=unit tests BUG=89593 Review URL: http://codereview.chromium.org/7471032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93541 0039d316-1c4b-4281-b951-d872f2087c98
* Detect and expose loss of OpenGL context using GL_ARB_robustness.kbr@chromium.org2011-07-141-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (This CL was originally reviewed under http://codereview.chromium.org/7331020/ . The only difference is the removal of an #include from command_buffer.h that was accidentally left in and which caused a significant increase in the number of files containing static initializers, presumably because of the dependent #include of <iostream>.) This initial patch changes the Linux port to use GLX_ARB_create_context_robustness when available, and tests periodically whether the context has been lost after each draw call and when making the context current. The detection of context loss also works with EGL and ANGLE, although it always reports an unknown reset status. WebKit changes will follow which test the reset status and determine what to do in response; for example, the policy might be to never restore a WebGL context which was lost (due to a GPU reset) and which was determined to be the guilty context. Tested manually with WebGL stress tests and verified on Linux and Windows that in at least some situations it is possible to detect guilty contexts and shut down the associated WebGL application. Some precision of this detection was recently lost and will need to be fixed in following CLs. Also updated and ran GPU unit tests. BUG=88106 TEST=none (tested manually; try servers) R=gman,apatrick,piman Review URL: http://codereview.chromium.org/7362005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92453 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 92429 - Detect and expose loss of OpenGL context using ↵kbr@chromium.org2011-07-131-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GL_ARB_robustness. (Regressed static initalizer size on Linux -- will need to reexamine code to understand why.) This initial patch changes the Linux port to use GLX_ARB_create_context_robustness when available, and tests periodically whether the context has been lost after each draw call and when making the context current. The detection of context loss also works with EGL and ANGLE, although it always reports an unknown reset status. WebKit changes will follow which test the reset status and determine what to do in response; for example, the policy might be to never restore a WebGL context which was lost (due to a GPU reset) and which was determined to be the guilty context. Tested manually with WebGL stress tests and verified on Linux and Windows that in at least some situations it is possible to detect guilty contexts and shut down the associated WebGL application. Some precision of this detection was recently lost and will need to be fixed in following CLs. Also updated and ran GPU unit tests. BUG=88106 TEST=none (tested manually; try servers) Review URL: http://codereview.chromium.org/7331020 TBR=kbr@chromium.org Review URL: http://codereview.chromium.org/7346032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92434 0039d316-1c4b-4281-b951-d872f2087c98
* Detect and expose loss of OpenGL context using GL_ARB_robustness.kbr@chromium.org2011-07-131-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | This initial patch changes the Linux port to use GLX_ARB_create_context_robustness when available, and tests periodically whether the context has been lost after each draw call and when making the context current. The detection of context loss also works with EGL and ANGLE, although it always reports an unknown reset status. WebKit changes will follow which test the reset status and determine what to do in response; for example, the policy might be to never restore a WebGL context which was lost (due to a GPU reset) and which was determined to be the guilty context. Tested manually with WebGL stress tests and verified on Linux and Windows that in at least some situations it is possible to detect guilty contexts and shut down the associated WebGL application. Some precision of this detection was recently lost and will need to be fixed in following CLs. Also updated and ran GPU unit tests. BUG=88106 TEST=none (tested manually; try servers) Review URL: http://codereview.chromium.org/7331020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92429 0039d316-1c4b-4281-b951-d872f2087c98
* Add glGetProgramInfoCHROMIUM.gman@chromium.org2011-07-111-0/+3
| | | | | | | | | | | | | | This passes all program data in one command. I'll use this in another CL to cache program data on the client side for contexts that are not sharing resources. TEST=unit tests BUG=85966 Review URL: http://codereview.chromium.org/7324035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92066 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Revert "Add glGetMultipleIntegervCHROMIUM""gman@chromium.org2011-06-281-0/+17
| | | | | | | | | | This reverts commit 99036c9a95bcb595cd87b2dabcc633a5d3ff7ccc. TEST=none BUG=85969 TBR=apatrick@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90775 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Add glGetMultipleIntegervCHROMIUM"gman@chromium.org2011-06-271-17/+0
| | | | | | | | | | | | This reverts commit ffddfc7f07bad6c52b69dae8e4911b4eb3b89275. TEST=none BUG=85969 TBR=gman@chromium.org TBR= git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90665 0039d316-1c4b-4281-b951-d872f2087c98
* Add glGetMultipleIntegervCHROMIUMgman@chromium.org2011-06-271-0/+17
| | | | | | | | | | | | | This is a step to adding more client side state caching. TEST=unit tests BUG=85969 R=apatrick@chromium.org Review URL: http://codereview.chromium.org/7217029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90662 0039d316-1c4b-4281-b951-d872f2087c98
* Implement GL_CHROMIUM_rate_limit_offscreen_contextnduca@chromium.org2011-05-131-1/+19
| | | | | | | | | | +jamesr for OWNERS on content/renderer because nobody else on GPU has owners there. :s BUG=81481 Review URL: http://codereview.chromium.org/6976012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85233 0039d316-1c4b-4281-b951-d872f2087c98
* implemented latch support in renderer process. this corresponds with a ↵jbates@chromium.org2011-04-121-4/+4
| | | | | | | | | | | | | webkit patch. https://bugs.webkit.org/show_bug.cgi?id=58003 BUG=72671 TEST=see attachment in bug for test. only green should be seen. Review URL: http://codereview.chromium.org/6810009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81295 0039d316-1c4b-4281-b951-d872f2087c98
* Implement latch system to help with GPU compositing flow control.gman@chromium.org2011-03-241-0/+20
| | | | | | | | | TEST=unit tests BUG=none Review URL: http://codereview.chromium.org/6719014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79218 0039d316-1c4b-4281-b951-d872f2087c98
* Exposed support for dynamically enabling extensions in command bufferkbr@google.com2010-12-061-0/+28
| | | | | | | | | | | | | | | | | | implementation via new glGetRequestableExtensionsCHROMIUM and glRequestExtensionCHROMIUM entry points. These entry points are needed in order to allow WebGL to both query the available extensions and enable them individually. Added these entry points to WebGraphicsContext3DCommandBufferImpl. A subsequent WebKit checkin under https://bugs.webkit.org/show_bug.cgi?id=40316 will utilize them and implement the OES_texture_float extension for WebGL. BUG=none TEST=none (ran with new oes-texture-float.html WebGL conformance test) Review URL: http://codereview.chromium.org/5626008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68352 0039d316-1c4b-4281-b951-d872f2087c98
* Renames Chrome only GL extension functions to followgman@chromium.org2010-11-182-16/+16
| | | | | | | | | | | GL naming convention. TEST=none BUG=none Review URL: http://codereview.chromium.org/5210001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66695 0039d316-1c4b-4281-b951-d872f2087c98
* Adds support for GL_FIXED vertex attributes.gman@chromium.org2010-11-181-0/+2
| | | | | | | | | | | | | | | | | Similar to sharing VBOs for both index buffers and vertex buffers this support is off by default but is turned on in the OpenGL ES 2.0 conformance tests (another CL) We can decide how/if to expose it to Pepper later if we want to claim Pepper is Open GL ES 2.0 conformant. TEST=The GL_FIXED OpenGL ES 2.0 conformance tests passes BUG=none Review URL: http://codereview.chromium.org/5026003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66649 0039d316-1c4b-4281-b951-d872f2087c98
* Added glResizeCHRM to resize the drawable associated with the command buffer.gman@chromium.org2010-11-161-0/+13
| | | | | | | | | | | | | | | | | This new command is used to pipe resize requests to the GPU process. It will allow is to synchronize the resize with the drawing. Specifically, if we resize at the wrong time, we will damage the backbuffer, causing visual artefacts (http://code.google.com/p/chromium/issues/detail?id=54430). The resize request gets sent to the GLContext. Each backend will implement it differently. At this point it's set as a NOP. -I will do an XResizeWindow on Linux. -Nat will do a resize on Windows. -Nico (or me?) will refactor the MacOSX code to use this path. There is one line webkit patch that's necessary to activate this code (removing an #ifdef). BUG=none TEST=none Review URL: http://codereview.chromium.org/4671003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66307 0039d316-1c4b-4281-b951-d872f2087c98
* Add way to create a texture in parent's context and copy into itjamesr@chromium.org2010-08-281-0/+14
| | | | | | | | | | | | | | | | | | | | | | For canvas we need a way to create multiple offscreen render targets within the same OpenGL context and expose them all to the compositor, which exists as a parent context. ggl currently provides a single framebuffer and texture pair per offscreen context and implements swapBuffers() to copy to the parent texture. This generalizes that to let clients create as many parent textures as necessary and do the equivalent of swapBuffers() for each without the service side needing to keep track of the mapping. We'll want to change this in the future when we start using glBlitFramebuffer to support multisampling. I think in that world we'll need a way to bind a texture in the parent's context to the DRAW_FRAMEBUFFER context. For now, I think this is OK. TEST=open a page with multiple accelerated canvases in a shared context BUG=52684 Review URL: http://codereview.chromium.org/3211005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57761 0039d316-1c4b-4281-b951-d872f2087c98
* Adds support for EXT_framebuffer_multisamplegman@chromium.org2010-08-231-3/+72
| | | | | | | | | | | | | | | 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
* Add support for gman@chromium.org2010-07-201-0/+3
| | | | | | | | | | | | | | GL_OES_texture_float, GL_OES_texture_float_linear, GL_OES_texture_half_float, GL_OES_texture_half_float_linear TEST=unit tests BUG=none Review URL: http://codereview.chromium.org/3005017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53060 0039d316-1c4b-4281-b951-d872f2087c98
* Adds support for OpenGL ES 2.0 extensionsgman@chromium.org2010-07-161-0/+3
| | | | | | | | | | | | | | this one specifically adds support for GL_EXT_texture_compression_dxt1 and GL_OES_texture_npot and GL_EXT_texture_format_BGRA8888 TEST=unit tests BUG=none Review URL: http://codereview.chromium.org/2827051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52598 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for gl2ext.hgman@chromium.org2010-07-161-4/+16
| | | | | | | | | TEST=hand tested with gles2_demo and simple_texture2d BUG=none Review URL: http://codereview.chromium.org/3039003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52579 0039d316-1c4b-4281-b951-d872f2087c98
* Expose MapBufferSubData and MatTexSubImage2Dgman@chromium.org2010-07-153-467/+474
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/2911010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52541 0039d316-1c4b-4281-b951-d872f2087c98
* Adds MapBufferSubData and MapTexSubImage2D.gman@chromium.org2010-07-141-0/+8
| | | | | | | | | | | | | | | | | 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
* Makes shader translation a runtime switch.gman@chromium.org2010-05-171-1/+5
| | | | | | | | | | | | | | 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-171-1/+32
| | | | | | | | | | | | | | | | | | | 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
* Resubmit CL http://codereview.chromium.org/1992008/gman@google.com2010-05-081-0/+18
| | | | | | | | | 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-081-18/+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-071-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Added gl2ext.h for conformance tests to compile.alokp@chromium.org2010-04-131-0/+773
| | | | | | Review URL: http://codereview.chromium.org/1591030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44363 0039d316-1c4b-4281-b951-d872f2087c98
* Rearrange GLES2 files so they are easier to usegman@chromium.org2010-03-083-0/+834
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