src


Log

Author Commit Date CI Message
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>
Olli Etuaho ebee5b3b 2017-11-23T12:56:32 Add GLSL support for runtime-sized arrays in SSBOs The GLSL parser now allows a runtime-sized array as the last member in a shader storage block. Clamping indexing against the memory bounds is done by determining the array length at runtime. Runtime-sized arrays are used in dEQP tests for many compute shader tests, so these now work on the OpenGL backend. BUG=angleproject:1951 TEST=angle_unittests, dEQP-GLES31.functional.shaders.linkage.shader_storage_block.* dEQP-GLES31.functional.shaders.builtin_functions.*compute* Change-Id: Ibecca24623ca8e4723af6f0e0421fe9711ea828d Reviewed-on: https://chromium-review.googlesource.com/787976 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Yunchao He cddcb59e 2017-11-13T15:27:35 ES31: Fix the issue when rendering against compute program. It is a undefined behavior in gles spec, but we should generate an error. This change also refactored the coding style for shader in the test. BUG=angleproject:2260 Change-Id: I7b480e8b66486d9954f7c7f6e8683298e94b6ad7 Reviewed-on: https://chromium-review.googlesource.com/764797 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@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>
Jiajia Qin ed2e6aa5 2017-11-23T17:17:17 GLES31: Use more compact entry point style. This migrates to the new generation style used in GLES2 and GLES3. BUG=angleproject:2254 Change-Id: I10afa1f006ff68e8bafda2bd45dd9a048f8f7dff Reviewed-on: https://chromium-review.googlesource.com/787172 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
Jiajia Qin cb59a909 2017-11-22T13:03:42 GLES31: Auto-generate entry points source. BUG=angleproject:2254 Change-Id: If9071066571f09902657528053e4af68b7dcdd2d Reviewed-on: https://chromium-review.googlesource.com/781105 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 7881cfdf 2017-08-23T18:00:21 Add parsing of arrays of arrays This changes the grammar so that multiple array sizes can be chained together, and adds arrays of arrays support to TPublicType. In TPublicType the array sizes are stored using a pointer to a vector, a plain vector won't work due to bison restrictions. A larger subset of program interface query tests now pass. Some are still failing due to unrelated bugs. BUG=angleproject:2125 TEST=angle_unittests, angle_end2end_tests, dEQP-GLES31.functional.shaders.arrays_of_arrays.* dEQP-GLES31.functional.uniform_location.nested_array.* dEQP-GLES31.functional.program_interface_query.* dEQP-GLES31.functional.ubo.*level*array.* Change-Id: Iee16477a3752b953f5068c0473a2ed62fead8155 Reviewed-on: https://chromium-review.googlesource.com/633944 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@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>
Olli Etuaho 1f73b7c6 2017-11-23T16:31:22 Add separate entries for inner arrays in block layout Generating separate entries for array of array members in blocks is needed so that block member queries work correctly. This change will be tested more fully once support for parsing arrays of arrays lands in the compiler. BUG=angleproject:2125 Change-Id: I052837ddd4ee44a5c2390d3af44c0f1d21fa5fc7 Reviewed-on: https://chromium-review.googlesource.com/787975 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jiajia Qin 5451d532 2017-11-16T17:16:34 Refactor ES31 entry points BUG=angleproject:2254 Change-Id: I4e837a831e0950330b243bd8aa01831af0a70cc4 Reviewed-on: https://chromium-review.googlesource.com/775604 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
Geoff Lang e51ba63b 2017-11-21T11:45:25 Optimize Texture initialization tracking with extra caching. In both Texture and State, track when all images/textures are initailized so that State::clearUnclearedActiveTextures can early-exit. Improves performance on the WebGL Aquarium by 26% (23->29 FPS) with 30000 fish. BUG=angleproject:2188 Change-Id: Ie2860a81d7be19ee87262325d8cf27bde43f80b8 Reviewed-on: https://chromium-review.googlesource.com/782339 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
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 902e8c18 2017-11-18T09:34:16 Reland "Make TType store a const char * for mangled name." This is a reland of dc7bffd06b526bbffd3d1c1ddbd6c763a2cc7287 Reland fixes the memory regression by not calling new, instead calling the pool allocator directly. Original change's description: > Make TType store a const char * for mangled name. > > We would only ever use the c_str value from the mangled name. This > makes it easier to make constexpr TTypes. > > Bug: angleproject:1432 > Change-Id: I147b3a85f9b8b2453e2d7f4a713d767b22036cc9 > Reviewed-on: https://chromium-review.googlesource.com/776277 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Kai Ninomiya <kainino@chromium.org> Bug: angleproject:1432 Change-Id: I1aaeea883186b9061955d55f2fa77d27f5d9b725 Reviewed-on: https://chromium-review.googlesource.com/782406 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang c801e359 2017-11-21T13:53:48 Add configurations of the TexturePerf benchmark that use robust init. BUG=angleproject:2188 Change-Id: Ia23b54044a85435c761478bceeb9aac961fac0d1 Reviewed-on: https://chromium-review.googlesource.com/783230 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@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 4f407ce2 2017-11-21T11:52:12 Fix Clang dEQP build on Win. Rolls the build/ repos from Chromium to include the fixed config. Also includes incidental improvements to platform-specific hooks. Bug: chromium:727437 Change-Id: Ia42a30acac1e800e593e304bfc59d86eb0a1e57c Reviewed-on: https://chromium-review.googlesource.com/782340 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 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>
Olli Etuaho 39f74df5 2017-11-20T16:09:57 Remove unreferenced struct types from the AST This expands pruning unreferenced variables so that unreferenced named struct types can also be removed from the AST. Includes a small cleanup in GLSL output so that the output code matching tests can test against clean output. BUG=chromium:786535 TEST=angle_unittests Change-Id: I20974ac99a797e478d82f9203c179d2d58fac268 Reviewed-on: https://chromium-review.googlesource.com/779519 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@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 c7965001 2017-11-20T23:29:11 Revert "Make TType store a const char * for mangled name." This reverts commit dc7bffd06b526bbffd3d1c1ddbd6c763a2cc7287. Reason for revert: Causes a memory leak, detected by ASAN bot: https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/494713 Direct leak of 24 byte(s) in 1 object(s) allocated from: #0 0x847aa2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:92:3 #1 0x193a833 in sh::TType::buildMangledName() const third_party/angle/src/compiler/translator/Types.cpp:545:21 #2 0x193d2e8 in getMangledName third_party/angle/src/compiler/translator/Types.cpp:751:24 #3 0x193d2e8 in sh::TType::realize() third_party/angle/src/compiler/translator/Types.cpp:759 #4 0x1834474 in sh::TCache::getType(sh::TBasicType, sh::TPrecision, sh::TQualifier, unsigned char, unsigned char) third_party/angle/src/compiler/translator/Cache.cpp:89:11 #5 0x1859ac7 in getType third_party/angle/src/compiler/translator/Cache.h:36:16 #6 0x1859ac7 in sh::InsertBuiltInFunctions(unsigned int, ShShaderSpec, ShBuiltInResources const&, sh::TSymbolTable&) third_party/angle/src/compiler/translator/Initialize.cpp:28 Bug: angleproject:1432 Original change's description: > Make TType store a const char * for mangled name. > > We would only ever use the c_str value from the mangled name. This > makes it easier to make constexpr TTypes. > > Bug: angleproject:1432 > Change-Id: I147b3a85f9b8b2453e2d7f4a713d767b22036cc9 > Reviewed-on: https://chromium-review.googlesource.com/776277 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Kai Ninomiya <kainino@chromium.org> TBR=jmadill@chromium.org,kainino@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: angleproject:1432 Change-Id: Ib112a2ce9871a4f4afc53101ac1a3ddd166008cf Reviewed-on: https://chromium-review.googlesource.com/780420 Reviewed-by: Jamie Madill <jmadill@chromium.org>
jchen10 85c93c41 2017-11-12T15:36:47 Refactor VaryingPacking Move all packing related logic from Program to VaryingPacking. Do linkValidateTransformFeedback check first to simplify packing. Make getPackedVaryings collect all required VaryingPackings in one run pass, so that packUserVaryings can focus on packing merely. BUG=angleproject:2241 Change-Id: I5e84e6e4688c80ba7a77a265b8ffaf79f4ddbb87 Reviewed-on: https://chromium-review.googlesource.com/764821 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: 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>
Jamie Madill 2f294c9a 2017-11-20T14:47:26 Add constructors for TMemoryQualifier and TLayoutQualifier. These replace the ::create methods, to facilitate constexpr versions. Also adds a constructor of WorkGroupSize that can be made to be constexpr. Bug: angleproject:1432 Change-Id: I413d1a56102c94d6a383775110a2b850a7532ea0 Reviewed-on: https://chromium-review.googlesource.com/776279 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kai Ninomiya <kainino@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>
Bryan Bernhart (Intel Americas Inc) 491b0d60 2017-11-10T12:48:22 WebGLCompatibility: Allow GL_DEPTH_STENCIL_ATTACHMENT. Permits depth-stencil attachment points for WebGL. BUG=angleproject:2090 Change-Id: I7f5a7c63f2a4a76116ce5639833e5fd8d7f50ffb Reviewed-on: https://chromium-review.googlesource.com/764591 Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho be0e2c0c 2017-11-20T11:38:16 Fix type conversion warnings Warnings about implicit type conversions were showing up as errors on MSVS 2017. TEST=build with MSVS 2017 Change-Id: I5f173a6838da16e96fad134756d31f56890c147b Reviewed-on: https://chromium-review.googlesource.com/778841 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill dc7bffd0 2017-11-18T09:34:16 Make TType store a const char * for mangled name. We would only ever use the c_str value from the mangled name. This makes it easier to make constexpr TTypes. Bug: angleproject:1432 Change-Id: I147b3a85f9b8b2453e2d7f4a713d767b22036cc9 Reviewed-on: https://chromium-review.googlesource.com/776277 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Jamie Madill 90ed1e49 2017-11-17T11:14:43 Reland "Clean up the TType class." This is a reland of 3f286cd1b6e29605a159ee0bd20c76929d4d5a9f Original change's description: > Clean up the TType class. > > Move more methods into the cpp file, and rename member variables to > start with the "m" prefix. > > Also move most of the TPublicType methods into the cpp. > > Bug: angleproject:1432 > Change-Id: Ib11a3c8c6ace654fd52077a317814665f81a7261 > Reviewed-on: https://chromium-review.googlesource.com/776276 > Reviewed-by: Kai Ninomiya <kainino@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> Bug: angleproject:1432 Bug: chromium:786603 Change-Id: I7f91557d9f9065f4aa90130ce30dc27e9f796065 Reviewed-on: https://chromium-review.googlesource.com/777715 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei Shao c622833c 2017-11-16T21:21:56 Re-enable SimpleStateChangeTest.RedefineBufferInUse on Win/Intel Now SimpleStateChangeTest.RedefineBufferInUse can pass on Win/Intel with https://chromium-review.googlesource.com/756959 BUG=angleproject:2221 TEST=angle_end2end_test Change-Id: Ibdb619a61fcaa35c72ff5a22dc6905edf9f0ec7b Reviewed-on: https://chromium-review.googlesource.com/774679 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Zhenyao Mo 758bc6a9 2017-11-18T00:02:09 Revert "Clean up the TType class." This reverts commit 3f286cd1b6e29605a159ee0bd20c76929d4d5a9f. Reason for revert: crbug.com/786603 Original change's description: > Clean up the TType class. > > Move more methods into the cpp file, and rename member variables to > start with the "m" prefix. > > Also move most of the TPublicType methods into the cpp. > > Bug: angleproject:1432 > Change-Id: Ib11a3c8c6ace654fd52077a317814665f81a7261 > Reviewed-on: https://chromium-review.googlesource.com/776276 > Reviewed-by: Kai Ninomiya <kainino@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=jmadill@chromium.org,oetuaho@nvidia.com,kainino@chromium.org Change-Id: Ib3062a71118095a3e58e75bfee2474c2e4ae9431 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:1432 Reviewed-on: https://chromium-review.googlesource.com/777801 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Jamie Madill 3f286cd1 2017-11-17T11:14:43 Clean up the TType class. Move more methods into the cpp file, and rename member variables to start with the "m" prefix. Also move most of the TPublicType methods into the cpp. Bug: angleproject:1432 Change-Id: Ib11a3c8c6ace654fd52077a317814665f81a7261 Reviewed-on: https://chromium-review.googlesource.com/776276 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 3d70ca9c 2017-11-10T16:53:26 Remove unreferenced variables from the AST Unreferenced local and global variables are now pruned from the AST. They will be removed unless their initializer has side effects. The CollectVariables step needs to be run after the pruning, as the pruning may affect which interface variables are statically used. It's also good to gather built-ins that need to be emulated after the pruning, so unnecessary built-in emulation functions are not added to the translator output. This will help handle some dEQP tests for arrays of arrays that have extremely large local arrays that are only used in an array length query. By constant folding the length and pruning unused variables we will avoid adding a large amount of array initialization code to the generated shaders. BUG=angleproject:2166 TEST=angle_unittests, angle_end2end_tests Change-Id: Ic918bfe8f16460bcd6101d73a7a674145f5aeecd Reviewed-on: https://chromium-review.googlesource.com/766434 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 2c7f34c8 2017-10-09T17:18:02 Initialize uninitialized GLSL arrays in a for loop Previously, creating nodes for initializing each single array element could result in memory bloat during translation when dealing with large arrays. The resulting shader could also end up very long. Initialize most arrays using a simple for loop instead. The loop is compatible with ESSL 1.00 Appendix A limitations. An exception is made for fragment outputs, so that they are not indexed by non-constant values. On some platforms using the a loop to initialize variables can cause problems, so we also have a compiler flag for turning this behavior off. The flag was already added earlier for a staggered rollout of this functionality. BUG=chromium:735497 TEST=angle_unittests, angle_end2end_tests, WebGL conformance tests Change-Id: Iec727821d8137db56b440ddbe007879b1b55f61f Reviewed-on: https://chromium-review.googlesource.com/707195 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho bb27c3a1 2017-11-15T16:32:25 Fix VectorizeVectorScalarArithmetic statement insertion The traverser must avoid inserting two statements to the same position on a single traversal, so it doesn't trigger an assert. BUG=chromium:784078 TEST=angle_unittests Change-Id: I855054e62cc1b1cf4e6bb02af527954151c7d0e7 Reviewed-on: https://chromium-review.googlesource.com/771611 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@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>
Yuly Novikov 78413499 2017-11-16T17:36:13 Skip ShaderStorageBufferTest31.AtomicMemoryFunctions on Linux AMD GL BUG=angleproject:2255 Change-Id: I986ee0e674d0f3fc2425c922ca92a3f8d86efb8c Reviewed-on: https://chromium-review.googlesource.com/775816 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Brandon Jones 92a1459f 2017-11-16T10:01:08 Add Regression Test for D3D11 Alpha Passthrough As a follow up to commit "8d6af08 Use dedicated ALPHA passthrough shader", this change adds a regression test that verifies RGB channels are set to zero when performing an ALPHA copy. BUG=angleproject:2239 Change-Id: Icc08deb523c388a0f2cbdcadd1eec69a97fbe136 Reviewed-on: https://chromium-review.googlesource.com/774579 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho b5601eb6 2017-11-15T18:08:04 Only initialize globals if initialization flag is set This avoids the possibility of initializing globals twice in Chromium. Now we also never initialize variables redundantly in case we're writing HLSL output. This was already the intent of the code before, but a mistake had slipped in and the code didn't actually check the output type properly. This also simplifies DeferGlobalInitializers by running it after SeparateDeclarations. BUG=chromium:735497 TEST=WebGL conformance tests Change-Id: I95036a24ac8cf18113755510376a2fca286b3ee6 Reviewed-on: https://chromium-review.googlesource.com/771555 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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>
Jeff Gilbert 0a05df48 2017-11-02T21:39:08 Add TextureUploadFormatTest for texture unpack/upload behavior checks. Also force ANGLE_SKIP_TEST_IF() to require a semicolon. BUG=angleproject:2220 TEST=angle_end2end_tests Change-Id: I2dc777ec75babb8fbb1a2dd8949636c5c05c5767 Reviewed-on: https://chromium-review.googlesource.com/754337 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiajia Qin a3106c58 2017-11-03T09:39:39 ES31: Add atomic memory functions BUG=angleproject:1442 TEST=angle_unittests, angle_end2end_tests dEQP-GLES31.functional.compute.shared_var.atomic* dEQP-GLES31.functional.compute.basic.shared_atomic_op* dEQP-GLES31.functional.ssbo.atomic.* Change-Id: I82b54fde3a852d3bd917b1e19680baa1c28fce4d Reviewed-on: https://chromium-review.googlesource.com/765061 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 39644fee 2017-11-15T16:31:44 Fix Clang build with dEQP. This will require a Chrome-side patch to the build/ folder to enable the new path, with appropriate Chrome-side changes. Bug: chromium:727437 Change-Id: Iae8d8f4caeead703b322abce75c97c7c9d9e1619 Reviewed-on: https://chromium-review.googlesource.com/773021 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 98f9f537 2017-11-15T19:16:19 Skip RenderingLimitToDefaultFBOSizeWithNoAttachments on Linux AMD GL BUG=anglebug:2253 Change-Id: I4c2fc6904f88a6d61c5d847b812a4272a99c1906 Reviewed-on: https://chromium-review.googlesource.com/773063 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@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>
Olli Etuaho 858ff481 2017-11-15T13:41:46 Make isNamelessStruct a member of TType This will be needed outside of InitializeVariables when removing unreferenced variables is added. Named struct type declarations cannot be pruned as easily as they might be referenced later. BUG=angleproject:2166 TEST=angle_unittests Change-Id: If1462abe67e62ae19bde97de3c8f3d15e99ae9ea Reviewed-on: https://chromium-review.googlesource.com/771790 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 10137d59 2017-10-30T15:36:44 Remove crash expectation on dEQP tests after driver fix NVIDIA 387.* drivers do not reproduce the issue anymore, so the test expectations for the previously failing indirect draw tests can be lifted. BUG=angleproject:1659 TEST=dEQP-GLES31.functional.draw_indirect.random.* Change-Id: Iba69821d19bfad8d2f2e81045658f3ef08695c80 Reviewed-on: https://chromium-review.googlesource.com/744021 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@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 08943afd 2017-11-14T16:51:00 Remove huge buffer data test. This is too difficult to implement without mocking new/delete. BUG=angleproject:875 Change-Id: I7cdafe11d26939f14a43bc515454dd5cf70c4a2a Reviewed-on: https://chromium-review.googlesource.com/769849 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang fb7685f4 2017-11-13T11:44:11 Validate texture parameters for >0 after rounding. From the spec (2.3.1 Data Conversion For State-Setting Commands): "Validation of values performed by state-setting commands is performed after conversion, unless specified otherwise for a specific command." BUG=783574 Change-Id: I9edf585a17489ad284bc85a1c3c2236b53ee34d9 Reviewed-on: https://chromium-review.googlesource.com/766569 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 7caa80e7 2017-11-14T15:03:14 Edit tests to reference temporary variables The shader translator is intended to prune unreferenced variables in the future. To maintain test coverage when this is done, most tests that used to have unreferenced GLSL locals and globals are edited to use built-ins or reference the necessary variables instead. BUG=angleproject:2166 TEST=angle_unittests, angle_end2end_tests Change-Id: I3964e7a80d52fc04a95f57e73da6095e433095e8 Reviewed-on: https://chromium-review.googlesource.com/768740 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 5ad52994 2017-11-14T12:43:40 Add generator for EGL proc table. This should improve ANGLE startup time by avoiding creating a large std::map filled with the entry points. BUG=chromium:781460 Change-Id: I20cfdb10b99844d0f60759dda73b729991dc60fe Reviewed-on: https://chromium-review.googlesource.com/768209 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang e8afa902 2017-09-27T15:00:43 Make GL_ANGLE_framebuffer_blit enableable. BUG=angleproject:1523 Change-Id: I5d6df35d2e65be6d73ec6100e3351ba5f9ff53a2 Reviewed-on: https://chromium-review.googlesource.com/688639 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 1d33c219 2017-11-13T10:21:39 Fix standalone mac compilation BUG= Change-Id: I225bd1693f595a64179b8e500cb1e7101fd2e197 Reviewed-on: https://chromium-review.googlesource.com/766472 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 740aa41d 2017-11-14T10:35:35 Fix angle::Platform export definitions. This was only showing up in the GYP build on Windows. BUG=chromium:778918 Change-Id: Ib9db0c928474be887ec1f46d7e99c0a3dedfb9e0 Reviewed-on: https://chromium-review.googlesource.com/768947 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Bryan Bernhart (Intel Americas Inc) f4f293ef 2017-11-06T15:56:29 Harden uniform array index parsing. Add overflow handling when parsing uniform variables. BUG=angleproject:2191 TEST=angle_unittests Change-Id: Ib2a69be1cc11a94420bc923a2aaaef8dc664d562 Reviewed-on: https://chromium-review.googlesource.com/756209 Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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>
Corentin Wallez d5d3099e 2017-11-13T10:21:52 Avoid redundant BindingPointer::set in setBufferBinding BUG=angleproject:2169 Change-Id: I91f099a53b456fc96988839e34733ce09fe38336 Reviewed-on: https://chromium-review.googlesource.com/766473 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 7af63727 2017-11-13T15:03:40 Fix nullptr dereference on struct parameter error Function parameter name string does not necessarily exist, so it's better to use the function name as the token in the error message. BUG=chromium:784158 TEST=angle_unittests Change-Id: I8f3b8604fd702bdc9486b8d721a5f60de1ff3fa7 Reviewed-on: https://chromium-review.googlesource.com/765972 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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>
JiangYizhou 19744529 2017-10-11T16:37:25 Clear up deqp cases for multisampled texture BUG=angleproject:1590 TEST=dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample.* TEST=dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample.* TEST=dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.renderbuffer_storage_multisample Change-Id: Ic5b9867f3588dae4c930e844b1ee2b99467a60ff Reviewed-on: https://chromium-review.googlesource.com/711975 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 703671e9 2017-11-08T17:47:18 Unify extension behavior checks Some supportsExtension and isExtensionEnabled checks are now turned into checkCanUseExtension checks. Using checkCanUseExtension is preferable so that warnings are generated correctly when an extension is used and a warn directive is present. isExtensionEnabled is still used in some places where an error message about the extension could be confusing, particularly when a core spec version adds support for something that is also present in an extension. Also make it possible to disable ARB_texture_rectangle extension using an extension directive. ARB_texture_rectangle extension functionality is enabled by default in GLSL when the extension is supported. BUG=angleproject:2238 TEST=angle_unittests Change-Id: I7455293412ff469f54bc7da79df146e7bc127379 Reviewed-on: https://chromium-review.googlesource.com/760737 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> 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>
Jamie Madill cac94a91 2017-11-10T10:09:32 Optimize ShaderVariable::isBuiltIn. This makes the check a bit faster, by inlining the prefix check. Also some cleanups to ValidateVertexShaderAttributeTypeMatch. BUG=angleproject:2202 Change-Id: Ifeab4cd85a91a1639a461f44776a68ac98c5bd79 Reviewed-on: https://chromium-review.googlesource.com/761240 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tom Anderson 23cd4add 2017-11-10T14:54:37 Add missing include to stddef.h on arm Change-Id: I28771a550a3188993635f55803093fc49590ceb1 Reviewed-on: https://chromium-review.googlesource.com/764887 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 336129f6 2017-10-17T15:55:40 Use a packed enum for buffer targets. BUG=angleproject:2169 Change-Id: I4e08973d0e16404b7b8ee2f119e29ac502e28669 Reviewed-on: https://chromium-review.googlesource.com/723865 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov e3bfefb4 2017-11-10T16:22:37 Align float access in InterleavedAttributeData perf test Used to crash on arm because of unaligned float access in positionColorData BUG=chromium:675997 Change-Id: Iadc705986700248ce3cff9bb33fcd72c94ad1c59 Reviewed-on: https://chromium-review.googlesource.com/764688 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@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>
Geoff Lang ee6884e7 2017-11-09T16:51:11 Generate generic error messages for Error objects without messages. Makes sure that the debug output is fired for all generated errors. BUG=783054 Change-Id: Ia30870cd950c53da892554e0862276d4be5360ac Reviewed-on: https://chromium-review.googlesource.com/761760 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Antoine Labour <piman@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>
Geoff Lang fa125c9e 2017-10-24T13:01:46 Validate GL_COLOR_ATTACHMENT0 separately from the draw buffers attachments. EXT_draw_buffers may not be enabled but the maxColorAttachments cap is always initialized so make sure to validate for the extension instead of just checking that the attachment is in the valid range. BUG=angleproject:2058 Change-Id: I5b48cb496bf96cbc0911295aa5bf87784ce9241b Reviewed-on: https://chromium-review.googlesource.com/735749 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yunchao He 70b715c9 2017-11-07T14:59:15 ES31: Add test for DispatchCompute with rendering program BUG=angleproject:1955 Change-Id: Ib3ee1ead76c83c8dceafba30a1c7526dd0891f8c Reviewed-on: https://chromium-review.googlesource.com/756654 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiawei Shao 3ef06a9f 2017-11-03T18:41:33 Skip hasMappedBuffer check in draw validations in WebGL contexts MapBufferRange, FlushMappedBufferRange, and UnmapBuffer entry points are removed from the WebGL 2.0 API[1], so we don't need to validate if a vertex array buffer or an index buffer is mapped or not in draw validations (ValidateDrawBase and ValidateDrawElementsCommon) in a WebGL context. According to profiling data, hasMappedBuffer weights over 1% (1.12%) CPU times in WebGL Acquarium benchmark (10K fishes, Intel HD630). With this patch, this hot spot has disappeared and no new hot spots are introduced. This optimization can also slightly improve FPS on WebGL benchmarks, or keep the same at least. [1] https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.14 BUG=angleproject:1671 Change-Id: I96e770b19b691e81774cc8e0c1b66b65dcc3cc83 Reviewed-on: https://chromium-review.googlesource.com/753281 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>