src/libANGLE/State.cpp


Log

Author Commit Date CI Message
Brandon Jones c405ae71 2017-12-06T14:15:03 Optimize Vertex Shader Attribute Type Validition Improves ValidateVertexShaderAttributeTypeMatch by storing vertex attributes types into masks for quick comparisons when needed. This shows 2% improvement to glDrawElements for the aquarium workload. BUG=angleproject:2202 Change-Id: I87fa3d30c3d8cdba6dfd936cd1a41fd27b1c6b77 Reviewed-on: https://chromium-review.googlesource.com/814795 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill d078c681 2018-01-02T11:50:24 VertexArray: Add enabled attribs bitmask. This replaces the "max enabled attrib" integer with a bitmask of enabled attribs. Should have better worst-case performance (only attribute 15 is enabled) and similar best-case performance (when only attribute 0 is enabled). This might also help implementing validation optimizations. Bug: angleproject:2202 Change-Id: I5cbb533c3af23851a42c80a6dc409a0da84e87c3 Reviewed-on: https://chromium-review.googlesource.com/847284 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Xinghua Cao 9c8e1a36 2017-12-06T17:59:58 ES31: Implement image state query BUG=angleproject:2278 TEST=dEQP-GLES31.functional.state_query.indexed.image_binding* Change-Id: Ia624d55ccf1fdf92188d9e710265bdffe96a23c6 Reviewed-on: https://chromium-review.googlesource.com/810465 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill f414121d 2017-12-12T15:08:07 D3D11: Fix program uniform buffer dity bits. There were actually three missing state synchronization points: 1. When re-binding a uniform buffer, we had no dirty bits. 2. When modifying the Program bindings, we also had no update. 3. When triggering a dependent state update via BufferData. This fixes all the missing syncs and adds tests for the cases. Bug: angleproject:1390 Change-Id: I2f05766545784248bcca8308ae34ac5720237ab1 Reviewed-on: https://chromium-review.googlesource.com/823150 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Qin Jiajia a98a2811 2017-11-30T18:12:06 ES31: Add support for GL_DISPATCH_INDIRECT_BUFFER_BINDING binding point BUG=angleproject:2270 TEST=dEQP-GLES31.functional.state_query.integer.dispatch_indirect_buffer_binding_* Change-Id: I2c286c219c5c849d7ba417069f53f2d0fae6abf1 Reviewed-on: https://chromium-review.googlesource.com/799990 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Xinghua Cao 10a4d434 2017-11-28T14:46:26 ES31: Enable some dirty bits and dirty objects for compute pipeline BUG=angleproject:2265 TEST=dEQP-GLES31.functional.shaders.builtin_var.compute.* angle_end2end_test.ShaderStorageBufferTest31 .MultiStorageBuffersForMultiPrograms Change-Id: Icc3df122602951a2328003c10a76696ab4c9f0d8 Reviewed-on: https://chromium-review.googlesource.com/792951 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang ded7923b 2017-11-28T15:21:11 GL backend: Only synchronize transform feedback state when it changes. BUG=angleproject:2188 Change-Id: I5bfcc038c887dde0770564d103eb3cb234b248c9 Reviewed-on: https://chromium-review.googlesource.com/794100 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang e51ba63b 2017-11-21T11:45:25 Optimize Texture initialization tracking with extra caching. In both Texture and State, track when all images/textures are initailized so that State::clearUnclearedActiveTextures can early-exit. Improves performance on the WebGL Aquarium by 26% (23->29 FPS) with 30000 fish. BUG=angleproject:2188 Change-Id: Ie2860a81d7be19ee87262325d8cf27bde43f80b8 Reviewed-on: https://chromium-review.googlesource.com/782339 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez d5d3099e 2017-11-13T10:21:52 Avoid redundant BindingPointer::set in setBufferBinding BUG=angleproject:2169 Change-Id: I91f099a53b456fc96988839e34733ce09fe38336 Reviewed-on: https://chromium-review.googlesource.com/766473 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill cac94a91 2017-11-10T10:09:32 Optimize ShaderVariable::isBuiltIn. This makes the check a bit faster, by inlining the prefix check. Also some cleanups to ValidateVertexShaderAttributeTypeMatch. BUG=angleproject:2202 Change-Id: Ifeab4cd85a91a1639a461f44776a68ac98c5bd79 Reviewed-on: https://chromium-review.googlesource.com/761240 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 336129f6 2017-10-17T15:55:40 Use a packed enum for buffer targets. BUG=angleproject:2169 Change-Id: I4e08973d0e16404b7b8ee2f119e29ac502e28669 Reviewed-on: https://chromium-review.googlesource.com/723865 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez cda6af19 2017-10-30T19:20:37 Split pixelBuffer from pack/unpack state This will refactor will help use packed enums for buffer targets. BUG=angleproject:2169 Change-Id: Ie7ed3e105f89457c67027e6598d7e29503ad355c Reviewed-on: https://chromium-review.googlesource.com/745181 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 29a20992 2017-11-06T18:23:16 Add back dirty bits for pack / unpack buffer binding BUG=angleproject:2169 Change-Id: I8cee9e1c7565d90022216d62b45f0eec5bc51f14 Reviewed-on: https://chromium-review.googlesource.com/755461 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill c67323a9 2017-11-02T23:11:41 Squash State dirty bits to below 64. This will dramatically speed up performance on 64-bit systems due to the efficiency of angle::BitSet64. Improves performance of the GL back-end on benchmarks quite a bit. Squashes the Pack and Unpack states together. Also moves the current value dirty bits to a single dirty bit, with a separate set for each attribute. Also squashes a multisample dirty bit. Also fixes an incorrect dirty bit in StateManagerGL. We may want to implement a semi-fast version of BitSet64 for 32-bit systems if we find performance is not satisfactory. BUG=angleproject:2188 Change-Id: I4616782bf75413252ede3e3ac752b9ccdb9aab49 Reviewed-on: https://chromium-review.googlesource.com/722423 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill a59fc19f 2017-11-02T12:57:58 Use active textures mask with robust init. This should speed up clearUnclearedActiveTextures considerably. It was showing up as a hotspot when running the aquarium demo with the passthrough command decoder. Also rename the complete textures mask in gl::State to an active textures mask, since it includes incomplete textures. BUG=angleproject:2188 Change-Id: Idf020fc49c1e74f17a8005c3b88516829767b84c Reviewed-on: https://chromium-review.googlesource.com/722421 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 4751aabb 2017-10-30T15:14:52 Fix minor issues with ANGLE_texture_rectangle. * Some texture parameters were not initialized correctly. * Binding points were not created for enableable texture extensions. BUG=angleproject:1650 BUG=angleproject:1523 Change-Id: Id3436fe1dbb4069eafad97e722ac519a6b59e5db Reviewed-on: https://chromium-review.googlesource.com/744446 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 2e568cfb 2017-09-18T17:05:22 Add generator for packed GL enums. For testing this also converts two unimportant GLenums, gl::BufferUsage and gl::CullModeFace. BUG=angleproject:2169 Change-Id: If1e86a97d0fed3fd567303aca6506ec579503076 Reviewed-on: https://chromium-review.googlesource.com/688000 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 42975644 2017-10-12T12:31:51 Move incomplete texture logic to shared helper. The incomplete texture handling is similar between the D3D and Vulkan back-ends. We create 1x1 textures, initialize them to black, and bind them when we detect incomplete textures. We would also bind incomplete textures when we detect feedback loops. In the GL back-end, we wouldn't detect feedback loops, and would allow the driver to handle incompleteness. Instead implement this in a shared helper class, and do the feedback loop detection in the front-end for every back-end. This makes our behaviour more consistent between back-ends, and prevents undefined behaviour. Because initializing multisample textures is tricky (they can't be updated with TexImage calls) we do a bit of a workaround so the back-end can clear the incomplete multisample texture initially. This progresses the initial Vulkan textures implementation. BUG=angleproject:2167 Change-Id: I79ddcc0711fcc986f2578a52ac6f701231d241ac Reviewed-on: https://chromium-review.googlesource.com/700993 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang b433e872 2017-10-05T14:01:47 Change robust resource init into a context creation attribute. Enabled support on OpenGL even through the extension is not fully implemented so that testing with Chromium/Passthrough commmand decoder is still possible. BUG=angleproject:1635 Change-Id: Ia417b1779aace1eae19514325701a79cd33f4ef3 Reviewed-on: https://chromium-review.googlesource.com/678479 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
jchen10 a99ed554 2017-09-22T08:10:32 Refactor data conversions for state commands This mainly enforces the rules as descripted in ES 3.10, section 2.2.1 and 2.2.2, by enhancing the "queryconversions" to support more rules, removing the scattered type convertors in "utilities" , "mathutil" and "queryutils", and forcing to only use the convertors in "queryconversions". BUG=angleproject:2165 Change-Id: I73c1dc850e2b3b8a479ece1d9c5eb7ae4ce851fe Reviewed-on: https://chromium-review.googlesource.com/680094 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 488130e0 2017-09-27T13:53:11 Make GL_ANGLE_framebuffer_multisample enableable. BUG=angleproject:1523 Change-Id: Idc2cf338ba1fb5142ef2596603d291790fd6ddd6 Reviewed-on: https://chromium-review.googlesource.com/688100 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 05b35b21 2017-10-03T09:01:44 D3D11: Lazy robust resource init. This patch moves the robust resource init logic to the GL front-end. Instead of initializing texture resources immediately on creation in D3D11, it defers the clear until before a draw call in some cases, or skips the update if we can determine if a texture (or other resource) has been fully initialized. Currently lazy init is only implemented for Textures, Renderbuffers, and Surfaces. Various places where lazy resource init is triggered: * Framebuffer operations (Draw, Blit, CopyTexImage, Clear, ReadPixels) * Texture operations (SubImage, GenerateMipmap, CopyTexImage) Some efficiency gains remain to be implemented, such as when a SubImage call fills the entire object. Similarly for Blit, and a few other operations. In these cases we can skip lazy init as an optimization. Edge cases with EGLImage are mostly untested. BUG=angleproject:2107 Change-Id: I2bf3a69b1eae0d4feeb5b17daca23451f1037be8 Reviewed-on: https://chromium-review.googlesource.com/576058 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jiawei Shao db342276 2017-09-27T10:21:45 ES31: Implement glSampleMaski on OpenGL This patch intends to implement glSampleMaski on OpenGL backends. Refers to: https://chromium-review.googlesource.com/c/487603 BUG=angleproject:1592 TEST=dEQP-GLES31.functional.state_query.*.sample_mask* TEST=dEQP-GLES31.functional.texture.multisample.*.sample_mask* Change-Id: If5ddd6ab57259593919a482be80fbdbe29f6f54d Reviewed-on: https://chromium-review.googlesource.com/573727 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 0f80ed86 2017-09-19T00:24:56 Improve speed of iterating dirty textures. We had a performance regression in the Textures benchmark. What the test was doing was iterating over all possible texture state, ensuring the active texture was dirty every frame. This is an attempt to improve on the speed by not doing as much resetting work in State::syncProgramTextures. It introduces an active textures mask to speed iteration over the active texture set. Also makes a refactoring change to Context to make it easier to limit caps to an implementation maxium. The number of active textures is limited to 64 so they easily fit in the bitset mask, with a limit of 32 per shader stage. No mask is currenly kept for compute shaders. With the fix the performance should be about the same as before (which is good, as the test always sets the textures dirty). Test: TexturesBenchmark.Run/gl_8_textures_5_rebind_3_state_8_mips BUG=chromium:765363 BUG=angleproject:1387 Change-Id: I8bcf95be3671195373573f89f406edaba40aa1be Reviewed-on: https://chromium-review.googlesource.com/670279 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yunchao He a336b90f 2017-08-02T16:05:21 ES31: Impl program pipeline object management entries for GL backend. The program pipeline object management entries are: GenProgramPipelines DeleteProgramPipelines BindProgramPipeline IsProgramPipeline BUG:angleproject:2123 Change-Id: I114d054b90caf2ee3f9befef7439552a1c309bc4 Reviewed-on: https://chromium-review.googlesource.com/629978 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill af4ffe0a 2017-09-09T23:32:48 D3D11: Implement dirty bits for texture updates. BUG=angleproject:1387 Change-Id: I5f759c3dc60b53a5d4f8a1dd1f4a1d3d5330bfda Reviewed-on: https://chromium-review.googlesource.com/648487 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 06ef36b9 2017-09-09T23:32:46 Add top-level state sync for Samplers. This also reformats the Sampler class to use a shared state struct with the implementation. It removes the call to sync the sampler state from the StateManagerGL::setGenericShaderState method, since it should all be handled at the front-end now. Also rename 'syncImplState' to 'syncState' methods. BUG=angleproject:1387 Change-Id: I5f0219b719aee99aaaa486ec188b2af0c9128e6a Reviewed-on: https://chromium-review.googlesource.com/648054 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 81c2e253 2017-09-09T23:32:46 Add top-level dirty bits for texture and samplers. These will have to be fleshed out in the back-ends. Also currently uses a single bit for all the bindings, and we can extend this to more fine-grained updates in the future. This patch implements top-level updates for texture completeness. Sampler completeness caches are removed from the Texture class, and replaced by a cache in the gl::State class. The State class also keeps a channel binding to the bound textures so it can be notified when textures might change from complete <-> incomplete. In future CLs we skip updating back-ends if texture state doesn't change. BUG=angleproject:1387 Change-Id: If580b4851303c86f3240e62891f5f6047eefb6a2 Reviewed-on: https://chromium-review.googlesource.com/648053 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8693bdb8 2017-09-02T15:32:14 Add a few missing dirty bit cases. Discovered some of these while investigating Texture dirty bits. BUG=angleproject:1387 Change-Id: I8b170462bfd283e4b0f9d47b7f7ddbaa7957914d Reviewed-on: https://chromium-review.googlesource.com/648051 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yunchao He a438f4e7 2017-08-04T13:42:39 Fix some style issues BUG=angleproject:2123 Change-Id: Ic3c70c7148297662d4fd9e08edcd208f5a1cc885 Reviewed-on: https://chromium-review.googlesource.com/601370 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 13c0dd46 2017-07-04T18:27:01 Add texture rectangle extension. This is needed to support binding IOSurfaces to textures on OSX. This commit adds support in the API and tests, but didn't need to implement compiler changes as it already supported ARB_texture_rectangle. Implementation of CHROMIUM_opy_texture for rectangle texture and the spec are left for follow-up commits. Change-Id: I45c66be763a9d3f6f619640f9f95f39b05c70867 Reviewed-on: https://chromium-review.googlesource.com/559106 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill a779b610 2017-07-24T11:46:05 Smart caching of VAO input layout. Don't recompute the cached attribute layout for a program if the vertex array info hasn't changed. We can use the Serial class to know when a vertex array has identical state. BUG=angleproject:1156 Change-Id: Ia11f6ac268f63c3299f6d6d80c2866009cb8429c Reviewed-on: https://chromium-review.googlesource.com/529768 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
JiangYizhou 24fe74c1 2017-07-06T16:56:50 ES31: Query multisampled texture binding id Add GL_TEXTURE_BINDING_2D_MULTISAMPLE option to State.cpp to query binding id of GL_TEXTURE_2D_MULTISAMPLE. BUG=angleproject:1590 TEST=angle_deqp_gles31_tests.exe --deqp-case=dEQP-GLES31.functional.state_query.integer.texture_binding_2d_multisample_* Change-Id: I86b24f00ac4e75eb0e2986f7cf2eb108aae14674 Reviewed-on: https://chromium-review.googlesource.com/561196 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yunchao He <yunchao.he@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shao dde78e8c 2017-05-22T14:13:27 ES31: Implement Vertex Attrib Binding on OpenGL This patch intends to implement Vertex Attrib Binding on OpenGL back-ends: 1. Add supports for updating vertex attributes by Vertex Attrib Binding APIs. 2. Refactor the process of updating vertex attribtues in class VertexArray to make it easier to implement this feature. BUG=angleproject:1593 TEST=dEQP-GLES31.functional.vertex_attribute_binding.* Change-Id: I800e61518c552b94b84c415895ad31668b0a84b2 Reviewed-on: https://chromium-review.googlesource.com/510251 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill a0016b7f 2017-07-14T14:30:46 Check depth-stencil attachment sample count. Currently we would only check for the color attachment sample count, which could return incorrect results for depth or stencil-only Framebuffers. BUG=angleproject:2108 Change-Id: I378349c91c0139ee507d88fa6a36a86234fea0d4 Reviewed-on: https://chromium-review.googlesource.com/571064 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c43be720 2017-07-13T16:22:14 Implement ANGLE_program_cache_control extensions. This will give the browsers the ability to control the cache size, query and populate the contents, and trim cache contents on memory pressure. BUG=angleproject:1897 Change-Id: I6edaa7d307b890223db98792d5b074e4a7fdfaa4 Reviewed-on: https://chromium-review.googlesource.com/563606 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Xinghua Cao 65ec0b2e 2017-03-28T16:10:52 ES31: Add support for bindImageTexture on GL backend This patch refers to https://chromium-review.googlesource.com/c/380636/ BUG=angleproject:1987 Change-Id: If621eed6ecaa7298214843a2a133801ca1487b03 Reviewed-on: https://chromium-review.googlesource.com/462088 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4928b7ca 2017-06-20T12:57:39 Proliferate gl::Context everywhere. This gives the D3D back-end access to the GL state almost anywhere. This uses the onDestroy hook for Textures to push errors up from destructors, although they still don't quite make it to the Context. There are places, such as in EGL object (Context/Surface) destruction, where we end up calling through to GL implementation internals without having access to a gl::Context. We handle this via a proxy Context to a Display, basically a null context, that has access to impl-side state like the Renderer pointer if necessary. It does not have access to the normal GL state. Also Pass gl::Context to RefCountObject::release(). Since we're using destroy() methods now, we should not ever call the destructor directly. BUG=angleproject:1156 Change-Id: Ie4c32ad6bf6caaff0289901f30b5c6bafa2ce259 Reviewed-on: https://chromium-review.googlesource.com/529707 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev dd5f27ee 2017-06-07T10:17:09 Make VertexBinding's member variables private The patch decorates all members in VertexBinding as private and limits access to them only through getters and setters. This makes it easier to debug and keep track of any assignments to the class members. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Iddd49063d060f136bc9cf11c313a5af0931d433c Reviewed-on: https://chromium-review.googlesource.com/530786 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill aa0a5446 2017-05-25T13:30:23 Ensure gl State structs are zero filled. In some cases we would hash or memcmp against structs with bools or other non-filled data. This could have implementation differences, and may have been causing cache errors on Clang. BUG=chromium:721648 BUG=angleproject:2044 Change-Id: I981a1e6e8d50a33f7fade568497b72b919accfce Reviewed-on: https://chromium-review.googlesource.com/516383 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yunchao He f81ce4a3 2017-04-24T10:49:17 Refactoring: replace NULL by nullptr for pointers (3rd CL). This CL mainly handles passing/returning NULL to/from a function. BUG=angleproject:2001 Change-Id: I34802f792e710e3d7ff697cbe4701dc1bf5ab009 Reviewed-on: https://chromium-review.googlesource.com/485060 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yunchao He 4f285443 2017-04-21T12:15:49 Refactoring: replace NULL by nullptr for pointers (2nd CL). This CL mainly handles the pointer comparisons (== or !=). BUG=angleproject:2001 Change-Id: I25ac3b61032e7ad91459a1c6541cadc87cf9b160 Reviewed-on: https://chromium-review.googlesource.com/483935 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yunchao He d7297bfb 2017-04-19T15:27:10 Code refactoring: replace NULL by nullptr for pointers. This is the frist change to replace NULL by nullptr. It handles the initialization and assignment for pointers. BUG=angleproject:2001 Change-Id: I6d4bb198a72e38b867cd2f65a6e6f2f61339a0b5 Reviewed-on: https://chromium-review.googlesource.com/481600 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 6de51858 2017-04-12T09:53:01 Optimize angle::BitSetIterator. Adds a new custom bitset template to handle packing as many bits as possible into a single variable. Intelligently select the right class depending on platform features and bit sizes. For now, always use a packed 64-bit set on 64-bit, instead of using a 32-bit set for smaller bitsets. BUG=angleproject:1814 Change-Id: I3ffef815c15515555833f6fc9302d8a4eee5423b Reviewed-on: https://chromium-review.googlesource.com/471827 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 20e005b2 2017-04-07T14:19:22 Rename BitSetIterator.h to bitset_utils.h BUG=angleproject:1814 Change-Id: I152ae13b6b7cf0ba72259967f0f124e199b20e07 Reviewed-on: https://chromium-review.googlesource.com/471826 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill dd43e6cd 2017-03-24T14:18:49 Pass Context to VertexArray and Framebuffer syncstate. This will enable more Vulkan-friendly idioms like clearing the vulkan pipeline caches correctly on GL state changes immediately because we have access to the ContextVk. BUG=angleproject:1898 Change-Id: I16c848d8abdde8e26a38d384e565cec8548a66d0 Reviewed-on: https://chromium-review.googlesource.com/459079 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jiajia Qin f546e7df 2017-03-27T14:12:59 ES31: Add GL_SHADER_STORAGE_BUFFER_BINDING binding point The affected APIs are below: getIntegeri_v getInteger64i_v BindBuffer BindBufferBase BindBufferRange BUG=angleproject:1951 TEST=dEQP-GLES31.functional.state_query.integer.shader_storage_buffer_binding_* dEQP-GLES31.functional.state_query.indexed.shader_storage_buffer_* Change-Id: Ief7186b2ebe305f14e620c31841bc244f84429a5 Reviewed-on: https://chromium-review.googlesource.com/459093 Reviewed-by: Yunchao He <yunchao.he@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Shao 80957d99 2017-02-20T21:25:59 ES31: Implement Vertex Attrib Binding entry points This patch intends to implement all entry points related to Vertex Attrib Binding. (1) Add entry points and validation code on following APIs: - VertexAttribFormat - VertexAttribIFormat - VertexAttribBinding - BindVertexBuffer - VertexBindingDivisor (2) Add queries on following parameters: - VERTEX_ATTRIB_BINDING - VERTEX_ATTRIB_RELATIVE_OFFSET - VERTEX_BINDING_DIVISOR - VERTEX_BINDING_OFFSET - VERTEX_BINDING_STRIDE - VERTEX_BINDING_BUFFER BUG=angleproject:1593 TEST=angle_end2end_tests TEST=angle_unittests TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_relative_offset_* TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_bindings_* TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_stride_* TEST=dEQP-GLES31.functional.state_query.vertex_attribute_binding.* TEST=dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.vertex_attrib_pointer TEST=dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.vertex_attrib_format TEST=dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.vertex_attrib_i_format Change-Id: I4b477a82df6aad89b89b088580a06d66963e6666 Reviewed-on: https://chromium-review.googlesource.com/446124 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill e08a1d36 2017-03-07T17:24:06 Plumb robust resource init extensions. This also cleans up a few minor glitches in the extension texts, and renames the EGL extension for consistency. It incidentally fixes a bug in our EGL init where we were checking the wrong client versions for KHR_create_context. It also implements a new feature for tests which allow them to defer Context creation until the test body. This allows tests to check for EGL extension available before trying to create a context with certain extensions. BUG=angleproject:1635 Change-Id: I9311991332c357e36214082b16f2a4a57bfa8865 Reviewed-on: https://chromium-review.googlesource.com/450920 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiajia Qin 6eafb04c 2016-12-27T17:04:07 ES31: Add GL_ATOMIC_COUNTER_BUFFER_BINDING binding point BUG=angleproject:1729 TEST=dEQP-GLES31.functional.state_query.integer.atomic_counter* dEQP-GLES31.functional.state_query.indexed.atomic_counter* angle_end2end_tests:AtomicCounterBufferTest Change-Id: I059c4e22e04cedec9134ec9f631de33f77b1fbe2 Reviewed-on: https://chromium-review.googlesource.com/430959 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill a02315b0 2017-02-23T14:14:47 WebGL Compat: Add DEPTH_STENCIL attachments. This is a special WebGL 1 binding point, that does not correspond to any native functionality. Due to particularities in validation we need to represent this with additional state in the Framebuffer. WebGL 2 fixes this oddity by resolving to the GLES 3 native spec. In order to pass the WebGL framebuffer objects test, we will also need a chromium-side CL to work with the additional state tracking it does in the blink layer, and an additional patch to ANGLE to clear the depth buffer before the first use (robust resource init). BUG=angleproject:1708 Change-Id: I111f8f5a451cce7de6cf281a6bc335b92dd2daf2 Reviewed-on: https://chromium-review.googlesource.com/444095 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiawei-Shao 2597fb64 2016-12-09T16:38:02 ES31: Refactor VertexArray for Vertex Attrib Binding OpenGL ES3.1 feature Vertex Attrib Binding requires vertex arrays should be split into two arrays: 1. an array of vertex buffer binding points, each of which specifies: - a bound buffer object, - a starting offset for vertex attribute data in that buffer object, - a stride used by all attributes using that binding point, - a frequency divisor used by all attributes using that binding point. 2. an array of generic vertex attribute format information records, each of which specifies: - a reference to one of the new buffer binding points above, - a component count and format, and a normalization flag for the attribute data, - the offset of the attribute data relative to the base offset of each vertex found at the associated binding point. Current ANGLE implementation simply uses a struct to represent a vertex attribute object, which does not meet the requirements above. This patch aims to be the the basis of the implementation of all ES3.1 Vertex Attrib Binding APIs by refactoring the struct VertexAttribute and the class VertexArray to fit the new data layout and ensuring all current functionality is retained. BUG=angleproject:1593 TEST=angle_unittests, angle_end2end_tests, gpu_unittests Change-Id: Ieb41f1bf503f815fd0476d2ea045dcb863465254 Reviewed-on: https://chromium-review.googlesource.com/418880 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang feb8c686 2017-02-13T16:07:35 Add extensions to disable client arrays. Chrome doesn't allow any client data in its command buffer. Add an ANGLE extension to request a context that disallows client data. BUG=602737 Change-Id: If9d5144daea3c629a73562396000df59a671aad3 Reviewed-on: https://chromium-review.googlesource.com/441986 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6c1f671b 2017-02-14T19:08:04 Add destroy hooks for several GL objects. These hooks allow the back-end renderer to free object resources without having to store pointers to shared device handles for each and every object. This will allow us to save memory on back-ends that really care about memory overhead. There is a downside in that there is more boilerplate in passing gl::Context handles around everywhere. BUG=angleproject:1684 Change-Id: I89463bba8d23f92920e8956650cb73c7fc6d66b7 Reviewed-on: https://chromium-review.googlesource.com/426401 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiajia Qin 9d7d0b14 2016-11-29T16:30:31 Add support for GL_DRAW_INDIRECT_BUFFER_BINDING binding point BUG=angleproject:1595 TEST=dEQP-GLES31.functional.state_query.integer.draw_indirect_buffer_binding* Change-Id: Ib8f712fdf10411ef0b7b63742d17c3caca99137b Reviewed-on: https://chromium-review.googlesource.com/416193 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang b5e997fb 2016-12-06T10:55:34 Update ES 3.1 expectations from SKIP to FAIL. Change "DEBUG RELEASE" modifier to "OPENGL D3D11" to be more specific. Add D3D11 expectations. BUG=angleproject:1442 Change-Id: If3a9704e7f16cc473fd6ea410d10eb01ae1a8008 Reviewed-on: https://chromium-review.googlesource.com/416960 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 9f09037b 2016-12-02T10:20:43 Change dEQP ES 3.1 expectations from FAIL to SKIP. UNIMPLEMENTED debug spam was causing the tests time time out. We can mark them as FAIL again once the dEQP test setup/tear down code doesn't emmit so many messages. Implement a couple validation cases for ES 3.1 to greatly reduce the spam. BUG=angleproject:1647 BUG=angleproject:1442 Change-Id: Ie7b4ac8737a2df1c0ada6ad53154ddf2f37d9c3c Reviewed-on: https://chromium-review.googlesource.com/415520 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 3b573612 2016-10-31T14:08:10 Add enough ES 3.1 enums to support initializing the dEQP ES 3.1 tests. BUG=angleproject:1442 Change-Id: Iece3efb272fdcbe004d4136129ba7bfe74ba5265 Reviewed-on: https://chromium-review.googlesource.com/405530 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4dc3af09 2016-11-18T14:09:27 Set the right size on the uniform bindings array. BUG=angleproject:1468 Change-Id: I3d75a03fcf624fe7f9510e76edc4a8298d8c5a72 Reviewed-on: https://chromium-review.googlesource.com/412860 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang eb66a6e2 2016-10-31T13:06:12 Replace the GLVersion class with gl::Version. Update code to use gl::Version in as many places as possible to ease ES 3.1 support. BUG=angleproject:1588 Change-Id: I3490b53a81027cf849dac551a9cc66ce04506144 Reviewed-on: https://chromium-review.googlesource.com/404946 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 1d2c41d6 2016-10-19T16:14:46 Implement GL_EXT_sRGB_write_control for GL. BUG=angleproject:1547 BUG=655247 Change-Id: I3f04ddc7032e4a47eb21ff3b8586c5b47415bb64 Reviewed-on: https://chromium-review.googlesource.com/400958 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
John Bauman 18319182 2016-09-28T14:22:27 Re-land "Fix glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, ...)" BUG=angleproject:1332 Change-Id: Ie970466c4528cb80b2363d0c0683da2d9c23c4f4 Reviewed-on: https://chromium-review.googlesource.com/392267 Commit-Queue: John Bauman <jbauman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang f41a7151 2016-09-19T15:11:17 Add an extension to disable resource generation on bind. BUG=angleproject:1518 Change-Id: I662f7b07da5c97831496f2617b0adadf9858bdc9 Reviewed-on: https://chromium-review.googlesource.com/386799 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Martin Radev 66fb8206 2016-07-28T11:45:20 Add ES3.1 API constants The newly added capability constants are handled in the corresponding glGet functions. Also, getBooleani_v has been added. BUG=angleproject:1442 TEST=angle_deqp_gtest_gles31_tests --gtest_filter=*functional_state_query_integer_max_* TEST=angle_deqp_gtest_gles31_tests --gtest_filter=*state_query_indexed_max_compute_work_group_size* TEST=angle_unittests TEST=angle_end2end_tests Change-Id: I846e006307563ae81d8b6c62cf261417e15186c7 Reviewed-on: https://chromium-review.googlesource.com/362270 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho bbf1c102 2016-06-28T13:31:33 Fix BeginQuery validation ANY_SAMPLES_PASSED and ANY_SAMPLES_PASSED_CONSERVATIVE queries can not be active at the same time. The only place where the State::isQueryActive function is used is validating whether a BeginQuery call is correct, so it can be changed to check for this. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.fragment.begin_query Change-Id: Idadf129c6a036570f6e28857bdb24ffc11eeebe8 Reviewed-on: https://chromium-review.googlesource.com/356363 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Sami Väisänen e45e53bd 2016-05-25T10:36:04 Support CHROMIUM_path_rendering This is partial support for CHROMIUM_path_rendering and implements basic path management and non-instanced rendering. BUG=angleproject:1382 Change-Id: I9c0e88183e0a915d522889323933439d25b45b5f Reviewed-on: https://chromium-review.googlesource.com/348630 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 51f40ecd 2016-06-15T14:06:00 Make Framebuffer::checkStatus non-const. BUG=angleproject:1388 Change-Id: Ia9befba0c915c087f2fe0557d91060256f6d4950 Reviewed-on: https://chromium-review.googlesource.com/348955 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill dfde6abf 2016-06-09T07:07:18 Context: Remove mutable gl::State getter. This will preserve layering - the API layer doesn't mutate the state directly, it passes the API call through to the Context. Is also removes the possiblity of any shenanigans of the Validation layer changing the GL state. Also, this CL refactors a few validation entry points to take ValidationContext instead of Context. ValidationContext will be the correct way to interact with the gl::Context in the Validation code. Finally, additional refactorings make ContextState a proper class with private data. This allows the ContextState itself to keep a mutable pointer to the gl::State, so ValidationContext can modify it if necessary (and it will be necessary for Framebuffer completeness caching). BUG=angleproject:1388 Change-Id: I86ab3561573caa9535c8d1b8aad4ab3d0e7cd470 Reviewed-on: https://chromium-review.googlesource.com/348954 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e2e406c3 2016-06-02T13:04:10 Add base::numerics for safe math and conversions. This replaces are "IsUnsignedXXXSafe" family of methods. Also add overflow checks to unpack block sizes. BUG=angleproject:1397 Change-Id: Ib47be149b0486c70f795b0d0f8899441faac9340 Reviewed-on: https://chromium-review.googlesource.com/348062 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang a0d3aa41 2016-05-18T10:39:18 Fix float-to-int conversion warning. BUG=angleproject:1378 Change-Id: I92b902154432e82a1357e8623426256c4ca53ca3 Reviewed-on: https://chromium-review.googlesource.com/345585 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Sami Väisänen a797e066 2016-05-12T15:23:40 Support CHROMIUM_framebuffer_mixed_samples in the GL backend BUG=angleproject:1378 Change-Id: I634c41f3507dbdeaa56234c4de1b498f81c848ed Reviewed-on: https://chromium-review.googlesource.com/344520 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Sami Väisänen <svaisanen@nvidia.com>
Sami Väisänen 74c2347e 2016-05-09T17:30:30 Support EXT_multisample_compatibility in the GL backend BUG=angleproject:1377 Change-Id: Ie14aceca8e01f1cbc93fd5bd06d986336fb752b3 Reviewed-on: https://chromium-review.googlesource.com/343501 Reviewed-by: Sami Väisänen <svaisanen@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Sami Väisänen <svaisanen@nvidia.com>
Geoff Lang 2b4ce80c 2016-04-28T13:34:50 Implement GL_CHROMIUM_sync_query for D3D9 and D3D11. BUG=angleproject:1366 Change-Id: Iadde61968f45b969c76578a6dd9116a25d63fb4b Reviewed-on: https://chromium-review.googlesource.com/341230 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Corentin Wallez bbd663a2 2016-04-20T17:49:17 Add dirty bits for the pixel pack and unpack buffer BUG=605775 Change-Id: Ifb7eee94a395a9e9f5a5c1d6c0f05299162264a9 Reviewed-on: https://chromium-review.googlesource.com/340115 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez a2257dac 2016-04-19T16:43:12 Set the bound XFB to 0 when it is deleted BUG=605775 Change-Id: Ie7af2c0dc4536b26473510a80955f4628ea496bb Reviewed-on: https://chromium-review.googlesource.com/340113 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez e71ea19a 2016-04-19T13:16:37 Allow queries of different types to be active at the same time BUG=605775 Change-Id: I0e23fae25d450c504f174a080279cf51aebcd123 Reviewed-on: https://chromium-review.googlesource.com/340112 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Ian Ewell bda75597 2016-04-18T17:25:54 Finish NV12 support via streams. The main functionality for NV12 texture support through EGL streams has been added. Updates to the compiler, texture code, and stream code were added to support binding to external D3D11 NV12 textures. An end2end test was also added to test sampling of YUV textures and converting to RGB. There is also a new script to convert BMP files to an NV12 texture ready to load into D3D11 for testing purposes. BUG=angleproject:1332 Change-Id: I39b6ec393ea338e2c843fb911acc1b36cd1158a0 Reviewed-on: https://chromium-review.googlesource.com/339454 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com> Reviewed-on: https://chromium-review.googlesource.com/341254 Reviewed-by: Ian Ewell <ewell@google.com>
Corentin Wallez 9670b03e 2016-04-29T09:47:47 Revert "Finish NV12 support via streams." Broke Windows Clang compilation, see https://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Win%20Clang%20Builder%20%28dbg%29/builds/3583/steps/compile/logs/stdio and search for TextureStorage11.h This reverts commit 9b8b359fa3615be7c7492239a48f61103b2e4fcc. Change-Id: I6e54305eba02b40927a35577594df39e951adb32 Reviewed-on: https://chromium-review.googlesource.com/341430 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 9082b982 2016-04-27T15:21:51 Rename gl::Data to gl::ContextState. Part of the new world order of renaming the Obj::Data classes to ObjState. BUG=angleproject:1363 Change-Id: I15cf002b8b093d687f540b9e86f045874af24a7e Reviewed-on: https://chromium-review.googlesource.com/340740 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Ewell 9b8b359f 2016-04-18T17:25:54 Finish NV12 support via streams. The main functionality for NV12 texture support through EGL streams has been added. Updates to the compiler, texture code, and stream code were added to support binding to external D3D11 NV12 textures. An end2end test was also added to test sampling of YUV textures and converting to RGB. There is also a new script to convert BMP files to an NV12 texture ready to load into D3D11 for testing purposes. BUG=angleproject:1332 Change-Id: I098940e6f25e113dcc4fc8d22ffed4b5a16fd860 Reviewed-on: https://chromium-review.googlesource.com/339454 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Olli Etuaho 86821db3 2016-03-04T12:05:47 Add support for READ_BUFFER and SAMPLER_BINDING queries BUG=angleproject:1101 TEST=dEQP-GLES3.functional.state_query.integers.* (all pass) Change-Id: I3a70335eeaef39822700ff639443a59849ed53fa Reviewed-on: https://chromium-review.googlesource.com/329866 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill ad9f24e1 2016-02-12T09:27:24 Don't always sync all dirty object state on update. This leads to a problem where we're synching objects out of order. For instance, when we call SetImage, we need to sync the pack state. But SetImage can affect the FBO state, so we need to sync the FBO only after we've finished with SetImage. Fix this by using a mask of dirty objects to sync instead of all of them, always. This also has the side effect of deferring some syncs that don't have to be processed immediately. BUG=angleproject:1260 Change-Id: I5678d8f967930d11b42a4309d209215be2bae963 Reviewed-on: https://chromium-review.googlesource.com/327259 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Ewell 3ffd78bc 2016-01-22T16:09:42 Add initial support for EXT_disjoint_timer_query. Basic timer queries are supported and tested in the OpenGL backend but are not enabled by default. A good portion of the existing query code was also refactored for improved validation - specifically for validating that the appropriate extensions are available. BUG=angleproject:1265 Change-Id: Iebae994cd7a8d3ed3e9fc3776fe2f3d99caa9237 Reviewed-on: https://chromium-review.googlesource.com/323450 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Ian Ewell <ewell@google.com> Tested-by: Ian Ewell <ewell@google.com>
Jamie Madill 60ec6ea7 2016-01-22T15:27:19 Implement dirty bits for Framebuffer. The dirty bits set the stage for performance improvements in D3D, but don't actually reduce any of the redundant work just yet. BUG=angleproject:1260 Change-Id: Ib84e6a9b7aa40c37c41790f492361b22faaf4742 Reviewed-on: https://chromium-review.googlesource.com/318730 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c9d442d7 2016-01-20T11:17:24 Sync dirty objects at the GL layer. The dirty bit system currently puts dirty objects in line with the rest of the dirty state. This means at the Renderer level, the sync manager code would call back to the GL layer to sync the specific objects that are dirty. This is a bit of a layering violation (impl layer mutating top-level objects) and also a bit of repeated boiler- plate code. Fix this by treating dirty objects in a separate dirty bit set, called the dirty objects. This also has the benefit of allowing us to re- implement the dirty object set at a later date, if we want to store them in a list, or other structure. Also don't skip the state sync at the GL level if there are no GL dirty bits. The Impl might have some dirty bits locally, and it's better to call syncState and do the no-op check in the Impl than it is to also sync local state at every sync point (draw call, read, etc) in each Impl. BUG=angleproject:1260 Change-Id: Id5d4beb2a1c4e3ad351edf54e3f32e828d5f5da3 Reviewed-on: https://chromium-review.googlesource.com/318790 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c29968bb 2016-01-20T11:17:23 Refactor FBO related entry points. Change the validation to the consistent style for easy auto-generation and make the context itself implement the entry points. This will more easily allow us to sync state without passing the Context to the Texture methods, or doing work in the entry point. BUG=angleproject:1260 BUG=angleproject:747 Change-Id: I7ed6ec5418b7f51d9e59529267b14b76b87743fb Reviewed-on: https://chromium-review.googlesource.com/319823 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 70d0f499 2015-12-10T17:45:46 Implement GL_KHR_debug. BUG=angleproject:520 Change-Id: I9ced3e7ab1515feddf2ec103c26b2610a45b1784 Reviewed-on: https://chromium-review.googlesource.com/319830 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 66988745 2015-12-22T19:39:19 Revert "Implement GL_KHR_debug." This reverts commit 6c521b7a70a53b1c9f7762e53e34b5a8146b0f7b. Change-Id: I6ff981198e31f34d3e405edea6277ee75516d6ee Reviewed-on: https://chromium-review.googlesource.com/319820 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6c521b7a 2015-12-10T17:45:46 Implement GL_KHR_debug. BUG=angleproject:520 Change-Id: I78d14cc8c94f5cef58604220f0ca847473b25bf8 Reviewed-on: https://chromium-review.googlesource.com/317820 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Yuly Novikov 5807a536 2015-12-03T13:01:22 Fix buffer unbinding upon deletion. - Remove buffer bindings for new ES3 buffer types. - Fix detachment behavior to GLES3 spec, i.e. detach only from currently bound containers. - Make pack/unpack buffer binding parameter available in GLES3. - Update test expectations. BUG=angleproject:1191 Change-Id: Iab4c1de8d96a523d5af55d22956d50c10f7c93c2 Reviewed-on: https://chromium-review.googlesource.com/315521 Tryjob-Request: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Frank Henigman b0f0b81d 2015-11-21T17:49:29 Don't skip delete_bound.transform_feedback. A one-line subset of 36167ab3 allowed dEQP-GLES3.functional.lifetime.delete_bound.transform_feedback to pass, though it indented that line differently than its neighbors. Fix up the indentation and don't skip the test. BUG=angleproject:1150 TEST=angle_deqp_gtest_gles3_tests --gtest_filter='*transform_feedback*' Change-Id: I8471bd46f8a642b0945b43ab9b980c11c50d63c0 Reviewed-on: https://chromium-review.googlesource.com/313860 Tryjob-Request: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Frank Henigman <fjhenigman@chromium.org>
Geoff Lang 36167ab3 2015-12-07T10:27:14 Don't allocate VertexArray or TransformFeedback objects until binding. Follow the spec more closely and only reserve IDs of vertex arrays and transform feedback objects before binding. This saves memory and allows the glIs* calls to succeed. BUG=angleproject:1218 BUG=angleproject:1101 Change-Id: I0039680c39c66c1c5506f6a1a9121a71791b77e9 Reviewed-on: https://chromium-review.googlesource.com/316591 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 50b3fe89 2015-12-08T14:49:12 Revert "Don't allocate VertexArray or TransformFeedback objects until binding." This reverts commit 070c0124be642383220ca44f795225b89d56f13b. Change-Id: I4ffa528f63311615bb4e22593c6e8a0ec424cd2d Reviewed-on: https://chromium-review.googlesource.com/316780 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 976489b2 2015-12-07T10:27:14 Don't allocate VertexArray or TransformFeedback objects until binding. Follow the spec more closely and only reserve IDs of vertex arrays and transform feedback objects before binding. This saves memory and allows the glIs* calls to succeed. BUG=angleproject:1218 BUG=angleproject:1101 Change-Id: I7bf99870a7c93f5545325785cbecd891c6b77f8a Reviewed-on: https://chromium-review.googlesource.com/316402 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang ab831f04 2015-12-01T09:39:10 Add queries for GL_RASTERIZER_DISCARD. BUG=angleproject:1238 Change-Id: Id3b219dfcc758cf19d61b7dc7eeabd8c2159d212 Reviewed-on: https://chromium-review.googlesource.com/315100 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Frank Henigman 22581ff1 2015-11-06T14:25:54 Support glGet GL_TRANSFORM_FEEDBACK_BINDING. BUG=angleproject:1150 Change-Id: If11bb2df6407248812d6dfa415395bbe315fa58c Reviewed-on: https://chromium-review.googlesource.com/311152 Tryjob-Request: Shannon Woods <shannonwoods@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill e79b1e14 2015-11-04T16:36:37 D3D11: Restrict use of MAX_UINT element indexes. We need to block the app from using MAX_UINT on D3D11 because we can't disable primitive restart on this platform. Instead generate an INVALID_OPERATION error, which is spec-compliant in ES3 because the result is undefined behaviour. This is also compliant with WebGL which explicitly defines an error here. BUG=angleproject:597 Change-Id: I7ebc5371b63ff860dc6dddf79939e9629ebb2a3c Reviewed-on: https://chromium-review.googlesource.com/309638 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill e2cd53d6 2015-10-27T11:15:46 Implement primitive restart boolean query. We have support for primitive restart in the GL renderer, but we didn't complete support for the state query. BUG=angleproject:1101 Change-Id: I4c6ad10642f7de1d09718c4582f1037782cced58 Reviewed-on: https://chromium-review.googlesource.com/309151 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@google.com> Tested-by: Jamie Madill <jmadill@chromium.org>
Minmin Gong adff67b5 2015-10-14T10:34:45 Re-land "Implements more pack/unpack states." Pack: row length, skip rows, skip pixels. Unpack: image height, skip images, skip rows, skip pixels. Note that PBOs are not covered by this change. Re-land with fix for test expectations. BUG=angleproject:512 BUG=angleproject:1095 Change-Id: I71d8d3bd8fc1f2c75ca16ac2634d5eafcbd71f26 Reviewed-on: https://chromium-review.googlesource.com/305522 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c7473924 2015-10-14T14:33:19 Revert "Implements more pack/unpack states. Pack: row length, skip rows, skip pixels. Unpack: image height, skip images, skip rows, skip pixels. Note that PBOs are not covered by this change." Expectations still not correct. This removes suppressions for two failing tests: functional.texture.specification.teximage3d_depth_pbo.depth_component32f_2d_array dEQP-GLES3.functional.texture.specification.teximage3d_depth_pbo.depth32f_stencil8_2d_array BUG=angleproject:512 BUG=angleproject:1095 This reverts commit 72e7013e68a24107b9082629fc52d59a78998eb2. Change-Id: Id81b6e616e61535b8504890ce57591813e22af69 Reviewed-on: https://chromium-review.googlesource.com/305521 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>