Log

Author Commit Date CI Message
Yunchao He 128e536a 2017-10-11T22:31:53 Fix a small build issue. Strcmp in SampleApplication.cpp is a cstring function. So some compilers (at least the default gcc compiler in my Ubuntu 17.04) would think that strcmp is not declared and lead to build failure, even we have include <string> in header file. Now that we use std::string variable in SampleApplication.h, it is better to include <string> in that header file as what it is. Then add <string.h> to include cstring functions in .cpp file to fix the build issue. BUG=angleproject:2180 Change-Id: Id97a6956480637c1218314c04d9b331031c7b911 Reviewed-on: https://chromium-review.googlesource.com/711396 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 78507c6e 2017-10-10T15:06:45 Fix statements disappearing from switch statements in HLSL RemoveSwitchFallThrough now correctly records the existence of declaration and swizzle statements inside switch statements. BUG=angleproject:2177 TEST=angle_end2end_tests Change-Id: I1ef83997db7ae510ded002a9568c29272c00c2fe Reviewed-on: https://chromium-review.googlesource.com/709195 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill bd159f06 2017-10-09T19:39:06 Vulkan: Use minimal dirty bits in VertexArrayVk. This should slightly reduce draw call overhead. BUG=angleproject:1898 Change-Id: I0e515bf2868f237f1d6948c12942f8cb6637c0c0 Reviewed-on: https://chromium-review.googlesource.com/707690 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 492f58ec 2017-10-09T19:41:33 Rename VertexArrayImpl::mData to mState. Refactoring change only. BUG=angleproject:1898 Change-Id: I9f55651f923ff930c395a9bb575b4f86ad5d9cbd Reviewed-on: https://chromium-review.googlesource.com/707689 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho af5070f7 2017-10-10T13:53:25 Hide RemoveSwitchFallThrough implementation in the .cpp file This cleans up the API provided by RemoveSwitchFallThrough.h, and adds documentation about caveats of RemoveSwitchFallThrough. This change is pure refactoring without any functional changes. BUG=angleproject:2177 TEST=angle_end2end_tests Change-Id: I2646e4fe3b53130b07977823cb1344e5096f67e4 Reviewed-on: https://chromium-review.googlesource.com/709194 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho c853804c 2017-09-27T11:20:15 Add support for arrays of arrays to VariableLocation Array indices are sorted so that the outermost index is in the back. This is because we want to be consistent with future arrays of arrays parsing code. In parsing we'll have a utility function to make a TType object into an array, and there it's most natural to push the new outermost sizes to the back of the vector. Further patches will still be needed to parse arrays of arrays and add support to arrays of arrays into the API. BUG=angleproject:2125 TEST=angle_unittests, angle_end2end_tests Change-Id: I6c88edabf68ae9dbd803ec6d20543016c408b702 Reviewed-on: https://chromium-review.googlesource.com/686414 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Qin Jiajia e416e527 2017-10-10T11:01:20 Remove some unused codes This patch will remove unused functions syncVertexAttributes and hasDirtyOrDynamicAttrib, and private member mAppliedIBChanged. Meanwhile, it changes hasDynamicAttrib to hasActiveDynamicAttrib to avoid unnecessary update in some cases. BUG=angleproject:1155 Change-Id: I29a0aa7fbc13874b7b070cf1ac5ec4134728f519 Reviewed-on: https://chromium-review.googlesource.com/707014 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 1fce3283 2017-10-09T16:12:03 Samples: Add command line flag to select renderer. This gives us the ability to test Vulkan without a special recompile, and keeps the default setting to the default ANGLE renderer. Only implemented for the hello_triangle sample currently. Also includes an extra error message for missing EGL config, which is where the Vulkan init fails right now, due to missing depth/stencil support. Also includes a hack to get Vulkan samples running without depth/ stencil. BUG=angleproject:2167 Change-Id: I6925b9b84956fb69cbf602a828ea95d8c7125b68 Reviewed-on: https://chromium-review.googlesource.com/707688 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Brian Osman a4810f71 2017-10-09T14:44:23 Fix several bugs in the timeout logic of clientWait 1) timeout is unsigned, and clients tend to pass large unsigned values (like -1) to mean "wait as long as possible". Casting to signed at the start of the math meant that everything was negative, so we would never actually wait for fences to be signalled. 2) When going from nanoseconds to seconds, we should divide by 10^9, not multiply by 10^6. 3) Even with all of this, it's possible for a sufficiently large counter frequency to still cause overflow, so detect that case and clamp. Change-Id: I9e728aac72d8dc0b15582732b6fd4d87c90bd140 Reviewed-on: https://chromium-review.googlesource.com/707202 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 8886f0fc 2017-10-10T11:59:45 Clean redundant semicolons from HLSL branch statements Branch statements can only exist inside block nodes. The block node that contains a branch will take care of writing a semicolon after each statement. BUG=angleproject:1013 TEST=angle_end2end_tests Change-Id: Ie5d9077c5d2e090c704282dba39b4d46845cbf1e Reviewed-on: https://chromium-review.googlesource.com/708894 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 180f43c6 2017-10-09T17:00:44 Refactor creating temporary symbols This makes creating temporary symbols easy also outside of traversers. This will be needed for improving variable initialization. TEST=angle_unittests BUG=chromium:735497 Change-Id: Id048fc338e0be6c76bb6f082421ae106618e5003 Reviewed-on: https://chromium-review.googlesource.com/707194 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kai Ninomiya d63d0007 2017-10-06T13:11:13 dontInitializeUninitializedLocals on Qualcomm only SH_INITIALIZE_UNINITIALIZED_LOCALS triggers a very unpredictable crash in the shader compiler on Qualcomm Adreno (at least 4xx) on Marshmallow. Bug: angleproject:2046 Change-Id: I9a109f7ff442b4e9d3880d137f1a55a19105bcef Reviewed-on: https://chromium-review.googlesource.com/705930 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 359487c8 2017-10-03T16:58:06 Build angle_perftests on Android BUG=chromium:675997 Change-Id: Ib6690f9f25a4ba4510cf6e18ba2054a9936dc574 Reviewed-on: https://chromium-review.googlesource.com/706455 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Olli Etuaho a3d384ad 2017-10-06T16:12:50 Fix signed integer overflow in GLSL preprocessor left shift Signed integer overflow is undefined in C++, whereas unsigned integer overflow is not. Always cast left shift operand to unsigned to avoid UB. On common compilers, the behavior was already the same before this patch, so this patch is done mostly for the benefit of automated fuzz testing. BUG=chromium:743136 TEST=angle_unittests Change-Id: I7aab939036bb19a37f258cef4297b560da3cd9d5 Reviewed-on: https://chromium-review.googlesource.com/704659 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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>
Olli Etuaho a87121f9 2017-10-06T14:07:27 Fix build warning by specializing clampCast Casting integers to booleans generates a performance warning in at least MSVS 2015 x64 Debug build. Specialize the clampCast template for bool->int conversion to avoid this warning, which is treated as an error. BUG=angleproject:2165 TEST=MSVS 2015 x64 Debug build Change-Id: Iaa9591c102cdd73fe9ff8a8739d356cc13cec248 Reviewed-on: https://chromium-review.googlesource.com/704820 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang e159717d 2017-10-05T12:02:30 Filter EGL attributes before passing them to the native driver. Adding extensions that are not native driver extensions would cause surface creation to fail. BUG=angleproject:1635 Change-Id: I2f683ee0560e463aa06f3ba92d0bf3f3d8c8927d Reviewed-on: https://chromium-review.googlesource.com/701602 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang af143fef 2017-10-05T13:59:43 Refactor the eglQueryContext entry point. BUG=angleproject:1635 Change-Id: Ia6ab5a2a7339d78912d7f871ed62941af1957eb1 Reviewed-on: https://chromium-review.googlesource.com/702856 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 000dab88 2017-09-27T14:27:07 Make pack and unpack image extensions enableable. BUG=angleproject:1523 Change-Id: Ic728a777ad7e05373de03ee98e9b0a17101cd45d Reviewed-on: https://chromium-review.googlesource.com/688102 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 63c5a597 2017-09-27T14:08:16 Make GL_ANGLE_instanced_arrays enableable. BUG=angleproject:1523 Change-Id: Id1dd5d0426c1b55bfd6cca8b0c8c73596080f2a9 Reviewed-on: https://chromium-review.googlesource.com/688101 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Kenneth Russell ce8602ab 2017-10-03T18:23:08 WebGL requires GL_FRAMEBUFFER_UNSUPPORTED for identical FBO attachments. If the same level of a texture is attached to multiple color attachments of a framebuffer object, for example, the WebGL conformance tests require generating a GL_FRAMEBUFFER_UNSUPPORTED error. The Direct3D backend already had this restriction; apply it to all backends when the WebGL compatibility extension is enabled. Fixes the following WebGL conformance tests with the pass-through command decoder in Chrome: conformance/extensions/webgl-draw-buffers-framebuffer-unsupported conformance2/rendering/framebuffer-unsupported BUG=angleproject:2168 Change-Id: I340d06ca0ee969989c6c5725512b1b9542281477 Reviewed-on: https://chromium-review.googlesource.com/699856 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill c1abf917 2017-10-03T15:08:33 Fix leaking objects with UniqueObjectPointer. BUG=angleproject:2170 Change-Id: Ie0473022c153c4b70f350cab0c208dd3a0670c40 Reviewed-on: https://chromium-review.googlesource.com/691374 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6276b922 2017-09-25T02:35:57 Vulkan: Implement basic uniform shader parsing. This is a first step at implementing uniforms with descriptor sets. It does not actually bind uniforms and upload data, but it does implement uniform shader parsing. Uniforms are gathered into a single uniform block which is bound to set 0, with binding 0 for vertex uniforms and binding 1 for fragment uniforms. Also adds a ReplaceSubstring helper to string_utils. Also removes the precision writing from OutputVulkanGLSL since this was generating warnings with glslang. BUG=angleproject:2167 Change-Id: I9ec8351ec1973e583100f99292b0080ee968067b Reviewed-on: https://chromium-review.googlesource.com/699938 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Corentin Wallez 10d4026b 2017-10-04T16:34:09 Fix compilation error on 32-bit systems a99ed554ca606 introduced explicit template instantiations that tunred out to be the same on 32-bit CPUs because GLenum and size_t are the same type. BUG=angleproject:2165 Change-Id: I85fafeff1996cb457f2b718e177944fc6aca50bf Reviewed-on: https://chromium-review.googlesource.com/699839 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang cb62d86f 2017-10-04T14:42:55 Don't delete framebuffers multiple times if they are bound multiple times. BUG=angleproject:2107 Change-Id: Icaa4cf7c708a68d63b45699255ddd3ced00ee119 Reviewed-on: https://chromium-review.googlesource.com/700804 Commit-Queue: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
jchen10 baf5d945 2017-08-28T20:45:48 ES31: Add UNIFORM support for ProgramInterface Add program resource properties for uniform. BUG=angleproject:1920 TEST=angle_end2end_tests:ProgramInterfaceTest* Change-Id: Ia5cf6219db43b8b1f73efbb3565d21c86e9d3ec0 Reviewed-on: https://chromium-review.googlesource.com/638050 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
Jamie Madill d03a849d 2017-10-03T15:46:06 Vulkan: Implement very basic DrawElements. This implements getIndexRange for index validation, without any caching. Vulkan does support a version of robust access, but it would require the robust context creation attribute. Also, it differs slight from the OpenGL spec. Also note that this implementation does not create the index buffer with the correct usage bits, but seems to work and doesn't produce an error in the validation layers. We should probably update them. This CL also doesn't impement index support for immediate data, offsets, or the unsigned short index type. BUG=angleproject:2167 Change-Id: I580930f85e23034b483f3ece62eb1faf8024d624 Reviewed-on: https://chromium-review.googlesource.com/681874 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 035fd6b3 2017-10-03T15:43:22 Vulkan: Implement very basic textures. This is a quick implementation which supports only one backing Image and one type of ImageView at a time, for 2D texture only. It also implements a helper class for finding compatible memory pools. It's possible we can keep a cache of memory pool indexes given the guarantees the Vulkan spec has on compatible memory types (see the documentation for VkMemoryRequirements). BUG=angleproject:2167 Change-Id: I1d7a8eaec90f240273ad75194e23430d6d4c5dc1 Reviewed-on: https://chromium-review.googlesource.com/680000 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@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>
Geoff Lang 536eca10 2017-09-13T11:23:35 Simplify GenerateMipmap validation now that sized format info is tracked. The previous validation used some workarounds because it didn't know if the texture format was sized or not. Now that the InternalFormat struct tracks this, the validation can work correctly for floating point formats. BUG=angleproject:2149 Change-Id: I583db4a36137a57dd1b7fc81cd4e3b6d5972fc67 Reviewed-on: https://chromium-review.googlesource.com/665163 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 682efdc4 2017-10-03T14:10:29 Fix a GCC warning found by Skia. This only seems to affect GCC's enum-compare warning, because we were comparing an untyped enum with a size_t enum. BUG=None Change-Id: I74b8315cff61344d1b7700b1c56a40d2ffce41e2 Reviewed-on: https://chromium-review.googlesource.com/698296 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 7e7f7d25 2017-09-22T13:32:14 Implement robust resource init for D3D9. BUG=angleproject:2107 Change-Id: I088956a1e13247c593cbb84677f346ef6f0fe983 Reviewed-on: https://chromium-review.googlesource.com/678483 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang a1506213 2017-09-21T10:49:18 Remove initialization of ImageD3D objects now that lazy init covers them Inintialize all D3D11 texture allocations with dummy values in debug. BUG=angleproject:2107 BUG=angleproject:1635 Change-Id: Ibcc6cc30480b32430563143f35f38dda16fdb83c Reviewed-on: https://chromium-review.googlesource.com/678477 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 09cd4777 2017-09-27T13:44:41 Remove references to the framebuffer fetch extensions in the GL layer. BUG=angleproject:1523 Change-Id: I145323661bc4fdd596784eb7b6e9d8f4588c7270 Reviewed-on: https://chromium-review.googlesource.com/688099 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 8c5b31c2 2017-09-26T18:07:44 Make query extensions enableable. BUG=angleproject:1523 Change-Id: If2da4bff180664de997c981165672858c19ebe78 Reviewed-on: https://chromium-review.googlesource.com/685649 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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>
Kai Ninomiya a60d3567 2017-10-02T22:10:28 Re-enable uninitialized-local test that should pass now Follow up to https://crrev.com/c/669642 Bug: angleproject:2041 Change-Id: I27bf4458f5c8be265b757fd5a3ea10f5ffa9e10e Reviewed-on: https://chromium-review.googlesource.com/696764 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang adaabc36 2017-10-02T16:23:00 Support PBO and map buffer extensions in the NULL backend. BUG=770696 Change-Id: Ic7bcc2b5c76817888647022505a2442ce4016b1e Reviewed-on: https://chromium-review.googlesource.com/696125 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 04d0646c 2017-10-02T16:01:13 Support GL_NV_fence in the NULL backend. BUG=770696 Change-Id: Ice5345eddc4cec61cd5ce33a7cd5d45fa68379a5 Reviewed-on: https://chromium-review.googlesource.com/695918 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 50cac57a 2017-09-26T17:37:43 Make GL_EXT_blend_minmax enableable. BUG=angleproject:1523 Change-Id: I73df8d9a23c3d22792abde44b495be7478abfc22 Reviewed-on: https://chromium-review.googlesource.com/685648 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 8c7133ca 2017-09-26T17:31:10 Make GL_OES_fbo_render_mipmap enableable. BUG=angleproject:1523 Change-Id: If50a4bf5e33bf0b9ad76a9c6bb999cf4d620c709 Reviewed-on: https://chromium-review.googlesource.com/685647 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 3fab7634 2017-09-26T15:45:54 Make PBO and map buffer extensions enableable. BUG=angleproject:1523 Change-Id: Ia934a186ce490083f93b59eedd3bdf48e0fcb727 Reviewed-on: https://chromium-review.googlesource.com/685799 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jiawei-Shao 5b2a1760 2017-09-29T13:19:39 ES31: Implement glSampleMaski on D3D11 This patch intends to implement glSampleMaski on D3D11 backends. In D3D11 the sample mask word can be set by OMSetRenderState. This function can only accept an UINT as its parameter SampleMask, so the value MAX_SAMPLE_MASK_WORDS in D3D11 backends is set to 1. BUG=angleproject:1592 TEST=dEQP-GLES31.functional.state_query.*.sample_mask* TEST=dEQP-GLES31.functional.texture.multisample.*.sample_mask* Change-Id: I27f509cf81624d95948b06739bb9fe21288d2d31 Reviewed-on: https://chromium-review.googlesource.com/691259 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kai Ninomiya 8c5b69cb 2017-09-18T20:23:08 Replace MurmurHash3 with PMurHash PMurHash comes from the smhasher repository at chromium/src/third_party/smhasher Bug: 697758 Change-Id: Id2859edf37ae66bf27509d53db7f22db8831fe44 Reviewed-on: https://chromium-review.googlesource.com/687970 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2a9e107c 2017-09-22T11:31:57 Vulkan: Support multiple vertex outputs. This is a bit of a hack, similar to how D3D11 works. We need to write output locations in the GLSL shader before we send them to glslang, so we wait until the link call, then string-replace some hard-coded identifeir code to the attribute location determined by ANGLE. This CL also fills in some of the vertex format conversion tables in formatutilsvk.cpp. BUG=angleproject:2167 Change-Id: I2424d0d990bdbcd831a4dd130e61e87d8f8f479f Reviewed-on: https://chromium-review.googlesource.com/677555 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill a9c60e9f 2017-09-28T19:06:39 Vulkan: Allow for multiple frames in-flight. This should give us the ability to send off more than one frame to the presentation engine at once. Instead of using a single pair of Semaphores to lock each surface, we make a Semaphore pair per Swapchain image. BUG=angleproject:1898 Change-Id: I9e833ed9969a79617d0a8968b0d5a25c27139e87 Reviewed-on: https://chromium-review.googlesource.com/672149 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@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>
Corentin Wallez 49bb7e13 2017-09-27T18:24:23 Fixup Mac dEQP GLES3 expectations BUG=angleproject:2137 Change-Id: I385eab17b60ae434b06c8235d7ee7849c145e765 Reviewed-on: https://chromium-review.googlesource.com/688681 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 89588b90 2017-09-27T15:02:18 Add dEQP GLES3 Mac suppressions BUG=angleproject:2137 Change-Id: If1b186de7aed3464427864b3a68dffd74cb497ed Reviewed-on: https://chromium-review.googlesource.com/687871 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez ffab7015 2017-09-26T18:43:11 Skip dEQP GLES3 performance tests on all platforms BUG=angleproject:2137 Change-Id: I0d434f6b92164fecb10ee61c8cb662ccab8470f1 Reviewed-on: https://chromium-review.googlesource.com/685937 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
JiangYizhou 0f2aa31d 2017-07-10T11:28:37 ES31: Fix bug on incomplete texture validation of internalformat and filterable Multisampled texture with unfilterable internalformat and default filter state shouldn't be justified as incomplete texture in angle. However, the default filter state is set to LINEAR and internalformat like R8I or R8UI is not filterable, which lead to texture incomplete. In es 3.1 spec 8.16, 'The effective internal format specified for the texture arrays is a sized internal color format that is not texture - filterable(see table 8.13), and either the magnification filter is not NEAREST or the minification filter is neither NEAREST nor NEAREST_MIPMAP_NEAREST'. As to Table 20.11, The default value of minFilter is NEAREST_MIPMAP_LINEAR, magFilter is LINEAR. Because in 11.1.3.3,'Multisample textures are not filtered when samples are fetched, and filter state is ignored.' So we ignore filtering for multismaple texture completeness. BUG=angleproject:1590 TEST=dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_*_texture_2d TEST=dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_*_texture_int_2d TEST=dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_*_texture_uint_2d TEST=dEQP-GLES31.functional.texture.multisample.samples_*.use_texture_color_2d TEST=dEQP-GLES31.functional.texture.multisample.samples_*.use_texture_int_2d TEST=dEQP-GLES31.functional.texture.multisample.samples_*.use_texture_uint_2d TEST=dEQP-GLES31.functional.texture.multisample.samples_*.use_texture_depth_2d Change-Id: I0533bd028e0bbb66d9f731a2395f6c8ae7db8938 Reviewed-on: https://chromium-review.googlesource.com/564843 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c71ea661 2017-09-26T17:06:02 Return HALF_FLOAT as an implementation read type in ES3. BUG=765953 Change-Id: I4dc79921766975cd75c489887b7e57ec4666fbbb Reviewed-on: https://chromium-review.googlesource.com/685897 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 457ded9b 2017-09-22T16:58:44 Print FILE in more debug info messages. Applies to UNREACHABLE and UNIMPLEMENTED. This helps track down the offending line more easily. BUG=angleproject:2167 Change-Id: I97eb80677a6dd432a04f5e7516c3db3de8e7128a Reviewed-on: https://chromium-review.googlesource.com/679999 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Yunchao He f0fd87d8 2017-09-12T04:55:05 Code refactoring in validation part. Some code refactoring in this change: 1) It moves some public methods to static. These methods are only used in validationES3.cpp. They are not necessay to be exposed to public. 2) The error messages to check context version are inconsistent. It makes them to be consistent. BUG:angleproject:2005 Change-Id: I5af4c3300634ccc44aac386c90dcb0522acbff83 Reviewed-on: https://chromium-review.googlesource.com/661324 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f32cd0b7 2017-09-21T15:33:32 Remove WindowSurfaceVk::swapImpl prototype. This method was removed in a prior patch. BUG=angleproject:1898 Change-Id: I2ab3c36bbef4ce6c978cd4c09cc191c4e7ff7991 Reviewed-on: https://chromium-review.googlesource.com/677547 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill d4826159 2017-09-21T11:18:59 Vulkan: Only init RenderPass once per frame. This saves some time spent in the driver, by making multiple draw calls happen inside a single RenderPass. This also makes the ReadPixels impl method non-const. I think in the future we should avoid making const Impl methods unless they're totally trivial. BUG=angleproject:1898 Change-Id: I39172270a2f7dc5c1c2e3d4cc50af3bac8a29fa1 Reviewed-on: https://chromium-review.googlesource.com/672148 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 1f9d6843 2017-09-21T11:01:44 StateManager11: Defer RenderTarget invalidation to draw. Although this adds a boolean check (and state flag maintenance) cost to each draw call, it makes ANGLE's internal life a lot simpler because it doesn't have to process a framebuffer change until the draw call. It turns out there are a few dependent checks of the Framebuffer that aren't always easy to do. In one test, Context destruction was triggering RenderTarget invalidation, after the Context had already freed the Framebuffer manager. This also fixes the problem in feature level 9_3 with framebuffer invalidation affecting the internal dirty bit set. (Note that it still dirties the Framebuffer for the next frame). BUG=chromium:767279 BUG=angleproject:2151 Change-Id: I74d61bddf9926004a04f712a9f9eb1205d5df0e1 Reviewed-on: https://chromium-review.googlesource.com/676657 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 981f0f8f 2017-09-21T09:07:41 Add flag to do a fast pass through perf tests. This flag will only render the first frame of each perf test, regardless of their preferences for how many seconds to run. It will be useful for speeding up the run time of the perf tests on testing infrastructure that only cares about correctness. BUG=chromium:725308 BUG=chromium:765321 Change-Id: I926f488c42f27ef23ef06a0159902613cff04080 Reviewed-on: https://chromium-review.googlesource.com/677306 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2bc94733 2017-09-20T21:57:29 D3D11: Minor optimizations to vertex attribute application. Introduce a dirty bit for current value attribs, and try to speed up the check for dirty vertex attribs. This series of small optimizations gives about a 15% improvement on the draw call benchmark for the D3D11 backend with the null driver. BUG=angleproject:1155 Change-Id: Idf560efa3af62776e8bdbdf693f8b06db8792c21 Reviewed-on: https://chromium-review.googlesource.com/666048 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill f1581583 2017-09-20T21:57:28 Minor cleanup to setIndexBuffer. This cleans up the point sprites dirtying logic into applyIndexBuffer. This series of small optimizations gives about a 15% improvement on the draw call benchmark for the D3D11 backend with the null driver. BUG=angleproject:1155 Change-Id: I210dd408d11ef5a0b58b0ad32d1255c787a55fba Reviewed-on: https://chromium-review.googlesource.com/666047 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 74b30e46 2017-09-20T21:57:27 Improve the speed of MarkAttachmentsDirty. Only iterate the enabled draw buffers, and the depth/stencil buffer. This series of small optimizations gives about a 15% improvement on the draw call benchmark for the D3D11 backend with the null driver. BUG=angleproject:1155 Change-Id: I5b29362f93c016c146d2a6527b378853bc070239 Reviewed-on: https://chromium-review.googlesource.com/666046 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1b7ed0ef 2017-09-20T21:57:26 D3D11: Minor optimizations to Renderer11. This moves the skipDraw logic into applyPrimitiveType, since it's more efficient to only check the primitive type once. Also merges the draw*Impl and genericDraw* methods, since the generic* methods weren't really doing anything anymore, and all the state logic lives in StateManager::updateState. This series of small optimizations gives about a 15% improvement on the draw call benchmark for the D3D11 backend with the null driver. BUG=angleproject:1155 Change-Id: I299213da6d1bbcb08691d5b50162e6cae16cb4bb Reviewed-on: https://chromium-review.googlesource.com/666044 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jiawei Shao 61491505 2017-09-15T22:32:21 Tighten clear-twice workaround on Windows Skylake Intel GPU The workaround for calling clearRenderTargetView on small targets isn't needed on the newly released Intel D3D driver 15.46-4771 because the fix of this bug has been merged into this driver. BUG=chromium:655534 Change-Id: I90125971fd4b782b7363b8ca3104bd500e21a034 Reviewed-on: https://chromium-review.googlesource.com/668223 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill a5dc625c 2017-09-20T21:08:14 Suppress two failing angle_end2end_tests. "Add test for GL_KHR_robust_buffer_access_behavior" introduced a failure in Windows 10 NVIDIA OpenGL configs. "ES31: Enable shader storage buffer support for OpenGL backend" introduced a failure on Linux Intel HD 630 configs. BUG=angleproject:1463 BUG=angleproject:1951 Change-Id: I791bc729893b7f31093ab1678dc8d01edfbd0a5a Reviewed-on: https://chromium-review.googlesource.com/676473 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c8bee335 2017-09-20T15:42:09 D3D11: Implement a dirty bit for Shaders. This allows us to skip calling the dynamic shader generation and program shader application when there haven't been any state changes. It builds on the previous work that immediately update state caches in the VertexArray11 and Framebuffer11. It should improve performance in draw-call limited applications by a small margin. For reference, here are the conditions under which the shaders are refreshed: 1. Directly changing the program executable 2. The vertex attribute layout 3. The fragment shader's rendertargets 4. Enabling/disabling rasterizer discard 5. Enabling/disabling transform feedback 6. An internal shader was used 7. Drawing with/without point sprites Improves the score of the draw call stress test for the D3D11 back-end (with null driver) by about 40% on my test machine. The 9_3 back-end seems to have an issue where the getSRV call to a texture storage can change the "use level zero workaround" status of the storage, which in turn will invalidate the state. Since this is localized to 9_3 only, put in a hack to disable an assert check for now. BUG=angleproject:2151 Change-Id: Idbd0a31376691b33972e735d5833a9b02a8a4aa9 Reviewed-on: https://chromium-review.googlesource.com/666278 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill fb997ec1 2017-09-20T15:44:27 Removed "name" and "used" from variable location. The used flag was redundant with the index (which used MAXUINT). The name was redundant with the stored uniform. Removing these gives a very minor performance speed up when iterating and retrieving uniform locations. BUG=angleproject:1390 Change-Id: Ieeccdff7c131e1359e754e246d3648b73aad5baf Reviewed-on: https://chromium-review.googlesource.com/659224 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 805d281a 2017-09-20T13:21:42 D3D11: Fix ClearBufferiv with STENCIL. For some reason we were using the second GLint value passed into the method, when the spec says we should have a single clear value. Noticed when adding tests for lazy robust resource init (tests will be added in a subsequent patch). BUG=angleproject:2107 Change-Id: Iadfc5072796255072bfb71ff1918253045e29576 Reviewed-on: https://chromium-review.googlesource.com/675049 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill ea84f6ff 2017-09-20T13:20:30 Pass Context to Framebuffer11 dirty callback. This allows us to call StateManager11::invalidateRenderTarget from the Framebuffer11::signal function, which will then trigger state refresh on the next draw call. This requires passing Context through a few more Renderbuffer methods, and reorganizing the RenderTarget signalling so that it doesn't signal dirty in the destructor. Instead they are signaled as they are destroyed in the containing classes. BUG=angleproject:2151 Change-Id: I4cf575e4a01b48275ff78d75bc55b2d1fced591d Reviewed-on: https://chromium-review.googlesource.com/673139 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 8ec383e6 2017-09-20T13:20:29 Use array template aliases in TextureStorage11. This cleans up some of the iteration logic. BUG=angleproject:2151 Change-Id: I8d80a8d732ee808babbb4859290b648b4fa67b4d Reviewed-on: https://chromium-review.googlesource.com/673138 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 136a2742 2017-09-20T12:29:44 TextureStorage11: Use unique_ptr for RenderTargets. This ensures they are auto-freed when the Storage is destroyed. Also remove the 'delete this' design pattern. BUG=angleproject:2151 Change-Id: I784b94c7125a1bbc15f5d6ae90e55317e199faa6 Reviewed-on: https://chromium-review.googlesource.com/673137 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 33510107 2017-09-20T10:39:18 Pass gl::Context to more Buffer methods. This will allow us to pull out the Renderer from the Context in more places in Buffer11, for state update. Impacts a few method calls in a few places. BUG=angleproject:2151 Change-Id: I1360caea65a94d3de4cd9f52d1b74b10439b02b3 Reviewed-on: https://chromium-review.googlesource.com/673136 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jiawei Shao 4cc89e2b 2017-08-31T14:25:54 ES31: Enable 'location' layout qualifier on shader interfaces in compiler This patch enables 'location' layout qualifier for vertex outputs and fragment shader inputs when the shader version is 3.1 in ANGLE GLSL compiler and adds the check on location conflicts for these varyings. According to GLSL ES 3.1 SPEC (Chapter 4.4.1 and Chapter 4.4.2), 'location' layout qualifier is allowed on both inputs and outputs of vertex and fragment shaders. 'location' layout qualifier on shader interfaces is only valid on shaders whose version is 3.1 and above. According to GLSL ES 3.0 SPEC, vertex shader cannot have output layout qualifiers (Chapter 4.3.8.2) and fragment shader cannot have input layout qualifiers (Chapter 4.3.8.1). The 'location' qualifier on varyings is used in the shader interface matching defined in OpenGL ES 3.1. (OpenGL ES 3.1 SPEC Chapter 7.4.1). This new link rule will be added to Program.cpp in another patch. For the OpenGL ES 3.1 extension GL_OES_geometry_shader, according to GL_OES_shader_io_blocks SPEC (Chapter 4.4.1 and Chapter 4.4.2), 'location' layout qualifier is both valid on geometry shader inputs and outputs. This feature will be implemented together with other rules on geometry shader inputs and outputs. BUG=angleproject:2144 TEST=angle_unittests Change-Id: I62d85f7144c177448321c2db36ed7aaeaa1fb205 Reviewed-on: https://chromium-review.googlesource.com/645366 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiajia Qin 729b2c6e 2017-08-14T09:36:11 ES31: Enable shader storage buffer support for OpenGL backend BUG=angleproject:1951 TEST=angle_end2end_tests:ShaderStorageBuffer Change-Id: I1afc3cd005ad2e595c6ce937fc53e17423f8ec8b Reviewed-on: https://chromium-review.googlesource.com/618132 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiajia Qin 47bf2dc5 2017-09-05T15:00:25 Add test for GL_KHR_robust_buffer_access_behavior This test is ported from webgl test element-index-uint.html. BUG=angleproject:1393, angleproject:1463 Change-Id: I165e3dd2913968c8cc035c570a7bcaf91aed095a Reviewed-on: https://chromium-review.googlesource.com/651239 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev 84aa2dcf 2017-09-11T15:51:02 Add textureGather and textureGatherOffset The patch adds new built-ins and extends the semantic parser to add support for textureGather and textureGatherOffset. BUG=angleproject:1442 TEST=angle_unittests TEST=angle_deqp_gles31_tests.exe --deqp-case=dEQP-GLES31.functional.texture.gather* --deqp-egl-display-type=angle-gl Change-Id: Iaf98c3420fbd61193072fdec8f5a61ac4c574101 Reviewed-on: https://chromium-review.googlesource.com/660124 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Brandon Jones 72f58fa3 2017-09-19T10:47:41 Change Returned Error For Invalid Hint When using FRAGMENT_SHADER_DERIVATIVE_HINT_OES as a hint with OES_standard_derivatives disabled, we should return INVALID_ENUM, not INVALID_OPERATION. Bug: angleproject:2158 Change-Id: I5759f1e8bb19d2caed278506054aebc5d82d431c Reviewed-on: https://chromium-review.googlesource.com/673374 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9abe07c6 2017-09-19T00:25:00 Move Platform Context pointer to start of struct. This will ensure that new methods (placed at the end) don't collide with the context pointer when using a mismatched platform. BUG=angleproject:1892 Change-Id: Ice6a3ccaf3cc2a1e36a04bc217386cf096612176 Reviewed-on: https://chromium-review.googlesource.com/672147 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7aa786c8 2017-09-19T13:57:15 Fix warnings produced from MSVS code analysis. We could dereference a null pointer in a couple edge cases. BUG=angleproject:2151 Change-Id: I0d40b930c5008b80928bfe8c93588f80127fd166 Reviewed-on: https://chromium-review.googlesource.com/665995 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill b8bbbf9e 2017-09-19T00:24:59 Vulkan: Use environment override to load layers. Instead of using a compile-time define, use an OS call to override the environment variable the loader uses to look for layers. This should allow us to have a run-time override mechanism, so we can more easily use ANGLE with RenderDoc and other tools that hook into the layers for debugging and profiling purposes. This should also allow the developer to install and use their own layers with ANGLE if desired. This patch removes the angle_loader.h generation since it is no longer necessary. It also fixes an unrelated loader warning that occured when releasing the current pipeline object. BUG=angleproject:1898 Change-Id: Ic4a5120a6b73745397451ef9e3897e157da1feda Reviewed-on: https://chromium-review.googlesource.com/671490 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill abd31359 2017-09-19T00:24:58 Vulkan: Fix deleting in-use Pipeline. This warning was popping up with a new version of the layers when running the hello_triangle sample. Fix it by assigning the current Serial ID to the Context for the current pipeline. A more robust fix in the future would probably be to assign Serial IDs to the Pipelines themselves. BUG=angleproject:1898 Change-Id: Ib5e8ea7c4c26907d1987529d8127249f9b18e17f Reviewed-on: https://chromium-review.googlesource.com/672146 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@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>
Kai Ninomiya 8b2142e3 2017-09-18T13:17:13 Put MurmurHash3 functions in the angle namespace To prevent collisions when linking with other copies of MurmurHash3. BUG=697758 Change-Id: Id8a5c709ba972812ffa3ca143e7553cbf05fc57a Reviewed-on: https://chromium-review.googlesource.com/671194 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 10ce2d28 2017-09-16T09:47:19 GL: Fix 64-bit caps query on older GL drivers. GetInteger64v wasn't introduced until GL 3.2, but some of the enums for caps that are 64-bit in 3.2 (eg, max uniform block size) were first introduced as 32-bit values in extensions. This comes up when trying to use RenderDoc's OpenGL simulator, since it exposes some relevant extensions and only uses core version 3.1. BUG=None Change-Id: Ie4be71b5c8656aae0fe08c270a53f5ef86c99710 Reviewed-on: https://chromium-review.googlesource.com/599030 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Kai Ninomiya f3d57454 2017-09-15T14:28:50 Enable SH_INITIALIZE_UNINITIALIZED_LOCALS on Mac BUG=angleproject:2041 Change-Id: Id5a85c40358b018c17984ac26ee7f97f10584d4b Reviewed-on: https://chromium-review.googlesource.com/669642 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Corentin Wallez 704e862f 2017-09-18T11:06:00 dEQP GLES2: skip some tests on Mac Intel These tests crash the OSX shader compiler. Skip them instead of expecting a failure. BUG=angleproject:2137 Change-Id: I4476ba93390ce8dfc1e609e4297d6ce1236d2686 Reviewed-on: https://chromium-review.googlesource.com/671285 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez afe8824b 2017-09-18T11:03:24 Fix standalone compilation on Mac Apple Clang 8.1 doesn't allow implicit conversion from gl::Error to egl::Error with the egl::Error::Error(gl::Error&&) constructor. Same thing for gl and egl reversed. This commits add conversion constructors taking errors by value. There should be not performance impact for non-error code paths. BUG= Change-Id: I91acf094af923080780b91850146d71016ec5ebc Reviewed-on: https://chromium-review.googlesource.com/671284 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@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 5307e15d 2017-09-17T16:43:07 D3D11: Re-check disabled attribs on VAO switch. When switching VAOs, if we switch to a VAO which has disabled attributes, we could occasionally in some edge cases not have a buffer initialized to render with. Fix this by re-checking the current value (disabled) attributes every VAO switch. Probably a regression caused by d28758d: "D3D11: Re-enable updateVertexBuffer dirty bits." BUG=angleproject:2156 BUG=angleproject:1156 Change-Id: Ic1795f914b9b4fa846241b0b4f9a8fe9c1183320 Reviewed-on: https://chromium-review.googlesource.com/669963 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho a20af6d7 2017-09-18T13:32:29 Use C++11 raw string literals instead of SHADER_SOURCE macro This is better in many ways: 1. It doesn't confuse clang format 2. \n doesn't need to be included after preprocessor directives like the version directive. 3. It's using built-in functionality instead of something custom. Raw string literals should be the preferred way to include shader source in C++ files going forward. BUG=angleproject:2157 TEST=angle_end2end_tests Change-Id: I8b236a6e2d5c25d920297e5bc5b5b143eddeba1f Reviewed-on: https://chromium-review.googlesource.com/671046 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho bb5a7e29 2017-08-30T13:03:12 Allow length() on arbitrary array expressions This is required to pass some dEQP GLES 3.1 tests for arrays of arrays, and WebGL conformance tests were also recently fixed to require this behavior. The intent of the GLSL ES spec was not to restrict usage of length(). In practice GL drivers don't implement array length() on expressions with side effects correctly in all cases. HLSL doesn't have an array length operator either. Because of this we always remove array length ops from the AST before output. BUG=angleproject:2142 TEST=angle_unittests, angle_end2end_tests, WebGL conformance tests Change-Id: I863a92e83ac5315b013af9a5626348482bad72b3 Reviewed-on: https://chromium-review.googlesource.com/643190 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Martin Radev 67a8a014 2017-09-08T13:03:52 Clean up MultiviewDrawTest.cpp The patch cleans up MultiviewDrawTest.cpp by removing some calls to glUseProgram as that would be done by drawQuad anyway. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: If9aff686b0ea25e63467852845c46582fdf741c5 Reviewed-on: https://chromium-review.googlesource.com/657678 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 63490943 2017-09-15T23:03:14 Work around VS 2017 compiler bug in dEQP. We should upstream this fix to dEQP once we have the chance. BUG=chromium:759402 Change-Id: I64e5df9bc6552e6fabe2b4b60c877fa30fd4c1f2 Reviewed-on: https://chromium-review.googlesource.com/670101 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 806cda93 2017-09-15T15:57:26 Fix newly added Mac dEQP expectations BUG=angleproject:2137 TBR=geofflang@chromium.org Change-Id: I16e0ca6422deed0c225f3eca11189ec7c62fb5c2 Reviewed-on: https://chromium-review.googlesource.com/669361 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Martin Radev 7e2c0d37 2017-09-15T14:25:42 Fix cubemap completeness check The patch updates the cubemap completeness check to use the base level instead of always level 0. Without this change the cubemap faces at level 0 would have to be created in order to specify another base level through TexParameteri. BUG=angleproject:2153 TEST=angle_end2end_tests Change-Id: Iee1fdc6adf0e69d797821a2ce2f2b2b85dfcdfc1 Reviewed-on: https://chromium-review.googlesource.com/668439 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 71c88b31 2017-09-14T22:20:29 Enable [[nodiscard]] for gl::Error. This forces all return values to be checked for gl::Error. Requires quite a bit of minor refactoring. I also added a macro to swallow an error without returning from a function. We could look at storing the errors in the Context at some point, since almost always when we're generating errors that we need to discard we have access to the Context as a parameter. BUG=angleproject:2150 Change-Id: I457e48a30c002eda0993acbcd3180ba87bf169fb Reviewed-on: https://chromium-review.googlesource.com/665173 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Peter Collingbourne 32b7e237 2017-09-14T15:44:17 Fix bad casts in BindingPointer::set. The object owned by the BindingPointer does not necessarily derive from RefCountObject; it could also just derive from RefCountObjectNoID (e.g. Compiler). Found with Clang's CFI bad cast checker. BUG=chromium:507755 Change-Id: I7e431746b2783e2fc0f2d347a4a27bd60da18473 Reviewed-on: https://chromium-review.googlesource.com/667218 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill eccd7ece 2017-09-14T15:46:22 Use a heap for the released handle list. This will prioritize re-allocating smaller handles. It should not affect performance in most cases, but will prefer allocating handles that are in the "fast" portion of the resource map. BUG=angleproject:1458 Change-Id: Ib2853be936f09fc1e6b5bfb870c360ce8424ab5f Reviewed-on: https://chromium-review.googlesource.com/665993 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 80823cc8 2017-09-14T15:46:21 D3D: Add memcmp filtering for matrix uniforms. This was already implemented, it simply hooks it up to the rest of the code. Could improve performance on some badly behaved benchmarks. BUG=angleproject:1390 Change-Id: I539df611d51ca085712fa8022bf8a7c1990afc65 Reviewed-on: https://chromium-review.googlesource.com/663896 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 4148fd74 2017-09-14T15:46:20 Add separate dirty bits for Pixel and Fragment uniforms. Also use a single UpdateSubresource call to update the buffer. Should improve performance on some benchmarks. BUG=angleproject:1390 Change-Id: I70d54d86d3d3beb0e2caee86338ee03081070ac8 Reviewed-on: https://chromium-review.googlesource.com/663895 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>