src/tests/gl_tests/VertexAttributeTest.cpp


Log

Author Commit Date CI Message
Courtney Goeltzenleuchter f3d35f8f 2019-11-22T14:24:52 Suppress flaky failure with Win7/NVIDIA/D3D11 Seeing intermittent failure on this test only on Win7/NVIDIA/D3D11. Suppress for now. Bug: angleproject:4163 Change-Id: Idfa44516a194dcd5710622d11801ce089c1e829d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1931338 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Tobin Ehlis 1a01b4b3 2019-11-11T16:41:07 Refactor end2end test macros This is a foundational CL to enabling the end2end tests on swiftshader. Refactored infrastructure with new ANGLE_INSTANTIATE_TEST_ES* macros that will run tests over all various combinations of all platforms for different ES versions. Just skipping failing tests initially to get the refactor landed. Bug: angleproject:4081 Bug: angleproject:4092 Change-Id: I017f6c3267179e49b6ae08cc7488096b423dcdb5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1904635 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Mohan Maiya 1850492e 2019-10-02T08:23:03 Vulkan: Disable OES_vertex_type_10_10_10_2 on GLES 2.0 - Because of the difference in the SNORM to FLOAT conversion formula between GLES 2.0 and 3.0, OES_vertex_type_10_10_10_2 is disabled when the context version is lower than 3.0. - Modify test conversion formula to be compliant with GLES 3.0 equation Bug: angleproject:3868 Test: angle_end2end_tests --gtest_filter=VertexAttributeTest*Packed*Vulkan Change-Id: I8b85d8146ee05353bc40fa0022f05d6634c33110 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1792197 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop 988f7170 2019-09-30T15:52:37 Vulkan: Base/max level fixes and cleanup This CL cleans up references to base/max level bug and fixes one lingering issue regarding special handling of depth/z for arrayed surfaces. Bug: angleproject:3148 Bug: angleproject:3184 Bug: angleproject:3948 Bug: angleproject:3949 Bug: angleproject:3950 Test: dEQP-GLES3.functional.texture.mipmap.*base_level* Test: dEQP-GLES3.functional.texture.mipmap.*max_level* Test: Texture2DArrayTestES3.DrawWithLevelsOutsideRangeWithInconsistentDimensions Change-Id: Iad72005a111507c50b8be9726adc32285bbae52b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1832757 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop cb16fb5f 2019-08-29T16:53:55 Vulkan: Support texture base and max levels The Vulkan backend uses a vkImage that matches the number of effective levels in the GL texture. This is due to the fact that GL textures can have really strange layouts that only make sense when base level and max level are applied. For instance, take the following layout with disjoint mip levels: Level 0: 4x4 RGBA Level 1: 2x2 RGBA Level 2: 10x10 RGB If base level is set to zero and max level is set to 1, the image is still considered mip-complete: Level 0: 4x4 RGBA ==> Base Level 0 ==> Level 0: 4x4 RGBA Level 1: 2x2 RGBA ==> Max Level 1 ==> Level 1: 2x2 RGBA Level 2: 10x10 RGB If base and max level are then both set to 2, the texture is still considered complete, but of a different size and format: Level 0: 4x4 RGBA Level 1: 2x2 RGBA Level 2: 10x10 RGB ==> Base/Max Level 2 ==> Level 2: 10x10 RGB When the base or max level is changed, we must recreate the vkImage to match the new level count. To support that, we: - Stage updates from the current image to the new image - Only stage updates if there aren't already staged updates for a level - Free the current image and so it can be recreated at the next draw This CL does the following: - Refactors TextureVk::copyImageDataToBuffer to support staging updates without flush - Adds TextureVk::copyImageDataToBufferAndGetData to support previous use model - Adds TextureVk::changeLevels, triggered during syncState, which stages updates and releases the current image. - Updates ImageHelper::flushStagedUpdates to understand base/max levels - Updates TextureVk::ensureImageInitialized and TextureVk::generateMipmap to account for base/max level - Tracks base and max levels in ImageHelper - Adds ImageHelper::stageSubresourceUpdateFromBuffer to support this use case - Adds ImageHelper::isUpdateStaged to determine if changeLevels should propagate data - Makes gl::TextureTypeToTarget available for use outside of ImageIndex - Enables several deqp and end2end tests Bug: angleproject:3148 Test: dEQP-GLES3.functional.texture.mipmap.*base_level* Test: dEQP-GLES3.functional.texture.mipmap.*max_level* Change-Id: I14ca071c9c62eb310dfed7ef9290dc65fc3ff696 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1776933 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Hyunchang Kim d4c75347 2019-09-18T10:49:34 Vulkan: Enable GPU conversion from RGB16F to RGBA16F - Add proper GPU conversion routine when the source and destination format of vertex attribute is half float data type. - Add an end2end test which utilizes half float GPU conversion path. Bug: angleproject:3802 Test: angle_end2end_tests --gtest_filter=*VertexAttributeTest.HalfFloatBuffer* Change-Id: Ia88a4984156f8967796bea3852c3cde714f2acab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1824799 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Mohan Maiya fea65766 2019-09-19T09:30:38 Vulkan: Add support for OES_vertex_type_10_10_10_2 - Add support to CPU/GPU convert vertex formats - Add test cases for type conversion in angle_end2end_tests - Fix a bug in shader script by adding a ceil when calculating bytes Bug: angleproject:3192 Test: angle_end2end_tests --gtest_filter=VertexAttributeTest*Packed1010102* Change-Id: I57bab9fc1c1041cd734746d0e52a33717b635ec0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1788495 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Hyunchang Kim b1580a27 2019-08-27T18:08:56 Vulkan: Set half float vertex format to valid in 2.0 context - OES_vertex_half_float extension requires this patch - Add end2end tests to verify OES_vertex_half_float extension BUG=angleproject:3191 BUG=angleproject:3802 Test: angle_end2end_tests --gtest_filter=*VertexAttributeTest.HalfFloatClientMemoryPointer* 3DMark Icestorm GT1 Change-Id: Ia597021a5ae6b4853ee1199989ec3f9cc23c7fac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1793354 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
James Dong 7e50f4cd 2019-07-25T09:58:51 Vulkan: Fix ES 3.1 vertex attribute bindings When handling dirty bindings, we were treating binding indices as if they were attribute indices, causing strange behavior. This change fixes the dirty bit handler to use the provided index properly and update the attributes that correspond to the binding index. Test: ./angle_end2end_tests --gtest_filter='VertexAttributeTestES31.OnlyUpdate*/ES3_1_Vulkan' Bug: angleproject:3598 Change-Id: I2bc3cd4da5f639a1301776fcf057a74368812c56 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1718786 Commit-Queue: James Dong <dongja@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
James Dong 020abb8b 2019-07-24T11:33:49 Vulkan: invalidate translation buffers for SSBOs Translation buffers weren't being marked dirty after running a compute shader in which they are bound as SSBOs. This change invalidates all SSBOs after a draw or compute call. Bug: angleproject:3739 Change-Id: I66b56df7e619b55afc7e3da6b5613b6d050e06bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1717144 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: James Dong <dongja@google.com>
James Dong 765ee7b7 2019-06-19T14:19:52 Vulkan: support for new vertex attribs in GLES 3.0 Fixes handling of packed vertex formats, adds new overrides for 32-bit [SU](NORM|SCALED) vertex types, and handles half-precision floats correctly. Pixel 2 does not natively support certain 10-10-10-2 vertex formats; this change does not add support for them. Test: ./angle_deqp_gles3_no_gtest --deqp-egl-display-type=angle-vulkan -n 'dEQP-GLES3.functional.vertex_arrays.*' Test: ./angle_end2end_tests --gtest_filter='AttributeLayout*/ES3_Vulkan' Test: ./angle_end2end_tests --gtest_filter='VertexAttribute*/ES3_Vulkan' Bug: angleproject:3193 Change-Id: I5ae4edd743e86e3e89e2697034c04dc4d9ecd1f9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1668230 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: James Dong <dongja@google.com>
Jamie Madill 375ddfc5 2019-07-12T11:12:14 Signal different dirty bit for vertex buffer change. We use new logic to compare if the attribute format changes before setting dirty bits. This improves performance of VBO-only state changes significantly. On the VBO change Vulkan microbenchmark gives about a 30% improvement. Bug: angleproject:3256 Change-Id: Ifaf1c92ed7a09422156ef79b5983e7349de63346 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1684294 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tim Van Patten cc82c3f0 2019-06-21T16:04:24 Vulkan: Enable VertexAttributeTest* for ES3_Vulkan VAO support is present, so this is just enabling the necessary testing. The tests being skipped are being worked on with issue 3193, which is adding support for integer values. Bug: angleproject:3207 Test: VertexAttributeTest end2end tests Change-Id: Ic0bbcc0e05673aece203e93d8765ac8e90dc6a59 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1672445 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Jonah Ryan-Davis fce1e2d1 2019-06-04T15:02:08 Extend eglGetPlatformDisplay to allow feature overrides. Add EGL_FEATURE_OVERRIDES_ENABLED_ANGLE and EGL_FEATURE_OVERRIDES_DISABLED_ANGLE to submit lists of strings naming the features that should be overridden (either enabled or disabled) on display creation. Bug: angleproject:1621 Change-Id: I4bb75c5dbab0e3b701a72069c38f8c60ecfffad2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1646595 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 776694cd 2019-05-08T10:28:55 Change all ANGLE workarounds to use struct definition with info. Change each workaround from a simple bool to a struct with info including name, workaround set, description, and bug IDs. This will help with future workaround integration with Chrome. Bug: angleproject:1621 Change-Id: Ia27c180abaf845e280060c803e5994cc3152a057 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1593917 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5cbaa3f8 2019-05-07T15:49:22 Don't inherit ANGLETest SetUp and TearDown. Instead of inheriting from testing::Test's SetUp and TearDown we add new methods 'testSetUp' and 'testTearDown'. This helps prevent a common error of forgetting to call the base class method. Also add a check in the ANGLETest destructor that SetUp and TearDown have been called. Bug: angleproject:3393 Change-Id: Iab211305cc06ffea9ca649e864ddc9b180f2cba0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1593960 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill ddc4d33a 2019-05-01T15:11:46 Remove several underused platform configs. * Removes D3D11 Warp and Reference configs from tests. * Removes several permutations of OpenGL back-end specific configs. * Removes FL 9_3 since it is no longer supported. * Removes present path "Copy" since it's redundant with normal D3D11. Reduces number of configs from over 60 to 25. Bug: angleproject:3393 Change-Id: Ia5a23de3c4865b17ee50673a4066757b901a4b5a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574675 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b8149075 2019-04-30T16:14:44 Clean up ANGLE test extension functions. None of these functions needed to be member functions. Also make the naming more consistent. Bug: angleproject:3393 Change-Id: I7aafe2269a48af703a87bd9a8cf4cfab9e177dd3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574673 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov d18c048a 2019-04-04T19:56:43 Remove Nexus 5X Vulkan test suppressions. SimpleStateChangeTest.DrawArraysThenDrawElements TextureUploadFormatTest.All VertexAttributeTest.UnsignedByteNormalized VertexAttributeTest.ByteNormalized EXTMultisampleCompatibilityTest.DrawAlphaOneAndResolve was skipped on all Android for unspecified reason in https://chromium-review.googlesource.com/c/angle/angle/+/451877 seems to be passing now. Make some suppressions OpenGL ES specific: MultisampleCompatibilityTest.DrawCoverageAndResolve RobustResourceInitTest.TexImageThenSubImage RobustResourceInitTest.ReadingPartiallyInitializedTexture RobustResourceInitTestES3.MultisampledDepthInitializedCorrectly RobustResourceInitTest.MaskedDepthClear RobustResourceInitTestES3.MaskedDepthClearBuffer RobustResourceInitTest.MaskedStencilClear RobustResourceInitTestES3.MaskedStencilClearBuffer TransformFeedbackTest.OffsetResetOnBeginTransformFeedback Bug: angleproject:3262 Bug: angleproject:3124, angleproject:2657, angleproject:2797 Change-Id: I3ed7a3f0ebbb4598bff75e2b3bd8b3b0630779f8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1572484 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Qin Jiajia 49c9dfe3 2018-12-29T16:48:20 Fix the SSBO sync bug in two dispatch calls We should make sure that the raw buffer is the latest buffer before each dispatch call since the dispatch itself can update the raw buffer content. Bug: angleproject:3037 Change-Id: I75dddfd3e57b3c9cbcc58c02ed057c66cc8e1785 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1392379 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Jamie Madill d51fbe34 2019-01-25T15:03:39 Fold buffer access validation into extensions. We only need to perform vertex array buffer validation if the WebGL compatiblity extension is enabled and robust access is not available. Although sometimes the range checks are useful for determining undefined behaviour they are not required by the OpenGL spec. They also slow down state updates significantly. This migrates the OOR tests into specific WebGL tests. It also requires a change to a Chromium test on the passthrough decoder. Improves perf by about 10% in the Vulkan VBO state change test. Also fixes some robust resource access cases for D3D11. Bug: angleproject:3000 Change-Id: Ice37f38f01c2f27bf32ed55657a30e69d8508335 Reviewed-on: https://chromium-review.googlesource.com/c/1390362 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 611bbaab 2018-12-06T01:59:53 Vulkan: Convert vertex attributes in compute In this commit, VertexArrayVk::convertVertexBuffer() is renamed to VertexArrayVk::convertVertexBufferCpu() to explicitly show it does a CPU readback. A new VertexArrayVk::convertVertexBuffer() function is added that has the same functionality in gpu (with some assumptions, where the CPU fallback is used should those assumptions fail). Currently, the only requirement is that buffer offset/stride are divided by the component size. ConvertVertex.comp is the shader responsible for this conversion, and it implements the functionality in renderer/copyvertex.inc, minus a few functions that are not used in the Vulkan backend. Bug: angleproject:2958, angleproject:3009 Change-Id: I8ec9a5f4672509bcf7b9e352cd27663970ad4653 Reviewed-on: https://chromium-review.googlesource.com/c/1364451 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 35cd7332 2018-12-02T12:03:33 Refactor test shader style. This change enforces a lot more consistency. We pass const char * to the Compile functions instead of std::string. Also fixes the indentation of C++11 block comments to be more consistent. Bug: angleproject:2995 Change-Id: Id6e5ea94055d8cbd420df4ea2e81b2d96cb5ce78 Reviewed-on: https://chromium-review.googlesource.com/c/1357103 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Qin Jiajia fcf10b62 2018-09-19T12:53:18 Fix the regression bug for ComputeBoids The old implementation missed considering compute program would also enter into applyActiveAttribLocationsMask. However, there was no bindVertexArray before updateAttribEnabled which resulted the previous VAO state was modified in unknown. And that's why ComputeBoids example wouldn't work correctly. This change adds a checking to not enter propagateProgramToVAO if it's a compute program since compute shader doesn't have vertex attributes. And an ASSERT is added to make sure that the right VAO is bound when updateAttribEnabled is called in applyActiveAttribLocationsMask. Bug: angleproject:2810 Change-Id: I6e77853498a527ef3b755bbb1da5826a9134b164 Reviewed-on: https://chromium-review.googlesource.com/c/1226227 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
jchen10 5dc0a6f9 2018-09-20T14:30:45 Vulkan: Vertex buffer should be format aligned. The address of each attribute in a vertex buffer must be aligned according to its format. See section 20.3 of vkspec. Currently we don't handle this when using DynamicBuffer as vertex input buffer. This loosely fixes the issue by using max alignment for all formats. BUG=angleproject:2797,angleproject:2405 Change-Id: I2b27950dacc8fda75dcb646ef4b4d66ff27d629a Reviewed-on: https://chromium-review.googlesource.com/1234281 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 624fbdcf 2018-10-01T11:54:05 Refactor CompileProgram utility Tests often need to call gl functions to set up program related state after glCreateProgram has been called but prior to glLinkProgram is called. Add a callback function to the CompileProgram utility function to fulfill this need. This reduces code duplication considerably in several tests. An alternative way to improve CompileProgram would be to split it into several different utility functions. This might be slightly easier to read, but would also be a larger refactoring and require more checks at the call site. This will make it easier to implement EXT_blend_func_extended tests, which need to bind fragment outputs to different slots. BUG=angleproject:1085 TEST=angle_end2end_tests Change-Id: I3ac8b7bdc21c6a1f14517bc7df0cf6f35abd7612 Reviewed-on: https://chromium-review.googlesource.com/1254062 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Will Harris 63aa0e5b 2018-09-05T16:15:46 Fix 64-bit -> 32-bit implicit conversions in libangle. ../../third_party/angle/src/libANGLE/renderer/gl/StateManagerGL.cpp(910,63): warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long long') to 'GLuint' (aka 'unsigned int') [-Wshorten-64-to-32] const gl::ImageUnit &imageUnit = glState.getImageUnit(imageUnitIndex); ~~~~~~~~~~~~ ^~~~~~~~~~~~~~ ../../third_party/angle/src/libANGLE/renderer/gl/StateManagerGL.cpp(914,30): warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long long') to 'GLuint' (aka 'unsigned int') [-Wshorten-64-to-32] bindImageTexture(imageUnitIndex, textureGL->getTextureID(), imageUnit.level, ~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~ ../../third_party/angle/src/libANGLE/renderer/gl/StateManagerGL.cpp(920,30): warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long long') to 'GLuint' (aka 'unsigned int') [-Wshorten-64-to-32] bindImageTexture(imageUnitIndex, 0, imageUnit.level, imageUnit.layered, imageUnit.layer, ~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~ ../../third_party/angle/src/tests/gl_tests/VertexAttributeTest.cpp(1080,66): warning: implicit conversion loses integer precision: 'GLsizeiptr' (aka 'long long') to 'GLuint' (aka 'unsigned int') [-Wshorten-64-to-32] glVertexAttribFormat(mTestAttrib, 1, GL_FLOAT, GL_FALSE, inputRelativeOffset); ~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~ BUG=chromium:879657 Change-Id: Ic6e8e5ebc0dc5fd38c15a48a936ceafd5407bba8 Reviewed-on: https://chromium-review.googlesource.com/1208315 Commit-Queue: Will Harris <wfh@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0a17e484 2018-08-31T17:19:11 Vulkan: Fix sync of initially disabled attributes. If an attribute was never enabled or disabled the default state was not properly synced in our implementation. This wasn't caught by currently enabled tests. Those tests are now enabled in VertexAttributeTest. Bug: angleproject:2800 Change-Id: I97c063651911379e16de4ee557d9840782114c54 Reviewed-on: https://chromium-review.googlesource.com/1199724 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 89e82979 2018-08-28T11:32:53 Vulkan: Allow gaps in vertex attributes by packing them. Work around restrictions with setting null vertex buffers on command buffers by binding ranges of non-null buffers. Enable VertexAttributeTest on ES2/Vulkan BUG=angleproject:2792 BUG=angleproject:2797 Change-Id: Ief9db1e60c8c9045a4101abe859302d529decbcb Reviewed-on: https://chromium-review.googlesource.com/1194282 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 8707af51 2018-08-23T15:49:14 Add a test case for enabled-but-inactive vertex attributes Bug: angleproject:2138 Change-Id: Ia5331845d34f60a31280e6da041d13dc3da29232 Reviewed-on: https://chromium-review.googlesource.com/1187364 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 88602e6e 2018-08-08T12:49:30 Fix vertex array element limit condition. Certain overflows wouldn't be detected when the attribute size was less than the attribute size and we were drawing a small number of vertices. Fix this and also set the sentinel value for an integer overflow to be negative maxint instead of -1 to more effectily distinguish the cases. Bug: angleproject:1391 Change-Id: I970d5e2a630c0a84c2c02ac0ac41ab1a395819fe Reviewed-on: https://chromium-review.googlesource.com/1162264 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiawei Shao 6a5d98c4 2018-05-04T15:42:20 ES31: Implement Vertex Attrib Binding on D3D11 This patch implements Vertex Attrib Binding on D3D11 and enables all the test cases related to Vertex Attrib Binding on D3D11 back-ends. On D3D11 back-ends the information in both GL vertex attributes and bindings should be updated together. When a binding is dirty, we need to find out and update all the attributes that are using this binding. To speed up this process, this patch adds a map from each binding to all the attrib indexes that are using this binding. This map may be updated when VertexAttribBinding is implicitly or explicitly called. With this map we can easily get all the attributes that should be updated with the current dirty binding. This patch also removes some unused variables in VertexArray11.cpp. BUG=angleproject:2700 TEST=dEQP-GLES31.functional.vertex_attribute_binding.* angle_end2end_tests Change-Id: I9a28ec357fd3aba835812cecc410cfa4e3734f0c Reviewed-on: https://chromium-review.googlesource.com/1048980 Commit-Queue: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho ebd6e2df 2018-03-23T17:07:55 Take all attributes into account when checking for aliasing This makes ANGLE to follow GLSL ES 3.00.6 spec section 12.46. The spec requires that all attributes are taken into account when checking for aliasing, regardless of if they are active or not. WebGL 2.0 spec was also recently changed to reflect GLSL ES 3.00.6 correctly. Aliasing checks for GLSL ES 1.00 shaders are left as-is. BUG=chromium:829541 TEST=angle_end2end_tests, WebGL conformance tests Change-Id: I71c36ac123f18dadf075e81f93af29321c15136b Reviewed-on: https://chromium-review.googlesource.com/1005077 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Yunchao He 9550c603 2018-02-13T14:47:05 Code refactoring for end2end tests. This change: 1) uses the new style ANGLE_SKIP_TEST_IF to skip tests. 2) replaces compile-time definition for OSX to skip tests by run-time function IsOSX() to skip tests, in order to align with ANGLE_SKIP_TEST_IF. 3) fixes a couple of typos. BUG=angleproject:2005 Change-Id: I5af77d82257536b9eb79e26afa502f5b91ff6d31 Reviewed-on: https://chromium-review.googlesource.com/915861 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Yunchao He 8e5ba8bb 2018-02-05T17:52:27 Clean up end2end tests for Intel Linux platform. Removed tests can pass on Intel Linux Desktop (Intel KabyLake, Ubuntu 17.04) with system default mesa and latest upstream mesa. BUG=angleproject:2205 BUG=chromium:680631 Change-Id: Ie3f0f34b9708a7dab81f66d9ec83a469658deee7 Reviewed-on: https://chromium-review.googlesource.com/901382 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 9088557f 2017-10-30T20:43:38 D3D11: Fix dirty current value updates. Fixes a bug where subsequent updates to a "current value" (disabled) Vertex Attribute would not trigger the state change to D3D11 such that the updated buffer handle would be applied to D3D11. Also adds a test to cover the problem case. This bug was introduced in 2bc947334cad: "D3D11: Minor optimizations to vertex attribute application." BUG=chromium:779675 BUG=angleproject:1155 Change-Id: Ib0447231fb6969e7dad1e1e576315cab91acf4f4 Reviewed-on: https://chromium-review.googlesource.com/744924 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiajia Qin 8a7b3a0c 2017-08-25T16:05:48 Reland 'Remove IndexRange retrieving in validation' This change adds GL_KHR_robust_buffer_access_behavior support. The old change is in https://chromium-review.googlesource.com/c/angle/angle/+/607413 BUG=755897, angleproject:1393, angleproject:1463 Change-Id: I04a1132c3ae8d3a766194df61c4ff7bf0b084f03 Reviewed-on: https://chromium-review.googlesource.com/640750 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez c1346fba 2017-08-24T16:11:26 Revert "Remove IndexRange retrieving in validation" This reverts commit 59d9da089580afac175ff5f1a932b987c9d194d6. Reason for revert: <INSERT REASONING HERE> Original change's description: > Remove IndexRange retrieving in validation > > This change can improve the performance of drawElements which uses > the path without translation. > Paste a set of mean data (repeated 30) for reference on Intel skylake > Win10 desktop. > DrawElementsPerfBenchmark.Run/d3d11: > before after > mean: 13644.4666667 -> mean: 13887.8333333 > DrawElementsPerfBenchmark.Run/d3d11_index_buffer_changed: > before after > mean: 45.8 -> mean: 46.3666666667 > > BUG=755897, angleproject:1393 > > Change-Id: I11f5db25445346958dfef52b1d23df5483cda32f > Reviewed-on: https://chromium-review.googlesource.com/607413 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=geofflang@chromium.org,jmadill@chromium.org,jiajia.qin@intel.com Change-Id: I4b00af2c32af36aa978ac2fddcf7514134497cf3 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 755897, angleproject:1393 Reviewed-on: https://chromium-review.googlesource.com/633296 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Qin Jiajia 59d9da08 2017-08-09T16:59:17 Remove IndexRange retrieving in validation This change can improve the performance of drawElements which uses the path without translation. Paste a set of mean data (repeated 30) for reference on Intel skylake Win10 desktop. DrawElementsPerfBenchmark.Run/d3d11: before after mean: 13644.4666667 -> mean: 13887.8333333 DrawElementsPerfBenchmark.Run/d3d11_index_buffer_changed: before after mean: 45.8 -> mean: 46.3666666667 BUG=755897, angleproject:1393 Change-Id: I11f5db25445346958dfef52b1d23df5483cda32f Reviewed-on: https://chromium-review.googlesource.com/607413 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill abf66fb3 2017-08-23T11:58:27 D3D11: Use dirty bits for applyVertexBuffers. If the vertex array has any dirty or dynamic attribs, we must do an update. Similarly, if a prior state change has left the vertex state invalidated, we do an update. For instance, a program change means we need a new input layout. If there was no such invalidation or dirtyness we can skip the call to InputLayoutCache. This improves the performance of the draw call benchmark (with no state changes) by about 50% on the D3D11 null driver. Increases the frames per second count of the aquarium demo with the passthrough command buffer by about 25% on a test machine. BUG=angleproject:1156 Change-Id: I8381999029f5b1912030a3342e96285a58f95e82 Reviewed-on: https://chromium-review.googlesource.com/616784 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 401345e4 2017-08-21T10:52:40 D3D11: Move more state into StateManager11. This moves the input layout cache and vertex and index data managers and related info into the state manager. This makes it easier to manage the state application with regards to dirty bits. Also updates the dirty current value handling in StateManager11. BUG=angleproject:1156 BUG=angleproject:2052 Change-Id: I8de968a1f8416363aa1c49d9e9da129942d21275 Reviewed-on: https://chromium-review.googlesource.com/616783 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shao dde78e8c 2017-05-22T14:13:27 ES31: Implement Vertex Attrib Binding on OpenGL This patch intends to implement Vertex Attrib Binding on OpenGL back-ends: 1. Add supports for updating vertex attributes by Vertex Attrib Binding APIs. 2. Refactor the process of updating vertex attribtues in class VertexArray to make it easier to implement this feature. BUG=angleproject:1593 TEST=dEQP-GLES31.functional.vertex_attribute_binding.* Change-Id: I800e61518c552b94b84c415895ad31668b0a84b2 Reviewed-on: https://chromium-review.googlesource.com/510251 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 231c7f56 2017-04-26T13:45:37 Apply clang-format to many files. This cleans up the formatting in many places. BUG=None Change-Id: I6c6652ebc042f1f0ffecced53582d09d66b4f384 Reviewed-on: https://chromium-review.googlesource.com/487884 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Frank Henigman aa7203ef 2017-05-03T23:32:29 Inherit privately from angle::NonCopyable. Make all inheritance from angle::NonCopyable private so the compiler complains about this (admittedly unlikely) code: class Foo: angle::NonCopyable { virtual ~Foo() { ... } }; angle::NonCopyable *p = new Foo; delete p; In the above code ~Foo() is not called, only ~NonCopyable(), because the latter is not virtual. Making it virtual would add overhead to all derived classes which don't already have a virtual method. Also tighten access in NonCopyable, because we can. BUG=angleproject:2026 Change-Id: Id0dc4d959cfb7bb82cf49382118129abb1d3a4f0 Reviewed-on: https://chromium-review.googlesource.com/495352 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 876429b7 2017-04-20T15:46:24 Update gl2.h and update entry points. Some method signatures were updated. Types like GLclampf and GLvoid were replaced with other equivalents. BUG=angleproject:1309 Change-Id: I05e8e2072c5a063d87ad96a855b907424661e680 Reviewed-on: https://chromium-review.googlesource.com/475011 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shao 4181bc97 2017-03-17T14:55:25 Fix bug in updating vertex attribs with client memory pointers In DEBUG version, when using OpenGL back-ends, ANGLE may meet an INVALID_OPERATION error from driver when attemping to update an attribute which is disabled and using a client memory pointer. This patch fixes this bug by skipping such vertex attributes when updating them to driver. With this patch the process to update vertex attributes should be: (1) For enabled attributes using client memory pointer: update by streaming mode in streamAttributes() (2) For disabled attributes using client memory pointer: just label them dirty and skip them (3) For attributes using buffer objects: update with vertexAttrib*Pointer BUG=angleproject:1942 Change-Id: I57043e5904eb4a342fa22d449d98a957010170d6 Reviewed-on: https://chromium-review.googlesource.com/456747 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Shao 562c9686 2017-04-04T17:28:43 Clean up legacy code in VertexAttributeTest.cpp This patch intends to clean up some coding style issues in VertexAttributeTest.cpp, which is helpful to implement Vertex Attrib Binding. 1. Use std::string directly instead of macro SHADER_SOURCE 2. Use constexpr on constants 3. Use std::array instead of traditional C-style arrays BUG=angleproject:1593 Change-Id: I5b6f6d4fe0e34e82a9fc38cb54932fbc39e19a80 Reviewed-on: https://chromium-review.googlesource.com/467406 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shao 80957d99 2017-02-20T21:25:59 ES31: Implement Vertex Attrib Binding entry points This patch intends to implement all entry points related to Vertex Attrib Binding. (1) Add entry points and validation code on following APIs: - VertexAttribFormat - VertexAttribIFormat - VertexAttribBinding - BindVertexBuffer - VertexBindingDivisor (2) Add queries on following parameters: - VERTEX_ATTRIB_BINDING - VERTEX_ATTRIB_RELATIVE_OFFSET - VERTEX_BINDING_DIVISOR - VERTEX_BINDING_OFFSET - VERTEX_BINDING_STRIDE - VERTEX_BINDING_BUFFER BUG=angleproject:1593 TEST=angle_end2end_tests TEST=angle_unittests TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_relative_offset_* TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_bindings_* TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_stride_* TEST=dEQP-GLES31.functional.state_query.vertex_attribute_binding.* TEST=dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.vertex_attrib_pointer TEST=dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.vertex_attrib_format TEST=dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.vertex_attrib_i_format Change-Id: I4b477a82df6aad89b89b088580a06d66963e6666 Reviewed-on: https://chromium-review.googlesource.com/446124 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Shao 86904b81 2017-03-21T09:30:59 ES31: Add workaround for illegal MAX_VERTEX_ATTRIB_STRIDE on Linux AMD Query of MAX_VERTEX_ATTRIB_STRIDE on some Linux AMD OpenGL drivers returns 0 even if the context is OpenGL 4.4 and 4.5, which is against SPEC and will block the implementation of ES3.1 feature Vertex Attrib Binding. This patch adds the workaround for this bug by choosing an emulated value (2048) as the value of MAX_VERTEX_ATTRIB_STRIDE on Linux AMD OpenGL drivers. BUG=angleproject:1936 TEST=angle_end2end_tests Change-Id: I831bda6cb94b2489d09735622150d35aa1948274 Reviewed-on: https://chromium-review.googlesource.com/457254 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov c1f8d61a 2017-03-10T14:13:06 Disable VertexAttributeTestES31.MaxVertexAttribStride on Linux AMD GL Due to AMD driver bug. BUG=angleproject:1593 Change-Id: Ic1fee717ffb55c67d3c4d0a43848d73ed6794732 Reviewed-on: https://chromium-review.googlesource.com/452940 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Shao 7a0b3044 2017-03-10T10:03:33 Reland "ES31: Add test on large strides" In OpenGL 4.3 there is no limit on the maximum value of stride. This patch choose an emulated value for OpenGL 4.3 to fix the fyi failure on Linux AMD. BUG=angleproject:1593 Change-Id: I83cecc2ed1a3734dc8b8df3edb48ecc16039ba6e Reviewed-on: https://chromium-review.googlesource.com/452746 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang 0bb791ed 2017-03-09T23:44:40 Revert "ES31: Add test on large strides" This is failing on Linux AMD: https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.gpu.fyi%2FLinux_Release__AMD_R7_240_%2F1729%2F%2B%2Frecipes%2Fsteps%2Fangle_end2end_tests%2F0%2Fstdout ../../third_party/angle/src/tests/gl_tests/VertexAttributeTest.cpp:684: Failure Expected: (maxStride) >= (2048), actual: 0 vs 2048 This reverts commit 0ba963ef27d1d656986f2f4382391dd5da8c8104. Reason for revert: <INSERT REASONING HERE> Original change's description: > ES31: Add test on large strides > > ES3.1 requires the implementation should define MAX_VERTEX_ATTRIB_STRIDE, > which should be emulated when we use D3D11 backends. > > This patch adds tests to verify this value required in ES3.1 are > supported to be used directly in glVertexAttribPointer for rendering. > > BUG=angleproject:1593 > > TEST=angle_end2end_tests > > Change-Id: I1ac206e4f6c972b5748552177c787c0adcb66786 > Reviewed-on: https://chromium-review.googlesource.com/441308 > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> > Reviewed-by: Yuly Novikov <ynovikov@chromium.org> > TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org,cwallez@chromium.org,yunchao.he@intel.com,qiankun.miao@intel.com,jiawei.shao@intel.com,yang.gu@intel.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=angleproject:1593 Change-Id: I036da9d6d5633bcc055cc8cfbfde9a15ae67f59c Reviewed-on: https://chromium-review.googlesource.com/452743 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shao 0ba963ef 2017-02-14T22:03:09 ES31: Add test on large strides ES3.1 requires the implementation should define MAX_VERTEX_ATTRIB_STRIDE, which should be emulated when we use D3D11 backends. This patch adds tests to verify this value required in ES3.1 are supported to be used directly in glVertexAttribPointer for rendering. BUG=angleproject:1593 TEST=angle_end2end_tests Change-Id: I1ac206e4f6c972b5748552177c787c0adcb66786 Reviewed-on: https://chromium-review.googlesource.com/441308 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill e1faacb1 2016-12-13T12:42:14 Don't use logging macros in end2end_tests. Macros like ASSERT and UNREACHABLE call gl::trace, which at some point we might want to use to call the angle Platform logging code. Standalone tests won't easily have access to the platform, so for now just log errors in other ways. This also corrects some logic in GLSLTest which was calling internal methods in libANGLE when it didn't have to. BUG=angleproject:1660 Change-Id: Idecbd97f2de7916b35bd78f5b7cd02b156ea100d Reviewed-on: https://chromium-review.googlesource.com/419134 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 0bdfe4c8 2016-10-25T09:52:33 VertexAttributeTest: don't copy too much data in the buffer BUG=angleproject:1570 Change-Id: I199bb88042c3926cb05e27494bb6af9b2666cd00 Reviewed-on: https://chromium-review.googlesource.com/402932 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Martin Radev 1be913cf 2016-07-11T17:59:16 Add support for ES31 context creation The dEQP test for context creation passes. SH_WEBGL3_SPEC has been added, but it should be considered whether we should keep it, remove it or rename it. It was added so that there is a webgl mapping to es 310 shaders. Check Compiler.cpp. The bison file has been modified so that some tokens from es3 can be also used in es31 as well. A separate macro ES3_1_ONLY is added so that some tokens are limited only for es 310 shaders. BUG=angleproject:1442 TEST=angle_unittests Change-Id: I2e5ca227c96046c30dc796ab934f3fda9c533eba Reviewed-on: https://chromium-review.googlesource.com/360300 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez c7f59d02 2016-06-20T10:12:08 Suppress a Wintel/OpenGL failure on a new test. BUG=angleproject:1388 Change-Id: I4d346ca3c6914e56055aa6492d9d013634a1b9ad Reviewed-on: https://chromium-review.googlesource.com/353693 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 52b09c2f 2016-04-11T14:12:31 Re-re-land "D3D11: Implement dirty bits for VertexArray11."" Translated attributes are now stored in the VertexArray11 in a cache, and only updated when dirty bits change. Currently dynamic attributes must be re-translated every call, so these are stored in a list and processed repeatedly. This skips doing a lot of the VertexDataManager work for vertex attributes that don't change between draw calls. Current value attributes, which correspond to disabled attributes that the program will pulls vertex data from, are owned by the Context, so these need to be handled outside of the VertexArray11. Further changes will be necessary to reduce the redundant work we do in the InputLayoutCache. We shouldn't need to re-check the cache if nothing relevant changed. This give about a 23% performance improvement on the draw call benchmark on my machine. Re-land with a fix for the start vertex offset. Re-re-land with a fix for using XFB with deleted buffers. BUG=angleproject:1327 Change-Id: I0fba49515375c149bbf54d933f8d1f747fbb8158 Reviewed-on: https://chromium-review.googlesource.com/338003 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 53a36004 2016-04-08T19:03:18 Revert "Re-land "D3D11: Implement dirty bits for VertexArray11.""" Seems to make the following dEQP test flaky: dEQP-GLES3.functional.lifetime.attach.deleted_output.buffer_transform_feedback doesn't show up on every bot test, but run it a few times and it'll flake. Reverting while I investigate. BUG=angleproject:1327 This reverts commit 3477f3a62dc139a253a0b361ee138116e9fa881f. Change-Id: Ic23a392526f5f6e107cf0aa06448389804d6b208 Reviewed-on: https://chromium-review.googlesource.com/337961 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3477f3a6 2016-03-29T17:15:29 Re-land "D3D11: Implement dirty bits for VertexArray11."" Translated attributes are now stored in the VertexArray11 in a cache, and only updated when dirty bits change. Currently dynamic attributes must be re-translated every call, so these are stored in a list and processed repeatedly. This skips doing a lot of the VertexDataManager work for vertex attributes that don't change between draw calls. Current value attributes, which correspond to disabled attributes that the program will pulls vertex data from, are owned by the Context, so these need to be handled outside of the VertexArray11. Further changes will be necessary to reduce the redundant work we do in the InputLayoutCache. We shouldn't need to re-check the cache if nothing relevant changed. This give about a 23% performance improvement on the draw call benchmark on my machine. Re-land with a fix for the start vertex offset. BUG=angleproject:1327 Change-Id: Ic23e48fb18ed7f29c1999914a2f799ac04aa03e9 Reviewed-on: https://chromium-review.googlesource.com/334225 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill bc4c4bc5 2016-03-23T21:04:43 Re-land "Validate that attrib offsets don't overflow buffers." During draw calls, we wouldn't add the current attrib offset to the required draw call size when checking attributes. This could lead to us producing warnings in the D3D11 runtime, and miss returning some errors. Re-land with a test data initialization fix, and with some extra tests merged from another CL. BUG=angleproject:1339 Change-Id: Ifd549c3b1f6871417dc1693cb3ec534414e92cfd Reviewed-on: https://chromium-review.googlesource.com/333723 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 00f394ec 2016-03-16T12:09:11 Revert Dirty bits for VertexArray11 This is a combination of two reverts: Revert "D3D11: Remove unused mRenderer from VertexArray11." Revert "D3D11: Implement dirty bits for VertexArray11." Reverting only the first commit would trigger warnings on the Windows clang bot. BUG=594509 BUG=angleproject:1327 This reverts commit fc4712b5ed270436f2993bfda9e916d4f92684a4. This reverts commit 7d8585b802b7eb741b380bd0d05769281d9507c9. Change-Id: I612dbba0816d6144f71ce815701c13a798585bc7 Reviewed-on: https://chromium-review.googlesource.com/332989 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c979aabf 2016-03-12T00:26:44 Revert "Validate that attrib offsets don't overflow buffers." Seems to fail the Windows 8 bots in FL9_3 for some reason. https://build.chromium.org/p/chromium.gpu.fyi/builders/Win8%20Release%20%28NVIDIA%29/builds/20703 VertexAttributeTest.ShortNormalized_ES2_D3D11_9_3 VertexAttributeTest.ShortUnnormalized_ES2_D3D11_9_3 BUG=angleproject:1339 This reverts commit fb57c04c781df708a432f0e90acf2e431b7983bb. Change-Id: I4c678ff6b337e9a3e0a1fc809f96f6b89407ea33 Reviewed-on: https://chromium-review.googlesource.com/332442 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill fb57c04c 2016-03-10T11:35:17 Validate that attrib offsets don't overflow buffers. During draw calls, we wouldn't add the current attrib offset to the required draw call size when checking attributes. This could lead to us producing warnings in the D3D11 runtime, and miss returning some errors. BUG=angleproject:1339 Change-Id: I03555be396df46f83d96dfb34fbcb145169625e8 Reviewed-on: https://chromium-review.googlesource.com/331807 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7d8585b8 2016-03-09T15:53:12 D3D11: Implement dirty bits for VertexArray11. Translated attributes are now stored in the VertexArray11 in a cache, and only updated when dirty bits change. Currently dynamic attributes must be re-translated every call, so these are stored in a list and processed repeatedly. This skips doing a lot of the VertexDataManager work for vertex attributes that don't change between draw calls. Current value attributes, which correspond to disabled attributes that the program will pulls vertex data from, are owned by the Context, so these need to be handled outside of the VertexArray11. Further changes will be necessary to reduce the redundant work we do in the InputLayoutCache. We shouldn't need to re-check the cache if nothing relevant changed. This give about a 23% performance improvement on the draw call benchmark on my machine. BUG=angleproject:1327 Change-Id: I7fb944d32ea7e6c78b9e478406bdb7e10a7fc05b Reviewed-on: https://chromium-review.googlesource.com/330173 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e36b92d4 2016-03-04T15:46:58 D3D: Use a single D3D buffer per static vertex attribute. The current caching logic stores multiple static attributes in a single buffer if the attributes share a D3D buffer - sometimes. If a buffer is 'committed' (has been used in a draw) then we would make a new D3D buffer for the next set of static attributes. Instead use a simpler scheme of a single D3D buffer for each static attribute. Also change rx::VertexBuffer to a reference counted class. This simplifies the caching logic for static vertex buffers (translated attributes) considerably. We only need to release the buffers when the ref count is zero, and ensure we track the ref count correctly when bound to D3D. This leads the way towards using a simpler dirty bit scheme for intelligent state updates, and less overhead doing work with buffer state updates. BUG=angleproject:1327 Change-Id: I99461d50b9663024eaa654cd56b42a63f1416d08 Reviewed-on: https://chromium-review.googlesource.com/330170 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 713e4db7 2016-03-02T16:35:33 D3D11: Fix RGBA32_UNORM integer vertex attribs. This formats were mistakenly listed as having no conversion necessary in the vertex formats table. Fix is to mark them as CPU-converted. This bug would only occur for 'direct' storage attributes, not those that were dynamically streamed. BUG=angleproject:1331 Change-Id: Ifa51b47d75e2f5bc762a718587470950cf195cb4 Reviewed-on: https://chromium-review.googlesource.com/329999 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill 518b9fab 2016-03-02T11:26:02 Suppress some failing end2end_tests on Intel. BUG=589851 Change-Id: Ia580cee30e6842aaddb4683025f425166f0f6120 Reviewed-on: https://chromium-review.googlesource.com/329735 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f09bf669 2016-03-02T11:26:01 Revert "Suppress some failing end2end_tests on Intel." This reverts commit 7208f6994cf7d810c2226965362aad43d2a66f53. Still some failures on Intel, requires a slightly different solution. BUG=589851 Change-Id: I6ac6599249e9e0f6319c917e04734cd48ca9274d Reviewed-on: https://chromium-review.googlesource.com/329734 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7208f699 2016-02-29T10:47:35 Suppress some failing end2end_tests on Intel. BUG=589851 Change-Id: I91588014784a8a9b75389aeb596923458c30d80a Reviewed-on: https://chromium-review.googlesource.com/329427 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@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>
Jamie Madill 1ea9aaad 2015-10-07T11:13:55 Add suppressions for several Intel failures. Also add a new test for UBOs to end2end_tests. BUG=540538 Change-Id: I6ffa6ba061a2c33811c65719deaa4302f1dbd704 Reviewed-on: https://chromium-review.googlesource.com/304521 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Cooper Partin 4d61f7ed 2015-08-12T10:56:50 Reland Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data' Additional warnings found with more testing and added C4267 warning disable only for angle_libpng BUG=angleproject:1120 Change-Id: Ic403dcff5a8018056fa51a8c408e64207f3362eb Reviewed-on: https://chromium-review.googlesource.com/293028 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 09e2d93b 2015-07-14T16:40:31 D3D11: Futher optimize input layout cache. *re-land with fix for matrix attributes* *re-re-land with fix for attributes with BindAttribLocation* Using the new vertex format type enum, we can shrink the size of the input layout tables and reduce draw call overhead further. BUG=angleproject:959 Change-Id: I181acd3d7d519f5587cbe180fb1bca8530b7cfc2 Reviewed-on: https://chromium-review.googlesource.com/285348 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 3dc5d070 2015-06-16T13:25:55 Skip MaxAttribs test on all AMD/OpenGL configs. Change-Id: Ia1c4f230a51c49a48db2d12749b9a028a17168e3 Reviewed-on: https://chromium-review.googlesource.com/277727 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 8e695edb 2015-06-15T17:00:44 Fix support for GL_MAX_ATTRIBS attributes. *re-land with fix for AMD/ES2/OpenGL.* An off-by-one bug slipped in that broke support for these edge case shaders. Bug introduced in https://chromium-review.googlesource.com/#/c/266928/ BUG=angleproject:1045 BUG=500116 Change-Id: If44f809d432221d1e17afc407d49e87e0cb7504c Reviewed-on: https://chromium-review.googlesource.com/277664 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 588e7ed2 2015-06-15T20:59:24 Revert "Fix support for GL_MAX_ATTRIBS attributes." Breaks the AMD bot's OpenGL tests. VertexAttributeTest.MaxAttribs/3: shader compilation failed: Vertex shader failed to compile with the following errors: ERROR: error(#272) Implicit version number 110 not supported by GL3 forward compatible context ERROR: error(#273) 1 compilation errors. No code generated shader compilation failed: Fragment shader failed to compile with the following errors: ERROR: error(#272) Implicit version number 110 not supported by GL3 forward compatible context ERROR: error(#273) 1 compilation errors. No code generated BUG=angleproject:1045 BUG=500116 This reverts commit 3f3d75ea6c20826adb6240f1573fd7139939a986. Change-Id: I8cdd024fcf49f1ade553dae2cdbe8b02d8fba364 Reviewed-on: https://chromium-review.googlesource.com/277673 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3f3d75ea 2015-06-15T14:10:42 Fix support for GL_MAX_ATTRIBS attributes. An off-by-one bug slipped in that broke support for these edge case shaders. Bug introduced in https://chromium-review.googlesource.com/#/c/266928/ BUG=angleproject:1045 BUG=500116 Change-Id: Iddfe0c21bef3c3a61017ba56d9e1fc001c0a3703 Reviewed-on: https://chromium-review.googlesource.com/277476 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@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>