src/libGLESv2/Context.cpp


Log

Author Commit Date CI Message
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 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Brandon Jones 43a53e24 2014-08-28T16:23:22 Converted ProgramBinary to use Context caps instead of Renderer BUG=angle:731 Change-Id: I9bbce69cabf767fb5fb2c94f437a9950bc79d1aa Reviewed-on: https://chromium-review.googlesource.com/215370 Tested-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 05881a0f 2014-07-10T14:05:30 Add caps for transform feedback limits from table 6.34. BUG=angle:658 Change-Id: Ifd8c620080c8de486ffb7c8f9e985be1aba516c1 Reviewed-on: https://chromium-review.googlesource.com/207376 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 3a61c321 2014-07-10T13:01:54 Add caps for the aggregate shader limits from table 6.33. BUG=angle:658 Change-Id: I59d0cd131114fcb925f01d83d218a657f4498a2a Reviewed-on: https://chromium-review.googlesource.com/207375 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0b7eef7c 2014-06-12T14:10:47 Removed common_includes.h reordered includes. Since we are not using precompiled headers anymore, remove common_includes.h so that fewer files are included in cpp files. Reordered includes to be in the following order: 1) Local ANGLE project headers, ordered by directory in descending depth 2) GL headers 3) STL headers This helps enforce the include-what-you-use principal by reducing the number of STL headers unexpectedly shared between files. This include order conflicts with some of the Google c++ style guide which states that STL includes should be first but this helps us catch more issues. Change-Id: I8f7785f4ad574e253dd3c7b4fb1e54d3ce3b99fc Reviewed-on: https://chromium-review.googlesource.com/214850 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill ea24759f 2014-08-28T10:37:08 Remove remnants of old PCH code. Remove the precompiled.cpp file which was producing a build warning, and rename the header to make it clear we no longer support PCH. BUG=angle: Change-Id: I944081ae477b1478ca9c18924fb02bb920d420a7 Reviewed-on: https://chromium-review.googlesource.com/214187 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Brandon Jones f05cdee4 2014-08-27T15:24:07 Refactoring Shader objects (Take 2) This change refactors shaders to no longer be dependent on D3D-only concepts. BUG=angle:731 Change-Id: I1006112f1d31b7e41bd14bd3225ea157b7d6c6c9 Reviewed-on: https://chromium-review.googlesource.com/214467 Tested-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Brandon Jones e54be46a 2014-08-27T22:21:45 Revert "Refactoring Shader objects" This reverts commit 537dfde52a33d621ab1198c949a81b09a1269b2e. Change-Id: I5eb8923ac8f78877e6e77a8cd897021e56ee004a Reviewed-on: https://chromium-review.googlesource.com/214466 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Brandon Jones <bajones@chromium.org>
Brandon Jones 537dfde5 2014-08-20T14:04:59 Refactoring Shader objects This change refactors shaders to no longer be dependent on D3D-only concepts. BUG=angle:731 Change-Id: I4fc1efeba9df4f873b3d7c8ba6f67f00b6532b9c Reviewed-on: https://chromium-review.googlesource.com/213803 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Brandon Jones <bajones@chromium.org>
Kenneth Russell db8ae16b 2014-08-25T19:02:35 Refactored TransformFeedback for multi-platform ANGLE and added tests. Added angle_implementation_unit_tests target designed for testing the cross-platform code in libGLESv2, and libGLESv2_static target as a dependency. The goal is to incorporate these tests into Chromium's angle_unittests target on all platforms; however, more work is needed to make libGLESv2's common code compile on non-Windows platforms, so this is an intermediate step. BUG=angle:719 Change-Id: Ifc44a779352294e857d6e913d9b997a60674c443 Reviewed-on: https://chromium-review.googlesource.com/214105 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Kenneth Russell <kbr@chromium.org>
Jamie Madill 2b97681b 2014-08-25T15:47:49 Extract validation from VertexDataManager.cpp to the API. We can check for buffer overflow at draw validation time, before processing any vertex data. BUG=angle:571 Change-Id: I4f49629b98c17ca28e25baed74cad4ae5341b20f Reviewed-on: https://chromium-review.googlesource.com/210647 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Geoff Lang 268b6bcd 2014-07-09T16:22:55 Clean up copyimage.h Change-Id: Ie4b81bb37dbbe6a9584dfc6a6c92670a9b73cda5 Reviewed-on: https://chromium-review.googlesource.com/207374 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 301d161d 2014-07-09T10:34:37 Add caps for vertex and fragment shader limits from tables 6.31 and 6.32. BUG=angle:658 Change-Id: I98509aa16caf74c3e4e28852e8b59aedd903f03a Reviewed-on: https://chromium-review.googlesource.com/207372 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 900013cd 2014-07-07T11:32:19 Add caps from the 6.29 table. BUG=angle:658 Change-Id: I392f581b1aea445d60f507c1fa897c4348c1a137 Reviewed-on: https://chromium-review.googlesource.com/207371 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang da5777cf 2014-07-11T09:52:58 Create an Error object to represent GL errors. BUG=angle:520 Change-Id: I1a54e6f308b5b0f310c725a7771af737a77ecd42 Reviewed-on: https://chromium-review.googlesource.com/209619 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 39b43463 2014-08-18T16:39:50 Use Range type for index ranges. This compacts a lot of parameter passing. Refactoring patch only. BUG=angle:571 Change-Id: Ic918478d0c6b81093bfea6154ce0f6bf1d2b5be2 Reviewed-on: https://chromium-review.googlesource.com/210645 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Brandon Jones 6053a52e 2014-07-25T16:22:09 Moved some validation back to Texture, unified all TextureImpl variants BUG=angle:688 Change-Id: Ie2df18277c84345fceaa31d4f63f5cbbb47540c6 Reviewed-on: https://chromium-review.googlesource.com/211387 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Brandon Jones <bajones@chromium.org>
Brandon Jones 3b579e36 2014-08-08T10:54:25 Minor cleanup to Query constructor to normalize it with other interfaces Change-Id: I562245cf6323edc7a127480e8de6ac16c6f97c03 Reviewed-on: https://chromium-review.googlesource.com/211641 Tested-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill d9ba4f73 2014-08-04T10:47:59 Move implementation of hasMappedBuffer to State. Refactoring patch only. BUG=angle:571 Change-Id: Ib9f3145eaa457d94e488fd42eb4c4b9133768996 Reviewed-on: https://chromium-review.googlesource.com/210643 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Geoff Lang 5d601382 2014-07-22T15:14:06 Simplify formatutils.h by exposing the info structures. Removed all the separate query functions and simply expose the internal info structures. This reduces the number of std::map/std::set operations that were hidden behind the API. Moved the validation tables for ES3 format combinations and effective internal formats into validationES3.cpp so that formatutils.h only has generic GL format queries. BUG=angle:658 Change-Id: Ieb60d42b8eafcdb4f21dcbec130b39478ce5f7c5 Reviewed-on: https://chromium-review.googlesource.com/206835 Reviewed-by: Nicolas Capens <capn@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 8e8bf555 2014-07-03T13:50:40 Remove the MajorShaderModel member from Context. BUG=angle:658 Change-Id: Iab7906309f6603d5364d891bb332af8c3bf457fe Reviewed-on: https://chromium-review.googlesource.com/206834 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5f4c4636 2014-07-03T13:46:52 Use the FormatCaps for multisample validation and queries. BUG=angle:658 Change-Id: Ic9fa53fb62d7eff62f07b68d7ddada461ecad859 Reviewed-on: https://chromium-review.googlesource.com/206832 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Brandon Jones 6b19b002 2014-07-16T14:32:05 Removing D3D-isms from gl::Texture BUG=angle:688 Change-Id: I0cdc758000993f2d54240c69a84f5ae149306d9e Reviewed-on: https://chromium-review.googlesource.com/209332 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Brandon Jones <bajones@chromium.org>
Brandon Jones 142ec426 2014-07-16T10:31:30 Refactored Texture2DArray, separated out D3D logic BUG=angle:688 Change-Id: Ie3e5ac2bedcffb816ef1537575f09afb3f5e7a35 Reviewed-on: https://chromium-review.googlesource.com/208381 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Brandon Jones <bajones@chromium.org>
Geoff Lang 493daf5a 2014-07-03T13:38:44 Update the format table to check support for filtering and rendering. Since filerability and renderability may depend on separate extensions, use functions to determine their support. Context now uses these functions to fill it's own TextureFormatCaps. BUG=angle:658 Change-Id: Ib4dc877ba7c24f84a3823fd5aa2e01a3b3621705 Reviewed-on: https://chromium-review.googlesource.com/206831 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6cf8e1b9 2014-07-03T13:03:57 Reduce the number of TextureFormatCaps members. Since GL has no notion of texture formats that can be used for different types of textures, merge the TextureFormatCaps texture support members. Also merge the various renderability members since the texture type is enough to determine what type of renderable a format is. BUG=angle:658 Change-Id: I7cba50b147fcca8f3880d65c06c57df9c65ed19c Reviewed-on: https://chromium-review.googlesource.com/206830 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Brandon Jones 78b1acdb 2014-07-15T15:33:07 Refactored Texture3D, separated out D3D logic BUG=angle:688 Change-Id: I6cda73c2e4c8a026b8c5222bc40cea93ad4e0ba3 Reviewed-on: https://chromium-review.googlesource.com/208102 Tested-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Brandon Jones 0511e808 2014-07-14T16:27:26 Refactored TextureCubeMap, separated out D3D logic BUG=angle:688 Change-Id: I2300aaad4fab25df484e0bc3613ac3b176addc93 Reviewed-on: https://chromium-review.googlesource.com/208191 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Brandon Jones <bajones@chromium.org>
Brandon Jones f47bebc4 2014-07-09T14:28:42 Refactored Texture2D, separated out D3D logic BUG=angle:688 Change-Id: I93c2ff0b125278234d61324844b79cc58135d4d8 Reviewed-on: https://chromium-review.googlesource.com/207675 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Brandon Jones <bajones@chromium.org>
Shannon Woods 53a94a82 2014-06-24T15:20:36 Refactors State to be a fully-qualified class BUG=angle:685 Change-Id: I36cff2da985a12c7180fe2850ccd471f4cebbaad Reviewed-on: https://chromium-review.googlesource.com/206634 Tested-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shannon Woods 1da3cf63 2014-06-27T15:32:23 Removes sub-entry-point Framebuffer validations BUG=angle:685 Change-Id: I2d630396a5971972f858cca9c39ceb6509492aa4 Reviewed-on: https://chromium-review.googlesource.com/205836 Tested-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shannon Woods aa2ab7d8 2014-06-24T17:51:51 Cache bound FBO and VAO objects themselves in State BUG=angle:685 Change-Id: I19ae6752d1a7490122dd9ca076efb08564e1901d Reviewed-on: https://chromium-review.googlesource.com/205835 Tested-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill d4cfa57d 2014-07-08T10:00:32 Move more draw call validation to the API. The GL expects us to reject invalid draw calls before we start doing any work, so we can prevent internal unnecessary state changes. Also update the program binary's cached sampler data when we validate. The previous patch was breaking draw calls in Google Earth WebGL. BUG=angle:571 BUG=390412 Change-Id: I1c4e204ae2467afc36b76af975a3a49e26349639 Reviewed-on: https://chromium-review.googlesource.com/206482 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c0b9ef4b 2014-07-02T10:02:37 Split Caps into Caps, Extensions and TextureFormatCaps. Context now holds it's own Caps, Extensions and TextureFormat caps so that it can modify them based on client version or work-arounds. BUG=angle:658 Change-Id: Id71b6c89b7aa36e1f3dc42b0e4720eaed1851fb9 Reviewed-on: https://chromium-review.googlesource.com/206480 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e92a3546 2014-07-03T10:38:58 Remove redundant FBO query methods. Several query methods simply wrapped a NULL check with a default return value. Most of these safety checks were unnecessary. BUG=angle:660 Change-Id: I0ac6897f06be082c8efab8721920d1b51ba999ee Reviewed-on: https://chromium-review.googlesource.com/205606 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang aae65a4e 2014-05-26T12:43:44 Add caps for texture size limits and other caps in the 6.28 table. BUG=angle:658 Change-Id: Ia265fe1d3713db7701b41e8430d6d186f352ab4a Reviewed-on: https://chromium-review.googlesource.com/201363 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 570f7c84 2014-07-03T10:38:54 Add helper methods for FBO attachment validation. Subsequent refactoring will eliminate duplicate code. BUG=angle:571 Change-Id: I086320beb5c432c326d29d047931575e6f2a1d64 Reviewed-on: https://chromium-review.googlesource.com/205603 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Brandon Jones a328d569 2014-07-01T13:52:40 Removed sampler state getters and setters from gl::Texture BUG=angle:688 Change-Id: I3f203e4d10059c12a0c00e967ad6c7d3b3a18074 Reviewed-on: https://chromium-review.googlesource.com/206335 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Brandon Jones <bajones@chromium.org>
Shannon Woods e8cda371 2014-07-01T16:13:18 Revert "Move more draw call validation to the API." BUG=390412 This reverts commit 9efa581d0e8f251b88f5a2f432ddb20655036c77. Conflicts: src/libGLESv2/validationES.cpp Change-Id: I78457e1dfec8b75fecef8dc40c549adbde680a2a Reviewed-on: https://chromium-review.googlesource.com/206340 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Brandon Jones d38f926a 2014-06-18T16:26:45 Refactoring Buffers BUG=angle:681 Change-Id: I6c3809e0b9468dfe38465c55759c2572c21485da Reviewed-on: https://chromium-review.googlesource.com/204896 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang e4a492be 2014-06-19T14:14:41 Remove the clientVersion parameter from the format utils. clientVersion was only useful for intitial validation of formats and not required for queries. Only use the client version and caps structure to validate if a format is available and then trust that it is supported past the validation layer. Fixed some inconsistancies between tables such as missing formats or incorrect load functions in the ES3 tables. BUG=angle:659 Change-Id: I8d33c902156ee6fb41efe937d93b0586191726e5 Reviewed-on: https://chromium-review.googlesource.com/201167 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e261b44a 2014-06-25T12:42:21 Remove obsolete Renderbuffer types. RenderbufferProxySet and FramebufferTextureBindingPointer aren't necessary any more with our refactored renderbuffer classes and ownership of attachments by the Framebuffer. We can also consolidate the FramebufferAttachment and implementation to a single class, and no longer need to store ref counted objects in the Framebuffer class directly. BUG=angle:660 Change-Id: Idcc06dfb42b47242b33494e797a0ba06d6669511 Reviewed-on: https://chromium-review.googlesource.com/201838 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Brandon Jones c7a41049 2014-06-23T12:03:25 Moved D3D specific files and folders under the D3D folder. Change-Id: I8afd67e08ee558fe94532c377d079673357a7192 Reviewed-on: https://chromium-review.googlesource.com/205229 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 13f7d7dc 2014-06-20T13:21:27 Move FBO check from applyRenderTarget to the API. We would traverse the applyRenderTarget path from several entry points, which could then trigger a GL error. In-line with our validation refactoring, move all error checks prior to executing any state logic. BUG=angle:571 Change-Id: I51f5bcfa41be7cdba7771eb87d5a831fa622f984 Reviewed-on: https://chromium-review.googlesource.com/203772 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill 9efa581d 2014-06-20T13:21:24 Move more draw call validation to the API. The GL expects us to reject invalid draw calls before we start doing any work, so we can prevent internal unnecessary state changes. BUG=angle:571 Change-Id: Ic71218b3c2d5dc310280d3738bb1387753a10e03 Reviewed-on: https://chromium-review.googlesource.com/203770 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill ac528015 2014-06-20T13:21:23 Move stencil mask validation to before the draw. ANGLE (and WebGL) restrict the back and front stencil masks on draw, due to D3D restrictions. We would previously only validate this if the stencil was enabled in D3D9. In D3D11 we would validate the stencil masks even if the stencil is disabled, which is the behaviour the spec suggests. Moving the error check to before the draw also prevents any issue with interrupting a draw call mid-way through. BUG=angle:571 BUG=378754 Change-Id: If7651c2be559eef64a872082e144dafa3b2c524b Reviewed-on: https://chromium-review.googlesource.com/203299 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Brandon Jones 5bf98290 2014-06-06T17:19:38 Refactoring VertexArrays BUG=angle:676 Change-Id: If17b05ab667d79adcaacfbd1811ed92c0ce47fff Reviewed-on: https://chromium-review.googlesource.com/203294 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 1e3fa74d 2014-06-16T10:34:00 Remove Renderer pointer from FBO attachments. Removing the Renderer pointer is one step towards making FBO attachments a minimal state object. Eventually we will be able to store them as arrays instead of arrays of pointers. BUG=angle:660 Change-Id: Idce34e06c339ecb18c60fef12d2ed911d0c4e0f6 Reviewed-on: https://chromium-review.googlesource.com/201835 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill 6c7b4ada 2014-06-16T10:33:59 Add new ref-counted Renderbuffer class. Renderbuffers are a clear object type in GL, and this patch adds a more consistent state representation for them. They're managed by the ResourceManager, and have a storage implementation similar to Textures, but much simpler. BUG=angle:660 Change-Id: Ia17199bb8cb570d48db42e1f28ccbcc12a902fcf Reviewed-on: https://chromium-review.googlesource.com/201834 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Geoff Lang 04fb89ad 2014-06-09T15:05:36 Generate pixel shader output to match the bound framebuffer. Only generate pixel shader output variables for render targets that are currently bound. Fixes some performance issues with D3D10 cards that were slow to discard unused outputs. Fixed memory leaks in ProgramBinary by refactoring the freeing of the current state into a reset function. BUG=angle:670 Change-Id: I40f83e15724fb9a1a9ae61363a056999f1fa26d2 Reviewed-on: https://chromium-review.googlesource.com/202977 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang cec3590a 2014-04-16T10:52:36 Use a Caps structure to store extension and texture format support. Removes support for fallbacks in D3D9 texture formats. The fallback formats did not work properly anyways. BUG=angle:658 Change-Id: Idfa5183bf71fd8ebf4608f940f9d93177b9eff08 Reviewed-on: https://chromium-review.googlesource.com/200813 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3c7fa226 2014-06-05T13:08:51 Rename Renderbuffer to FramebufferAttachment. Part of the refactoring effort to clean up our classes for FBO attachments and Renderbuffers. BUG=angle:660 Change-Id: Id23df904f56499568159611b66c8922b9dce6a3d Reviewed-on: https://chromium-review.googlesource.com/201832 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 893ab087 2014-05-16T16:56:10 Move state query validation out of Context. Generate all GL errors in the validation helper functions, instead of within the state manipulation logic and internals of Context. BUG=angle:571 Change-Id: I7a3f540e2ae0f5f8c7126e2593717cc3200dd7e5 Reviewed-on: https://chromium-review.googlesource.com/200551 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 784371d0 2014-05-16T12:39:04 Don't discard serials of zero from the set of bound framebuffer serials. A serial of zero is a valid texture serial but it was used by RenderbufferStorage to denote a non-texture binding. Added a isTexture method to Renderbuffers and RenderbufferStorage has been updated to return -1 as the current texture serial to avoid collisions. BUG=angle:633 Change-Id: Ie27e4b185ac09b48b593ae0dea02aeff5950a44f Reviewed-on: https://chromium-review.googlesource.com/200123 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 43b00426 2014-05-12T16:28:07 Optimize texture application in draw calls. Gather all bound textures and samplers first and then pass them to generateSwizzles and applyTextures to reduce redundant get calls. BUG=260069 Change-Id: I5b10dddb01a6bfd756c58b76218838cfc1fd59b6 Reviewed-on: https://chromium-review.googlesource.com/199343 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 45c785d3 2014-05-13T14:09:34 Move validation of EndQuery out of gl::Context. BUG=angle:571 Change-Id: I8913eb1b565a4282d9d84d06933e8b854453f17d Reviewed-on: https://chromium-review.googlesource.com/199349 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill db2f14c0 2014-05-13T13:56:30 Refactor BeginQuery validation out of gl::Context. Part of our effort to relocate all validation logic to a preliminary pass outside of our state tracking or rendering layers. BUG=angle:571 Change-Id: I5241daef6249910a781e78fd066debe0ab1d3f2b Reviewed-on: https://chromium-review.googlesource.com/199348 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Vladimir Vukicevic 1e514358 2014-05-13T15:53:06 Add READ/DRAW_FRAMEBUFFER_BINDING_ANGLE to getQueryParameterInfo Change-Id: I3e7f5cb0b4d2829eef86b878ffede0ac86279f57 Reviewed-on: https://chromium-review.googlesource.com/199684 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang d3ff9009 2014-05-08T11:19:27 Add support for querying GL_MAX_VARYING_COMPONENTS. BUG=angle:645 Change-Id: I2e33798bd7fe6cabb1237224aeb9e59cdf03f73c Reviewed-on: https://chromium-review.googlesource.com/198836 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Shannon Woods 6667f76b 2014-05-06T17:12:19 Advertises the NV_pixel_buffer_object extension BUG=angle:581 Change-Id: I1e55582e94a36e56ef3e0f53ff9233c1a31408f5 Reviewed-on: https://chromium-review.googlesource.com/198238 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Shannon Woods 158c4384 2014-05-06T13:00:07 Adds PBO buffer targets when extension is present BUG=angle:581 Change-Id: I125cdd995e538db4a275657770149071406a6ad1 Reviewed-on: https://chromium-review.googlesource.com/198237 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Geoff Lang cdacacdd 2014-04-24T12:01:56 Add validation for unsized BGRA texture formats. BUG=angle:620 Change-Id: I956b7fc4ed0be99239e4ed1c63b51732727cc87f Reviewed-on: https://chromium-review.googlesource.com/196840 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Nicolas Capens 46485086 2014-04-15T13:12:50 Implement EXT_shader_texture_lod BUG=angle:551 Change-Id: I81d7574a15861f1b24ddf6147cf71adbf20e10f3 Reviewed-on: https://chromium-review.googlesource.com/194960 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Geoff Lang cebb5aa0 2014-04-07T14:13:40 Fix warnings about unreferenced local variables. BUG=angleproject:602 Change-Id: I2eb04fe6eed60b3877b14628e81c0b1fe3b68647 Reviewed-on: https://chromium-review.googlesource.com/193431 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill eb9baabb 2014-03-24T13:19:43 Pass pack state arguments instead of split parameters. Similar to unpack state, the PixelPackState struct encapsulates all the parameters related to pixel pack buffers. Passing the packstate makes functions more consise. BUG=angle:511 Change-Id: If6954a5085e9b8f828cfc8892a73e7c7514b0c8a Reviewed-on: https://chromium-review.googlesource.com/191032 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 4c5c6bbb 2014-02-05T16:32:46 Add support for drawing with transform feedback. BUG=angle:495 Change-Id: Ib9c19130dfbc44a99998c5d6d8160bfc2b683eb9 Reviewed-on: https://chromium-review.googlesource.com/185037 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Shannon Woods 916e769a 2014-03-27T16:58:22 Adds support for EXT_map_buffer_range BUG=angle:581 Change-Id: I0ab637db35afd51ff4c516bb97e954f4f2cdad3d Reviewed-on: https://chromium-review.googlesource.com/191710 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Shannon Woods b3801744 2014-03-27T14:59:19 Adds support for OES_mapbuffer BUG=angle:581 Change-Id: I05824051789a77c8169ec5830731e6155c507fc4 Reviewed-on: https://chromium-review.googlesource.com/191650 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Geoff Lang 48dcae7b 2014-02-05T16:28:24 Added transform feedback shader generation. BUG=angle:495 Change-Id: I41a0177fd3eb43c9f4ab9e54faeadac3eb483c2c Reviewed-on: https://chromium-review.googlesource.com/185035 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 1b6edcb6 2014-02-03T14:27:56 Add remaining transform feedback queries. BUG=angle:493 Change-Id: I8841af50dcb90e7fb8a811b95d015bfdd2c5d226 Reviewed-on: https://chromium-review.googlesource.com/191035 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 1e40d1c9 2014-03-18T22:41:22 Revert "Add remaining transform feedback queries." This reverts commit 4251b75830f91df68df80a096a0713830c73b1cc. Change-Id: I95afebcaf91ee38a121df20f403eb06f19b2510a Reviewed-on: https://chromium-review.googlesource.com/190560 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4251b758 2014-02-03T14:27:56 Add remaining transform feedback queries. BUG=angle:493 Change-Id: Ibeae41da2b83ab63d237912602ba5d2aad0bbec2 Reviewed-on: https://chromium-review.googlesource.com/185036 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill 26e9195f 2014-03-05T15:01:27 Refactor ReadPixels validation. Move ReadPixels error generation out of the implementation and into the API level. BUG=angle:571 Change-Id: I0b32294f359fedd13d1af2c95baf37a3e5ac1d5b Reviewed-on: https://chromium-review.googlesource.com/188014 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7a5f738b 2014-03-05T15:01:24 Implement buffer map related entry points and errors. BUG=angle:565 Change-Id: I14cee4eec032d4b6b8d9479da4234b81e4ec6bec Reviewed-on: https://chromium-review.googlesource.com/188202 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8c96d58a 2014-03-05T15:01:23 Add helper methods for buffer enum tagets. A query helper method in Context and a validation helper method reduce code redundancy quite a bit. BUG=angle:565 Change-Id: I96b9ecc4614e7e31240e31594223e8b9636d22c2 Reviewed-on: https://chromium-review.googlesource.com/188201 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang eeba6e1e 2014-02-03T13:12:30 Added methods for applying the current transform feedback buffers. BUG=angle:495 Change-Id: I2d9fbf9c245bc519b8c5a724ca3912aaa7a23d97 Reviewed-on: https://chromium-review.googlesource.com/185034 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang c8058451 2014-02-03T12:04:11 Add functionality to create and destroy TransformFeedback objects. BUG=angle:491 Change-Id: I3ee3c2aec1878ad656a8f522943a29fea6f7e215 Reviewed-on: https://chromium-review.googlesource.com/185033 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 496123fd 2014-02-12T11:33:51 Implement EXT_blend_minmax. BUG=angle:555 Change-Id: I1ae6a9783e718d16ee08bda5463f11cd52ad0967 Reviewed-on: https://chromium-review.googlesource.com/186123 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill c5a83000 2014-02-14T16:41:25 Store multiple vertex executables in the program binary. With dynamic vertex conversion the GPU, we will have different input layouts resulting in different executables. This patch adds a way of mapping the input layouts to vertex executables. BUG=angle:560 Change-Id: Ie36f2f8ac2dfcb96f562af577d31f57d6d89b447 Reviewed-on: https://chromium-review.googlesource.com/185192 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 37dde692 2014-01-31T16:34:54 Add support for transform feedback queries. Change-Id: I0aab43b146f87259898db57acb9f74fdbfdb1b96 Reviewed-on: https://chromium-review.googlesource.com/184580 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0550d038 2014-01-30T11:29:07 Implement GL_RASTERIZER_DISCARD. BUG=angle:498 Change-Id: Ib60c39e206003ae67c93769e35f7f9ef790ce9f4 Reviewed-on: https://chromium-review.googlesource.com/184396 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 1fc7e2c5 2014-01-21T16:47:10 Refactor validation of FramebufferRenderbuffer. Consolidate a lot of duplicated code into helper methods. Also move GetTargetTexture to the context class. Change-Id: I8e3990a5e3c1976cb533941d0a0946466accec30 Reviewed-on: https://chromium-review.googlesource.com/181556 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill b155bbcb 2014-01-13T09:51:03 Properly clamp stencil mask query values to max int. We could overflow when casting from max unsigned int to integer, and return a negative mask. See dEQP functional.state_query.stencil_value_mask_getfloat Change-Id: I59189a40b662ad9d8ded79cdfeded923b98f0b85 Reviewed-on: https://chromium-review.googlesource.com/181780 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Commit-Queue: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2e503557 2013-12-19T13:48:34 Add in fixes for dEQP state reset. dEQP relies on a couple specific enums to reset state (see the prerequisites test) which we don't currently implement. Prior changes require us to implement a few query parameter to allow dEQP to work. BUG=angle:540 Change-Id: Ibd7caa08ffb821ea2de120717beedb2f82428da2 Reviewed-on: https://chromium-review.googlesource.com/180981 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Commit-Queue: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Jamie Madill 13a2f85b 2013-12-11T16:35:08 Implement max elements indices and vertices. ES3 has integer queries for the maximum recommended number of vertices and indices per draw call. These are roughly correlated to D3D's resource limits -- however, while ES3 has recommended limits D3D has hard limits. Change-Id: Ib653bc27e61607c78d0c5e70b0d97fea7af6464f Reviewed-on: https://chromium-review.googlesource.com/179670 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Commit-Queue: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Geoff Lang c142e9da 2013-09-30T15:19:47 Renderer classes now set their blend states to mask out channels that do not exist in the render target. Change-Id: Ia49bf8de07bbdfa31275ec9835de28adc3717485 Reviewed-on: https://chromium-review.googlesource.com/176855 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Commit-Queue: Shannon Woods <shannonwoods@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>