src/libGLESv2


Log

Author Commit Date CI Message
Shannon Woods d8111baf 2014-09-26T18:59:13 Fix typos in caps generation method names. Change-Id: I7efa752b2276cb92b4ca12ffaf7aa37c514525f0 Reviewed-on: https://chromium-review.googlesource.com/219807 Tested-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shannon Woods 8299bb0f 2014-09-26T18:55:43 Store XFB buffers in a vector in State. BUG=angle:685 Change-Id: I4bff717f716ba21633c59244560fd56f41f587ed Reviewed-on: https://chromium-review.googlesource.com/219806 Tested-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shannon Woods f3acaf9e 2014-09-23T18:07:11 Use a caps-dependent sized vector to store Uniform Buffers BUG=angle:685 Change-Id: I3f2e9fcccf27aebbb4ec5485286eec9828851887 Reviewed-on: https://chromium-review.googlesource.com/219805 Tested-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shannon Woods 23e0500d 2014-09-22T19:07:27 Change mVertexAttribCurrentValues from fixed-size array to STL container. BUG=angle:685 Change-Id: I42fc6c919f42cd6ab1c11531742f9a2c5ad0cd3d Reviewed-on: https://chromium-review.googlesource.com/219353 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Shannon Woods 1a965480 2014-09-22T18:00:32 Vertex management functions can take a State reference instead of pointers to attrib data. BUG=angle:685 Change-Id: I0bfc26c53eb1358a023ac5d4ec20be06f9c90f4a Reviewed-on: https://chromium-review.googlesource.com/219352 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Shannon Woods 2df6a601 2014-09-26T16:12:07 Remove context pointer from State BUG=angle:685 State needs only to track a few variables from Context's caps, so store those instead of a pointer to Context. Change-Id: I36d448dcaccf9780d6df2cfc82ef975b2ba0346f Reviewed-on: https://chromium-review.googlesource.com/219804 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill aabecf8e 2014-10-02T10:44:14 Fix D3D9 varyings limits. We were off by one varying, since D3D9 treats PSIZE specially. BUG=angle:769 Change-Id: Id5242d12c3ca42da3f3f528ff4a21445dba89701 Reviewed-on: https://chromium-review.googlesource.com/221062 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5a0c45e1 2014-10-02T11:10:36 Accept RenderTargets as parameters to Image::copy. This gives us the flexibility to use copy internally for Textures as well as FBO attachments. This will be useful for the TexSubImage performance workaround. BUG=angle:729 Change-Id: I4df8ef3a5a928d44ef84100cd96a5d35f12b47fa Reviewed-on: https://chromium-review.googlesource.com/219863 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jacek Caban a5521de2 2014-10-01T17:23:46 Fixed mingw compilation. Change-Id: I8ae33c752feb19e291e4a3b128d21a0ced883c90 Reviewed-on: https://chromium-review.googlesource.com/220761 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Tibor den Ouden ac7556f6 2014-09-25T17:15:11 Freed temporary info log buffer and removed explicit destruction of char[] BUG=angle:758 Removed explicit destruction of char[] by using std::vector<char> object. Added Borbitsoft to AUTHORS and Tibor den Ouden to CONTRIBUTORS Change-Id: I9c4017eb81ce3fab8b7fb4a5b4ad52a758d14a2d Reviewed-on: https://chromium-review.googlesource.com/219940 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang ff39bd87 2014-10-01T13:17:39 Add check for size before setting buffer data. If data is non-null and size is zero, the memory buffer may have a NULL pointer. BUG=angle:765 Change-Id: I4cb8f54ec85fea886e37ee2d4469d26e651a916b Reviewed-on: https://chromium-review.googlesource.com/220801 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b4fd0c96 2014-10-01T17:40:24 Replace usages of std::vector::data in most cases. In some parts of ANGLE code, we were using std::vector::data to get a pointer to the first element. Sadly, this is c++11 only, which isn't currently supported on Chromium. This was causing a breakage on Android. We should probably refrain from using data except on D3D-only code, which we know will be Visual Studio. BUG=angle:767 Change-Id: Ibc10577368435a13f62d74d77c95076482cd8f82 Reviewed-on: https://chromium-review.googlesource.com/220920 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 3269bcb4 2014-09-30T16:33:52 More TextureD3D cleanups. The getLayers method was redundant, and the getBaseLevelImage method we can replace with a shared TextureD3D method rather than a specialized method for each type. BUG=angle:729 Change-Id: I80c94a765dbc369fb0bb60ec8273e9e3ba6ffeed Reviewed-on: https://chromium-review.googlesource.com/219862 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 135570a4 2014-09-30T16:33:51 Clean up ensureRenderTarget(). We can use the same code for this method, with the only difference being in when we determine a texture image holds no pixels. BUG=angle:729 Change-Id: I3356f5deb900c24b1a5c739ce8de99e9ce1371c0 Reviewed-on: https://chromium-review.googlesource.com/219861 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 716915d7 2014-09-30T16:33:50 Fix d3d9 copyToStorage dirty flag. This flag wasn't being set in the 2D version of this method. The bug would only cause a performance penalty on Windows XP machines. BUG=angle:729 Change-Id: I516206740becc90438d613ae9abb3ac550733aed Reviewed-on: https://chromium-review.googlesource.com/219860 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 98553e37 2014-09-30T16:33:50 Remove copyToRenderTarget methods. These Renderer methods can be replaced with virtual TextureStorage methods, now that we do not have TextureStorageInterface to complicate matters. This reduces the number of stubs in Renderer as well as allowing cleaner code re-use. BUG=angle:729 Change-Id: I6d2004d4f1abdb1041420144cee1c173e5ab199e Reviewed-on: https://chromium-review.googlesource.com/219839 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 3a612876 2014-09-29T11:08:17 Moved the responsibility for releasing the dest surface out of copyToSurface. BUG=angle:520 Change-Id: I4c6c39462b43eeb0a202f731c4a54007ef16445c Reviewed-on: https://chromium-review.googlesource.com/219866 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang b5348331 2014-09-02T13:16:34 Refactor Texture::compressed*Image methods to use gl::Error objects. BUG=angle:520 Change-Id: I8fd7ebf3edb3edef06e77b79776c363672931a61 Reviewed-on: https://chromium-review.googlesource.com/216646 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 8376ceae 2014-09-02T11:47:07 Merge the various TextureCube::setImage* methods. BUG=angle:520 Change-Id: I4e8191dd827744ef380348a31dce7181d99fbf30 Reviewed-on: https://chromium-review.googlesource.com/216645 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 1ba6b8db 2014-08-28T10:57:31 Refactor Texture::setImage and subImage to use gl::Error objects. BUG=angle:520 Change-Id: Ib43ace0fbdab59086ae4314cce139636d9045e65 Reviewed-on: https://chromium-review.googlesource.com/216644 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang ae5122c4 2014-08-27T14:08:43 Updated the PixelTransfer class to use Error objects. BUG=angle:520 Change-Id: I7e21acbfd5726607ea62c8fcf64d76bbf5877860 Reviewed-on: https://chromium-review.googlesource.com/216643 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 7acae0a1 2014-09-24T17:10:51 Add a centralized workarounds module. This is a temporary home for the various workarounds we use for performance or to solve driver issues. Eventually we will want a standalone library we can use as part of Chromium or in ANGLE standalone. Re-land with member variable initialized. BUG=angle:729 Change-Id: If7f8f9596a39b2855366d9a67caebf6dd4197b55 Reviewed-on: https://chromium-review.googlesource.com/219868 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 57f20894 2014-09-29T23:05:36 Revert "Add a centralized workarounds module." Was missing an initialization in Renderer.cpp. This reverts commit 815a1dc3710c48ecc84539b7ffb15860f6738f6c. Change-Id: Ia4666911c2ff58660e0ab5c7cec4431b1c30a1e1 Reviewed-on: https://chromium-review.googlesource.com/220420 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 815a1dc3 2014-09-24T17:10:51 Add a centralized workarounds module. This is a temporary home for the various workarounds we use for performance or to solve driver issues. Eventually we will want a standalone library we can use as part of Chromium or in ANGLE standalone. BUG=angle:729 Change-Id: Ib0254262cad9f8fb779886dacb967be646ea96ae Reviewed-on: https://chromium-review.googlesource.com/219838 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4aa79e11 2014-09-29T10:46:14 Reduce code duplication in generateMipmap. Using the newly introduced image index struct, we can simplify our code somewhat in TextureStorage. BUG=angle:729 Change-Id: Iff274fd1df7a0dc36dd34e0cb31ad42831b4f5d5 Reviewed-on: https://chromium-review.googlesource.com/219836 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill cb83dc16 2014-09-29T10:46:12 Add TextureD3D::getIndex. This is a simple virtual method which gives an ImageIndex at a particular level and layer. It's useful for handling all the texture types uniformly, which all treat levels and layers differently. BUG=angle:729 Change-Id: I72db560287272c195b1ff8555f99ab2258ac7e6d Reviewed-on: https://chromium-review.googlesource.com/219835 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill ef4ac5b1 2014-09-29T10:46:11 Add ImageIndexIterator. We can use image index iterators to iterate over all images in a Texture. This allows us to do some operations in TextureD3D rather than in the typed subclasses and save on some repeated code. BUG=angle:729 Change-Id: I3ba47b2eebad2cfca313117fd501ff76d5107044 Reviewed-on: https://chromium-review.googlesource.com/219834 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Brandon Jones eb99436e 2014-09-24T10:27:28 Moving Shader Executables into ProgramD3D BUG=angle:731 Change-Id: I677fc9773914307184bcdd9ab7ac564956d77f6a Reviewed-on: https://chromium-review.googlesource.com/219814 Tested-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cooper Partin eeb1f537 2014-09-23T10:25:02 Added SurfaceHost to enable additional hosts and abstract access for EGLNativeWindowType. Change-Id: I590b52925c6b9127d08eaf0e5ba2a0bde30505c3 Reviewed-on: https://chromium-review.googlesource.com/219488 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 9e3f24f6 2014-08-27T12:06:04 Update Renderer::copyToRenderTarget to return Error objects. BUG=angle:520 Change-Id: Ieab2d031d638056676e07d80aa024b6c6f12f3d6 Reviewed-on: https://chromium-review.googlesource.com/216642 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang e8356bb0 2014-08-26T17:13:21 Update Renderer::copyImage to return Error objects. BUG=angle:520 Change-Id: I1bb7a53bc75ebb8bf324935b673ea636bdff6931 Reviewed-on: https://chromium-review.googlesource.com/216641 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 64839155 2014-08-26T16:23:25 Update blit calls to return Error objects instead of calling gl::error. BUG=angle:520 Change-Id: I94c3ad327433cf275744e98be6cb2ba91be49c0f Reviewed-on: https://chromium-review.googlesource.com/216640 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f7ed7054 2014-09-23T13:39:31 Move the code that writes the temporary shader file to the shader compiler. BUG=angle:755 Change-Id: I5fdc3ae112ea3f59694a22da6199b99a568ed0a1 Reviewed-on: https://chromium-review.googlesource.com/219530 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 3935e51d 2014-09-23T13:15:19 Refactor HLSLCompiler to use stl objects and encapulate workarounds. * Pass std::strings for the source and profile. * Create a wrapper struct for storing the compile configurations and pass them to the compiler with an std::vector. * Remove function typedefs, they're available from the platform.h header. BUG=angle:755 Change-Id: I19dd2be1655a12f76fc5718450db974a7ec324ec Reviewed-on: https://chromium-review.googlesource.com/219287 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Brandon Jones 18bd4100 2014-09-22T14:21:44 Removed the last references to Renderer from ProgramBinary. BUG=angle:731 Change-Id: I8829a434e59279b1b9c37e9a1922ae05d467b376 Reviewed-on: https://chromium-review.googlesource.com/219421 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Brandon Jones <bajones@chromium.org>
Brandon Jones 44151a97 2014-09-10T11:32:25 Removed the last references to DynamicHLSL from ProgramBinary. Migrated several more non-generic values from ProgramBinary the D3D impl. BUG=angle:731 Change-Id: Ic043dd75328cffbc6bef6556da801c382b4138bc Reviewed-on: https://chromium-review.googlesource.com/219390 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Brandon Jones <bajones@chromium.org>
Geoff Lang abce7620 2014-09-19T16:13:00 Fix some texture support queries ORing extensions instead of ANDing. A couple of formats that required two extensions would OR the checks together when they should have ANDed them and allowed the validation to be too permissive. Fixed the checks and added a new one that needs to OR the extension checks together to verify GL_DEPTH24_STENCIL8_OES support. BUG=angle:752 Change-Id: I2e1e12fd428358e975cd22eb685b9a8fb797161f Reviewed-on: https://chromium-review.googlesource.com/219094 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang d87878e3 2014-09-19T15:42:59 Remove the requirement that a format must be texturable to be renderable. Previously, to determine if a texture format was renderable, the texturable and renderable fields had to be and-ed together. This caused issues for formats such as D24S8 which can be renderable but not texturable depending on available extensions. Made the renderable flag a complete check that may be different than the textureable flag and removed assumptions that a format is texturable if renderable from the code. GL_DEPTH24_STENCIL8 now checks for ANGLE_depth_textures for texturability and ANGLE_depth_textures or OES_packed_depth_stencil for renderability. BUG=angle:752 Change-Id: I6d197cee72cc249e5996fa395303bdf43d246a87 Reviewed-on: https://chromium-review.googlesource.com/219093 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c77e8c39 2014-09-08T16:28:24 Update the draw calls to return Error objects. BUG=angle:520 Change-Id: I3330ba2dbe095fc9460789822a938420a80a149f Reviewed-on: https://chromium-review.googlesource.com/213823 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 3110ffdc 2014-09-08T16:25:50 Updated the swizzle generation functions to use Error objects. BUG=angle:520 Change-Id: I01b3cdb7d6719582fa8a57f21218705f6743a7b0 Reviewed-on: https://chromium-review.googlesource.com/217103 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Shannon Woods 950cb606 2014-09-18T10:01:56 Create test configuration include guards BUG=angle:501 Change-Id: I0281cf6de4fbf8ddd142b7af4ea2917f0a0a1569 Reviewed-on: https://chromium-review.googlesource.com/218840 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Geoff Lang df647a2a 2014-09-19T13:13:40 Use a D24S8 format to back GL_DEPTH_COMPONENT32_OES in D3D9. Looks like the D3D9 D32 format isn't available on most GPUs (and doesn't exist in D3D11) so back GL_DEPTH_COMPONENT32_OES with D24S8 instead to match D3D11. BUG=angle:750 Change-Id: I0f7a124544c1c14ba21db20fbf6765d07e244966 Reviewed-on: https://chromium-review.googlesource.com/219080 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill ee009b8e 2014-09-19T13:17:51 Fix a NULL dereference on buffer initialization. In some cases, where the user would create a buffer with NULL (empty) data, we would attempt to dereference NULL when drawing with the buffer as a vertex attribute. BUG=angle:749 Change-Id: Ied5ecbab4608c85890cdf7cc32a8dae46989e33b Reviewed-on: https://chromium-review.googlesource.com/219090 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill 2f06dbfb 2014-09-18T15:08:50 Remove rx::TextureStorageInterface entirely. This class provides no added benefit now that we've scrapped the type-specialized classes. We can squash it's functionality into TextureStorage instead. BUG=angle:741 Change-Id: I04984806719a01f299986265fe09b3cccf04dca5 Reviewed-on: https://chromium-review.googlesource.com/218316 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 856d9d4b 2014-09-18T15:08:49 Squash the TextureStorageInterface heirarchy. Since there are no longer any significant differences in the child classes of TextureStorageInterface, we can scrap the different implementations. This involves changing the function names of some Renderer functions which relied on overloading. BUG=angle:741 Change-Id: I074797e4ac0bf3ecf8fe4bddf84eaed28b1a2c23 Reviewed-on: https://chromium-review.googlesource.com/218315 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 5e48c034 2014-09-18T15:08:47 Move generateMipmap to storage interface base class. Using a little bit more of code repetition allows us to move the implementation of the mipmaps to a simple virtual interface in TextureStorage. BUG=angle:741 Change-Id: I7661d0cc3bdb02b646da0802cba285650d7832b2 Reviewed-on: https://chromium-review.googlesource.com/218314 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c483326b 2014-09-18T16:18:26 Use ImageIndex in getRenderTargetSerial. Also move getRenderTargetSerial to the TextureStorageInterface base class, since it shares a common interface. BUG=angle:741 Change-Id: I1bc1cfac6426e241ac91d373884a7dd8a1c5b188 Reviewed-on: https://chromium-review.googlesource.com/218313 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f7100b98 2014-09-08T16:17:08 Updated the vertex buffer classes to use Error objects. BUG=angle:520 Change-Id: Id003e66b2acbf37dbbe66aaca2fa336c3c884be2 Reviewed-on: https://chromium-review.googlesource.com/217102 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill d5a796ca 2014-09-18T15:30:16 Fix Renderer11 signed/unsigned warning in 32-bit. Change-Id: I1e11f54b0ae245cdd7e090ab0748821738ad6314 Reviewed-on: https://chromium-review.googlesource.com/218761 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 76b10c9a 2014-09-05T16:28:14 Use dynamically sized containers for texture and sampler bindings. BUG=angle:685 Change-Id: I7af97a95deee69fbdebca2b57403244f45516e67 Reviewed-on: https://chromium-review.googlesource.com/216564 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill ac7579c2 2014-09-17T16:59:33 Use ImageIndex in getRenderTarget. Also change ImageIndex to allow invalid indexes for layer. In 3D indexes, sometimes the layer parameter is invalid, indicating we index an entire mip level instead of a layer of a mip level. BUG=angle:741 Change-Id: I7b410f9aaf568f215bb93ae063934669a8fa09bd Reviewed-on: https://chromium-review.googlesource.com/218312 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 02f18b88 2014-09-17T11:42:17 Don't skip draw calls on zero-sized viewports. If transform feedback is active, primitives still need to be rendered even if no pixels are written to the framebuffer. Instead of checking for active transform feedback, simply remove the draw call skipping optimization since it is most likely an application mistake to draw with a zero sized viewport and we shouldn't optimize for this case. This change doesn't affect the clear calls because the viewport is set to the framebuffer size which is non-zero. BUG=angle:743 Change-Id: I04af9d6de5aad3040e3c6b3c24990e107e21ad36 Reviewed-on: https://chromium-review.googlesource.com/218508 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross af875527 2014-08-25T21:06:07 Improve D3D11 varying packing when there are more varyings than registers. BUG=angle:738 Change-Id: I0599840fc79d571230acf26105d512322bcffdcd Reviewed-on: https://chromium-review.googlesource.com/214108 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang bdee2d59 2014-09-17T11:02:51 Fix incorrect error check. The registers variable became a pointer but this error check was not updated. BUG=angle:743 Change-Id: Id2cd7b5ba39180281a3bbc408cd7c31bc663500c Reviewed-on: https://chromium-review.googlesource.com/218507 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang be4fdb3f 2014-09-16T14:11:40 Merge the sampler uniform application into ProgramBinary::setUniform. * Fixes incorrect dirty checks for the dirty sampler mappings flag. * Fixes WebGL tests: * conformance_canvas_texture_bindings_unaffected_on_resize * conformance_reading_read_pixels_test * conformance_uniforms_uniform_default_values BUG=414450 Change-Id: I132dbc301a236aef153fb6da4c6b64c36b0ba3f3 Reviewed-on: https://chromium-review.googlesource.com/218501 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill ee85d1bb 2014-09-17T10:35:23 Fix enum in FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE query. We were using DEPTH_STENCIL instead of DEPTH_STENCIL_ATTACHMENT. BUG=angle:739 Change-Id: I0c746c374577dca2b965dfd7ccfac793f7075efb Reviewed-on: https://chromium-review.googlesource.com/218592 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill feda4d29 2014-09-17T13:03:29 Accept ImageIndex in TextureD3D::subImage and getImage. This paves the way for setting data on the TextureStorage directly instead of working through the Image objects. BUG=angle:741 Change-Id: I3be3d5f9b2e45707c1630b74ad3f4789e034c3fd Reviewed-on: https://chromium-review.googlesource.com/218311 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill e6256f87 2014-09-17T10:31:15 Fix the varying sort comparator in ShaderD3D. The comparator was actually a <= operator, while sort requires a strict < operator. This was causing a potential assertion failure. Bug report from Kerim Borchaev. BUG=angle:742 Change-Id: I37c2925ab0b85e70ee1b2be3c72c6ddc062e8d28 Reviewed-on: https://chromium-review.googlesource.com/218506 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 87a93308 2014-09-16T13:29:43 Move validation of ANGLE_instanced_arrays to the validation layer. BUG=angle:520 Change-Id: Idb3c50235a7029e72c58bc202aba0cfab735202a Reviewed-on: https://chromium-review.googlesource.com/218510 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 61f54180 2014-09-16T14:10:02 Don't modify the function parameters in ProgramBinary::setUniform. BUG=414450 Change-Id: Ib5ebf18e57af671b8694ffcfc3cb152557f7f002 Reviewed-on: https://chromium-review.googlesource.com/218500 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Andrew Knight 08a59f85 2014-09-16T23:19:39 Add several missing header guard comments These were causing build failures under GCC. Change-Id: Iba19ed166f909fe559d19731f31849770619f412 Reviewed-on: https://chromium-review.googlesource.com/218580 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Geoff Lang 5aad9673 2014-09-08T11:10:42 Update Queries to return Error objects instead of calling gl::error. BUG=angle:520 Change-Id: If8f2bb1c4de7b9cc30861a06aab1d89c97305b26 Reviewed-on: https://chromium-review.googlesource.com/216699 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Brandon Jones 22502d52 2014-08-29T16:58:36 Moving more D3D-only logic into ProgramBinaryD3D BUG=angle:731 Change-Id: Ia62ec9a912c8bd63fcee51ca206d52688dd999da Reviewed-on: https://chromium-review.googlesource.com/217495 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Brandon Jones <bajones@chromium.org>
Jamie Madill e1f0d00c 2014-09-12T13:26:56 Remove dead RenderbufferStorage::getDepthBuffer. This code was unused. BUG=angle:732 Change-Id: I764d7c5624bdb81650e05a22c4ef0431c2002b18 Reviewed-on: https://chromium-review.googlesource.com/217331 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 612e2e44 2014-09-12T13:26:55 Add a helper to replace FBO attachment's getSerial. Ideally we could store a render target serial in the render target itself. For now, this helper function allows us to finally stop exposing rx::RenderTarget from gl::Texture. BUG=angle:732 Change-Id: I4ffc5e0af6f0542212ad4e74adced21ebbd89462 Reviewed-on: https://chromium-review.googlesource.com/217330 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9f0b42a6 2014-09-12T10:25:27 Add an attachment helper to replace getRenderTarget. We would like to stop exposing rx::RenderTarget to any GL-layer code, like the Context, or Framebuffer. Then we can pull any necessary information inside the Renderer back-ends. BUG=angle:732 Change-Id: Ifa35218f097c528e616d732bda4bcd8e5f1c3843 Reviewed-on: https://chromium-review.googlesource.com/217029 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Shannon Woods 231943bf 2014-09-10T14:41:45 Fix signed-unsigned mismatch Change-Id: Ie7fba8a0fd0475a395205139c4f7169cc94e61b7 Reviewed-on: https://chromium-review.googlesource.com/217510 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Geoff Lang c9e69b19 2014-09-08T16:06:25 Updated the index buffer classes to use Error objects. BUG=angle:520 Change-Id: Ifc249058a3ed3ffffe163a9e3ec21d6fc8c75bd0 Reviewed-on: https://chromium-review.googlesource.com/217101 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 1c134e6c 2014-09-08T15:32:18 Only allocate the streaming index buffers when they are first needed. BUG=angle:520 Change-Id: I111e4fd830ad19f6a4ff50749ba891fc14f9154b Reviewed-on: https://chromium-review.googlesource.com/217100 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 23ba30e4 2014-09-08T15:28:20 Move the counting IB from IndexDataManager to Renderer9. BUG=angle:520 Change-Id: Ice0a04b296af6c0a61a604f629b08603e594bb0b Reviewed-on: https://chromium-review.googlesource.com/216919 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 157f9374 2014-09-08T15:16:28 Update the RenderStateCache to use Error objects. BUG=angle:520 Change-Id: I14e2a84c6d2e6f98a50395b63ac206e32bc10f8b Reviewed-on: https://chromium-review.googlesource.com/216918 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 5b5d1244 2014-09-09T15:15:36 Add queries for attachment targets. Queries for the FBO attachment Textures and Renderbuffers allow us more options than specific methods for querying the texture storage or texture serial. BUG=angle:732 Change-Id: Ieb4ddca3955fcf716dbf54331524d0c1e25fe946 Reviewed-on: https://chromium-review.googlesource.com/217028 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Jamie Madill dd8488d3 2014-09-03T15:07:21 Get stencil buffer clear parameters format directly. The state layer should not be querying render targets directly, since they are not a GL concept. BUG=angle:732 Change-Id: I5ee96ae54cced8a32c5082ddd9f8796a975e2591 Reviewed-on: https://chromium-review.googlesource.com/213971 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill 82cceb2d 2014-09-09T13:21:33 Only use direct buffers for static data in D3D11. For highly dynamic data, which gets updated every frame, or almost every frame, we're better off using our existing dynamic buffer path. We could further optimize the dynamic buffer path by only uploading changed data every frame. BUG=angle:705 Change-Id: Icbb357b889be789b30f73067f75b13664c806929 Reviewed-on: https://chromium-review.googlesource.com/217280 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Brandon Jones c9610c51 2014-08-25T17:02:59 Starting refactor of ProgramBinary This is gonna take a while... BUG=angle:731 Change-Id: Ief72c3361b6429f3f6e0bc2d2ea0810d523ff178 Reviewed-on: https://chromium-review.googlesource.com/215661 Tested-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill eeb7b0e9 2014-09-03T15:07:20 Squash the Texture attachment classes into one. BUG=angle:732 Change-Id: Ib6b26fe1351bc09e729178f6ec8b8d2ec1f7ff58 Reviewed-on: https://chromium-review.googlesource.com/213970 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill cc00239d 2014-09-09T10:21:56 Revert "Optimize dynamic buffers." This reverts commit 3e3813f787ee5e8bb7808eed539a606a4e2e3fd3. Conflicts: src/libGLESv2/renderer/d3d/d3d11/Buffer11.cpp Change-Id: I6470059672d3b377ce0fafbc8b637318a91f62c8 Reviewed-on: https://chromium-review.googlesource.com/217106 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5ac5ae86 2014-09-09T10:14:17 Move assertion into if-block. Since the loop always goes up to MAX_VERTEX_ATTRIBS, the ASSERTION may be triggered even though no more attributes are enabled. BUG=angle:740 Change-Id: I2bb30d7e9f426ae1a0b8250e65c1fd02107973ac Reviewed-on: https://chromium-review.googlesource.com/217027 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 63d2fc7f 2014-07-25T14:51:41 Update the ReadPixels calls to return Error objects instead of calling gl::error. BUG=angle:520 Change-Id: I2ead221e7d1f02cf088b60d0e98376fcd68dde8e Reviewed-on: https://chromium-review.googlesource.com/211441 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang cc79b8c6 2014-07-25T13:48:02 Update clear calls to return Error objects instead of calling gl::error. BUG=angle:520 Change-Id: I474a6ed29b882963f7f3425515e7d65f8f69b3e4 Reviewed-on: https://chromium-review.googlesource.com/211440 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2a1c15a1 2014-07-25T11:43:00 Update Buffers to return Error objects instead of calling gl::error. BUG=angle:520 Change-Id: I4b6af8e2d4fae97639518e2acd26e2d4be93c925 Reviewed-on: https://chromium-review.googlesource.com/209881 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 1d743d3d 2014-09-03T15:07:18 Eliminate typed render target Texture attachment method. More convergance to the base TextureAttachment class. BUG=angle:732 Change-Id: I9aae1a49ab3908a4eb4cec4bce201b88a7d93926 Reviewed-on: https://chromium-review.googlesource.com/213859 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill de3ed704 2014-09-03T15:07:17 Use ImageIndex to return Texture attachment properties. This and subsequent patches will eliminate the need for typed attachments. BUG=angle:732 Change-Id: Ia1cfa672855b577f7a2ce219e6ed8ca1e3e16cc1 Reviewed-on: https://chromium-review.googlesource.com/213858 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill f6be8d7c 2014-09-05T10:38:07 Fix typo in "PixelShaderOuputVariable". Change-Id: I2b223c9b80faa3ff2a0f94bd52ca73edf3d67cf7 Reviewed-on: https://chromium-review.googlesource.com/216273 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill f9479eff 2014-09-05T10:38:05 Drop support for the old "full multiplexed" MRT shaders. This will simplify the code somewhat. It should no longer be necessary now that we have the nVidia workaround. BUG=angle:705 Change-Id: I1abe1abd9f03472341ce4315975a76c56b252bb4 Reviewed-on: https://chromium-review.googlesource.com/216111 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 3f2e61de 2014-09-05T10:38:05 Enable MRT pixel shader rewriting. Writing to all 8 pixel outputs was causing performance problems on Intel and AMD. Enabling Geoff's work to rewrite our pixel shaders solves the regression. This patch also includes a workaround to the nVidia driver bug where it would ignore NULL RT values in OMSetRenderTargets, by compacting the RT list to skip NULL values. BUG=angle:705 BUG=365078 Change-Id: Ia68af6f0ccd5f10c484d6f76297a0bec694948f0 Reviewed-on: https://chromium-review.googlesource.com/214852 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill aef95dec 2014-09-05T10:12:41 Use attachment binding points for dynamic PS key. Because our output signature is only dependent on the arrangment of the attachments, not the attachment type, use the output layout key for now. If we need to, we could store both, in the future. BUG=angle:705 Change-Id: I3b99954d30b91a4741fdd6f48f8ffcf88c0bea7a Reviewed-on: https://chromium-review.googlesource.com/215846 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 3592a338 2014-09-03T15:07:15 Add a new TextureAttachment class to simplify FBO attachments. This single class will eventually replace the four child classes. BUG=angle:732 Change-Id: Ie2862b4458c8b1302ff4fc5fbe0e4ded3b81894d Reviewed-on: https://chromium-review.googlesource.com/213857 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 945f7329 2014-09-03T15:07:14 Add an ImageIndex helper struct to index into tex levels. This encapsulates the three values needed to index into the image array. It will simplify the logic for querying texture images from the base calss. BUG=angle:732 Change-Id: I31c55b3f972fd4d96ab540ec8498ef4b9b2ba16b Reviewed-on: https://chromium-review.googlesource.com/213856 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6d708263 2014-09-03T15:07:13 Refactor Framebuffer::invalidateSub. Use our new helper methods to simplify this method. BUG=angle:732 Change-Id: I56b837678d5efbc60de6de4bdb01447ca811e71d Reviewed-on: https://chromium-review.googlesource.com/213855 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill ce20c7f1 2014-09-03T11:56:29 Retrieve render colorbuffers as a single vector. Making all our render methods query FBO attachments for rendering in one place will allow us to easily control the MRT peformance workaround, and simplify the implementation. BUG=angle:705 Change-Id: I6c476d45b81228d6ffe8831347443994237e3593 Reviewed-on: https://chromium-review.googlesource.com/215843 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Jamie Madill 04668675 2014-09-03T09:40:49 Mark shared and std140 UBOs as always active. This aligns ANGLE with the GL spec. With this fix, we pass all of the dEQP conformance tests in Functional / Uniform Buffer Object that don't rely on single buffers. BUG=angle:507 Change-Id: I6063a416e3f7ee6d5327d96850e3d0cc8521c817 Reviewed-on: https://chromium-review.googlesource.com/213506 Reviewed-by: Nicolas Capens <capn@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 54ad4f81 2014-09-03T09:40:46 Use the CollectVariables path on the HLSL translator. This approach consolidates our two methods, and lets us reuse the same code for both methods of variable collection. BUG=angle:466 Change-Id: Ie92f76ff0b6d0d0dbfd211a234d0ab86290fa798 Reviewed-on: https://chromium-review.googlesource.com/213504 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org>
Jamie Madill 2ad1dc48 2014-09-03T09:40:45 Compact the D3D shader specializations into one. BUG=angle:731 Change-Id: I4f35a05aeea130f9011ec62cfe931ed23e2681c9 Reviewed-on: https://chromium-review.googlesource.com/214871 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill d15250e6 2014-09-03T09:40:44 Move shader variables into the base impl. These variable types apply across shader types. Either we'll want a way to cache them after we query them, or we'll do a pre-parse pass similar to our current Chromium GLSL to GLSL pre-pass where we store the variables in ANGLE. In either case, they're shared across GL implementations so make sense as queries from gl::Shader. BUG=angle:731 Change-Id: I23f5541423abb4af87a2bc2fc1e9f4047fd2ff90 Reviewed-on: https://chromium-review.googlesource.com/214870 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 2d96b9eb 2014-08-29T15:46:47 Use GL-like methods for InvalidateFramebuffer calls. This will faciliate the MANGLE implementation. BUG=angle:732 Change-Id: I0e4d569667e03305c9cca8d7c23154c70fb71eeb Reviewed-on: https://chromium-review.googlesource.com/213854 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill 400a4418 2014-08-29T15:46:45 Move logic of InvalidateFramebuffer to Framebuffer.cpp. This method will translate to an implementation call. BUG=angle:732 Change-Id: Ida1e3c9cccd94f7d166cc9a785708c12bfc52da5 Reviewed-on: https://chromium-review.googlesource.com/213853 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Shannon Woods 8e7d7a30 2014-09-02T17:09:08 Fix use of references with va_start BUG=angle:736 va_start behavior is undefined if the second parameter is a function, array, or reference type. clang produces a warning for this, while MSVC does not. Change-Id: I0bc2805e312e3542aac816f10a257e2f1cfad128 Reviewed-on: https://chromium-review.googlesource.com/216010 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Tested-by: Nico Weber <thakis@chromium.org>
Jamie Madill 685dd27a 2014-08-29T15:46:43 Replace getDepthStencil with getRenderTarget. In all places where we called this method, we treated a NULL return value as an internal error. This implies to me that we don't need the two getRenderTarget and getDepthStencil methods, since we aren't using them to check if a surface is depth or stencil. BUG=angle:732 Change-Id: I4d1dc148abf3383b1b101bbff4f4d22de27ad03e Reviewed-on: https://chromium-review.googlesource.com/213852 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Shannon Woods 97d65b79 2014-08-05T18:04:22 Clean up Query classes. BUG=angle:717 Change-Id: I8f29f24964a9661d9f0bea5dca48cebddbf9b0b2 Reviewed-on: https://chromium-review.googlesource.com/211136 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>