src


Log

Author Commit Date CI Message
Jamie Madill 17a50e17 2019-01-10T22:05:43 Vulkan: Enable robust buffer access. This is not a complete implementation because it does not have the ability to disable the physical device feature. It does pass the current set of robust access tests. But there could be a performance regression on platforms that have a slower impelmentation. We would want the ability to support cases with bufer robustness on or off. Bug: angleproject:3062 Change-Id: I7d6eb889debcbd32f6ed809b526677123f872726 Reviewed-on: https://chromium-review.googlesource.com/c/1403967 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c759b8b4 2019-01-03T15:16:50 Vulkan: More Vertex Array optimizations. Inlines a number of Vulkan vertex array methods. Also changes the way vertex buffers are bound. Note that Vulkan doesn't support NULL buffer bindings. Thus we create an emulated NULL buffer to work around the problem of having gaps in the bound vertex buffers. This allows us to use a single bind call for ranges of vertex buffers even when there are gaps. Also changes how vertex array dirty bits are reset. Instead of calling memset to clear the affected buffers we pass a mutable pointer to the Vertex Array sync state. This allows us to only reset the dirty bits that we sync. This saves on the memory clearing time. Improves perf by about 10% in the Vulkan VBO state change test. Bug: angleproject:3014 Change-Id: Ib7b742dff7897fc891606a652ea0b64255a24c86 Reviewed-on: https://chromium-review.googlesource.com/c/1390360 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 633d5e69 2018-12-23T19:58:01 Vulkan: Put viewport and scissor back in pipeline desc. Turns out this is much faster than using dynamic state. When we support multiple viewports it might be easier to use dynamic state since we won't need to make an overly large pipeline description. We could support both methods using a flag to indicate the viewport and/or scissor regions are invalid. Until then we can remove the pipeline and scissor dirty bits. Improves perf by about 15% in the Vulkan VBO state change test. Bug: angleproject:3013 Change-Id: I4572250626a9a0f0ca3451b17e8f0de186416cae Reviewed-on: https://chromium-review.googlesource.com/c/1390359 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 5bca4fed 2019-01-09T17:07:06 Vulkan: Switch to EXT_debug_utils EXT_debug_utils is a (relatively) new extension that subsumes EXT_debug_report and EXT_debug_marker extensions. This change uses EXT_debut_utils (if available) to receive debug messages, keeping EXT_debug_report as fallback. Bug: angleproject:2798 Change-Id: Ia6767604548704e18f8150a54d2533c0b1197841 Reviewed-on: https://chromium-review.googlesource.com/c/1403955 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 2450d8dd 2019-01-11T14:41:04 Vulkan: Squash Vertex Pipeline info. Instead of using 8 bytes per vertex we can reduce the space used for the divisor to 8 bytes. For larger values than 255 we can emulate the divisor by unrolling the draw call. We will likely need to do this in any case for instanced draws when the instancing extension isn't available. The tighter packing will allow for us to move the viewport and scissor back into the pipeline description. It seems this is much faster than using dynamic state. Every state change that would pull in a new Pipeline would need the viewport and scissor re-applied. It seems these driver calls are costly. Does not improve perf significantly but enables future improvements. Bug: angleproject:3013 Change-Id: I1a41c3acadc6fbd47c7a7b961c706e82f78de936 Reviewed-on: https://chromium-review.googlesource.com/c/1390358 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill a3b64e86 2019-01-11T14:07:21 Fix skip for InterleavedAttributeDataBenchmark on GL. Should be setting mSkipTest instead of calling abortTest(). Bug: 921004 Change-Id: I7bead806eef0c7825348d509a9dce7ed1bf34825 Reviewed-on: https://chromium-review.googlesource.com/c/1407250 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 92ee1f9f 2019-01-11T08:02:07 Suppress InterleavedAttributeDataBenchmark on GL. This is timing out on Intel. Would be nice to narrow the suppression but we don't have that check yet in perf tests. Bug: chromium:921004 Change-Id: Icb8bf2d1222b9ff9790877dc051797a1291ad02b Reviewed-on: https://chromium-review.googlesource.com/c/1406892 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tom Anderson e4a52cb5 2019-01-10T11:02:50 Fix Android ASAN tests when is_component_build=false Context in Chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/1405277/ This CL must be landed first. BUG=chromium:916973 R=thakis,cwallez,fjhenigman,geofflang,jmadill,ynovikov Change-Id: Icde4ec98c9031a262e0dfafa5cfe2a702c4c4e3e Reviewed-on: https://chromium-review.googlesource.com/c/1405908 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Enrico Galli a3b2e71f 2018-12-08T16:46:48 ES31: Support for GL_BUFFER_DATA_SIZE on GL_ATOMIC_COUNTER_BUFFER in D3D This commit adds support for querying the GL_BUFFER_DATA_SIZE of GL_ATOMIC_COUNTER_BUFFER in the D3D renderer. Bug: angleproject:1729 Test: angle_end2end_tests Change-Id: Id6aae0d92c5e0960b2b245ba7d83970b04ba4eed Reviewed-on: https://chromium-review.googlesource.com/c/1399143 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Ian Elliott b814bbb7 2019-01-10T12:02:47 Temporarily disable calling GetSystemInfo for rules processing. A bug on Android is causing <something> to crash if the rules-processing code calls GetSystemInfo, which in turn calls Vulkan. While this is being investigated, we will temporarily disable calling GetSystemInfo (instead, insert dummy data that won't match any actual GPU), so that the rest of the rules processing will still work. Bug: angleproject:3063 Change-Id: I9976fd57ba001099b94ebe7186739477bf0c8f79 Reviewed-on: https://chromium-review.googlesource.com/c/1405709 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3f0c4a56 2019-01-10T10:20:35 Vulkan: Faster state transitions. Implements a transition table from Pipeline Cache entry to state change neighbouring Pipeline Cache entries. We use a 64-bit mask to do a quick scan over the pipeline desc. This ends up being a lot faster than doing a full hash and memcmp over the pipeline description. Note that there could be future optimizations to this design. We might keep a hash map of the pipeline transitions instead of a list. Or use a sorted list. This could speed up the search when there are many transitions for cache entries. Also we could skip the transition table and opt to do a full hash when there are more than a configurable number of dirty states. This might be a bit faster in some cases. Likely this will be something we can add performance tests for in the future. Documentation is also added in a README file for the Vulkan back end. This will be extended over time. Improves performance about 30-35% on the VBO state change test. Bug: angleproject:3013 Change-Id: I793f9e3efd8887acf00ad60e4ac2502a54c95dee Reviewed-on: https://chromium-review.googlesource.com/c/1369287 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 80766cfa 2019-01-10T10:20:34 Vulkan: Update individual VAO attribs when dirty. This simplifies the dirty state updates in VertexArrayVk. It also lets us use a smaller dirty bit mask when a single attribute is marked dirty in a vertex array. Improves performance by about 1-2% in the VBO state change test. Will allow for better performance using a pipeline transition table. Bug: angleproject:3013 Change-Id: I25c5172b3f41b7abac6b8273c8f9cd42eb46cc9f Reviewed-on: https://chromium-review.googlesource.com/c/1403958 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang b827f490 2018-12-14T12:09:41 GL: Work around errors generated during query caps initialization. Nexus5X drivers generate INVLAID_ENUM errors when querying GL_QUERY_COUNTER_BITS. Add device detection from renderer string. BUG=angleproject:3027 Change-Id: I367e20c79e1c4e53c26d94603d9a893604b51165 Reviewed-on: https://chromium-review.googlesource.com/c/1374274 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi b5ba549a 2019-01-02T15:19:22 Vulkan: Shader path for texture copy when image is not initialized This change implements staging image/texture copies when the destination image is not yet fully initialized. With this change, CPU readback for glCopyTex[Sub]Image2D and glCopy[Sub]TextureCHROMIUM should happen only if the texture formats don't allow a fragment-shader based copy. Bug: angleproject:2958 Change-Id: I04087e14ea8fb6fbc731598c5493e44651c22c01 Reviewed-on: https://chromium-review.googlesource.com/c/1393909 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 4f3b207d 2019-01-01T14:48:25 Vulkan: Shader path for texture-to-texture copy This change implements glCopy[Sub]TextureCHROMIUM in GPU. As with the previous change implementing glCopyTex[Sub]Image2D, it currently only selects the shader path if the texture is already defined. Bug: angleproject:2958 Change-Id: Ia1b5625f92e6c9f91807c9b601e5c34d2d5e5c30 Reviewed-on: https://chromium-review.googlesource.com/c/1392394 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi 29b49417 2019-01-07T14:03:06 Make copy texture test more extensive By doing the copy multiple times, we exercise both paths where the destination is already initialized and when it's not. This adds tests for all combinations of formats and flags. Bug: angleproject:2958 Change-Id: I56afb44496acd1b4d5a8527f4dbee29afbac9c81 Reviewed-on: https://chromium-review.googlesource.com/c/1398643 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kimmo Kinnunen 6344d8ea 2019-01-02T13:23:21 Fix a crash on checking NVIDIA driver version with incorrect X11 DISPLAY Check if the display was valid (non-null Display pointer) before querying NVCTRL X11 extension. Bug: 840249 Change-Id: I299f87e2eb150d56649dd71c7becbe8f8abf7841 Reviewed-on: https://chromium-review.googlesource.com/c/1392906 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill eb278cb0 2019-01-07T13:49:36 D3D: Log GetLastError when compiler load fails. Also use the non-unicode version of LoadLibrary explicitly. Bug: chromium:919163 Change-Id: I4841c3eef586ff57563915da12765baaa6e0b146 Reviewed-on: https://chromium-review.googlesource.com/c/1398642 Reviewed-by: Bruce Dawson <brucedawson@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Qin Jiajia 5df1d281 2019-01-04T14:22:59 Add std430 support (continue) This patch enables that the interface block information can be correctly collected in API side for std430 layout. So we can get right offset value when we use glGetProgramResourceiv to query. BUG=angleproject:1920 Change-Id: Ib936f6e25936c07c5bbc29f6b567d282a0f257c2 Reviewed-on: https://chromium-review.googlesource.com/c/1345891 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Frank Henigman 86b0868d 2019-01-05T19:12:26 Enable RenderingProgramFailsWithProgramInstalled. Enable end2end test LinkAndRelinkTest.RenderingProgramFailsWithProgramInstalled on Vulkan. It works now because Vulkan was rolled and a shader with no output is now a warning instead of an error. BUG=angleproject:2648 Change-Id: Ie92d28b53c18a9a2b74fc2d1b951923512910a33 Reviewed-on: https://chromium-review.googlesource.com/c/1396264 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill f75e654d 2019-01-05T16:28:34 Add DrawElements on WGL perf test. Bug: angleproject:2995 Change-Id: I3ed814935ba587d260502b664976322a57f32d98 Reviewed-on: https://chromium-review.googlesource.com/c/1396502 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill dbc605ce 2019-01-04T16:39:14 Vulkan: Optimize VBO state changes. Also has some minor optimizations for the front-end. 12% improvement on the Vulkan VBO change test. Bug: angleproject:3014 Change-Id: I38e1a8194edfc14bfe57424be348cb9688e928f4 Reviewed-on: https://chromium-review.googlesource.com/c/1369286 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
James Darpinian e4109f27 2018-12-13T16:25:53 WebGL: validate texture format matches sampler type WebGL requires that drawing produces INVALID_OPERATION if a texture's format doesn't match the sampler type it is bound to. This is a little confusing because samplers have two attributes that could be called "type": addressing mode (2D/3D/Cube), and component format (float/signed/unsigned/shadow). ANGLE already handled checking the addressing mode; this change adds checking for the component format. Fixes WebGL conformance test conformance2/uniforms/incompatible-texture-type-for-sampler.html Bug: chromium:809237 Change-Id: I52ebfecd92625e3ee10274cb5f548d7e53de72dd Reviewed-on: https://chromium-review.googlesource.com/c/1377611 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Jamie Madill 225f08bf 2019-01-03T15:59:29 Cleanups to StripArrayIndices. Not picked up in prior review. Bug: angleproject:3024 Change-Id: I9dd1ea146996c8ac3569070af0cb12df65f0d815 Reviewed-on: https://chromium-review.googlesource.com/c/1394570 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1f56ed2a 2019-01-03T15:24:22 Add WGLWindow and WGL test configs. WGLWindow lets us use a Windows driver's bindings instead of ANGLE. This only works if the underlying driver supports OpenGL ES compatibility. Also adds the WGL headers, WGL XML, and a specialized WGL loader. Because of a small driver issue with NVIDIA I added a retry for the WGL Window initialization. Bug: angleproject:2995 Change-Id: Ie5148ece470dd03df33015f4919ad1fa79a859ec Reviewed-on: https://chromium-review.googlesource.com/c/1366021 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 4e712be2 2019-01-03T13:53:59 Refactor BlockLayoutEncoder APIs for std430. This splits HLSL SSBO access into two steps. First we compute a mapping from the collected SSBO variable names to TField pointers. Then during tree traversal we use a block encoding visitor class that uses the shader names to store BlockMemberInfo structures for the structures and variables. Each nested structure is traversed separately so that the BlockMemberInfo offsets are relative to the structure start rather than the enclosing block. The array stride for a structure is the size of the struct after all the alignment is included. This gives the correct results for the SSBO access chain in the HLSL code. It also will allow us to use the same encoding and visiting logic for SSBOs on the API side. Bug: angleproject:3024 Change-Id: I42b1db0e7547782ae77fe5f64a797f803f203f45 Reviewed-on: https://chromium-review.googlesource.com/c/1352731 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi f83a28a6 2018-12-09T03:48:34 Vulkan: Shader path for framebuffer-to-texture copy Part 1 in a series of changes to perform image copies on the GPU. Bug: angleproject:2958 Change-Id: I6264a880865c4738c0866f2dc71af63425fc4118 Reviewed-on: https://chromium-review.googlesource.com/c/1370724 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi d7969cdd 2019-01-02T11:53:18 Vulkan: optimize image layout transitions Removes dstAccessMask being redundantly set where `GetBasicLayoutAccessFlags()` sets the same bits. Additionally, removes setting HOST_WRITE_BIT and TRANSFER_WRITE_BIT as src access mask if new layout is SHADER_READ_ONLY_OPTIMAL. The correct src access mask will be set based on the previous layout. Additionally, specializes `GetBasicLayoutAccessFlags()` in `GetSrcLayoutAccessFlags()` and `GetDstLayoutAccessFlags()` where the access mask is set correctly (and optimally) based on whether the layout is the old or the new one. This removes a few unnecessary access masks from src (for WAR hazards), and adds a few missing access masks to dst (for RAW hazards), such as VK_ACCESS_COLOR_ATTACHMENT_READ_BIT necessary for blending. Bug: angleproject:2958 Change-Id: I5870bc99c755f0444332418f998032850825aca5 Reviewed-on: https://chromium-review.googlesource.com/c/1392397 Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill ad398ee8 2019-01-03T13:01:08 Free OSWindow and EGLWindow through helpers. This cleans up any potential problems with allocating and freeing resources in different shared objects or DLLs. Previously we were using a dynamically linked allocation function and then calling the standard delete function. Also adds a base class helper for EGLWindow. Will base the WGL Window class on this. Needed for running ANGLE tests against native drivers. Bug: angleproject:2995 Change-Id: Ic92b447649ebb32c547605c20086c07a601842f0 Reviewed-on: https://chromium-review.googlesource.com/c/1393443 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 9fa54eab 2019-01-02T18:38:33 Optimize and inline more validation. Previously on each draw call we were checking both the instanced and non-instanced attributes for overflow. On on-instanced draw calls we don't need to do any special checks for instanced attributes. Also we can inline more into the headers. This improves draw call performance slightly. Bug: angleproject:2966 Change-Id: Idf5861d2d9daf9fffd5c84f6a1ea5b23ac8ab713 Reviewed-on: https://chromium-review.googlesource.com/c/1390357 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Markus Tavenrath <matavenrath@nvidia.com>
Jamie Madill 4627b370 2019-01-02T18:38:32 Add gl null driver tests to DrawElements. Requires a couple tweaks to the back-end to be compatible with the null driver. Bug: angleproject:2966 Change-Id: Ia83651aabb0dd14b7d6f64152c276463a8fb28fc Reviewed-on: https://chromium-review.googlesource.com/c/1392392 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 904bb918 2019-01-02T16:00:02 Rename constants in blocklayout.h. This adds the "k" prefix. Bug: angleproject:3024 Change-Id: I3771a8a9d90cd5edc7173f2b3817a5f1f053bdd4 Reviewed-on: https://chromium-review.googlesource.com/c/1392399 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Bryan Bernhart 48bbc53e 2018-12-03T16:17:00 ES31: Fix for reading back initialized SSBO buffers in D3D11 If a SSBO is initialized with data, a staging buffer was created. When the data was read back, it was read from the staging buffer instead of the GPU. This patch fixes that by making the UAV buffer the latest buffer. Bug: angleproject:2990 Test: angle_end2end_tests Change-Id: I43c8c85144c74cc9b317577b7c834e3f7e347f72 Reviewed-on: https://chromium-review.googlesource.com/c/1359712 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 441649f7 2019-01-02T14:09:13 Suppress flaky Linux/Intel/OpenGL test. SimpleStateChangeTestES31.DispatchImageTextureAThenTextureBThenTextureA/ES3_1_OPENGL Bug: angleproject:3044 Change-Id: I21a4e4dadcb1dea23d3a7b2e9089e395e33dc1cd Reviewed-on: https://chromium-review.googlesource.com/c/1392398 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill bbdeee91 2019-01-02T09:57:49 Suppress FL 9_3 failing test. RobustBufferAccessBehaviorTest.RobustBufferAccessBehaviorTest Bug: angleproject:3042 Change-Id: I40186eeeb69ee2939844117b661209a433773db9 Reviewed-on: https://chromium-review.googlesource.com/c/1392396 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 04ea03e4 2019-01-01T15:14:25 Make default block member info a constant. Instead of generating a struct each time we can use a constexpr constructor to use a single representation. Bug: angleproject:3024 Change-Id: I14dec65a4f6ac9ab2f7e7af444862e4ceab88d8c Reviewed-on: https://chromium-review.googlesource.com/c/1392395 Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Qin Jiajia 76f66954 2018-12-18T17:59:00 ES31: Fix the bug that SSBO is active but not statically used If a SSBO is active but not statically used, there will be no UAV slot is bound. So we should skip this kind of block. Bug: angleproject:1951 Change-Id: I4d813ddefcce6c31fa02701f26148eb21c00f380 Reviewed-on: https://chromium-review.googlesource.com/c/1381847 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Jamie Madill 0c667215 2019-01-01T14:40:36 Pass ErrorSet to ContextImpl constructor. This removes the need for the setErrorSet method. Also update some egl::Error TODO bugs. Bug: angleproject:2491 Change-Id: I0aba07c4a53b579835a88c3dacae294f752e6b17 Reviewed-on: https://chromium-review.googlesource.com/c/1392393 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill ba319ba3 2018-12-29T10:29:33 Re-land "Load entry points dynamically in tests and samples." Fixes the Android/ChromeOS/Fuchsia builds by using consistent EGL headers. This CL adds a dynamic loader generator based on XML files. It also refactors the entry point generation script to move the XML parsing into a helper class. Additionally this includes a new GLES 1.0 base header. The new header allows for function pointer types and hiding prototypes. All tests and samples now load ANGLE dynamically. In the future this will be extended to load entry points from the driver directly when possible. This will allow us to perform more accurate A/B testing. The new build configuration leads to some tests having more warnings applied. The CL includes fixes for the new warnings. Bug: angleproject:2995 Change-Id: I5a8772f41a0f89570b3736b785f44b7de1539b57 Reviewed-on: https://chromium-review.googlesource.com/c/1392382 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c3dc5d48 2018-12-30T12:12:04 Merge gl::Context and gl::ContextState. This reduces the number of indrections when accessing the Extensions or Caps structures. It will provide a small speed-up to some methods. It also cleans up the code. Bug: angleproject:2966 Change-Id: Idddac70758c42c1c2b75c885d0cacc8a5c458685 Reviewed-on: https://chromium-review.googlesource.com/c/1392391 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Markus Tavenrath <matavenrath@nvidia.com>
Markus Tavenrath 957eb07f 2019-01-01T12:36:48 Remove redundant masking of the bits in angle::BitSet when using ternary operators. Bug: angleproject:3040 Change-Id: I59e69ddb27ec9c5723aff04858ac5c052e2775da Reviewed-on: https://chromium-review.googlesource.com/c/1392806 Commit-Queue: Markus Tavenrath <matavenrath@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Markus Tavenrath cc37cbf2 2018-12-30T23:35:25 Apply several small micro-optimizations to ValidateDrawElementsCommon * Remove indirection when getting CotextState from Context * Reduce number of branches from 2 to 1 when checking for an InvalidEnum in FromGLEnum<DrawElementsType> * Provide IndexRange constructor which doesn't initialize the member variables * Reduce number of branches to 1 when checking for BasicDrawStateErrors for the fast path * Remove a few branches and reduce math cost during the buffer range check in ValidateDrawElementsCommon Bug: angleproject:2966 Change-Id: Ibdbed8a59ad9d7abce76622e9f507498e67ab997 Reviewed-on: https://chromium-review.googlesource.com/c/1392805 Commit-Queue: Markus Tavenrath <matavenrath@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 60a50cfc 2018-12-29T16:04:05 Inline Context::DrawArrays and Context::BindBuffer. This reduces the call depth of both of these two hotspots. Reduces time spent in the CPU overhead benchmarks by about 10%. Bug: angleproject:2966 Change-Id: I5052e56dcc1dfb80274326a7f0891fafba7d6655 Reviewed-on: https://chromium-review.googlesource.com/c/1392389 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Markus Tavenrath <matavenrath@nvidia.com>
Yuly Novikov 9f088621 2018-12-29T20:46:15 Revert "Load entry points dynamically in tests and samples." This reverts commit 03923558a7103827ffec6a4d2a1453ed91f01c6f. Reason for revert: fails compilation on Android, ChromeOS and Fuchsia during roll https://chromium-review.googlesource.com/c/chromium/src/+/1392624 Original change's description: > Load entry points dynamically in tests and samples. > > This CL adds a dynamic loader generator based on XML files. It also > refactors the entry point generation script to move the XML parsing > into a helper class. > > Additionally this includes a new GLES 1.0 base header. The new > header allows for function pointer types and hiding prototypes. > > All tests and samples now load ANGLE dynamically. In the future this > will be extended to load entry points from the driver directly when > possible. This will allow us to perform more accurate A/B testing. > > The new build configuration leads to some tests having more warnings > applied. The CL includes fixes for the new warnings. > > Bug: angleproject:2995 > Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05 > Reviewed-on: https://chromium-review.googlesource.com/c/1359516 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org Change-Id: I902bec2d733c2b879be29c02ab52a0b7d4eaa077 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2995 Reviewed-on: https://chromium-review.googlesource.com/c/1392381 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 03923558 2018-12-29T10:29:33 Load entry points dynamically in tests and samples. This CL adds a dynamic loader generator based on XML files. It also refactors the entry point generation script to move the XML parsing into a helper class. Additionally this includes a new GLES 1.0 base header. The new header allows for function pointer types and hiding prototypes. All tests and samples now load ANGLE dynamically. In the future this will be extended to load entry points from the driver directly when possible. This will allow us to perform more accurate A/B testing. The new build configuration leads to some tests having more warnings applied. The CL includes fixes for the new warnings. Bug: angleproject:2995 Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05 Reviewed-on: https://chromium-review.googlesource.com/c/1359516 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 8c78ce4b 2018-12-16T19:14:58 Use visitor pattern for Shader Variable APIs. In many places in ANGLE we need to traverse a ShaderVariable tree. We do this to store uniform offset and other information, to flatten the tree of uniforms for the front-end, or to produce active variable lists for uniform and shader storage blocks. In each case, we would write separate tree traversal code. This patch introduces a shared visitor pattern for all of the shader variable tree traversal instances. With that get more common code. Also it is easier to write new variable traversals. ProgramD3D and ProgramLinkedResources in particular get nice simplificiations. The visitor object recieves callbacks from the traversal when entering structs, array elements, and new variables. The visitor can treat these differently depending on the use case. A common visitor that constructs full variable names is used as a base class in several places. Also moves the 'isRowMajorLayout' from sh::InterfaceBlockField to sh::ShaderVariable. This allows us to forgo using templates in several call sites. Bug: angleproject:3024 Change-Id: I472d81ec775e2eee92fb3d2eb0ca83860221ba2e Reviewed-on: https://chromium-review.googlesource.com/c/1358722 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi e321940c 2018-12-08T16:54:14 Vulkan: Move image clear functionality to UtilsVk DispatchUtilsVk is renamed to UtilsVk and the functionality in framebuffer's clearWithDraw() is moved to that class. Eventually, more fragment-shader-based internal algorithms will be added to this class as well. Bug: angleproject:2958 Change-Id: I4753c9cb3288b59cd1ed60fe7a57b9f189704322 Reviewed-on: https://chromium-review.googlesource.com/c/1369284 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi af4cef51 2018-12-28T16:56:47 Improve CopyTexImageTest The test is enhanced to perform the copy multiple times. Initially, the copy creates a new texture from a 16x16 framebuffer. Then, a copy is made from another 16x16 framebuffer (which should not trigger the recreation of the texture). Finally, a copy is made from a 32x32 framebuffer (which should trigger the recreation of the texture). Bug: angleproject:2958 Change-Id: Idc934d6f3d6312a2122d079309a4c2ae2608ba7f Reviewed-on: https://chromium-review.googlesource.com/c/1392388 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Xinghua Cao c5117571 2018-12-28T15:56:41 Add test case for storage buffer When storage buffer bound is unchanged and shader writes it, buffer content should also be updated. Currently, this case cannot work normally on D3D backend. Bug: angleproject:2814 TEST=angle_end2end_tests.ComputeShaderTest.StorageBufferBoundUnchanged Change-Id: I6f25b7eac84c44392befaca61a33bdf2457f29f9 Reviewed-on: https://chromium-review.googlesource.com/c/1391880 Commit-Queue: Xinghua Cao <xinghua.cao@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Qin Jiajia 3f01f53c 2018-12-11T15:13:51 ES31: Add state change tests for image This change adds dirty bit state change tests for image textures. Meanwhile, syncImages related codes are removed since syncTextures will do all texture states sync. Bug: angleproject:3015 Change-Id: I9b299c86af1d589e72c08c5d7c55ac74cc7833aa Reviewed-on: https://chromium-review.googlesource.com/c/1390596 Commit-Queue: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Markus Tavenrath cb9609fe 2018-12-26T00:52:44 Optimize glDrawElements performance A call to glDrawElements results in a calling depth of up to 4 * glDrawElements * gl::Context::DrawElements * rx::ContextGL::DrawElements * VertexArrayGL::syncDrawState. Each function call has to save/restore a lot of registers which results in a stall in the prologue of rx::ContextGL::DrawElements due to memory bandwidth limitations. The main change is the function gl::Context::DrawElements being inlined to reduce the calling depth by one. In addition the call to ContextGL::syncDrawElementsState is now protected so that it gets called only if it's required. Finally a few small getter functions have been inlined where the calling code was bigger than the actual function. In total this change improves performance of the DrawElementsPerfBenchmark.Run/gl benchmark by 16%. Bug: angleproject:2966 Change-Id: I423d18452f2f5b520ab52850fda2054e1da86991 Reviewed-on: https://chromium-review.googlesource.com/c/1389988 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Markus Tavenrath <matavenrath@nvidia.com>
Raul Tambre 7f6b3674 2018-12-24T20:09:20 Disable null pointer arithmetic warnings for GLES1 conformance tests Required for the rest of Chromium to compile with the warning enabled. Bug: chromium:766891 Change-Id: Ie319df01599434011dc953532a30ad68d6a7c9a3 Reviewed-on: https://chromium-review.googlesource.com/c/1390659 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Xinghua Cao 84412860 2018-12-21T17:41:24 Set dirty for uniform on D3D backend When uniform's value had been updated, set dirty and update its content on D3D backend. Bug: angleproject:2814 TEST=angle_end2end_tests.ComputeShaderTest .UniformDirty/ES3_1_D3D11 dEQP.GLES31/functional_image_load_store_cube* dEQP.GLES31/functional_image_load_store_3d* dEQP.GLES31/functional_image_load_store_2d_array* Change-Id: Ic135c140559925fe33790475d03dc608afa92384 Reviewed-on: https://chromium-review.googlesource.com/c/1387967 Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Xinghua Cao <xinghua.cao@intel.com>
Jamie Madill ae6ba9f8 2018-12-21T23:00:04 Optimize check for active not paused XFB. Local testing showed an improved score of about 2% in the most sensitive CPU overhead benchmark. Likely because of improved caching from fewer indirections. Bug: angleproject:2966 Change-Id: I5d9a4b4bcf624ab0b430bb696c4227e589cdb7a6 Reviewed-on: https://chromium-review.googlesource.com/c/1359518 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 1e853266 2018-12-21T09:07:38 Cache common DrawElements states. Similar to how we cache the base common draw states. This will improve DrawElements performance. Several state checks are optimized into a single 'if' check of a cached value. Also includes a regression test for mapping the element array buffer. Bug: angleproject:2966 Change-Id: Ia6e524a58ad6b7df2e455d67733e15d324b1b893 Reviewed-on: https://chromium-review.googlesource.com/c/1357150 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Elliott 52f5da43 2018-12-21T09:02:09 Also enable flipY for Vulkan 1.1 The necessary support for flipY is included in core Vulkan 1.1 so enable the feature if that's what's available. Bug: angleproject:2968 Change-Id: I6808a1a0b1ace74976a7476f77d686e137a1e747 Reviewed-on: https://chromium-review.googlesource.com/c/1387758 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Ian Elliott 899c5d26 2018-12-21T13:12:50 Appropriately set VkApplicationInfo::apiVersion to 1.1 Check if the Vulkan instance version is 1.1+, and if so, set VkApplicationInfo::apiVersion to 1.1 (which signals to the validation layers that ANGLE will use Vulkan 1.1 functionality. Bug: angleproject:2968 Change-Id: I6808a1a0b1ace74976a7476f77d686e137a1e746 Reviewed-on: https://chromium-review.googlesource.com/c/1387757 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Ian Elliott d50521fd 2018-12-20T12:05:14 Only enable VK_KHR_maintenance1 when available. This prevents an error in case ANGLE is run on an older Vulkan driver that does not support the VK_KHR_maintenance1 extension. Bug: angleproject:3035 Change-Id: I7e2b74bcb88bffdfc2a525a1d332eb3ef7d23d7c Reviewed-on: https://chromium-review.googlesource.com/c/1387347 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Jamie Madill 2b35654d 2018-12-20T12:43:37 compiler: Fix const non-square matrix component mult. It seems like there weren't any dEQP tests for constant folding of nonsquare matrices component-wise multiplication. There were a couple bugs in our implementation which could lead to undefined behaviour. Fixes the code and cleans up a few style issues. Also includes a regression test. Bug: chromium:912505 Bug: chromium:912508 Change-Id: I7fb85d1404a32950fa9fe4c3bbba9edc9f38ddd1 Reviewed-on: https://chromium-review.googlesource.com/c/1387065 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Ian Elliott bcb78908 2018-12-19T11:46:29 Implement eglSwapBuffersWithDamage on top of VK_KHR_incremental_present Bug: angleproject:2510 Change-Id: I12b0877f787dbcb48e2890f54ba4bc8ebe8294b4 Reviewed-on: https://chromium-review.googlesource.com/c/1383373 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Jamie Madill 6f087e9e 2018-12-19T16:10:49 Modify end2end_tests main to not import ANGLETest.h. This will allow for easier dependency management in the build files. Bug: angleproject:2995 Change-Id: Ia3464bf622b861df03c3d06bcf1b34874a9a5400 Reviewed-on: https://chromium-review.googlesource.com/c/1385025 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4638dc9d 2018-12-17T13:13:49 Re-land "Load correct libGLESv2 on Linux and Mac." Re-land fixes build to ensure commit_id is built before libEGL. libEGL was implicitly loading libGLESv2 on startup. This is bad because on platforms like Linux and Mac we could sometimes use the incorrect rpath. This in turn meant we needed workarounds like using "_angle" extensions to our shared objects to get the correct loading behaviour. Fix this by loading libGLESv2 dynamically in libEGL. We build the loader automatically from egl.xml. The loader itself is lazily initialized on every EGL entry point call. This is necessary because on Linux, etc, there is no equivalent to Windows' DLLMain. We also use an EGL.h with different generation options so we have the proper function pointer types. A README is included for instructions on how to regenerate EGL.h. The entry point generation script is refactored into a helper class that is used in the loader generator. Also adds the libGLESv2 versions of the EGL entry points in the DEF file on Windows. This allows them to be imported properly in 32-bit configurations. Also fixes up some errors in ANGLE's entry point definitions. Also includes a clang-format disable rule for the Khronos headers. This CL will help us to run ANGLE tests against native drivers. Bug: angleproject:2871 Bug: chromium:915731 Change-Id: I4192a938d1f4117cea1bf1399c98bda7ac25ddab Reviewed-on: https://chromium-review.googlesource.com/c/1380511 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 720ca449 2018-12-17T14:04:10 Pass GN header visibility check. This fixes a few things: * removes includes that weren't supposed to be present * scopes some compiler code into white_box_perftests * makes version.h/commit and angle_common id more visible * roll zlib to a version that passes check This should help prevent build problems from popping up in the downstream Chromium build. We could also potentially look at including gn check in our CQ recipe. Bug: chromium:915429 Change-Id: I350f543e16de13c84eb2c43260f4966d47185114 Reviewed-on: https://chromium-review.googlesource.com/c/1380771 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Xinghua Cao 0d218da4 2018-12-17T11:53:52 Specify texture LOD in compute shader on D3D backend D3D does not define LOD in compute shader, so Sample() is not supported, try to use SampleLevel(). Bug: angleproject:2756 TEST=angle_end2end_tests.ComputeShaderTest .TextureFunction/ES3_1_D3D11 dEQP.GLES31/functional_image_load_store_2d_store* Change-Id: I63e707d2b56e807cfe766cc21bc6b0819982ce80 Reviewed-on: https://chromium-review.googlesource.com/c/1379672 Commit-Queue: Xinghua Cao <xinghua.cao@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Xinghua Cao 2db5082b 2018-12-17T14:27:18 Add UAV format for GL_RGBA8I GL_RGBA8I is a supported image unit format, add its corresponding UAV format on D3D backend. Bug: angleproject:1987 TEST=dEQP.GLES31/functional_image_load_store_2d_store_rgba8i dEQP.GLES31/functional_image_load_store_2d_load_store_rgba8i Change-Id: Ib759f873c8629a644f85784a57ce141d3018e0c1 Reviewed-on: https://chromium-review.googlesource.com/c/1378888 Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Xinghua Cao <xinghua.cao@intel.com>
Ian Elliott 18017ca4 2018-12-17T15:39:27 Add opt-in/out unit testing for API version below minimum Bug: angleproject:2794 Change-Id: I133ebd4afb7064e8ac461f4f7174ec59af5ea0d1 Reviewed-on: https://chromium-review.googlesource.com/c/1380716 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Ian Elliott 5a8d0bc2 2018-11-30T14:35:29 Remove version-1 API of A4A opt-in/out (a.k.a. feature-support utilities) Bug: angleproject:2794 Change-Id: I7f41452a37536a00d772ecd9b21125ff7459a3d6 Reviewed-on: https://chromium-review.googlesource.com/c/1357151 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Qin Jiajia 4622905b 2018-12-10T13:31:00 ES31: Add atomic memory functions for SSBO Due to SSBO is translated to RWByteAddressBuffer in HLSL, the corresponding atomic memory functions atomic* will be translated to RWByteAddressBuffer.Interlocked*. The translation is like below: atomicAdd(instanceName.data[0], 5u); // becomes uint _ssbo_atomicAdd_uint(RWByteAddressBuffer buffer, uint loc, uint value) { uint original_value; buffer.InterlockedAdd(loc, value, original_value); return original_value; } _ssbo_atomicAdd_uint(_instanceName, 0 + 16 * 0, 5); Bug: angleproject:1951 Change-Id: If2af8bedb67a4135b443d2512d43c6058a78888d Reviewed-on: https://chromium-review.googlesource.com/c/1370676 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Yuly Novikov 175d918a 2018-12-16T19:53:23 Revert "Load correct libGLESv2 on Linux and Mac." This reverts commit dd815b623e60a1e1550f328104ffcd7caf20fde1. Reason for revert: Broke https://luci-milo.appspot.com/p/chromium/builders/luci.chromium.ci/win-rel/8006 Original change's description: > Load correct libGLESv2 on Linux and Mac. > > libEGL was implicitly loading libGLESv2 on startup. This is bad > because on platforms like Linux and Mac we could sometimes use the > incorrect rpath. This in turn meant we needed workarounds like using > "_angle" extensions to our shared objects to get the correct loading > behaviour. > > Fix this by loading libGLESv2 dynamically in libEGL. We build the > loader automatically from egl.xml. The loader itself is lazily > initialized on every EGL entry point call. This is necessary because > on Linux, etc, there is no equivalent to Windows' DLLMain. > > We also use an EGL.h with different generation options so we have the > proper function pointer types. A README is included for instructions > on how to regenerate EGL.h. > > The entry point generation script is refactored into a helper class > that is used in the loader generator. Also adds the libGLESv2 versions > of the EGL entry points in the DEF file on Windows. This allows them to > be imported properly in 32-bit configurations. > > Also fixes up some errors in ANGLE's entry point definitions. Also > includes a clang-format disable rule for the Khronos headers. > > This CL will help us to run ANGLE tests against native drivers. > > Bug: angleproject:2871 > Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572 > Reviewed-on: https://chromium-review.googlesource.com/c/1370725 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org Change-Id: I921b3c45435ab4f05cbc2d1c1172b4185d6257b0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2871 Reviewed-on: https://chromium-review.googlesource.com/c/1378887 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill dd815b62 2018-12-15T10:39:00 Load correct libGLESv2 on Linux and Mac. libEGL was implicitly loading libGLESv2 on startup. This is bad because on platforms like Linux and Mac we could sometimes use the incorrect rpath. This in turn meant we needed workarounds like using "_angle" extensions to our shared objects to get the correct loading behaviour. Fix this by loading libGLESv2 dynamically in libEGL. We build the loader automatically from egl.xml. The loader itself is lazily initialized on every EGL entry point call. This is necessary because on Linux, etc, there is no equivalent to Windows' DLLMain. We also use an EGL.h with different generation options so we have the proper function pointer types. A README is included for instructions on how to regenerate EGL.h. The entry point generation script is refactored into a helper class that is used in the loader generator. Also adds the libGLESv2 versions of the EGL entry points in the DEF file on Windows. This allows them to be imported properly in 32-bit configurations. Also fixes up some errors in ANGLE's entry point definitions. Also includes a clang-format disable rule for the Khronos headers. This CL will help us to run ANGLE tests against native drivers. Bug: angleproject:2871 Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572 Reviewed-on: https://chromium-review.googlesource.com/c/1370725 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 7139b434 2018-12-14T16:57:28 Print a warning on unexpected internal errors. The error message can be dropped when converting angle::Result to egl::Error. This makes sure something is always printed when we get an unexpected error. BUG=914911 Change-Id: Icc8b06b1c13e3ea83287da5a217f4c8bc218deec Reviewed-on: https://chromium-review.googlesource.com/c/1378689 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yuly Novikov 9a51daf6 2018-12-14T17:32:21 Fix angle_apk build Bug: angleproject:2995 Change-Id: I277a36b58dc6e0a9268b43d89e1da46635b5e1d1 Reviewed-on: https://chromium-review.googlesource.com/c/1378691 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang a7af56be 2018-12-14T14:20:28 Vulkan: Print the device id in the renderer string. Add a end2end test that prints all strings to help debug on the bots. BUG=angleproject:3026 Change-Id: Ia524a0d7dac88e55e0aa67412339e646a5564e64 Reviewed-on: https://chromium-review.googlesource.com/c/1378686 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang e1f742af 2018-12-14T14:17:59 GL: Clean up workaround detection. Use functions instead of macros for platform detection so compilation can be checked from any platform. Also makes the workaround detection more readable. BUG=angleproject:3026 Change-Id: I4153f0a2a6a6d5860c7b37f7cc67561895165ed1 Reviewed-on: https://chromium-review.googlesource.com/c/1378685 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 70fd9b5d 2018-12-14T10:27:33 Fix compile error in angle_white_box_perftests. This seems to have slipped through our CQ coverage. Bug: angleproject:3025 Change-Id: I2975eed3026feaa39b0cb3b897821e3bfc112f43 Reviewed-on: https://chromium-review.googlesource.com/c/1378385 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill dfaccbc0 2018-12-13T23:43:52 Clean up Windows DEF file generation. Ordinal numbers weren't necessary. It's a legacy function from Win16. Also refactor the def file generator to be much simpler. Will be helpful for adding the libGLESv2 EGL entry points to the DEF files. This will enable loading the right GLES libs on Linux and Mac once we break the link dependency of libEGL on libGLESv2. Bug: angleproject:2871 Bug: angleproject:2621 Change-Id: Ia2585323b076446af55359d875a6b67bcdc4d6f9 Reviewed-on: https://chromium-review.googlesource.com/c/1372378 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 828c5946 2018-12-13T23:09:05 Split angle_perftests into white and black box. The black box version tests traditional GL API features. The white box version is designed to test internal classes and uses a static link against libANGLE and libGLESv2. The black box version will also be extendable to test native drivers directly instead of going through ANGLE. Bug: angleproject:2995 Change-Id: I0b672db37ed38f82157c7a1db70080ff539337ce Reviewed-on: https://chromium-review.googlesource.com/c/1359515 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Qin Jiajia 4a9f9b08 2018-12-06T17:49:39 ES31: support ssbo as the operand of unary operator Bug: angleproject:1951 Change-Id: I71c2cf2ca35d7b1fe5d14358a0749f47e223816b Reviewed-on: https://chromium-review.googlesource.com/c/1367405 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Tobin Ehlis bec39877 2018-12-12T16:23:30 tests:Fix memory leak in MipmapTest Update createRGBInitData() to use/return std::vector instead of raw ptr w/ "new." This prevents potential for memory leaks. Bug: angleproject:2958 Change-Id: I4b1bb4ee293e171f56d1221a562e607ff8eb0fb3 Reviewed-on: https://chromium-review.googlesource.com/c/1375229 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tobin Ehlis <tobine@google.com>
Geoff Lang 91002266 2018-12-12T16:05:24 Use angle::Result and pass a context pointer to TransformFeedbackImpl BUG=angleproject:3020 Change-Id: Ib0877dd33f9a8c6ea57976642f1b904258cb6a86 Reviewed-on: https://chromium-review.googlesource.com/c/1374273 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 9b02506c 2018-12-12T15:44:12 Cache valid draw modes with transform feedback. Enabling transform feedback can affect which draw modes are valid. We can use the exiting draw modes cache to save having to check the draw modes twice. We update the cached draw modes on any change to the transform feedback activity state. e.g. when transform feedback is started, or resumed. There are also spec changes that comes into effect in ES 3.2 or when EXT_geometry_shader is enabled. Again we cache these draw modes in the packed valid draw modes map. Will allow for faster validation for draw calls once the other checks for transform feedback are optimized. Also adds a new regression test. Bug: angleproject:2966 Change-Id: Iab901e45aab70980b9e631ec8383fdeadbd32368 Reviewed-on: https://chromium-review.googlesource.com/c/1357149 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi b08457df 2018-12-11T15:13:54 Vulkan: Make flushAfterVertexConversion workaround Nexus5X-specific Workaround added in 611bbaabb28cf4231ad0a138cd7bc21fe559ea02 is likely Nexus5X-specific. This commit detects the phone and enables the workaround only on that. Bug: angleproject:2958, angleproject:3009 Change-Id: I9ab230d4aa690fd92e3d2d84ad98c159128c1093 Reviewed-on: https://chromium-review.googlesource.com/c/1372445 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuly Novikov 64f62f4a 2018-12-12T11:57:35 Skip external texture ImageTest tests on Ozone Since Ozone supports external target only for images created with EGL_EXT_image_dma_buf_import Bug: 914146, angleproject:2507 Change-Id: I454b26bbb7aa8ed638045dc0c9c98065c9ed76e4 Reviewed-on: https://chromium-review.googlesource.com/c/1374269 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Qin Jiajia 88faa696 2018-12-03T16:22:24 ES31: Add unsized array length support in SSBO Bug: angleproject:1951 Change-Id: I10c798c62a741b156f5b614e0df0795c0e845108 Reviewed-on: https://chromium-review.googlesource.com/c/1365154 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Qin Jiajia a48f26fb 2018-12-11T16:54:51 ES31: Use deepCopy to make sure that every node being used only once This patch uses deepCopy for nodes which are used more than once in the SSBO traverser. Bug: angleproject:1951 Change-Id: Ie8e03d4f595484a1e2ca0397ed30a7f484add607 Reviewed-on: https://chromium-review.googlesource.com/c/1370678 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Jamie Madill 3a256228 2018-12-08T09:56:39 Update ANGLE_multiview validation. Multiview transform feedback now passes if the transform feedback is paused. Also updates the relevant validation. This aligns the ANGLE_multiview validation with OVR_multivew and with the WebGL extension spec. This change allow us to combine multiple draw call validation updates into one update function. Bug: angleproject:3012 Change-Id: I2ce04edc386039134198afa1792201e03cc20490 Reviewed-on: https://chromium-review.googlesource.com/c/1357148 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 611bbaab 2018-12-06T01:59:53 Vulkan: Convert vertex attributes in compute In this commit, VertexArrayVk::convertVertexBuffer() is renamed to VertexArrayVk::convertVertexBufferCpu() to explicitly show it does a CPU readback. A new VertexArrayVk::convertVertexBuffer() function is added that has the same functionality in gpu (with some assumptions, where the CPU fallback is used should those assumptions fail). Currently, the only requirement is that buffer offset/stride are divided by the component size. ConvertVertex.comp is the shader responsible for this conversion, and it implements the functionality in renderer/copyvertex.inc, minus a few functions that are not used in the Vulkan backend. Bug: angleproject:2958, angleproject:3009 Change-Id: I8ec9a5f4672509bcf7b9e352cd27663970ad4653 Reviewed-on: https://chromium-review.googlesource.com/c/1364451 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang be607ad6 2018-11-29T10:14:22 GL: Implement GL_OES_EGL_image_external and GL_OES_EGL_image_external_essl3 Chrome uses external textures as part of its hardware video decode paths on Android. BUG=angleproject:2507 Change-Id: I2af608f84a99843c99a16dcfb9fb2fa28cc8fbb6 Reviewed-on: https://chromium-review.googlesource.com/c/1361480 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill f5c88e7e 2018-12-08T09:56:38 Refactor and inline DrawElements validation. This moves ValidateDrawBase into a common inline function. It also moves some checks in ValidateDrawElementsCommon into ValidateDrawElementsBase. "Base" is called from DrawElementsIndirect while "Common" is only called from non-indirect entry points. But this improves conformance because the missing checks in "Base" apply to DrawIndirect as well. In a follow-up patch many checks in "Base" will be cached into a single value. Much like what we did for ValidateDrawBase. Also inlines ValidateDrawElements which just calls through to "Common". Bug: angleproject:2966 Change-Id: Ibe0c5db25f403dd52a50dc73373ebb50cedad003 Reviewed-on: https://chromium-review.googlesource.com/c/1357147 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi 149eb33b 2018-12-08T14:53:49 Vulkan: add possibility to build subset of shaders As the number of internal shaders grow, it's helpful in development time to be able to build variations of a specific shader, instead of building everything every time. With this commit, one can do: $ python gen_vk_internal_shaders.py SubString which will result in compilation of shaders whose name matches the glob *SubString*. Bug: angleproject:2958 Change-Id: I3b18d7e32e2ec4317531a7655eb2c6148cea177b Reviewed-on: https://chromium-review.googlesource.com/c/1369285 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Austin Eng 153e0224 2018-12-07T13:31:31 Add gl_DrawID emulation for ESSL3 with ANGLE_multi_draw Bug: chromium:890539 Change-Id: I3d9a9429608afb454f076013f3ed844e115c56cc Reviewed-on: https://chromium-review.googlesource.com/c/1368784 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
Qin Jiajia 19f2f9eb 2018-12-07T15:10:48 Mark variable to call 'length()' as statically used Bug: angleproject:3008 Change-Id: I8779706c667f49fddb0a741f5bf31c4af54db3e7 Reviewed-on: https://chromium-review.googlesource.com/c/1367404 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Shahbaz Youssefi 7ef08391 2018-12-07T16:38:21 Vulkan: add test to verify attrib default value dirty handling Companion test to 0c2dc8c378bb288ab9ccfff078fc222d2b99b1a4. Bug: angleproject:2786 Change-Id: Idfbd557dcf6b6bf7e62821ec554bdb3138b616ab Reviewed-on: https://chromium-review.googlesource.com/c/1367750 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 5c4af666 2018-12-07T06:31:00 Vulkan: unix line endings in generated shaders Bug: angleproject:3007 Change-Id: I466caa92ae337508ae284b6fb8d38f5fa3ea1042 Reviewed-on: https://chromium-review.googlesource.com/c/1366796 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Ian Elliott 33484b97 2018-12-06T14:38:59 A4A opt-in/out: add TestRuleProcess test and use a test fixture The new TestRuleProcess test tests the full rule-processing paths. The test fixture reduces code duplication. Bug: angleproject:2993 Change-Id: Ia07ea408fb771dfd1a21cc2fd4610e0e88f529ea Reviewed-on: https://chromium-review.googlesource.com/c/1366314 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi 0c2dc8c3 2018-12-07T08:00:49 Vulkan: Fix dirty default attributes handling When invalidating default attributes, the mask to invalidate was set as the current dirty mask, but it should have been or'ed with it. The following test triggered a validation error on Linux: dEQP.GLES2/functional_default_vertex_attrib_mat4_vertex_attrib_4fv In this test, Vertex Array Bindings and Program dirty bits would set the default attrib dirty mask to all the default attributes, but the handling of Current Values dirty bits would mistakenly remove some of those dirty bits. Bug: angleproject:2786 Change-Id: Ife96621da7646102c1ce3b24e45f405e34a08b40 Reviewed-on: https://chromium-review.googlesource.com/c/1366797 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Qin Jiajia e14feaf5 2018-11-29T16:29:54 ES31: support ssbo as an argument of aggregate type BUG: angleproject:1951 Change-Id: Icaab8ffd0ee88cca22ba79a9f0d4e02c9134a169 Reviewed-on: https://chromium-review.googlesource.com/c/1349071 Commit-Queue: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7c985f5c 2018-11-29T18:16:17 Make angle::Result an enum. This moves away from a class type to a value type. This should improve performance when using angle::Result as a return value. Previously the generated code would return a pointer instead of a value. Improves performance in the most targeted microbenchmark by 10%. In more realistic scanarios it will have a smaller improvement. Also simplifies the class implementation and usage. Includes some unrelated code generation changes. Bug: angleproject:2491 Change-Id: Ifcf86870bf1c00a2f73c39ea6e4f05ca705050aa Reviewed-on: https://chromium-review.googlesource.com/c/1356139 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c3e3731c 2018-11-30T15:25:39 Give every validation error a constant. Makes the code more consistent and organized. Also reduces binary size by about 4k. Also refactors validation for GetBufferPointerv. Bug: angleproject:2957 Change-Id: Ib076ce936193e9840eef2499bf815489cdb48479 Reviewed-on: https://chromium-review.googlesource.com/c/1350489 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi ec06305b 2018-12-06T01:58:06 Vulkan: Add dynamic vertex buffers to graph With DynamicBuffer outputting BufferHelper objects, these objects can participate in the command graph, i.e. record commands. This means they need appropriate dependencies in the graph as well as pipeline barriers. There are a few users of DynamicBuffer for which this change should be applied to. This change covers vertex attribute buffers. Bug: angleproject:2958 Change-Id: Ic3f8e187639919aba23102bba238de9ce70e6394 Reviewed-on: https://chromium-review.googlesource.com/c/1364450 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>