src/tests/gl_tests/SimpleOperationTest.cpp


Log

Author Commit Date CI Message
Frank Henigman df4b6316 2018-01-18T18:22:19 Vulkan: Add unmap in BufferVk::getIndexRange. There was a map() without a corresponding unmap(). Add a test which does multiple indexed draws, triggering the problem. BUG=angleproject:2310 Change-Id: Id33d66f24de2005ec3f9958d33ab4c2630b49dc5 Reviewed-on: https://chromium-review.googlesource.com/875318 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 0cbfa586 2018-02-15T14:45:41 Vulkan: Implement basic Renderbuffer attachments. Creating an ImageView for color Renderbuffers allows us to render to them in a RenderPass. We will also need additional functionality to support depth/stencil Renderbuffers. Bug: angleproject:2347 Change-Id: I5d4f7d8242ad4fbca38cb08c0cf6b43edca57c8f Reviewed-on: https://chromium-review.googlesource.com/922456 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Frank Henigman 17448956 2017-01-05T15:48:26 Vulkan: vertex attributes in client memory. Support vertex data stored in client memory passed to glVertexAttribPointer. Only GL_FLOAT data is supported at this time. Includes a simple test. BUG=angleproject:1683 Change-Id: I3bc0cdefe02b02c046b0e85822019a0f1762235e Reviewed-on: https://chromium-review.googlesource.com/425137 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 12eb3d74 2018-02-14T12:34:45 Vulkan: Implement basic Renderbuffer creation. Bug: angleproject:2347 Change-Id: I56edfde2dbc020d5c792cc4f107aa4b9d6b71840 Reviewed-on: https://chromium-review.googlesource.com/905895 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Luc Ferron 2900c3be 2018-02-09T16:02:41 Vulkan: Add culling rasterization states tests and invert front face Bug: angleproject:2352 Change-Id: I0ac83f3173d22a2ee8bc98d2fd7bfa1875d46b8c Reviewed-on: https://chromium-review.googlesource.com/912358 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Luc Ferron f8be756e 2018-02-06T15:59:11 Vulkan: Implement blend states and add a simple test for it Bug: angleproject:2346 Change-Id: I462a2cb29ceda5563f48b4a3cc1d0aa20f4a49fc Reviewed-on: https://chromium-review.googlesource.com/907169 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0e65454d 2018-02-07T14:50:06 Vulkan: Fix circular dependency with resource updates. The old implementation would try to keep recording draw commands to the same framebuffer write operation even if the vertex array buffer data changed. This would lead to a broken dependency graph. Fix this by forcing any current render operations to create a new node in this case, giving a correct command graph. Old design: - render (creates a CommandBufferNode A) - update buffer (creates a CommandBufferNode B which happens after A) - render (to CommandBuffer A, and gives a circular dependency with B) New design - render (CommandBufferNode A) - update buffer (CommandBufferNode B, happens after A) - render (CommandBufferNode C, happens after B) This also renames some methods to try to clarify them. Bug: angleproject:2350 Change-Id: I6559bed4ed3f58f68771662422c5bef6a505282b Reviewed-on: https://chromium-review.googlesource.com/907416 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Luc Ferron 00155d58 2018-02-06T10:48:47 Vulkan: Implement scissor test and add a simple test for it Bug: angleproject:2338 Change-Id: I699189fcd41feca1656c8553fdf4c1078421524d Reviewed-on: https://chromium-review.googlesource.com/904861 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Luc Ferron b5420664 2018-02-02T10:03:22 Add end2end test for GL_TRIANGLE_FAN in SimpleOperationTest Bug: angleproject:2334 Change-Id: Idb4d651ade139372f40d690e523c43b20e859a5e Reviewed-on: https://chromium-review.googlesource.com/899024 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Luc Ferron 22294b04 2018-02-02T10:03:22 Add end2end tests for GL_LINES and GL_LINE_STRIP + Small refactoring in SimpleOperationTest.cpp to share the vertex/fragment shaders for all the tests. + Adjust deqp gles2 expectations to include dEQP-GLES2.functional.draw.draw_arrays.lines.single_attribute Bug: angleproject:2328 Change-Id: I7cab84b7914f503537eb5bfabb7ed58002e19846 Reviewed-on: https://chromium-review.googlesource.com/899046 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
jchen10 191a84a8 2018-01-31T16:09:45 Fix VK_NOT_READY for vkAcquireNextImageKHR The error was not handled, as is the cause for the bug. So far we'd better wait until a valid image index is ready. BUG=angleproject:2301 Change-Id: I49a5545d0f2e0cf6cfbb3f604ab0602f8a131d12 Reviewed-on: https://chromium-review.googlesource.com/895402 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill efb5a5c8 2018-01-29T15:56:59 Vulkan: Fix swaps done right after a clear. We were missing a dependency insertion between the Framebuffer and its attachments, only during clear operations. Also renames a few methods to make them more consistent. Bug: angleproject:2264 Change-Id: Ic3af5b34b6de900ea2cc1b765f8d3d69f7f9a131 Reviewed-on: https://chromium-review.googlesource.com/891985 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 47c9888c 2018-01-08T15:01:11 Skip SimpleOperationTest.DrawQuadAndSwap on Linux Intel Vulkan Was flaky. BUG=angleproject:2301 Change-Id: Id71cf6c43e133810c64535bbde494d12546b0adc Reviewed-on: https://chromium-review.googlesource.com/854978 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill b79e7bb6 2017-10-24T13:55:50 Vulkan: Implement simple render-to-texture. This was mostly working already, just needed to set up a few entry points. BUG=angleproject:2200 Change-Id: I9c13d6d4dd42f23c69a58e42e07e3e28877671a1 Reviewed-on: https://chromium-review.googlesource.com/734237 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 5547b384 2017-10-23T18:16:01 Vulkan: Implement simple static textures. After this change, the SimpleTexture2D sample mostly runs. BUG=angleproject:2167 Change-Id: Ie6d56f890b1aede329e11d1e987d0f8c17a2d0b4 Reviewed-on: https://chromium-review.googlesource.com/720072 Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill de03e003 2017-10-21T14:04:20 Vulkan: Add shader handling for textures. BUG=angleproject:2167 Change-Id: I33940288331a23b940753795e5e43b8cabcb87f5 Reviewed-on: https://chromium-review.googlesource.com/732189 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 76e471e9 2017-10-21T09:56:01 Vulkan: Implement basic uniforms. This implementation adds one descriptor set with two bindings: one for default vertex uniforms and the other for fragment. It adds two corresponding uniform buffers, and the logic for updating the descriptor sets bound to Vulkan. It doesn't handle much in the way of synchronization and dependency management, or uniform update. If there are only vertex or fragment uniforms the empty uniform buffer is omitted from the descriptor set. If both are missing, there is no descriptor set bound. Note that as our implementation progresses we might not be able to initialize our descriptor sets at link time, due to streaming in uniform data. BUG=angleproject:2167 Change-Id: I4ce4c3879ab454114df43bfac8d87ddf817fc045 Reviewed-on: https://chromium-review.googlesource.com/706340 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 6276b922 2017-09-25T02:35:57 Vulkan: Implement basic uniform shader parsing. This is a first step at implementing uniforms with descriptor sets. It does not actually bind uniforms and upload data, but it does implement uniform shader parsing. Uniforms are gathered into a single uniform block which is bound to set 0, with binding 0 for vertex uniforms and binding 1 for fragment uniforms. Also adds a ReplaceSubstring helper to string_utils. Also removes the precision writing from OutputVulkanGLSL since this was generating warnings with glslang. BUG=angleproject:2167 Change-Id: I9ec8351ec1973e583100f99292b0080ee968067b Reviewed-on: https://chromium-review.googlesource.com/699938 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill d03a849d 2017-10-03T15:46:06 Vulkan: Implement very basic DrawElements. This implements getIndexRange for index validation, without any caching. Vulkan does support a version of robust access, but it would require the robust context creation attribute. Also, it differs slight from the OpenGL spec. Also note that this implementation does not create the index buffer with the correct usage bits, but seems to work and doesn't produce an error in the validation layers. We should probably update them. This CL also doesn't impement index support for immediate data, offsets, or the unsigned short index type. BUG=angleproject:2167 Change-Id: I580930f85e23034b483f3ece62eb1faf8024d624 Reviewed-on: https://chromium-review.googlesource.com/681874 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 035fd6b3 2017-10-03T15:43:22 Vulkan: Implement very basic textures. This is a quick implementation which supports only one backing Image and one type of ImageView at a time, for 2D texture only. It also implements a helper class for finding compatible memory pools. It's possible we can keep a cache of memory pool indexes given the guarantees the Vulkan spec has on compatible memory types (see the documentation for VkMemoryRequirements). BUG=angleproject:2167 Change-Id: I1d7a8eaec90f240273ad75194e23430d6d4c5dc1 Reviewed-on: https://chromium-review.googlesource.com/680000 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 2a9e107c 2017-09-22T11:31:57 Vulkan: Support multiple vertex outputs. This is a bit of a hack, similar to how D3D11 works. We need to write output locations in the GLSL shader before we send them to glslang, so we wait until the link call, then string-replace some hard-coded identifeir code to the attribute location determined by ANGLE. This CL also fills in some of the vertex format conversion tables in formatutilsvk.cpp. BUG=angleproject:2167 Change-Id: I2424d0d990bdbcd831a4dd130e61e87d8f8f479f Reviewed-on: https://chromium-review.googlesource.com/677555 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Olli Etuaho a20af6d7 2017-09-18T13:32:29 Use C++11 raw string literals instead of SHADER_SOURCE macro This is better in many ways: 1. It doesn't confuse clang format 2. \n doesn't need to be included after preprocessor directives like the version directive. 3. It's using built-in functionality instead of something custom. Raw string literals should be the preferred way to include shader source in C++ files going forward. BUG=angleproject:2157 TEST=angle_end2end_tests Change-Id: I8b236a6e2d5c25d920297e5bc5b5b143eddeba1f Reviewed-on: https://chromium-review.googlesource.com/671046 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 4c26fc2f 2017-02-24T11:04:10 Vulkan: Initial command queueing implementation. This removes the sychronous operation of the command buffers. It also introduces a serial type for assigning ids to queue operations. This gives us the ability to manage lifetimes of resources and track when they're no longer in use on the device. BUG=angleproject:1898 Change-Id: I91a4836d3098f1d7bd06cd389d88601a3a4826ab Reviewed-on: https://chromium-review.googlesource.com/428352 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill df68a6f0 2017-01-13T17:29:53 Vulkan: Implement a simple graphics pipeline. BUG=angleproject:1580 Change-Id: Iceaed896db22dc9eefa3f1bee7d6142fcfb20368 Reviewed-on: https://chromium-review.googlesource.com/412267 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 8ecf7f9b 2017-01-13T17:29:52 Vulkan: Implement shader compilation. This hooks up the Vulkan GLSL, decorated with locations, to glslang, and then pipes the SPIRV back to the Program implementation for later use when making pipelines to run draw calls. The program compilation tests work now, but don't really test anything other than not generating Vulkan validation layer errors during compilation and shader object generation. BUG=angleproject:1576 Change-Id: I625e42219f4b4d1433dd3109b94e1a2f666ba4bd Reviewed-on: https://chromium-review.googlesource.com/408519 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b8353b01 2017-01-25T12:57:21 Vulkan: Simple buffer creation. This is necessary to initialize vertex arrays. BUG=angleproject:1579 Change-Id: Ic5a232d5cdfaa75b41241901de842e62ff3b173f Reviewed-on: https://chromium-review.googlesource.com/406645 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill cc6ac25e 2017-01-25T12:57:21 GLES: Expose OES_mapbuffer in GLES2 on GLES3. This extension is mandatory for EXT_map_buffer_range support. We can emulate it using GLES 3.0 core map functionality. BUG=angleproject:1751 Change-Id: Idba09ce7276603d5556039f4a49aa0b87cae22aa Reviewed-on: https://chromium-review.googlesource.com/431826 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Austin Kinross 2a63b3f8 2016-02-08T12:29:08 Re-land "Implement EGL_experimental_present_path_angle" - Re-land with clang fix. This allows ANGLE to render directly onto a D3D swapchain in the correct orientation when using the D3D11 renderer. The trick is to add an extra uniform to each shader which takes either the value +1.0 or -1.0. When rendering to a texture, ANGLE sets this value to -1.0. When rendering to the default framebuffer, ANGLE sets this value to +1.0. ANGLE multiplies vertex positions by this value in the VS to invert rendering when appropriate. It also corrects other state (e.g. viewport/scissor rect) and shader built-in values (e.g. gl_FragCoord). This saves a substantial amount of GPU time and lowers power consumption. For example, the old method (where ANGLE renders all content onto an offscreen texture, and then copies/inverts this onto the swapchain at eglSwapBuffers() time) uses about 20% of the GPU each frame on a Lumia 630. Verification: + dEQP GL ES2 tests pass when "present path fast" is enabled + all ANGLE_end2end_tests pass when "present path fast" is enabled BUG=angleproject:1219 Change-Id: I56b339897828753a616d7bae837a2f354dba9c63 Reviewed-on: https://chromium-review.googlesource.com/326730 Tryjob-Request: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill d1c46228 2016-02-08T14:51:18 Revert "Implement EGL_experimental_present_path_angle" Compile failure on Clang/Win: The reason for reverting is: FAILED: ninja -t msvc -e environment.x86 -- "..\..\third_party/llvm-build/Release+Asserts/bin/clang-cl" -m32 /nologo /showIncludes /FC @obj\third_party\angle\src\tests\egl_tests\angle_end2end_tests.EGLPresentPathD3D11Test.obj.rsp /c ..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp /Foobj\third_party\angle\src\tests\egl_tests\angle_end2end_tests.EGLPresentPathD3D11Test.obj /Fdobj\gpu\angle_end2end_tests.cc.pdb In file included from ..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp:7: In file included from ..\..\third_party\angle\src\tests\test_utils/ANGLETest.h:13: ..\..\testing\gtest\include\gtest/gtest.h(1392,16) : error: comparison of integers of different signs: 'const int' and 'const unsigned int' [-Werror,-Wsign-compare] if (expected == actual) { ~~~~~~~~ ^ ~~~~~~ ..\..\testing\gtest\include\gtest/gtest.h(1422,12) : note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned int>' requested here return CmpHelperEQ(expected_expression, actual_expression, expected, ^ ..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp(281,9) : note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<int, unsigned int>' requested here ASSERT_EQ(mWindowWidth * 4, mappedSubresource.RowPitch); ^ ..\..\testing\gtest\include\gtest/gtest.h(1960,32) : note: expanded from macro 'ASSERT_EQ' # define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2) ^ ..\..\testing\gtest\include\gtest/gtest.h(1943,67) : note: expanded from macro 'GTEST_ASSERT_EQ' EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \ ^ BUG=angleproject:1219 This reverts commit 6b3c1db5170450bbc4946d8f18ba0d8619da43a0. Change-Id: Ia67ab82dd13295dc03235d57fa417c73f20a49e6 Reviewed-on: https://chromium-review.googlesource.com/326680 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross 6b3c1db5 2015-12-18T14:01:46 Implement EGL_experimental_present_path_angle This allows ANGLE to render directly onto a D3D swapchain in the correct orientation when using the D3D11 renderer. The trick is to add an extra uniform to each shader which takes either the value +1.0 or -1.0. When rendering to a texture, ANGLE sets this value to -1.0. When rendering to the default framebuffer, ANGLE sets this value to +1.0. ANGLE multiplies vertex positions by this value in the VS to invert rendering when appropriate. It also corrects other state (e.g. viewport/scissor rect) and shader built-in values (e.g. gl_FragCoord). This saves a substantial amount of GPU time and lowers power consumption. For example, the old method (where ANGLE renders all content onto an offscreen texture, and then copies/inverts this onto the swapchain at eglSwapBuffers() time) uses about 20% of the GPU each frame on a Lumia 630. Verification: + dEQP GL ES2 tests pass when "present path fast" is enabled + all ANGLE_end2end_tests pass when "present path fast" is enabled BUG=angleproject:1219 Change-Id: Ib6eeea46bafa6ebce4adada0ae9db3a433b8fc4c Reviewed-on: https://chromium-review.googlesource.com/321360 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang e0cc2a4a 2016-01-20T10:58:17 Enable all angle_end2end_tests targeting OpenGL and OpenGL ES backends. Added failure supressions and filed bugs for failing tests. BUG=angleproject:1145 BUG=angleproject:1289 BUG=angleproject:1291 BUG=angleproject:1292 BUG=angleproject:1293 BUG=angleproject:1296 Change-Id: Ida78ba855500fe8a6ce6154d43ee01520330e3b1 Reviewed-on: https://chromium-review.googlesource.com/322695 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Corentin Wallez d3970de4 2015-05-14T11:07:48 Move ANGLETest back in test_utils, leaving a proxy header for Chromium BUG=angleproject:892 Change-Id: Ibd494813be87e996096077d6e208cc92461b8f49 Reviewed-on: https://chromium-review.googlesource.com/271154 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez ac3ab882 2015-05-12T13:31:28 Temporarily move back ANGLETest in end2end_tests This path needs to a Chrome change before it can change. BUG=angleproject:892 Change-Id: I549737383b9720a2e7d83ee5e3145d71716f04cb Reviewed-on: https://chromium-review.googlesource.com/270457 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 9cb9583e 2015-05-11T10:21:48 Move end2end and standalone tests to gl_tests and egl_tests Also introduce a test_utils directory that contains helpers used for all types of tests. BUG=angleproject:892 Change-Id: I9e1bff895020ffd3a109162283971a290a1098bd Reviewed-on: https://chromium-review.googlesource.com/270198 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>