src/tests/gl_tests/MipmapTest.cpp


Log

Author Commit Date CI Message
Alexey Knyazev 9e8b104e 2024-10-14T00:00:00 Do not test OpenGL backend on iOS Added Metal platform to tests that require instantiation. Bug: angleproject:40050022 Bug: angleproject:42264029 Bug: angleproject:42266119 Bug: angleproject:42266226 Bug: angleproject:42266239 Bug: angleproject:42266249 Bug: angleproject:359136169 Fixed: angleproject:373478551 Change-Id: I915f09c7f24acce27bf0d489932645338ac3fbe8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5932659 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi d193d51b 2024-06-17T22:46:08 Replace issue ids post migration to new issue tracker This change replaces anglebug.com/NNNN links. Bug: None Change-Id: I8ac3aec8d2a8a844b3d7b99fc0a6b2be8da31761 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637912 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi b3ab67d3 2024-03-14T15:06:02 tests: Remove unnecessary .get() from RAII objects Bug: chromium:40942995 Change-Id: I82509869bce3ad8f51811188fe04267f2de04786 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5370904 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang b7bacdb7 2024-02-15T11:14:21 GL: Generate mipmaps through draw calls on Pixel7/Pixel8. Some patterns that use a texture as a framebuffer attachment and then generate mipmaps on that texture multiple times cause context loss or driver hangs. Extend the sRGB mipmap generation to also generate mipmaps on non-SRGB textures using draw calls and linear samplers to do the downsampling. Bug: chromium:40279678 Change-Id: I19c6bf9c702ddf2c400ef03ff076fbd4cf15d285 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5297413 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev d7077e9f 2023-12-05T00:00:00 Update macOS end2end expectations Bug: angleproject:2273 Bug: angleproject:2408 Bug: angleproject:3837 Bug: angleproject:5325 Bug: angleproject:5360 Bug: angleproject:5594 Bug: angleproject:6358 Bug: angleproject:6418 Bug: angleproject:6454 Bug: angleproject:6457 Bug: angleproject:6540 Bug: angleproject:6702 Bug: angleproject:6751 Bug: angleproject:7068 Bug: angleproject:7309 Bug: angleproject:7445 Change-Id: I7f4c012ed2de6af83188ed69170b19f8d2bb19de Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5087774 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Steven Noonan 113f847b 2023-06-26T12:07:52 centralize basic OS/platform detection functions We had multiple different places that defined these, and with varying naming schemes. Centralize them to be defined in platform_helpers.h. Also renaming the IsApple(uint32_t) functions to IsAppleGPU(uint32_t) to avoid ambiguous meaning: "IsApple" should mean "is Apple-vended OS" while "IsAppleGPU" should mean "is Apple GPU vendor ID". Bug: angleproject:8229 Change-Id: If4e3fc5ac1b5b8ad416663950a1b2ee912ccad99 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4647291 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Steven Noonan <steven@uplinklabs.net> Auto-Submit: Steven Noonan <steven@uplinklabs.net> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 48588a89 2023-02-17T11:03:56 Update the common cube map texture in MipmapTest In MipmapTest, mTextureCube is defined so that one side is set to blue. However, the other sides are not explicitly defined. This seems to be causing capture/replay errors due to context mismatch after updating the image memory allocation method to use VMA. (CL: https://crrev.com/c/4191202) * Added definition for the other sides of mTextureCube, now set to white. Bug: b/267811497 Change-Id: Icaca67ba6032e5156c9f4bbf3913459d863c2f1d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4264172 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Eddie Hatfield 89e38b57 2022-06-22T15:04:08 Refactor to use ANGLETest vs ANGLETestWithParam Bug: angleproject:6747 Change-Id: I72ad52d0268eae0e1a401f12f3e94cc5efa402f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3719002 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi 6cbedc98 2022-04-20T00:03:05 Add a test for backwards mip generation with draw A test similar to mipmap generation with draw (mip0->mip1->etc) where a small mip is upscaled to lower mips with draw (mip2->mip1->mip0). Bug: angleproject:6977 Bug: b/229764351 Change-Id: Iff29f0e02af085c817c41f713644238edfcb22e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3594803 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 797e627e 2022-04-08T22:49:51 Autogenerate list of features as enum The WithX() and WithNoX() helpers are removed and replaced with enable() and disable() member functions that take the name of the feature (as a Feature::X enum constant). This has two benefits: - Adding tests that override a feature no longer requires additional helper functions to be written. - There's no mistaking the feature name. This change doesn't yet fix the main issue in anglebug.com/6435, but does fix the following helpers using an old feature name (so they were ineffective): - WithMetalForcedBufferGPUStorage - WithNoVulkanViewportFlip A follow up would remove the old way of overriding features in tests and replaces them with the new way. Bug: angleproject:6435 Change-Id: Ida02b26ec72bc40d7a8938c76a93815bb903ca05 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3580982 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya f65e7c3c 2022-02-02T14:23:31 Vulkan: Take base level into account in image views Similarly to how max level changes are handled, this change also handles base level changes. In either case, the old views are retained and new views are created for the [base, max] level range. Test provided by m.maiya@samsung.com Bug: angleproject:6967 Test: MipmapTestES31.UpdateBaseLevel/* Change-Id: Iee8b2f035c1cc0fa916b987a91939b8ae65d27c5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3441074 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@google.com>
Shahbaz Youssefi 2ad5f350 2022-01-25T12:15:16 Vulkan: Fix texture array level redefinition When a level of a texture is redefined, all staged updates to that level should be removed, not the ones specific to the new layers. The bug fixed was that if the texture was redefined to have its number of layers changed, the staged higher-layer-count update to the image was not removed. Bug: chromium:1289383 Change-Id: I9b90025f78af80ab19a280f90b58510716da31d2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3413004 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
SeongHwan Park 9b231f09 2022-01-18T04:49:08 Vulkan: Fix incorrect bit test when mipmapping Fixed an issue where angle::Bit was used instead of angle::BitMask when should selecting [0, x) to set bit range (x, y] in an n-bit bitmask. Bug: chromium:1287962 Change-Id: I053fbc836ef12b0dfd30305fd527de3fabfdf525 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3394468 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 8f6f5a4b 2021-11-30T23:48:30 Vulkan: Fix image respecify's usage tracking When respecifying an image due to mip level count changes, the previous image is staged as an update to the new image. The resource usage info was not being transferred to the image being staged as an update, causing it to be prematurely deleted. Test based on one authored by sugoi@google.com. Bug: chromium:1270658 Bug: angleproject:4835 Change-Id: I215c65ba700d7be608d0910d3cb37fcfdf297a2a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3308921 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 44bef8ae 2021-10-08T15:01:37 Remove traces of Feature Level 9_3 support from tests. Bug: angleproject:1284 Bug: angleproject:3042 Change-Id: Ic2f77d315e98c3b15c5fc8b0359168bce00867d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3213294 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 977a28f3 2021-06-22T12:30:07 No-op glGenerateMipmap on zero-sized textures The spec says: > Otherwise, ... if any dimension is zero, all mipmap levels are left > unchanged. This is not an error. Bug: chromium:1220250 Change-Id: I45e007c1f8e9b80f405d3d096eb896a7246f7c8e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2979853 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 26973584 2021-05-20T12:22:46 D3D11: Fix respecifying 3D textures. The missing check for the "Depth" dimension could lead to a bug where we would not recreate a texture when the dimension changed. Bug: chromium:1210414 Change-Id: Id59097ad14ae77ff80d27081f61786dad17a77ea Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2911032 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 57727c4e 2021-03-08T17:32:25 Further suppress tests failing on Ozone. Since MipmapTest and Texture3DTestES2 fail in testSetUp(), it also needs to be skipped, in addition to the failing tests. Also suppress instantiation error for ES3-only QueryObjectTest Bug: angleproject:5725, angleproject:5728, angleproject:5704 Change-Id: Iac6549afd7609a2aee78bcfdb7c3de41886f3505 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2743920 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov a0bc2589 2021-03-05T19:27:04 Skip tests failing on Ozone. MipmapTest.DefineValidExtraLevelAndUseItLater MipmapTest.GenerateMipmapAfterModifyingBaseLevel MipmapTest.GenerateMipmapAfterSingleLevelDraw MipmapTest.GenerateMipmapFromInitDataThenRender MipmapTest.GenerateMipmapFromRenderedImage MipmapTest.MipMapGenerationD3D9Bug MipmapTest.MipmapsForTexture3DOES MipmapTest.RenderOntoLevelZeroAfterGenerateMipmap MipmapTest.TextureCubeGeneralLevelZero MipmapTest.TextureCubeRenderToLevelZero MultisampleTest.AlphaToSampleCoverage MultisampleTest.ContentPresevedAfterInterruption MultisampleTest.Line MultisampleTest.Point MultisampleTest.Triangle Texture3DTestES2.CopySubImageAlpha Texture3DTestES2.CopySubImageLuminance Texture3DTestES2.CopySubImageRGBA Texture3DTestES2.Luminance Texture3DTestES2.RGBA Bug: angleproject:5725, angleproject:5727, angleproject:5728 Change-Id: Ibe7d7e44e01ce430e381edd0c83c3e24069b35aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2738718 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov a6b16d29 2021-03-02T19:04:57 Suppress UNINSTANTIATED_PARAMETERIZED_TEST failures on Ozone We only support ES2 on Ozone, so tests that depend on ES3 or ES31 support are not instantiated there. Bug: chromium:1183147 Change-Id: Id58bcd9b44a5b9a70b5ae8115e27c44f5dc81226 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2726550 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Austin Sullivan a2fad5ea 2021-02-11T22:49:33 Mark uninstantiated tests This problem was discovered by attempting to roll googletest past CL 315255779, which causes test binaries to fail when they include test suites / parametrized tests that are not instantiated, and when they include empty test suites. This CL uses the GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST() macro to annotate the suites / tests that are causing test failures. This is necessary to get googletest rolled past CL 315255779. Bug: chromium:1163396 Change-Id: I17c7cae1121079219f632cbbcf8cfc65a27bfdb7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2691459 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
James Darpinian ebf00703 2020-12-29T16:25:54 angle_end2end_tests passes on iOS! Miscellaneous test skips and fixes for iOS. Bug: angleproject:5417 Bug: angleproject:5491 Change-Id: Id0785e6243949fc756e4d7923dbbe77a411052f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2606656 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Shahbaz Youssefi 56330564 2020-12-10T00:46:04 Vulkan: Support layered framebuffers This feature is introduced by geometry shaders, where all the layers of a texture can be attached to a framebuffer. The geometry shader would use gl_Layer to decide which layer the primitive should be rendered to. Bug: angleproject:3571 Change-Id: Ib2ae8e227b226295f9e2f62f6b230839070bc95c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2582711 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Kai Ninomiya bacb8dfc 2020-11-17T11:31:49 Add TODOs for Apple DTK skips; update bug urls Bug: angleproject:5360 Change-Id: Ibad5be256f08c893caebd6fa268668b966556d13 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2544907 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Kai Ninomiya 12804827 2020-11-17T10:50:01 Disable more tests for Apple DTK (macOS ARM) Some of these new failures are on ES3-on-Metal and probably cropped up because they weren't running before. Bug: chromium:1132295 Change-Id: I631c53f1e6cf1374b0f3af62c9713456c924c6a1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2545122 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Geoff Lang f02a6e0c 2020-10-26T14:35:14 Work around Mac glGenerateMipmap with missing levels bug. Some Mac GL drivers fail to generate mipmaps if level zero is not set before the texture is first used, all mipmap data is black. To work around this, whenever a texture level is allocated, ensure that level zero is also allocated with at least a 1x1 image. Bug: angleproject:5223 Change-Id: If1a728e017dec600c77a54f7ae185b719aaaae84 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2497569 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Kai Ninomiya e0780931 2020-10-08T17:57:47 Suppress gl_test failures on Mac ARM64 (Apple DTK) BuiltinVariableFragDepthClampingFloatRBOTest.Below1/ES3_OpenGL CopyTexImageTest.DeleteAfterCopyingToTextures/ES2_OpenGL GLSLTest.MaxVaryingVec2Arrays/ES2_Metal GLSLTest.MaxVaryingVec3ArrayAndOneFloatArray/ES2_Metal GLSLTest.MoreNestedCompoundStructsWithSamplersAsFunctionArg/ES2_OpenGL GLSLTest.NestedCompoundStructsWithSamplersAsFunctionArg/ES2_OpenGL GLSLTest.NestedStructsWithSamplersAsFunctionArg/ES2_OpenGL GLSLTest.NestedStructsWithSamplersAsFunctionArg/ES3_OpenGL MipmapTestES3.BaseLevelTextureBug/ES3_OpenGL MipmapTestES3.GenerateMipmapBaseLevel/ES3_OpenGL MipmapTestES3.GenerateMipmapCubeBaseLevel/ES3_OpenGL MipmapTestES3.GenerateMipmapMaxLevel/ES3_OpenGL MipmapTestES3.GenerateMipmapPreservesOutOfRangeMips/ES3_OpenGL OcclusionQueriesTest.MultiQueries/ES2_Metal Texture2DBaseMaxTestES3.GenerateMipmapAfterRedefineAndRebase/ES3_OpenGL Texture2DFloatTestES2.TextureFloatLinearLegacyTest/ES2_Metal Texture2DFloatTestES2.TextureFloatLinearLegacyTest/ES2_OpenGL Texture2DFloatTestES2.TextureFloatLinearTest/ES2_Metal Texture2DFloatTestES2.TextureFloatLinearTest/ES2_OpenGL Texture2DFloatTestES3.TextureFloatLinearLegacyTest/ES3_OpenGL Texture2DFloatTestES3.TextureFloatLinearTest/ES3_OpenGL TimerQueriesTest.TimeElapsed/ES3_OpenGL TimerQueriesTest.TimeElapsedMulticontextTest/ES3_OpenGL WebGLCompatibilityTest.TextureCopyingFeedbackLoops/ES2_OpenGL WebGLCompatibilityTest.TextureCopyingFeedbackLoops/ES3_OpenGL Bug: chromium:1132295 Change-Id: If64dc67275063c8046dbc941d92de273fbc226e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2461674 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen a4f706b2 2020-08-04T12:08:00 Metal: Use compute to generate 3D texture's mipmap. - Metal's built-in blit based mipmap generator doesn't use box filtering. Hence manual generation using compute is needed. - Compute based mipmap gen can generate up to 4 mips per pass if the base level is power of 2. - This approach can be extended to 2D/cube texture's mipmap generation in future. Bug: angleproject:4921 Bug: angleproject:2634 Change-Id: I7f997669fe39afef075b2bca2406e9424cbb3016 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2336120 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com>
Le Hoang Quyen acda9dde 2020-08-08T18:36:57 Metal: Implement GL_OES_texture_3D Bug: angleproject:2634 Change-Id: I8c46493ac28fe1bbfdb29ee3a60b23076bbc4c0c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2336119 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Shahbaz Youssefi 8adc5469 2020-07-02T10:15:17 Vulkan: Generate mipmap in compute An initial implementation based on AMD's FFX SPD (Single Pass Downsampler). Apart from requiring STORAGE_IMAGE support for the image format, the following limitations are in place due to FFX SPD: - Image must be 2D or 2D array (including cube maps) - Image must be single-sampled The following _can_ be supported, but not yet implemented: - sRGB formats - Integer formats - depth/stencil formats Bug: angleproject:4551 Change-Id: Ibc4d5cea701cca31e55e3d651540872bbd3b473f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2278713 Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c81da1c8 2020-06-19T22:05:38 Vulkan: Avoid double-copy when generating mipmap If the image needs to be redefined with mips, level 0 was copied to a buffer which was then copied to the new image. This change instead stages the old image directly for copy to the new image. Bug: angleproject:4551 Change-Id: I7625f140ddadde0a2b439c5e91c519ad49ae2fd7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2257264 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Corentin Wallez d6293293 2020-06-25T10:54:16 Suppress MipmapTest failure on NVIDIA Shield. MipmapTestES3.GenerateMipmapPreservesOutOfRangeMips/ES3_OpenGLES started failing on NVIDIA Shield right after it was introduced. TBR=syoussefi@chromium.org Bug: angleproject:4551 Bug: angleproject:4786 Change-Id: Id6b258a09d33783faf34f867523da31995cee4e7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2264102 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Shahbaz Youssefi 6ef0387d 2020-06-16T23:32:47 Vulkan: Fix mipmap generation discarding levels above max Bug: angleproject:4551 Change-Id: I1f65e41049b8cc8065ff988bb708cb44acfdb98b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2257263 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi b772a955 2020-06-16T23:32:47 Vulkan: Make texture syncState aware of upcoming generateMipmap By letting TextureVk::syncState know it's being called for generateMipmap, it can make a better decision to initialize the image: - Staged updates to mips that are going to be overwritten are dropped - The image is created with full mipchain to avoid a redefine in the following generateMipmap() call. Bug: angleproject:4551 Change-Id: Ic70ee6c0a0b29c7bd62beaff612b2f2d5276defb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2249340 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 3589d9a0 2020-06-16T15:32:18 Add a test for generateMipmap after modify To make sure TextureVk::syncState is called before generateMipmap. Bug: angleproject:4551 Change-Id: Ibce0738b72fc81270e07617f04ffee57f1c8ed20 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2248209 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 000a79f1 2020-06-04T23:06:58 Vulkan: Better handling of texture level redefinition If a texture level is being redefined, there are two scenarios to consider: 1. The level is outside the base/max level, for which the image was allocated. 2. The level is within the base/max level, but it's being redefined to a different size or format. In the former case, we simply don't need to release the image. The latter case itself has two possibilities: 2.1. There is only one level in the image. 2.2. There are multiple levels in the image. In case 2.1, the whole image is being redefined (as it has only a single level), so the image can (and should) be released. Prior to this change, this behavior was adopted for all cases. This change retains this behavior for this case only. In case 2.2, the texture is becoming incomplete. However, the image shouldn't yet be released because another one of its mips may be bound to a framebuffer. In such cases as glCopyTexImage2D(), that framebuffer may in fact be the source of the copy operation (which would be destroyed if the image is released). If the base/max level of the texture doesn't change, redefining the level and making the texture incomplete doesn't make the framebuffer incomplete; this is achieved at the same time by not releasing the image. This change ensures that updates to the redefined level are staged in cases 1 and 2.2. Bug: angleproject:4274 Change-Id: I3fac3203c2fbbc16e8e4a35b1334b767120b2dcf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2230853 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 57f7b690 2020-06-05T00:45:01 Vulkan: Enable passing tests Bug: angleproject:3950 Change-Id: I091d99951772479ef2fbdb2ac51e5bf52a263da7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2231983 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Ancheng Qiao dbb23ec3 2020-03-30T14:24:53 Vulkan: Remove swiftshader mipmap3d test skip Bug: angleproject:3983 Change-Id: I9c487cc7db5d5e22a6cff00b40e4081498ab771f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2128207 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Ancheng Qiao 90019cea 2020-02-26T18:04:25 Vulkan: Add depth to mipmap generation In generateMipmaps, remove hard coded depth of 1, shift depth like every other dimension. Remove MipmapsForTexture3D test pixel value check, in es spec3.2 8.14.4 "No particular filter algorithm is required, though a box filter is recommended." It's implementation-dependent. In current angle implementation, will choose VK_FILTER_LINEAR/VK_FILTER_NEAREST according to vkdeice support. Bug: angleproject:3983 Test: MipmapTestES3.MipmapsForTexture3D/ES3_Vulkan Test: dEQP-GLES3.functional.samplers.single_tex_3d.diff_max_lod Test: dEQP-GLES3.functional.samplers.single_tex_3d.diff_min_lod Test: dEQP-GLES3.functional.samplers.multi_tex_3d.diff_max_lod Test: dEQP-GLES3.functional.samplers.multi_tex_3d.diff_min_lod Change-Id: I5e73f8c743053aeb521b5e0b3e372bbe77e57ad2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2076740 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Xinyi He 19f9f414 2019-11-29T10:30:25 Vulkan: Textures incorrect on Android maps with Vulkan Backend The issue was fixed, but adding a regression test to avoid it again. glMemoryBarrier inserts a memory barrier and breaks the submission order, which causes the copyBufferToImage happens before copyImageToBuffer and image corruption. This test fails on commit 052167b, and can pass on the latest build. Bug: angleproject:4074 Change-Id: Icc42dd7b2ba167815b223085ce933682654ce760 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1943848 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Ian Elliott <ianelliott@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>
Cody Northrop 2d5c8d31 2019-10-08T22:37:32 Vulkan: Fix off by one when flushing staged texture updates When updating ImageHelper::flushStagedUpdates to handle base and max texture level, we got off by one when deciding if an update landed in in the range of the current vkImage. When there are 8 mipLevels and we see an update for level 8, that should not be applied, and should be preserved in updatesToKeep. Bug: angleproject:3950 Test: MipmapTest.DefineValidExtraLevelAndUseItLater/ES2_Vulkan Change-Id: I63e0c24f7885f8b0580ce212b531711aebcf0e01 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1848933 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
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>
Sami Väisänen 5f45432f 2019-08-22T15:34:57 Add several angle bugs for end2end tests failing on NVIDIA Add several angle bugs for end2end tests failing on NVIDIA. - TwiceMaxVaryingVec2 failing on GLES - MipLevels failing on Shield GLES - GenerateMipmapCubeBaseLevel failing on GL BUG=angleproject:3849 BUG=angleproject:3850 BUG=angleproject:3851 Change-Id: I6e5283f0d4c1c5da8259034dfda3beb94e041b21 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1768016 Commit-Queue: Jamie Madill <jmadill@chromium.org> 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>
Tim Van Patten 7d689863 2019-04-08T12:31:33 Re-Enable MipmapTest.TextureCubeGeneralLevelZero/ES2_VULKAN The test MipmapTest.TextureCubeGeneralLevelZero/ES2_VULKAN was disabled for Vulkan Android due to Nexus 5x and Pixel 2 issues. The Nexus 5x has been removed from the test infrastructure and the Pixel 2 issue seems to have sorted itself out. Bug: angleproject:2817 Test: angle_end2end_tests MipmapTest.TextureCubeGeneralLevelZero/ES2_VULKAN Change-Id: I85bb56707def2906194c34942fcd74a811255abc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558293 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 0c128e15 2019-03-25T23:50:14 Vulkan: Use render pass ops to clear images when possible On tiling GPUs, render pass loadOp and stencilLoadOp can be used to very cheaply clear an image as it is being render to. This change uses this feature to clear render targets when possible. Bug: angleproject:2361 Change-Id: Ic4bdc908873f4802760d549f4893f84a47beac0f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1500576 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 559aaca5 2019-02-14T18:24:07 Fix texture and buffer data bugs in tests found by ASAN. Bug: angleproject:3153 Change-Id: Iacb7b2b97b9fc5c68fbee03c66d71eb72a53b4d6 Reviewed-on: https://chromium-review.googlesource.com/c/1474342 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Michael Spang d8506c7e 2019-01-29T15:35:09 Disable broken tests on Fuchsia (reland) This disables tests that do not work on Fuchsia. Most of them are related to cube maps which currently crash inside the intel driver. Reland disabling -Wextra-semi. BUG=angleproject:2475, angleproject:3145, angleproject:3081 TEST=angle_end2end_tests on Fuchsia Change-Id: I65ad84f43c88e8ee83c581cc2f41046d00bbae7f Reviewed-on: https://chromium-review.googlesource.com/c/1467604 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Michael Spang <spang@chromium.org>
Zhenyao Mo c66fb571 2019-02-12T03:56:16 Revert "Disable broken tests on Fuchsia" This reverts commit ad194995ed7228078d5b937dd1eff87c1dcac9c0. Reason for revert: broke GPU optional bots since the revert of its previous CL Original change's description: > Disable broken tests on Fuchsia > > This disables tests that do not work on Fuchsia. Most of them are related > to cube maps which currently crash inside the intel driver. > > BUG=angleproject:2475, angleproject:3145, angleproject:3081 > TEST=angle_end2end_tests on Fuchsia > > Change-Id: Ifc0be390c6d5c43a756e1afb6ced9e3bd5b6986e > Reviewed-on: https://chromium-review.googlesource.com/c/1446497 > Commit-Queue: Michael Spang <spang@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=spang@chromium.org,geofflang@chromium.org,jmadill@chromium.org Change-Id: Id1861ee94b89020bcd64dd8e7e52588b76830783 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2475, angleproject:3145, angleproject:3081 Reviewed-on: https://chromium-review.googlesource.com/c/1465881 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Michael Spang ad194995 2019-01-29T15:35:09 Disable broken tests on Fuchsia This disables tests that do not work on Fuchsia. Most of them are related to cube maps which currently crash inside the intel driver. BUG=angleproject:2475, angleproject:3145, angleproject:3081 TEST=angle_end2end_tests on Fuchsia Change-Id: Ifc0be390c6d5c43a756e1afb6ced9e3bd5b6986e Reviewed-on: https://chromium-review.googlesource.com/c/1446497 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill ba319ba3 2018-12-29T10:29:33 Re-land "Load entry points dynamically in tests and samples." Fixes the Android/ChromeOS/Fuchsia builds by using consistent EGL headers. This CL adds a dynamic loader generator based on XML files. It also refactors the entry point generation script to move the XML parsing into a helper class. Additionally this includes a new GLES 1.0 base header. The new header allows for function pointer types and hiding prototypes. All tests and samples now load ANGLE dynamically. In the future this will be extended to load entry points from the driver directly when possible. This will allow us to perform more accurate A/B testing. The new build configuration leads to some tests having more warnings applied. The CL includes fixes for the new warnings. Bug: angleproject:2995 Change-Id: I5a8772f41a0f89570b3736b785f44b7de1539b57 Reviewed-on: https://chromium-review.googlesource.com/c/1392382 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 9f088621 2018-12-29T20:46:15 Revert "Load entry points dynamically in tests and samples." This reverts commit 03923558a7103827ffec6a4d2a1453ed91f01c6f. Reason for revert: fails compilation on Android, ChromeOS and Fuchsia during roll https://chromium-review.googlesource.com/c/chromium/src/+/1392624 Original change's description: > Load entry points dynamically in tests and samples. > > This CL adds a dynamic loader generator based on XML files. It also > refactors the entry point generation script to move the XML parsing > into a helper class. > > Additionally this includes a new GLES 1.0 base header. The new > header allows for function pointer types and hiding prototypes. > > All tests and samples now load ANGLE dynamically. In the future this > will be extended to load entry points from the driver directly when > possible. This will allow us to perform more accurate A/B testing. > > The new build configuration leads to some tests having more warnings > applied. The CL includes fixes for the new warnings. > > Bug: angleproject:2995 > Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05 > Reviewed-on: https://chromium-review.googlesource.com/c/1359516 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org Change-Id: I902bec2d733c2b879be29c02ab52a0b7d4eaa077 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2995 Reviewed-on: https://chromium-review.googlesource.com/c/1392381 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 03923558 2018-12-29T10:29:33 Load entry points dynamically in tests and samples. This CL adds a dynamic loader generator based on XML files. It also refactors the entry point generation script to move the XML parsing into a helper class. Additionally this includes a new GLES 1.0 base header. The new header allows for function pointer types and hiding prototypes. All tests and samples now load ANGLE dynamically. In the future this will be extended to load entry points from the driver directly when possible. This will allow us to perform more accurate A/B testing. The new build configuration leads to some tests having more warnings applied. The CL includes fixes for the new warnings. Bug: angleproject:2995 Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05 Reviewed-on: https://chromium-review.googlesource.com/c/1359516 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Tobin Ehlis bec39877 2018-12-12T16:23:30 tests:Fix memory leak in MipmapTest Update createRGBInitData() to use/return std::vector instead of raw ptr w/ "new." This prevents potential for memory leaks. Bug: angleproject:2958 Change-Id: I4b1bb4ee293e171f56d1221a562e607ff8eb0fb3 Reviewed-on: https://chromium-review.googlesource.com/c/1375229 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tobin Ehlis <tobine@google.com>
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>
Jamie Madill 3f3b358f 2018-09-14T10:38:44 Vulkan: Fix cube map attachment clears and readpixels. These were both missing the correct layer offset. Cache the layer inside the RenderTargetVk for easy access. Bug: angleproject:2470 Change-Id: I690dbf0702d7ec52f44ba0a9429b6ef0e51baf6b Reviewed-on: https://chromium-review.googlesource.com/1225910 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 71bb0267 2018-09-12T11:09:42 Vulkan: Implement cube map render targets. Each TextureVk now stores vectors of RenderTargetVks and ImageViews associated with the image faces. They are initialized lazily when the RenderTarget is queried in getAttachmentRenderTarget. There's still one missing edge case for handling clear with the Framebuffer when using cube maps. Also one additional test failure on Android. Bug: angleproject:2470 Change-Id: Ib959a3434a992cef010a11940cf2ee49e118ac17 Reviewed-on: https://chromium-review.googlesource.com/1220727 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Luc Ferron 2f3f4141 2018-05-30T08:27:19 Vulkan: Fix texture completeness issues The fix is to skip updates that are queued that are not valid for the current image description. We keep these around in case they are used in a later usage of the same texture but we issue a warning telling the user that memory will be used indefinitely until they use that data. Bug: angleproject:2596 Change-Id: I8c20fffbd473ae8e2e9d2123a49b675b824a9bf6 Reviewed-on: https://chromium-review.googlesource.com/1078913 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Luc Ferron 05cd6dfc 2018-05-24T15:51:29 Vulkan: generateMipmaps with vkCmdBlitImage when possible Bug: angleproject:2502 Change-Id: Ib32a128a453749c59d751e996017a8a6e2a9972e Reviewed-on: https://chromium-review.googlesource.com/1072550 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Luc Ferron c20b950e 2018-05-24T09:30:17 Vulkan: Fix clear of specific mip level was clearing all mip levels Bug: angleproject:2502 Change-Id: Iffa012dce14584318c4dfd3d9b3a304291c9cebf Reviewed-on: https://chromium-review.googlesource.com/1070666 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Luc Ferron c5181706 2018-05-17T09:44:42 Vulkan: generateMipmaps for 2D textures - This implements cpu-only mipmaps generation. To do in the next CLs: - Cube textures support - GPU faster path with vkCmdBlitImage - Find the bug with clearing of level 0 mips. - Investigate the intel linux specific bug. Bug: angleproject:2502 Change-Id: Iecd73cb45ebc9c79ce6291c4529eb27330b51e2c Reviewed-on: https://chromium-review.googlesource.com/1064194 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
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>
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>
Kenneth Russell e7a792c6 2017-04-28T16:31:03 Suppress MipmapTestES3.BaseLevelTextureBug failures on 10.12.4. BUG=705865 Change-Id: Ife59aaf009365a51b5362a00373d1efaceba9fb8 Reviewed-on: https://chromium-review.googlesource.com/490946 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2aadbfc3 2017-04-27T10:11:27 Expand the MipmapTestES3.BaseLevelTextureBug supression to all AMD OpenGL. BUG=705865 BUG=715875 Change-Id: Ib4d83a8c9cb3f65ac8517bfd3ff7c38794dd0654 Reviewed-on: https://chromium-review.googlesource.com/488661 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 66c5e619 2017-04-25T11:40:03 TextureD3D: Mark images dirty after deleting the texture storage. When a texture storage is deleted, it copies its mip levels back into images and marks them clean. Marking the images dirty before deleting the texture storage would have no effect. BUG=705865 Change-Id: Ib4c0fc9bea1236fc31963d1b7db814785bc54abc Reviewed-on: https://chromium-review.googlesource.com/486107 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yunchao He f81ce4a3 2017-04-24T10:49:17 Refactoring: replace NULL by nullptr for pointers (3rd CL). This CL mainly handles passing/returning NULL to/from a function. BUG=angleproject:2001 Change-Id: I34802f792e710e3d7ff697cbe4701dc1bf5ab009 Reviewed-on: https://chromium-review.googlesource.com/485060 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 46258e1f 2017-04-10T12:28:34 Blit9: Pass the dest rect to setViewportAndShaderConstants. Using the sourceRect for calculating the viewport and texture coordinates was not enough when the source and destination rectangles were different sizes (generating mipmaps). BUG=709232 Change-Id: I2704ddf6e3da0939ad77d278ab495e53a2d9bc7d Reviewed-on: https://chromium-review.googlesource.com/473266 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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>
Olli Etuaho fb80eaf0 2016-07-25T13:39:30 Enable GenerateMipmapBaseLevel test on NVIDIA The issue is no longer reproducible on newest drivers. TEST=angle_end2end_tests Change-Id: I18728877ed9b936ecb469c44e3dae185ab4f08d3 Reviewed-on: https://chromium-review.googlesource.com/362950 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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>
Olli Etuaho 0f2b1560 2016-05-13T16:15:35 Fix GenerateMipmap when base level or max level are set According to GLES 3.0.4 section 3.8.10, GenerateMipmap should generate levels based on the base level, and generate them at most up to the max level. Levels outside the base/max level range should be unchanged by GenerateMipmap. The Texture class is fixed so that the image descs are set only for the changed mipmap range when GenerateMipmap is called. The D3D backend is fixed so that mipmap generation is correctly started from the base level instead of level 0, and making sure that mipmaps are generated only up to the max level. Generating mipmaps for array textures is also fixed for cases where the base level depth >= max(width, height) * 2. The GL backend is fixed to sync texture state before GenerateMipmap is called, so that base level and max level are set correctly in the driver. The GenerateMipmap entry point is refactored so that it has a separate validation function and a context function which does the work. Validation for out-of-range base levels is added. New tests are added to verify the functionality. One corner case in the tests fails on NVIDIA GL drivers likely due to a driver bug - similar rules for GenerateMipmap are found from newer GLES specs and also OpenGL specs (checked versions 3.3 and 4.4). BUG=angleproject:596 TEST=angle_end2end_tests Change-Id: Ifc7b4126281967fc4f6dc4f9452e5b01e39f83d7 Reviewed-on: https://chromium-review.googlesource.com/344514 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 190028d3 2016-05-13T12:11:29 Clean up specifying colors and texture scale in MipmapTest Remove unnecessary scale parameter from MipmapTestES3, and use the GLColor class and EXPECT_PIXEL_COLOR_EQ instead of EXPECT_PIXEL_EQ for greater readability. BUG=angleproject:596 TEST=angle_end2end_tests Change-Id: I79c30ce85be5d554d89197f8f1ce7ab0c51c11b6 Reviewed-on: https://chromium-review.googlesource.com/344513 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho b97a3e77 2016-04-13T14:31:52 Clean up MipmapTest This refactoring is done to prepare for adding more mipmap tests for ES3 where base level / max level is changed from 0. 1. Reuse drawQuad() from ANGLETest instead of having completely custom quad drawing code, and reuse the same clear+draw function for both 2D and cube map texture tests. 2. Add a helper function for clearing texture level 0 with glClear. 3. Remove a few redundant texture binding and useProgram calls. 4. Rely on sampler uniforms being set to 0 by default and texture unit 0 being active by default. 5. Remove "Offscreen" from variable names. 6. Split SetUp functions to helper functions. 7. Reuse FillWithRGBA from TextureTest also in MipmapTest. BUG=angleproject:596 TEST=angle_end2end_tests Change-Id: I9fd738f4b8b0a19c7aa1d267f7dbaa40a6935631 Reviewed-on: https://chromium-review.googlesource.com/338791 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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>
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>
Olli Etuaho 183d7e24 2015-11-20T15:59:09 Remove predefined precision qualifiers from ESSL3 samplers New sampler types in ESSL3 should not have default precision qualifiers. This is specified in ESSL 3.00.4 section 4.5.4. BUG=angleproject:1222 TEST=angle_unittests Change-Id: I9c8e7a5fbb4278db80de79bcaeebaf23e64242a0 Reviewed-on: https://chromium-review.googlesource.com/312048 Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Corentin Wallez 254fceac 2015-08-25T15:11:07 Fix two leaks and a delete vs delete[] reported by ASAN BUG=angleproject:1137 Change-Id: Ic654b79aa56ae0c0a24097b85ab48f5af53ca1f7 Reviewed-on: https://chromium-review.googlesource.com/295154 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 322653bf 2015-06-17T18:33:56 Fix Chromium build of angle_end2end_tests BUG=angleproject:892 Change-Id: I9922046fc9e4d82d7034405f5952263f982c6529 Reviewed-on: https://chromium-review.googlesource.com/278159 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 35b08e3c 2015-06-03T11:22:07 Skip MipmapTest.RenderOntoLevelZeroAfterGenerateMipmap on Intel too. Seeing failures on some Intel HD4000 cards as well as AMD. BUG=angleproject:1038 Change-Id: I45dfcdf62af69cd3295918d963def85f2eb50ebe Reviewed-on: https://chromium-review.googlesource.com/274943 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 27359ff7 2015-06-02T15:42:04 Read the proper uniform location instead of assuming location 0. Fixes MipMapTest on Intel/OpenGL. BUG=angleproject:1038 Change-Id: I19a0704969ef03d5d2ee3c9092daf4bd3a9818f7 Reviewed-on: https://chromium-review.googlesource.com/274818 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: 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>