src/libANGLE/renderer


Log

Author Commit Date CI Message
Jamie Madill 647dca76 2017-12-15T21:31:00 Revert "Vulkan: Roll loader/validation layers SDK. (2/2)" This reverts commit f15f9cec318b5b0042cca7f819b1df9dbd1872ee. Reason for revert: Causing a compile failure on the Fuchsia config, due to a path difference. Will fix upstream and re-land, since it's breaking the auto-roller. https://chromium-review.googlesource.com/c/chromium/src/+/829878 FAILED: clang_x64/gen/third_party/angle/src/vulkan_support/angle/vulkan/parameter_validation.cpp python ../../third_party/vulkan-validation-layers/src/scripts/lvl_genvk.py -o clang_x64/gen/third_party/angle/src/vulkan_support/angle/vulkan -registry ../../third_party/vulkan-validation-layers/src/scripts/vk.xml parameter_validation.cpp -quiet Error: Could not find vk_validation_error_messages.h [906/1359] ACTION //third_party/angle/src/vulkan_support:vulkan_gen_object_tracker_cpp(//build/toolchain/linux:clang_x64) FAILED: clang_x64/gen/third_party/angle/src/vulkan_support/angle/vulkan/object_tracker.cpp python ../../third_party/vulkan-validation-layers/src/scripts/lvl_genvk.py -o clang_x64/gen/third_party/angle/src/vulkan_support/angle/vulkan -registry ../../third_party/vulkan-validation-layers/src/scripts/vk.xml object_tracker.cpp -quiet Error: Could not find vk_validation_error_messages.h Original change's description: > Vulkan: Roll loader/validation layers SDK. (2/2) > > This hasn't been updated in a while, so there are many changes. > It should also include better validation for memory barriers. > > Also includes updated builds for SPIRV Tools and glslang. > A few pull requests need to land before landing this in ANGLE. > > This second step re-enables Vulkan and includes the updated build. > > Includes a workaround for parameter_validation.h no longer being > auto-generated, and the stale file clobbering the build. > > Also includes a fix for an incorrect memory barrier. > > Bug: angleproject:2237 > Change-Id: Iae611764870281ed6aa7b187ec0c4e44226c722a > Reviewed-on: https://chromium-review.googlesource.com/759197 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Frank Henigman <fjhenigman@chromium.org> TBR=fjhenigman@chromium.org,jmadill@chromium.org,cwallez@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: angleproject:2237 Change-Id: I9bc60860668c1da773b6e2fdb83ecc20215e9125 Reviewed-on: https://chromium-review.googlesource.com/830926 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Brandon Jones 9fc87331 2017-12-13T15:46:52 Fix Bug in Intel Workaround Fixes an incorrect assert that is hit when trying to find a program output when none are present. It is valid to not have an output, so we should not check for an output when there are none. Bug:angleproject:2283 Change-Id: Ia640482870c6ee589a933b989272177760237e3b Reviewed-on: https://chromium-review.googlesource.com/825957 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f414121d 2017-12-12T15:08:07 D3D11: Fix program uniform buffer dity bits. There were actually three missing state synchronization points: 1. When re-binding a uniform buffer, we had no dirty bits. 2. When modifying the Program bindings, we also had no update. 3. When triggering a dependent state update via BufferData. This fixes all the missing syncs and adds tests for the cases. Bug: angleproject:1390 Change-Id: I2f05766545784248bcca8308ae34ac5720237ab1 Reviewed-on: https://chromium-review.googlesource.com/823150 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f15f9cec 2017-12-13T15:02:24 Vulkan: Roll loader/validation layers SDK. (2/2) This hasn't been updated in a while, so there are many changes. It should also include better validation for memory barriers. Also includes updated builds for SPIRV Tools and glslang. A few pull requests need to land before landing this in ANGLE. This second step re-enables Vulkan and includes the updated build. Includes a workaround for parameter_validation.h no longer being auto-generated, and the stale file clobbering the build. Also includes a fix for an incorrect memory barrier. Bug: angleproject:2237 Change-Id: Iae611764870281ed6aa7b187ec0c4e44226c722a Reviewed-on: https://chromium-review.googlesource.com/759197 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill bef918cb 2017-12-13T13:11:30 Vulkan: Add packed RenderPass descriptions. This change is two-fold: it splits the compatible parts from the RenderPass description, which allows for correct caching. It also will allow the pipeline state cache to cache the compatible RenderPass bits. In order to do this we introduce a packed version of the RenderPass description, which uses carefully aligned bit representations so we can hash the descriptions easily using MurmurHash, and compare them with memcmp. Bug: angleproject:2163 Change-Id: I4179c0ff8762df81f29082168bd6e3056ceb1318 Reviewed-on: https://chromium-review.googlesource.com/815816 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
jchen10 8225e73b 2017-11-14T16:29:03 Support struct varying for transform feedback Capturing struct members is vague In ES 3.00. But the ES 3.10 explicitly says that base-level members of struct are feasible for transform feedback capture. This implementation fills the gap. TEST=angle_end2end_tests:TrasnformFeedbackTest* BUG=angleproject:2241 Change-Id: Ibdf3ae6c2b8b28952e2f7fef1363545cbccad389 Reviewed-on: https://chromium-review.googlesource.com/768613 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 9db70de8 2017-07-04T18:28:42 Reland: Implement EGL_ANGLE_iosurface_client_buffer Includes a fix for creating pbuffers with <buftype> EGL_D3D_TEXTURE with EGL_WIDTH and EGL_HEIGHT attributes. BUG=angleproject:1649 TBR=geofflang@chromium.org Change-Id: Id2974b8fab02c3218febfac708b9b034e65cbc53 Reviewed-on: https://chromium-review.googlesource.com/823248 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Qin Jiajia a98a2811 2017-11-30T18:12:06 ES31: Add support for GL_DISPATCH_INDIRECT_BUFFER_BINDING binding point BUG=angleproject:2270 TEST=dEQP-GLES31.functional.state_query.integer.dispatch_indirect_buffer_binding_* Change-Id: I2c286c219c5c849d7ba417069f53f2d0fae6abf1 Reviewed-on: https://chromium-review.googlesource.com/799990 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 7f5c3eb7 2017-12-12T14:54:17 Revert "Implement EGL_ANGLE_iosurface_client_buffer" This reverts commit c7abc08034a30a41748eefc5b628a76d4e2daa8a. Reason for revert: Might have broken Chromium Win10 composition due to validation changes. Original change's description: > Implement EGL_ANGLE_iosurface_client_buffer > > BUG=angleproject:1649 > > Change-Id: I1e72c31d7c9497ad14039a8d3fb97317ab193cb2 > Reviewed-on: https://chromium-review.googlesource.com/559107 > Reviewed-by: Corentin Wallez <cwallez@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Corentin Wallez <cwallez@chromium.org> TBR=geofflang@chromium.org,cwallez@chromium.org Change-Id: I605b710b6d76056d6276b09822cd6ddca277bfd0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:1649 Reviewed-on: https://chromium-review.googlesource.com/822172 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez c7abc080 2017-07-04T18:28:42 Implement EGL_ANGLE_iosurface_client_buffer BUG=angleproject:1649 Change-Id: I1e72c31d7c9497ad14039a8d3fb97317ab193cb2 Reviewed-on: https://chromium-review.googlesource.com/559107 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kai Ninomiya 9b88991c 2017-12-08T15:37:49 Disable DIRTY_BIT_PROGRAM_UNIFORM_BUFFERS This dirty bit isn't getting set somewhere where it should be, so work around this by just enabling the dirty bit always. The bit was added here: https://chromium-review.googlesource.com/c/angle/angle/+/659228 There will be a followup to re-enable this dirty bit once the correctness has been fixed. Test: https://github.com/KhronosGroup/WebGL/pull/2559 Bug: chromium:792966 Change-Id: I473a60b39eff70e59ab55ff7b74f06fdb0db1305 Reviewed-on: https://chromium-review.googlesource.com/818178 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Geoff Lang 58ba6bf5 2017-11-28T16:40:58 Enable debug layers by default whenever assertions are enabled. BUG=angleproject:2279 Change-Id: I7e7ef359fa3021aa10585653b2fec169f5d4a51f Reviewed-on: https://chromium-review.googlesource.com/794536 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Xinghua Cao 10a4d434 2017-11-28T14:46:26 ES31: Enable some dirty bits and dirty objects for compute pipeline BUG=angleproject:2265 TEST=dEQP-GLES31.functional.shaders.builtin_var.compute.* angle_end2end_test.ShaderStorageBufferTest31 .MultiStorageBuffersForMultiPrograms Change-Id: Icc3df122602951a2328003c10a76696ab4c9f0d8 Reviewed-on: https://chromium-review.googlesource.com/792951 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jeff Gilbert 3dddccff 2017-11-14T16:44:36 Support RGB gl-tex-external stream consumers for StreamProducerNV12. This makes it relatively simple to sample from a D3D11Texture of arbitrary format. From: https://bugzilla.mozilla.org/show_bug.cgi?id=1322746 BUG=angleproject:2233 TEST=angle_end2end_tests Change-Id: I10cd3043b5cb0c5d36dd613467ba6c0ceadf41af Reviewed-on: https://chromium-review.googlesource.com/758042 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang ded7923b 2017-11-28T15:21:11 GL backend: Only synchronize transform feedback state when it changes. BUG=angleproject:2188 Change-Id: I5bfcc038c887dde0770564d103eb3cb234b248c9 Reviewed-on: https://chromium-review.googlesource.com/794100 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 3de2703d 2017-11-30T12:16:47 Fix handling matrix qualifiers on block members Individual block member row_major/column_major layout qualifiers may override the qualifiers set on the block. During parsing, this was already being handled correctly, so that the qualifier is resolved for each block member and recorded for each TField / InterfaceBlockField. Now we always write the qualifiers on a per-member granularity to the output GLSL shaders, so that the native driver gets the correct per-member qualifiers. This replaces earlier behavior where the matrix qualifiers were only written per-block. Also only use qualifiers from individual members in block layout. Since the block-level qualifier information is no longer used after parsing, it is no longer kept in the AST. A dummy value is still set to the InterfaceBlock structs exposed through the ShaderVars interface, since that has existing usage in Chromium that needs to be removed before the field can be removed. Some AMD OpenGL drivers don't seem to handle matrix layout qualifiers correctly, so most of the added tests need to be skipped for AMD GL. On NVIDIA and Intel the tests pass. BUG=angleproject:2271 TEST=angle_unittests, angle_end2end_tests, dEQP-GLES31.functional.program_interface_query.uniform.matrix* Change-Id: I1baa7a633bc2da548743c2190cb72db491b5227a Reviewed-on: https://chromium-review.googlesource.com/800174 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang f5be5baf 2017-11-29T13:17:01 StateManagerGL: Use dirty bits for program binding. BUG=angleproject:2188 Change-Id: I7456692e779107514ab87bfb1a0ab91178c9fc3a Reviewed-on: https://chromium-review.googlesource.com/797356 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei Shao 361df070 2017-11-22T09:33:59 ES31: Implement Geometry Shader resource queries on OpenGL This patch intends to implement all geometry shader related resource queries on OpenGL back-ends. This patch also fixes a memory leak by releasing the geometry shader compiler handle in the destructor of the Compiler. BUG=angleproject:1941, angleproject:2261 TEST=angle_end2end_tests Change-Id: Ieb69c162d2fc6c6550e145d1ec7948c3d36d4d15 Reviewed-on: https://chromium-review.googlesource.com/784552 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jiajia Qin 94f1e89f 2017-11-20T12:14:32 ES31: Add atomic counter buffer data size BUG=angleproject:1729 TEST=dEQP-GLES31.functional.ssbo.layout.* dEQP-GLES31.functional.compute.basic.atomic_counter* Change-Id: Ic78c0f089fd539c0b1064e8405d63505456dbc01 Reviewed-on: https://chromium-review.googlesource.com/777958 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 5b18f487 2017-11-30T17:24:22 Vulkan: Implement basic TexSubImage2D. This also adds a test for updating a Texture that is in-use. This will ensure our Texture updates occur at the right time when we're implementing command re-ordering. Bug: angleproject:2264 Bug: angleproject:2200 Change-Id: Id6040d7238eca031e3cc7b27564d8ea815bf3d73 Reviewed-on: https://chromium-review.googlesource.com/801031 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Xinghua Cao 37584b36 2017-12-01T11:04:03 Refactor: replace SamplerType with ShaderType BUG=angleproject:1987 Change-Id: I189e1606bd966eb369e8192a6866c8e90810e937 Reviewed-on: https://chromium-review.googlesource.com/802956 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yunchao He <yunchao.he@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill da854a27 2017-11-30T17:24:21 Vulkan: Clean up VAO cached resources. We can actually store a pointer to the base ResourceVk instead of BufferVk for updating serials. This will work a little nicer with streaming vertex data, which won't have a BufferVk but will have an accessible ResourceVk pointer. Also add an element array resource pointer for serial update. This was missing and could lead to incorrect behaviour. Also change the types of the caches from std::vector to gl::AttribArray, which is a std::array. Bug: angleproject:2264 Change-Id: Ibd79b7676b5dbc3875ae9d110be477d228e01c5c Reviewed-on: https://chromium-review.googlesource.com/798170 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 9f2a8613 2017-11-30T12:43:09 Vulkan: Implement a RenderPass cache. This cache replaces the RenderPass-per-Framebuffer approach. Although the concepts of a RenderPass are closely associated with rendering to a Framebuffer, there can be multiple RenderPasses used with a single FBO, especially considering the nature of Load and Store operations. This code will then lend itself to the implementation of the deferred RenderPasses, which are created on flush. These RenderPasses won't be owned by a Framebuffer. Bug: angleproject:2264 Change-Id: I4dce07c302118f7e05f5225e2a3b0569ad1e52bf Reviewed-on: https://chromium-review.googlesource.com/789534 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e218f15f 2017-11-30T12:38:50 Vulkan: Remove std::vector arg from beginRenderPass. We don't want to force the RenderPass code to use std::vector when we are working with static data. Change it to take a pointer. Bug: angleproject:2264 Change-Id: I07a077719fb9b4abc33a0cfcccc178d0544b7f06 Reviewed-on: https://chromium-review.googlesource.com/789535 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill d3e213bc 2017-11-27T18:33:41 Add a gl::AttribArray helper type. This is a generic std::array sized to gl::MAX_VERTEX_ATTRIBS. Bug: angleproject:2264 Change-Id: I788659ad25be5708dbab422ac4a16dff60abf154 Reviewed-on: https://chromium-review.googlesource.com/790750 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang df68ca50 2017-11-27T17:15:30 Add missing break in StateManagerGL::syncState. BUG=angleproject:2188 Change-Id: I4baae8b13f217769cd10f5e559452ab49350174f Reviewed-on: https://chromium-review.googlesource.com/792173 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 0b684ce3 2017-11-23T12:57:39 Vulkan: Move RenderPass init into a helper function. Here it can be more easily accessed for command re-ordering, which will use a RenderPass cache instead of having RenderPasses be owned by the Framebuffer. Bug: angleproject:2264 Change-Id: I9b06cff43e536a526d44e7e0c04027bc450051cf Reviewed-on: https://chromium-review.googlesource.com/789533 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill afa02a2f 2017-11-23T12:57:38 ContextImpl: Make flush/finish take a gl::Context. This will more easily allow us to call gl::BindingPointer methods. The binding pointer will be used temporarily in the command graph. This is only temporary since we will likely not be using BindingPointer in the end result code, but it could be necessary for future work. Bug: angleproject:2264 Change-Id: I33cf40ec2a1e334c4abfdcff2ad20bbcda3c9d78 Reviewed-on: https://chromium-review.googlesource.com/789532 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 994ee3f2 2017-11-22T21:34:21 Remove static sNativeLib from FunctionsEGLDL It should be safe to never dlclose native EGL, since we want to do it only when process exits, in which case fd is closed and library destructor is called. BUG=angleproject:1459 Change-Id: I8d3e5b323164d2f6473a083973f4d0adc9e655aa Reviewed-on: https://chromium-review.googlesource.com/786051 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang 0250fd4a 2017-11-24T14:05:03 Handle DIRTY_BIT_LABEL in TextureGL::syncState. BUG=angleproject:1993 Change-Id: I495589e638443060ee8c140ee44a990e89f0ecdd Reviewed-on: https://chromium-review.googlesource.com/789491 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
JiangYizhou bcbe8e1a 2017-11-21T14:13:14 Update extension queries on OpenGL part Fix some incorrect extension queries on OpenGL part. GL_MAX_FRAMEBUFFER_WIDTH should be checked by GL_ARB_framebuffer_no_attachments. GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS should be checked by GL_ARB_shader_storage_buffer_object and GL_ARB_compute_shader. Also do code refactoring for query GL_MAX_FRAGMENT_UNIFORM_VECTORS, GL_MAX_VERTEX_UNIFORM_BLOCKS and GL_MAX_FRAGMENT_UNIFORM_BLOCKS. BUG=angleproject:2256 Change-Id: Iea2471363551019dfeb97f224eea808de19914ab Reviewed-on: https://chromium-review.googlesource.com/781239 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c7c0d1c1 2017-11-22T14:53:03 Expose OES_vertex_array_object on the GL backend. BUG=781164 Change-Id: I92738c0f45efdf0efaecede509648fd5a4d00b8b Reviewed-on: https://chromium-review.googlesource.com/786338 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 5d5253a3 2017-11-22T14:51:12 Clean up usage of EXT_debug_marker and KHR_debug in the backends. In RendererGL, the EXT_debug_marker functions were calling the KHR_debug entry points, now they fall back only when EXT_debug_marker is missing. Separated the ContextImpl methods for the two extensions. BUG=781164 Change-Id: I615b5965b705e55eb730ebefa6e27e0ee6d86c31 Reviewed-on: https://chromium-review.googlesource.com/786337 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yunchao He 85072e8f 2017-11-14T15:43:28 ES31: Fix detaching/deleting compute shader after LinkProgram. This change also moves the ShaderType enum from D3D renderer to angletype.h. And it uses a bit mask to track the linked shader stages. BUG=angleproject:2247 Change-Id: I5c7ee1445d353a02e24549ffcf6b0ac694dd1069 Reviewed-on: https://chromium-review.googlesource.com/768629 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8e4bb4b1 2017-11-22T18:59:51 D3D11: Cache element array buffer updates. This attempts to reduce the amount of redundant validation done between indexed draw calls. It keeps the cached info in the VertexArray11 class. It also includes a fix to a missing direct buffer invalidation in CopyBufferSubData which was turning up with the new caching. Reduces overhead in the D3D11 indexed rendering perf test such that it leads to an increased score of about 20%. BUG=angleproject:2229 Change-Id: I63121bea19a9c8198e1925ed6a1460838e8f8955 Reviewed-on: https://chromium-review.googlesource.com/765262 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill c7b0cf2a 2017-11-22T16:34:09 D3D11: Remove "fast path" check in DrawElements. This was a bit of an anti-pattern. Many draw calls were being handled in the "slow" path, so the repeated checks were slowing the draw calls down more than the fast path was speeding things up. The new code tries to do all the checking for index ranges and restart index once only, and lazily when possible. The 'start' vertex is a bit of a special case - we known when the primitive restart index is not enabled, this will be always the same as the 'base' vertex (zero if the base vertex is not enabled - only currently available through draw indirect commands). In future work we can look at implementing a lazy evaluation for draw indirect commands so we don't need to do a check there either. Reduces overhead in the D3D11 indexed rendering perf test such that it leads to an increased score of about 5%. BUG=angleproject:2229 Change-Id: I6330f30b66d1810624d03f4e7a012bf2391a3bf3 Reviewed-on: https://chromium-review.googlesource.com/764677 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5a654f5f 2017-11-22T11:16:10 Fix reinterpret_cast size missmatch warning on 64-bit Windows. Change-Id: I9c4b102c60abb90281f778833be9b1d5bfdcb8f1 Reviewed-on: https://chromium-review.googlesource.com/786110 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 465835d6 2017-09-26T13:34:10 Support arrays of arrays in the API The ShaderVariable class that is used as an interface between the compiler and the rest of the code gets arrays of arrays support. Array of array variables are passed from the compiler just like any other variables. However, when stored in Program state each innermost array constitutes a separate variable. This is done to make the implementation match the GLES specification for program interface query APIs. This will be tested more fully once support for parsing arrays of arrays lands in the compiler. TEST=angle_end2end_tests, angle_unittests BUG=angleproject:2125 Change-Id: I0f7159000f039be92a87a52b3b68cd9a215a21cb Reviewed-on: https://chromium-review.googlesource.com/684742 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill acf2f3ad 2017-11-21T19:22:44 Apply Chromium style fixes. This addresses several minor code quality issues that are validated in Chromium, but not yet applied to ANGLE: * constructors and destructors must be defined out-of-line * auto is not allowed for simple pointer types * use override everywhere instead of virtual * virtual functions must also be defined out-of-line Slightly reduces binary size for me (~2k on Win, 150k on Linux). Bug: angleproject:1569 Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6 Reviewed-on: https://chromium-review.googlesource.com/779959 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f1b47e89 2017-11-21T22:58:31 Fix ComputeGenericHash. ANGLE's internal hash maps would run MurmurHash on c++ structs to come up with hash values. Since the hash ran on 4 byte words only, it would have no understanding that sometimes our structs would only have meaninful data in the first N bytes, and would include the garbage at the end in the hash calculation. This fixes the problem by forcing our structs to be aligned at compile-time. It also adds custom copy operators for a few classes to ensure that all bits are copied when the struct is initialized, including the padding. Bug: angleproject:1569 Bug: chromium:721648 Change-Id: I4d11f6e12d9a067b36e1416c7ed15586eff99aab Reviewed-on: https://chromium-review.googlesource.com/783990 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei Shao 89be29a5 2017-11-06T14:36:45 ES31: Implement creation and attaching geometry shader on OpenGL This patch intends to implement the creation of a geometry shader and attaching a geometry shader to a program on OpenGL back-ends. This patch also adds all geometry shader related dEQP-GLES31 test failures to deqp_gles31_test_expectations.txt. BUG=angleproject:1941 TEST=angle_end2end_tests Change-Id: Ib0b497030255b15dacd967e48bc59eef0009af46 Reviewed-on: https://chromium-review.googlesource.com/757979 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7f738d4e 2017-11-20T17:06:27 Vulkan: Refactor CommandBuffer helper class. This makes the base vk::CommandBuffer class as close to the Vulkan API as possible. It moves the extra functionality and state tracking to a CommandBufferAndState helper class. Also no longer stores a reference to a CommandPool in a CommandBuffer. Eventually we won't need to free CommandBuffers explicitly, since they can be freed en-masse by deallocating the CommandPool on a flush. Bug: angleproject:2200 Change-Id: I5095fe89e8da935ff8273b1a402ccfd6a3ffe0df Reviewed-on: https://chromium-review.googlesource.com/778184 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 378734c5 2017-11-20T16:32:56 D3D11: Lazy evaluation for draw call vertex params. The vertex params are the 'start' vertex index and the number of vertices in the draw call. For indexed draws, they sometimes mean we need to compute the index range. In other cases, we don't. Defer computing the index range as long as possible so we don't end up computing the index range when we don't have to. BUG=angleproject:2229 Change-Id: I8e125416ef6767787a14509b322efa8dcd8e4a34 Reviewed-on: https://chromium-review.googlesource.com/764676 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 03fd0356 2017-11-20T16:30:10 D3D11: Push index range computation deeper. If we can make the index range computation happen as late as possible, we won't have to check it during the fastest draw call paths. This change makes it easier to skip re-computing some index range checks by only checking it in one place in IndexDataManager, and by making it a lazy check; the check is never evaluated if the primitive restart workaround is not enabled. Future work can also push the index range computation for vertex info later, so we only evaluate it in the cases where we need it. BUG=angleproject:2229 Change-Id: Ic55fac9e23fd35a119ddff475355a43095d2e3e9 Reviewed-on: https://chromium-review.googlesource.com/764675 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 578b51fd 2017-11-20T16:13:34 D3D: Add helper for index translation type. This makes it a bit simpler to work with the prepareIndexData method. Also removes the mRendererClass member of the index data manager since it was no longer necessary. BUG=angleproject:2229 Change-Id: I03768b104da21f57c499239bbbb5f716efb0fd48 Reviewed-on: https://chromium-review.googlesource.com/765261 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 92019431 2017-11-20T13:09:34 Make conversion from GL types to native bools consistant. Some places would compare with "== GL_TRUE" and others with "!= GL_FALSE". This behaviour is not in the OpenGL spec but "!= GL_FALSE" is the most standard and follows the same rules as C and C++. Remove un-necessary validation that params are either GL_TRUE or GL_FALSE. Update some internal storage from GLboolean to bool. BUG=angleproject:2258 Change-Id: I12adbe2d24318a206521ca6ad1099ee7e2bf677e Reviewed-on: https://chromium-review.googlesource.com/779799 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 416a23e8 2017-11-20T12:34:20 ProgramGL: Make sure the binary vector does not read out of bounds. By sizing the vector to at least one element, it is not possible to pass invalid pointers to the driver or binary stream even if the binary is zero-sized. BUG=angleproject:2257 Change-Id: Ie0e42bff1192207e0e069934b03dfd49e8d34824 Reviewed-on: https://chromium-review.googlesource.com/779739 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4dd167fb 2017-11-09T13:08:31 Vulkan: Assign locations to varyings. These were actually always required, but only was caught by the newer versions of the SPIR-V toolchain. BUG=angleproject:2237 Change-Id: I43fef179e8792e46a602b39a6decafcab03b19df Reviewed-on: https://chromium-review.googlesource.com/760638 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 05fd3860 2017-11-13T10:59:35 Make sure non-multi-sampled EGL configs are always exposed. It is possible for some hardware to not support multisampling on any texture formats which results in an empty sample set for all formats. BUG=angleproject:2242 Change-Id: I8148c781ec22ec02562b6a8b5d1b966c6f13915e Reviewed-on: https://chromium-review.googlesource.com/766568 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 1eda27a6 2017-11-16T13:06:38 Buffer11: Allow CopySubData from uninitialized. This fixes a very odd use case where an app would try to copy from an uninitialized buffer. I didn't search the spec too closely, but it's likely a valid operation that produces undefined buffer contents. Previously to this change we would genearte an OOM error. Also includes an unrelated fix to ensure the latest buffer storage is never nullptr when we have any data. Bug: angleproject:1155 Change-Id: I4292bd302cc2b84d125a7d3e8d28e4d2b0210e53 Reviewed-on: https://chromium-review.googlesource.com/774991 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8957b6c0 2017-11-14T12:40:38 Add perf test for ushort DrawElements. The code path in the D3D11 back-end is sigificantly different for unsigned short indices vs unsigned int. Because of the workaround we have for the primitive restart index in D3D11, ushort rendering can be slower. BUG=angleproject:2229 Change-Id: I303dcc55b0314ec45508044995ba47b250cbb87d Reviewed-on: https://chromium-review.googlesource.com/767149 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0acb268c 2017-11-14T12:40:37 TextureD3D: Only update storage if images dirty. This uses the existing dirty bit mDirtyImages to early return in the TextureD3D::updateStorage methods. Also fixes a couple missing cases for setting dirty images. The code could be improved in the future by using a bitset of dirty images per mip level instead of a single bit. BUG=angleproject:1392 Change-Id: I58df2be455b6ee51c3e3f76a6fa44ad585d1480d Reviewed-on: https://chromium-review.googlesource.com/761243 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 192199a7 2017-11-14T16:12:20 ResourceManager11: Store resource sizes 64-bit. This prevents possible size count overflow when in 32-bit mode with a lot of very large resources. Issue originally reported via Mozilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1412554 BUG=angleproject:2234 Change-Id: Idacfda98356c13bf22bc493ef7aa2bff1a287f97 Reviewed-on: https://chromium-review.googlesource.com/769749 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6226b8df 2017-11-09T13:08:30 Vulkan: Fix missing index buffer usage. The newer validation layers picked up this missing bit. BUG=angleproject:2237 Change-Id: I5bb2f1db3a4e284c003de0f5b23f7f613056af3a Reviewed-on: https://chromium-review.googlesource.com/760637 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill d33c77c0 2017-11-09T13:08:30 Vulkan: Use correct transfer access mask in layout change. When using a transfer destination, we should be using the transfer access mask, not bottom of pipe or other bits. Uncovered by using a newer version of the layers SDK. BUG=angleproject:2237 Change-Id: I3ebcca707ac8889d2ece099e3765f5b0ca3dfdbc Reviewed-on: https://chromium-review.googlesource.com/760636 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill fea1e754 2017-11-14T16:42:37 Buffer11: Cleanup onCopyStorage. BUG=angleproject:1155 Change-Id: I7bc5c196d10ae040487ecd1137d9b18c3000775a Reviewed-on: https://chromium-review.googlesource.com/769730 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 36f34243 2017-11-13T21:41:42 Buffer11: Cache latest buffer storage. This saves needing to scan the list of buffers every time we query the latest buffer storage. Should slightly improve speed. BUG=angleproject:1155 Change-Id: I6be8457aca1ee5aa871090241e6f67ae16b094a5 Reviewed-on: https://chromium-review.googlesource.com/761242 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Brandon Jones 8d6af086 2017-11-08T09:14:06 Use dedicated ALPHA passthrough shader ANGLE previously used the RGBA passthrough shader for ALPHA copies. This commit adds a dedicated ALPHA shader that will not pass RGB components when doing an ALPHA copy. BUG=angleproject:2239 TEST=angle_end2end_tests Change-Id: I52d1f18a8f968db005cd887803123c17e16df938 Reviewed-on: https://chromium-review.googlesource.com/758717 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 87718a87 2017-11-13T15:01:19 Use more gl::Error in IndexDataManager. BUG=angleproject:2229 Change-Id: I19f7c1600300298e7bc2a1f7dc4215a67053767c Reviewed-on: https://chromium-review.googlesource.com/764674 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho c4eca923 2017-11-13T12:27:23 Fix MSVS 2015 warnings Fix warnings about implicit int to bool conversion and noexcept. TEST=build on MVSV 2015 Change-Id: I437977ca01f62ce2df39872da5903a0338a73bba Reviewed-on: https://chromium-review.googlesource.com/765371 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho bb0775da 2017-11-10T16:20:43 Add flag for turning off initializing variables with loops This flag is needed to toggle upcoming variable initialization mode which uses for loops to optimize the compilation process. Initializing variables using for loops will be turned on by default, but it needs to be turned off in Chromium in certain cases. Chromium will use the flag added in this patch and that code will need to go into Chromium before finishing the implementation in ANGLE. BUG=chromium:735497 Change-Id: I3a0e7b7c6cebe60afa72964fbd0caf3b1eafccbc Reviewed-on: https://chromium-review.googlesource.com/763451 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jeff Gilbert 48590358 2017-11-07T16:03:38 Remove formatType arg from computeCompressedImageSize. BUG=angleproject:2230 Change-Id: Ie291ba05efa89bc4ea52966e975d5a21431a461f Reviewed-on: https://chromium-review.googlesource.com/757877 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 336129f6 2017-10-17T15:55:40 Use a packed enum for buffer targets. BUG=angleproject:2169 Change-Id: I4e08973d0e16404b7b8ee2f119e29ac502e28669 Reviewed-on: https://chromium-review.googlesource.com/723865 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9776035d 2017-11-09T13:08:29 Vulkan: Implement Buffer updates. This allows the app to update Buffer data while the data is in use by the GPU. For instance, uploading new vertex attribute data after a draw call. It introduces a StagingBuffer helper class, similar to StagingImage. These classes are somewhat temporary and could be redesigned. BUG=angleproject:2200 Change-Id: If8634b1411779b16c2bd22cce18a5f37ed958d1c Reviewed-on: https://chromium-review.googlesource.com/756959 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
JiangYizhou 38d92b59 2017-09-13T13:47:52 Workaround Intel driver bug on D3D when renderering with no render target When rendering with no render target on D3D, two bugs lead to incorrect behavior on Intel drivers < 4815. The rendering samples always pass neglecting discard statement in pixel shader. Two bugs are listed bellow, 1. When a framebuffer has no attachments, the pixel shader will be recompiled to drop 'SV_TARGET'. On Intel drivers, when using a pixel shader with no 'SV_TARGET' in a draw, pixels are always generated even if they should be discard by 'discard' statements. 2. When a framebuffer has no attachments, ID3D11BlendState.RenderTarget [].RenderTargetWriteMask were set to 0 in angle. If RenderTargetWriteMask is 0 and rendertarget is not set, then rendering samples also pass neglecting discard statement in pixel shader on Intel. So we add a dummy texture as render target to workaround this issue. BUG=angleproject:2152 TEST=FramebufferTest_ES31.RenderingLimitToDefaultFBOSizeWithNoAttachments/ES3_1_D3D11 TEST=dEQP-GLES31.functional.fbo.no_attachments.* TEST=dEQP-GLES31.functional.state_query.integer.max_framebuffer* TEST=dEQP-GLES31.functional.state_query.integer.max_color_texture_samples_* TEST=dEQP-GLES31.functional.state_query.integer.max_depth_texture_samples_* TEST=dEQP-GLES31.functional.state_query.integer.max_integer_samples_* Change-Id: I1cb974703b6c05c39b731d147f7c8c4fb7b5fe68 Reviewed-on: https://chromium-review.googlesource.com/741544 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jiajia Qin 3a9090fa 2017-09-27T14:37:04 ES31: Add BUFFER_VARIABLE and SHADER_STORAGE_BLOCK program interfaces This patch collects the shader storage block members information. It implements getShaderStorageBlockMemberInfo and getShaderStorageBlockSize for OpenGL backend. Meanwhile, it implements BUFFER_VARIABLE and SHADER_STORAGE_BLOCK interfaces for program query. BUG=angleproject:1920 TEST=angle_end2end_tests:ProgramInterfaceTest* dEQP-GLES31.functional.layout_binding.ssbo* dEQP-GLES31.functional.compute.basic.empty dEQP-GLES31.functional.compute.basic.ssbo_rw* dEQP-GLES31.functional.compute.basic.ssbo_local_barrier* dEQP-GLES31.functional.compute.basic.copy_image_to_ssbo_small dEQP-GLES31.functional.compute.basic.copy_ssbo_multiple_groups dEQP-GLES31.functional.compute.basic.copy_ssbo_multiple_invocations dEQP-GLES31.functional.compute.basic.copy_ssbo_single_invocation dEQP-GLES31.functional.compute.basic.copy_ssbo_to_image_small dEQP-GLES31.functional.compute.basic.shared_var* dEQP-GLES31.functional.compute.basic.ubo_to_ssbo* dEQP-GLES31.functional.compute.basic.write_multiple_arr* dEQP-GLES31.functional.compute.shared_var.basic_type.* dEQP-GLES31.functional.compute.shared_var.work_group_size.* dEQP-GLES31.functional.atomic_counter.* Change-Id: Ie8b81fde5a2e919aab77adb3d137c9ff2f193409 Reviewed-on: https://chromium-review.googlesource.com/712235 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 225bfa95 2017-11-10T10:53:57 Always update HALF_FLOAT_OES type to HALF_FLOAT on Desktop GL. TEST=webgl_conformance_gl_passthrough_tests on Linux/Windows BUG=angleproject:2231 Change-Id: I17c7d693e2b75726e2478925e0f22963de6ab819 Reviewed-on: https://chromium-review.googlesource.com/763987 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jeff Gilbert 9e888a46 2017-11-06T21:34:22 Fix HALF_FLOAT/HALF_FLOAT_OES selection with the ES3 backend. Found via TextureUploadFormatTest. BUG=angleproject:2231 Change-Id: I8f214c4cfe3d8fead9226db20e57f6e6039b5b44 Reviewed-on: https://chromium-review.googlesource.com/756642 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jeff Gilbert f5b8ba6b 2017-11-06T19:15:25 Set TextureGL dirty bits when workaround usage of levels changes. Previously, we wouldn't update the dirty bits when switching from a workarounded alpha/alpha/uint8 (r8/red/uint8) to something else. Found via TextureUploadFormatTest. BUG=angleproject:2232 Change-Id: Idba63282f8a65daec5675798d3516345ca941447 Reviewed-on: https://chromium-review.googlesource.com/756641 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 661fc487 2017-10-16T12:17:05 Work around NVIDIA GLSL vector-scalar op bug This adds a new AST transform VectorizeVectorScalarArithmetic. The AST transform works around incorrect handling of certain types of GLSL arithmetic operations by NVIDIA's GL driver. It works around only the most common cases where the bug reproduces, since detecting all the cases would take more sophisticated analysis of the code than what is currently easily implementable in ANGLE. When a float add operator has both vector and scalar operands, the AST transform turns the scalar operand into a vector operand. Example: vec4 f; f += 1.0; gets turned into: vec4 f; f += vec4(1.0); When a vector constructor contains a binary scalar float multiplication or division operation as its only argument, the AST transform turns both operands of the binary operation into vector operands. Example: float f, g; vec4(f * g); gets turned into: float f, g; vec4(vec4(f) * vec4(g)); Another example with compound assignment: float f, g; vec4(f *= g); gets turned into: float f, g; vec4 s0 = vec4(f); (s0 *= g, f = s0.x), s0; This latter transformation only works in case the compound assignment left hand expression doesn't have side effects. BUG=chromium:772651 TEST=angle_end2end_tests Change-Id: I84ec04287793c56a94845a725785439565debdaf Reviewed-on: https://chromium-review.googlesource.com/721321 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 73dcc60c 2017-11-08T16:41:52 Support more always-available extensions in ContextNULL. Add some extensions that are required by the passthrough command decoder and exposed on all other ANGLE backends. BUG=781164 Change-Id: Ie83143effd2460122e7a093c658f217fb460d8b2 Reviewed-on: https://chromium-review.googlesource.com/759132 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Sami Väisänen 935cb7c5 2017-11-08T15:53:41 Support B8G8R8A8_UNORM_SRGB as D3D11 texture format Support B8G8R8A8_UNORM_SRGB as D3D11 texture format. BUG=angleproject:2172 Change-Id: I2f15a55123601735d7fc6caa40bb056243a91b44 Reviewed-on: https://chromium-review.googlesource.com/758600 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 3fb0ca02 2017-11-07T18:06:12 Move LazyResource::resolveImpl to the cpp. This avoids a compile error where GCC is not compatible with MSVS and Clang, who can both handle calls to forward declared functions in templates. It explicitly specializes LazyResource for the used template types. BUG=angleproject:2182 Change-Id: Iedb1f157d0662b0ea4472c9b4e85828217be577e Reviewed-on: https://chromium-review.googlesource.com/757758 Reviewed-by: Jeff Gilbert <jgilbert@mozilla.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6db1c2e8 2017-11-08T09:17:40 Link interface blocks in ProgramImpl::link. This allows the back-end to have access to the interface block info in the link operation, and also allows the interface block info to have direct access to the post-link Impl information. BUG=angleproject:2208 Change-Id: Ib2bfb3c9155eee715bd3d29de1c3fdd67b16eed4 Reviewed-on: https://chromium-review.googlesource.com/753521 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez cda6af19 2017-10-30T19:20:37 Split pixelBuffer from pack/unpack state This will refactor will help use packed enums for buffer targets. BUG=angleproject:2169 Change-Id: Ie7ed3e105f89457c67027e6598d7e29503ad355c Reviewed-on: https://chromium-review.googlesource.com/745181 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 29a20992 2017-11-06T18:23:16 Add back dirty bits for pack / unpack buffer binding BUG=angleproject:2169 Change-Id: I8cee9e1c7565d90022216d62b45f0eec5bc51f14 Reviewed-on: https://chromium-review.googlesource.com/755461 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 7af0de52 2017-11-06T17:09:33 Rename UniformLinker.cpp/h to ProgramLinkedResources. A more general name for a file that will house a collection of pogram variable related linking code. BUG=angleproject:2208 Change-Id: I82710f6abadd2df58fb58a3c4179989fe956e7e4 Reviewed-on: https://chromium-review.googlesource.com/755858 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 1734e171 2017-10-27T15:30:27 Only store innermost array offset in VariableLocation Separate entries will be generated for each innermost array of arrays of arrays in the variable tables. Because of this VariableLocation actually only needs to store the innermost array index. BUG=angleproject:2125 TEST=angle_end2end_tests Change-Id: Id1ee35b3cecfc011d96b58e43cf0b1cccbfed408 Reviewed-on: https://chromium-review.googlesource.com/741742 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c9727f31 2017-11-07T12:37:07 Pass InterfaceBlockLinker to ProgramImpl::link. This change is in preparation for moving the linking logic to the Implementation. Introduces a ProgramLinkedResources class that is passed into the Impl and holds linking-related info such as the UBOs, Varyings, etc. BUG=angleproject:2208 Change-Id: I2ef0824b54bfb462c79d003bffe34e9cfad60d8a Reviewed-on: https://chromium-review.googlesource.com/746204 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5b09d90d 2017-11-06T12:06:24 Skip RedefineBufferInUse Vulkan test on Win/Intel. Also cleans up GenerateWorkarounds a bit for D3D11. BUG=angleproject:2221 Change-Id: I01667f850051045006d3439406aac3f4d094a374 Reviewed-on: https://chromium-review.googlesource.com/754915 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang a579ded1 2017-11-06T10:45:45 Extend BGRA8 glGetInternalformativ workaround to ES drivers. Some ES drivers also generate INVALID_ENUM errors when querying this format, particuarly on linux Mesa+nouveau. BUG=angleproject:2219 Change-Id: I7b9cf9b003a0125fabdda63038b4c8941710e1db Reviewed-on: https://chromium-review.googlesource.com/754329 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jeff Gilbert 20c285ec 2017-10-31T19:01:09 callClearTwiceOnSmallTarget is needed for all sizes. Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1325733 BUG=angleproject:2214 Change-Id: I6837a0fbf0bbbd0877f333f0625729445a5999aa Reviewed-on: https://chromium-review.googlesource.com/748320 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 1f0b468c 2017-11-05T19:56:28 StateManagerGL: Fix reserved indexed buffer count. We were reserving the count of shader resource limits instead of API- side binding limits. This fixes a broken dEQP test that was only showing up in some device configs. Also add an ASSERT. See: dEQP-GLES31.functional.layout_binding.ubo.fragment_binding_max_array BUG=angleproject:1920 Change-Id: I993ebc7993cc3cc78e90f74e097c0bbab9d03909 Reviewed-on: https://chromium-review.googlesource.com/754721 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho d255123c 2017-10-26T20:03:33 Store shader interface variables as per query spec GLES 3.1 section 7.3.1.1 specifies how active variable entries should be generated and how active variables are named. The specs for program interface variable queries are built on top of this section. ANGLE has already followed this spec for the most part for generating variable lists in ProgramState, but now we also follow the naming spec for arrays and include [0] at the end of the stored name. This will make implementing arrays of arrays more straightforward. Most logic for variable queries will just keep working as is when arrays of arrays are added instead of needing more complex logic for handling array indexing. BUG=angleproject:2125 TEST=angle_end2end_tests Change-Id: I3acd14253153e10bc312114b0303065da2efb506 Reviewed-on: https://chromium-review.googlesource.com/739826 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill c67323a9 2017-11-02T23:11:41 Squash State dirty bits to below 64. This will dramatically speed up performance on 64-bit systems due to the efficiency of angle::BitSet64. Improves performance of the GL back-end on benchmarks quite a bit. Squashes the Pack and Unpack states together. Also moves the current value dirty bits to a single dirty bit, with a separate set for each attribute. Also squashes a multisample dirty bit. Also fixes an incorrect dirty bit in StateManagerGL. We may want to implement a semi-fast version of BitSet64 for 32-bit systems if we find performance is not satisfactory. BUG=angleproject:2188 Change-Id: I4616782bf75413252ede3e3ac752b9ccdb9aab49 Reviewed-on: https://chromium-review.googlesource.com/722423 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1d7be50a 2017-10-29T18:06:50 Vulkan: Upgrade RGB8 textures to RGBA8. It's unlikely any real hardware supports this format. Hack in a fixed fallback format for RGB8. We could consider implementing conditional support by checking the VkPhysicalDevice properties. This extends the Vulkan format support info in the RendererVk class to distinguish between a Buffer and Texture format. This is closely related to how Vulkan has separate format support bits for Linear Textures, Optimal Textures, and Buffers. We probably won't need to keep separate caps for Linear/Optimal, but it makes sense for Buffers to eventually use the same format tables. BUG=angleproject:2207 Change-Id: I8d427a99db15b314b13dd99f31aa1ac5055f0881 Reviewed-on: https://chromium-review.googlesource.com/742376 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 7b62cf97 2017-11-02T15:20:49 Refactor TextureFormatMap to store an array. std::map lookups are already showing up as a hot spot during some profile trace analysis. We can elimintate these by only doing a single switch at the entry point level to convert the GL internal format to an internal identifier or type info pointer. This change doesn't completely fix the hot spot, since now we are doing multiple switch statements, but it does remove the std::map storage in TextureCapsMap. It replaces it with a flat std::array indexed by angle::Format::ID, and gives us the option in the future to eliminate all by one switch statement. This should allow for a faster texture caps implementation in Vulkan. This also fixes the missing ANGLE format entries for ETC1 compressed formats. BUG=angleproject:2207 Change-Id: I74ea2082e582a6790d5fde90e33246a618a2da0e Reviewed-on: https://chromium-review.googlesource.com/742375 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 0741c0f1 2017-11-02T12:57:58 Add missing reset to GL multi-view dirty bits. This missing clear was costing quite a bit of performance on any use case that called for a lot of state changes. BUG=angleproject:2188 Change-Id: I98fa6c21728c1655fa9e1019ddc10ccfbdb594d8 Reviewed-on: https://chromium-review.googlesource.com/722422 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6a89d227 2017-11-02T11:59:51 Vulkan: Refactor format table. This moves the Vulkan format table to dynamically generated, but keeps it easily indexed. Because Vulkan format support is not able to be fully determined until runtime, we'll need a dynamic way to build the table. The most straight-forward way seems to be to keep a copy of the full table in the Renderer. Initializing it once at startup makes it a bit slower to init, but saves us from any threading shenanigans with lazy init when (and if) we ever support multi- threaded Contexts. BUG=angleproject:2207 Change-Id: Ib1ac879daa562c7ad1a965390be401fa2314e42c Reviewed-on: https://chromium-review.googlesource.com/742374 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill a8b73ed0 2017-11-02T09:22:29 Add a meta-script to run code generators. This script calls all the various GL and back-end python scripts to generate our internal format tables and entry points, etc. It uses a GYP-like scheme of inputs/outputs to check modified time before running the generators. It also will automatically call 'git cl format' if any generator was called. Also updates the copyright in a couple of touched files. BUG=angleproject:2207 Change-Id: I4187a7622accc1c97a8d779b8f87fe00b74855ea Reviewed-on: https://chromium-review.googlesource.com/742372 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e1f3ad4d 2017-10-28T23:00:42 Vulkan: Add vk::GetImpl helper. Using reflection helpers, we can avoid having to pass the return type to the GetImpl method. BUG=angleproject:2200 Change-Id: Id160fbdf0ea8b3de2f219d3cc92394c678189a48 Reviewed-on: https://chromium-review.googlesource.com/742371 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 7bd16666 2017-10-28T19:40:50 Vulkan: Allow in-flight Framebuffer changes. This allows the app to alter Framebuffer attachments while there are existing command buffers using the resources and attachments. BUG=angleproject:2200 Change-Id: I3298dafef5e3bd2c6efda8e8a32a6cf7febc13dc Reviewed-on: https://chromium-review.googlesource.com/742370 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 526543cb 2017-10-28T10:59:16 Vulkan: Fix deleting in-use Framebuffer. BUG=angleproject:2200 Change-Id: I13d661b690a6a9e67b3e8a27f9d7bd4126dca87f Reviewed-on: https://chromium-review.googlesource.com/742749 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 86f8116b 2017-10-30T15:10:45 Make compressed texture format extensions enableable. Fix allowing CompressedTexSubImage calls on ETC1 texture types (disallowed in the extension spec). BUG=angleproject:1523 Change-Id: Ic90175ff4626da0170b6c94f204a9d31fd0154a7 Reviewed-on: https://chromium-review.googlesource.com/744443 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 1b038241 2017-11-01T15:14:36 Vulkan: Support Texture redefinition. Because initializing the texture can queue a copy from a staging vk::Image, we must ensure we're not in a render pass. To make this easier we move the current render pass tracking into the RendererVk from the FramebufferVk class. (Note: in the future we will have deferred command submission and this will become unnecessary.) BUG=angleproject:2200 Change-Id: Ide8d4d70b50efbd79bbfa7006ad75cbc57cdf4c7 Reviewed-on: https://chromium-review.googlesource.com/741549 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 91ab54b6 2017-10-30T15:12:42 Make ANGLE_texture_usage enableable. BUG=angleproject:1523 Change-Id: I4e6e4ec6ae7cfb616869373b62dc455d0c5c8c09 Reviewed-on: https://chromium-review.googlesource.com/744444 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 8724e254 2017-10-28T10:44:40 Vulkan: Fix re-creating buffer storage. BUG=angleproject:2200 Change-Id: Id60e857517cce9c0bfa272e4e6a399f236e395f7 Reviewed-on: https://chromium-review.googlesource.com/741548 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 25301b60 2017-10-28T20:59:31 Remove WrappedObject::retain. With resources being mostly deleted by the Renderer along with a serial number, the retain move semantics weren't very useful. Refactoring change only. BUG=angleproject:2200 Change-Id: I7b72b1decfa7604cdd767e7d9b5213b9383eb240 Reviewed-on: https://chromium-review.googlesource.com/742369 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 4751aabb 2017-10-30T15:14:52 Fix minor issues with ANGLE_texture_rectangle. * Some texture parameters were not initialized correctly. * Binding points were not created for enableable texture extensions. BUG=angleproject:1650 BUG=angleproject:1523 Change-Id: Id3436fe1dbb4069eafad97e722ac519a6b59e5db Reviewed-on: https://chromium-review.googlesource.com/744446 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 3590555d 2017-11-01T10:27:09 Revert BGRA renderability change for ES drivers. While these should be supported on ES drivers, ANGLE's texture format caps generation does not correctly differentiate between renderbuffer and framebuffer attachment formats and leads to assertion failures. BUG=779346 BUG=angleproject:1523 Change-Id: I9a49abdf52ae8b1ef91f88a4434ff8c3f95b025b Reviewed-on: https://chromium-review.googlesource.com/748888 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>