src/tests/gl_tests/TextureTest.cpp


Log

Author Commit Date CI Message
Shahbaz Youssefi 962c222a 2019-02-20T15:43:41 Vulkan: Enable anisotropy feature when available If anisotropic filtering is used, the feature must be enabled at device creation time. This was missing. Bug: angleproject:2901 Change-Id: I86db55f8b1696dc04eae922b941512f786aa12b8 Reviewed-on: https://chromium-review.googlesource.com/c/1479264 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@google.com>
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>
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>
Shahbaz Youssefi 0864a7ac 2018-11-07T15:50:15 Vulkan: Enable end2end tests for ES2_VULKAN everywhere Used a script to find test files that have more ES2_OPENGL() invocations than ES2_VULKAN(), and added ES2_VULKAN() to those. There may be false negatives. Bug: angleproject:1578 Change-Id: I938eb3571c909879e9276b355a9f1d324880f99a Reviewed-on: https://chromium-review.googlesource.com/c/1324350 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Till Rathmann b8543630 2018-10-02T19:46:14 Support GL_OES_texture_border_clamp Added support for GL_TEXTURE_BORDER_COLOR and GL_CLAMP_TO_BORDER in OpenGL/OpenGLES, Direct3D9 and Direct3D11 backends. For integer textures in OpenGLES3 contexts these additional entry points are available now: void glTexParameterIivOES(enum target, enum pname, const int *params); void glTexParameterIuivOES(enum target, enum pname, const uint *params); void glGetTexParameterIivOES(enum target, enum pname, int *params); void glGetTexParameterIuivOES(enum target, enum pname, uint *params); void glSamplerParameterIivOES(uint sampler, enum pname, const int *params); void glSamplerParameterIuivOES(uint sampler, enum pname, const uint *params); void glGetSamplerParameterIivOES(uint sampler, enum pname, int *params); void glGetSamplerParameterIuivOES(uint sampler, enum pname, uint *params); BUG=angleproject:2890 TEST=angle_end2end_tests.TextureBorderClamp* Change-Id: Iee3eeb399d8d7851b3b30694ad8f21a2111f5828 Reviewed-on: https://chromium-review.googlesource.com/c/1257824 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5ddbdbf7 2018-10-01T10:15:37 Vulkan: Fix bugs in glGenerateMipmaps. We had two separate minor bugs. 1) missing a flush of the image data and 2) missing an initial barrier to set the image to TRANSFER_DST. Bug: angleproject:2652 Bug: angleproject:2653 Change-Id: I485aafc5c9055b5efb101cb2bc3ebab0588d2639 Reviewed-on: https://chromium-review.googlesource.com/1249564 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jiawei Shao af0f31d3 2018-09-27T15:42:31 Enable several end2end tests on Windows Intel drivers Bug: angleproject:1388 angleproject:1706 Change-Id: Ic6c62b0a85756bf36b6d345610a77ffd5c4665e3 Reviewed-on: https://chromium-review.googlesource.com/1248442 Commit-Queue: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0fdb956d 2018-09-17T17:18:43 Re-land "Inline and micro-optimize more for perf tests."" Re-land fixes memory leaks. Using a custom array instead of std::vector speeds up the resource manager. One reason is because calls to size() are implemented in many implementations as a difference between two pointers. This sub size implementations are slower than storing a simple size variable in a custom class. Also includes more inlining of hot spots functions. Also includes a small unit test class for ResourceMap. And an unrelated but small test fix for TextureLimisTest. Also a small unrelated fix for a Transform Feedback test. Increase the scores of the draw call perf test with texture and buffer bindings and the buffer binding perf test. Bug: angleproject:2763 Change-Id: Ic2f0f689107b2bf05c63da2ed6bbc9f0feea63f7 Reviewed-on: https://chromium-review.googlesource.com/1229033 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 98a3e078 2018-09-17T19:40:04 Revert "Inline and micro-optimize more for perf tests." This reverts commit 57ff6f95f143bd65a0c3d12d64773f274b9935f4. Reason for revert: Memory leaks detected during roll in https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux_chromium_asan_rel_ng/100284 Original change's description: > Inline and micro-optimize more for perf tests. > > Using a custom array instead of std::vector speeds up the resource > manager. One reason is because calls to size() are implemented in many > implementations as a difference between two pointers. This sub size > implementations are slower than storing a simple size variable in a > custom class. > > Also includes more inlining of hot spots functions. > > Also includes a small unit test class for ResourceMap. And an unrelated > but small test fix for TextureLimisTest. Also a small unrelated fix for > a Transform Feedback test. > > Increase the scores of the draw call perf test with texture and buffer > bindings and the buffer binding perf test. > > Bug: angleproject:2763 > Change-Id: I41c327987db27ac45e6a62579f01e1cdc22e396c > Reviewed-on: https://chromium-review.googlesource.com/1171510 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=fjhenigman@chromium.org,ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org Change-Id: Ie047289c9bf23a842c3cbb9692c811da0534991c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2763 Reviewed-on: https://chromium-review.googlesource.com/1228893 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 57ff6f95 2018-09-14T12:44:52 Inline and micro-optimize more for perf tests. Using a custom array instead of std::vector speeds up the resource manager. One reason is because calls to size() are implemented in many implementations as a difference between two pointers. This sub size implementations are slower than storing a simple size variable in a custom class. Also includes more inlining of hot spots functions. Also includes a small unit test class for ResourceMap. And an unrelated but small test fix for TextureLimisTest. Also a small unrelated fix for a Transform Feedback test. Increase the scores of the draw call perf test with texture and buffer bindings and the buffer binding perf test. Bug: angleproject:2763 Change-Id: I41c327987db27ac45e6a62579f01e1cdc22e396c Reviewed-on: https://chromium-review.googlesource.com/1171510 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@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>
Jamie Madill 44558e37 2018-08-31T17:19:14 Vulkan: Enable TextureLimitsTest. Seems to pass possibly because of a prior bug fix. Bug: angleproject:2654 Change-Id: I53e67bfa28e5429c51720fa71d9168d2f1cf1ece Reviewed-on: https://chromium-review.googlesource.com/1199928 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Till Rathmann c1551dc2 2018-08-15T17:04:49 D3D11 fix: Mipmapping was used although disabled via Sampler When using a sampler the texture was created as if it has mipmaps, regardless what you specified in GL_TEXTURE_MIN_FILTER via glSamplerParameteri() -- mistakenly the default value GL_NEAREST_MIPMAP_LINEAR or the value set via glTexParameteri() was evaluated. If you didn't provide mipmaps and didn't let the driver generate them this led to not sampling your texture data when minification occurred. BUG=angleproject:2772 TEST=angle_end2end_tests.Texture2DTestES3.MinificationWithSamplerNoMipmapping Change-Id: I195147e208129c6fa8686bb0d9aea6931b2f20b1 Reviewed-on: https://chromium-review.googlesource.com/1175910 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Luc Ferron f786b706 2018-07-10T11:01:43 Vulkan: Enable viewport Y flipping Bug: angleproject:2728 Bug: angleproject:2726 Bug: angleproject:2673 Bug: angleproject:2729 Change-Id: Iad657a116bf9fcd06c3d4cf1918aaacba4f1fd38 Reviewed-on: https://chromium-review.googlesource.com/1131515 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Luc Ferron c94ba1d5 2018-06-18T11:26:28 Vulkan: Enable a bunch of texture related tests Also adds a small bugfix in PixelBuffer::stageSubresourceUpdateFromFramebuffer where we weren't using the right format for the pack pixels params. The format should be unsized so that the fastcopyfunc / colorwritefunc / colorreadfunc are found correctly if needed when packing pixels. Bug: angleproject:2653 Bug: angleproject:2501 Change-Id: Ie4aacc623ddc9583360ab0c99be19d3db2bdbf44 Reviewed-on: https://chromium-review.googlesource.com/1104395 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 50cf2be0 2018-06-15T09:46:57 Reformat some style in touched files. This was triggered by running the code generation script. Bug: angleproject:2665 Change-Id: Id639c78eb618182ee1859678590cf0f559b572c2 Reviewed-on: https://chromium-review.googlesource.com/1101564 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Luc Ferron <lucferron@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4cc753e0 2018-06-13T13:25:33 Vulkan: Implement sampler arrays. Bug: angleproject:2462 Change-Id: If9c9cb69624d6f9f0895f6883e1eed19a27e6cb4 Reviewed-on: https://chromium-review.googlesource.com/1089809 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Luc Ferron af883628 2018-06-08T15:57:31 Vulkan: enable as many end2end tests as possible Bug: angleproject:2615 Change-Id: I918cc18984b2e5b22b5e13398355a2fd60e4eb00 Reviewed-on: https://chromium-review.googlesource.com/1093564 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Luc Ferron 7348fc5b 2018-05-09T07:17:16 Vulkan: Clear to opaque black instead of transparent This is a problem when we emulate RGB8 with RGBA8. Bug: angleproject:2536 Change-Id: I5665e513ef0138bc56f52ba35342378d8392989f Reviewed-on: https://chromium-review.googlesource.com/1051687 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Luc Ferron fa7503ca 2018-05-08T11:25:06 Vulkan: Support EXT_texture_storage This is a prerequisite to support incomplete textures. Bug: angleproject:2536 Change-Id: Ica40bbd185a67253f457148007b08f6735da788c Reviewed-on: https://chromium-review.googlesource.com/1050308 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Olli Etuaho 023371b3 2018-04-24T17:43:32 Fix setting mip level metadata on GL backend LUMA texture workarounds are now being used correctly in case texture levels that have only been touched by generateMipmap are used to draw. BUG=angleproject:2498 TEST=angle_end2end_tests Change-Id: I739550d59f99a4a22ffae766a5ee52c07610d78a Reviewed-on: https://chromium-review.googlesource.com/1025995 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 5804dc8e 2018-04-13T14:11:46 Refactor GL tests to use a shader library Instead of having the same simple shaders repeated over and over in the test code, reuse a single shader library. BUG=angleproject:2474 TEST=angle_end2end_tests Change-Id: I13f8ca8c0125e6d30f1761639bf8c3f69e0e77d2 Reviewed-on: https://chromium-review.googlesource.com/1012078 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Luc Ferron d8c632c8 2018-04-10T12:31:44 Vulkan: Cleanup some TODOs in TextureTest.cpp Bug: angleproject:2364 Change-Id: I316db1f6796a4a2efe344dd4b0a4a6e7bf2ead90 Reviewed-on: https://chromium-review.googlesource.com/1005556 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Luc Ferron 5164b797 2018-03-06T09:10:12 Vulkan: Support GL_LUMINANCE and GL_LUMINANCE_ALPHA The dEQP tests cannot be turned on before immediate data for drawElements is supported. Bug:angleproject:2364 Change-Id: Id5fd6fbc0c74f2dba08341f36ca0091d540f4ed8 Reviewed-on: https://chromium-review.googlesource.com/951402 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Jiawei Shao 3c43b4d1 2018-02-23T11:08:28 Fix incorrect conversion in ConvertToGLint This patch fixes a bug in function ConvertToGLint. This function should convert ParamType into GLint instead of GLenum. This patch can fix the bug that no errors are generated when trying to set negative base level or max level by glTexParameteri because ConvertToGLint always incorrectly converts a negative integer into an unsigned integer in ValidateTexParameterBase. BUG=angleproject:2371 TEST=angle_end2end_tests dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.texparameter* Change-Id: Id5baf3430ae574a083bcc40a7a8f7db1cb2d07ed Reviewed-on: https://chromium-review.googlesource.com/933923 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Commit-Queue: Jamie Madill <jmadill@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 2f23f35a 2018-02-11T22:11:37 Clean up end2end tests for Intel OSX. BUG=angleproject:2205 BUG=angleproject:2041 BUG=angleproject:2155 Change-Id: I26bcbb63e147787cd342ec80a86d60cf230be4c9 Reviewed-on: https://chromium-review.googlesource.com/913108 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@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>
Yunchao He 14cb42c0 2018-01-24T14:11:19 Clean up passed end2end tests on Intel Linux platforms. Only one end2end test still fail for ANGLE issue 1346. BUG=angleproject:1346 Change-Id: Ibeefe600b21b6ae2056e304d18a8fc4071a48cbe Reviewed-on: https://chromium-review.googlesource.com/882294 Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 49886899 2018-01-23T21:18:27 Skip TextureCOMPRESSEDRGB8ETC2ImplicitAlpha1 on Mac NVIDIA GL Also TextureCOMPRESSEDSRGB8ETC2ImplicitAlpha1. Flaky on Mac Experimental Retina Release (NVIDIA) bot. BUG=angleproject:2190 Change-Id: Iad620808db3977625ccd7221f6c3eb7a453802e9 Reviewed-on: https://chromium-review.googlesource.com/882391 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang fb7685f4 2017-11-13T11:44:11 Validate texture parameters for >0 after rounding. From the spec (2.3.1 Data Conversion For State-Setting Commands): "Validation of values performed by state-setting commands is performed after conversion, unless specified otherwise for a specific command." BUG=783574 Change-Id: I9edf585a17489ad284bc85a1c3c2236b53ee34d9 Reviewed-on: https://chromium-review.googlesource.com/766569 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang fb05264b 2017-10-24T13:42:09 Disallow null pixel data for TexSubImage that have non-zero size. BUG=angleproject:2055 Change-Id: I4c338691776c6d807333c169ed876d686188a97c Reviewed-on: https://chromium-review.googlesource.com/735786 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jiang d922775b 2017-10-19T16:23:07 Clean up passed end2end tests on Intel Windows platform Intel driver has released its latest versions, many intel driver bugs are fixed. This patch cleans up end2end test cases skipped on windows 10 and windows 7. The test environment is as follows, Hardware: Skylake(HD 530), Kabylake(HD 630) Driver version: 4815, 4821 OS: windows 10(15063), windows 7. BUG=angleproject:2205 Change-Id: Iae14763aa86a572da1221e9ea35b28da2561d3b0 Reviewed-on: https://chromium-review.googlesource.com/729549 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang f7480ad2 2017-10-24T11:46:02 D3D11 FL 10: Create cubemap SRVs as cube maps instead of 2D arrays. The creation of these SRVs would fail and spew D3D11 runtime errors. BUG=angleproject:2171 Change-Id: I80b6390822f74128b3443db7b6d48c4d318ec34d Reviewed-on: https://chromium-review.googlesource.com/735745 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 05b35b21 2017-10-03T09:01:44 D3D11: Lazy robust resource init. This patch moves the robust resource init logic to the GL front-end. Instead of initializing texture resources immediately on creation in D3D11, it defers the clear until before a draw call in some cases, or skips the update if we can determine if a texture (or other resource) has been fully initialized. Currently lazy init is only implemented for Textures, Renderbuffers, and Surfaces. Various places where lazy resource init is triggered: * Framebuffer operations (Draw, Blit, CopyTexImage, Clear, ReadPixels) * Texture operations (SubImage, GenerateMipmap, CopyTexImage) Some efficiency gains remain to be implemented, such as when a SubImage call fills the entire object. Similarly for Blit, and a few other operations. In these cases we can skip lazy init as an optimization. Edge cases with EGLImage are mostly untested. BUG=angleproject:2107 Change-Id: I2bf3a69b1eae0d4feeb5b17daca23451f1037be8 Reviewed-on: https://chromium-review.googlesource.com/576058 Commit-Queue: 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>
Martin Radev 7e2c0d37 2017-09-15T14:25:42 Fix cubemap completeness check The patch updates the cubemap completeness check to use the base level instead of always level 0. Without this change the cubemap faces at level 0 would have to be created in order to specify another base level through TexParameteri. BUG=angleproject:2153 TEST=angle_end2end_tests Change-Id: Iee1fdc6adf0e69d797821a2ce2f2b2b85dfcdfc1 Reviewed-on: https://chromium-review.googlesource.com/668439 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 3ed60424 2017-09-07T11:32:52 Test using the same texture with multiple samplers. This covers a regression introduced with texture dirty bits. BUG=angleproject:1387 Change-Id: Ic8112718c185298ef54ec5a6f6ed2cd519e010d6 Reviewed-on: https://chromium-review.googlesource.com/653586 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 677bb6ff 2017-04-05T12:40:40 Update checks for floating point renderability. * Expose GL_CHROMIUM_color_buffer_float_rgb and GL_CHROMIUM_color_buffer_float_rgba * Fix many texture formats that were incorrectly checking the wrong extension for support or renderability. * Make all floating point texture extensions dynamically enableable. BUG=angleproject:1958 BUG=angleproject:1715 Change-Id: Iefccc8b5ae5edd97623affa9de05b1d9af5c9598 Reviewed-on: https://chromium-review.googlesource.com/468450 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang c4e93668 2017-05-01T10:45:59 Update end2end tests to function without EXT_texture_storage. This also exposed an issue in our glTexSubImage2D validation where the sized format would be used for the texture support check when the unsized format was provided. The GL_ALPHA32F format is not valid unless EXT_texture_storage is present but using GL_ALPHA + GL_FLOAT is valid. BUG=angleproject:1958 Change-Id: Ice0b7549c39559990942176481c5175df17aaf92 Reviewed-on: https://chromium-review.googlesource.com/491246 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez d262799c 2017-04-28T17:17:03 Take depth into account when checking for OOB in TexImage3D BUG=angleproject:2017 Change-Id: Id75a8c0ddf4eda4b569509e2014c20db6f5c46ff Reviewed-on: https://chromium-review.googlesource.com/490848 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
Frank Henigman 999b0fd2 2017-02-02T21:45:55 Validate uniform sampler values. Generate GL_INVALID_VALUE when setting a sampler uniform with a value outside the range [0, GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS). Add a test for the new behavior. Remove TextureLimitsTest.DrawWithTexturePastMaximum, which is made obsolete by the new test. BUG=angleproject:1711 Change-Id: I9a4ea13b8cb47742816476689bd3932ce267fd0a Reviewed-on: https://chromium-review.googlesource.com/430196 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Zhenyao Mo e520d7c6 2017-01-13T13:46:49 Skip DepthTexturesWithMipmaps on Win Intel. BUG=angleproject:1706 TEST=Win Intel HD 530 Debug bot on GPU FYI waterfall Change-Id: I9037e777f42654e7030bcf197e81d0c118bb792d Reviewed-on: https://chromium-review.googlesource.com/428221 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill bb1db48e 2017-01-10T10:48:32 Suppress two new failing tests on OSX 10.12 Intel. BUG=chromium:679607 Change-Id: Iacba3958dc942d7830caec8e053148533bff4069 Reviewed-on: https://chromium-review.googlesource.com/425872 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@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>
Geoff Lang c51642b4 2016-11-14T16:18:26 Validate level exists for TexSubImage calls. Before validating the texture format, verify that the texture level already exists in glTexSubImage calls. BUG=602737 Change-Id: I0d83c7d43c7b358abdb59583dc83265df70c13b5 Reviewed-on: https://chromium-review.googlesource.com/411361 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill f097e238 2016-11-05T00:44:15 D3D11: Fix 3D texture redefinition bug. We would incorrectly check the storage type after we had redefined it. Thus we would allow old storages to persist for some cases of 3D texture. This bug did not affect 2D textures. See WebGL 2 test: conformance2/misc/views-with-offsets.html BUG=angleproject:1609 Change-Id: I7a04ff498740bb5d7daf2cee174c336f97a44c01 Reviewed-on: https://chromium-review.googlesource.com/408417 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
John Bauman 18319182 2016-09-28T14:22:27 Re-land "Fix glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, ...)" BUG=angleproject:1332 Change-Id: Ie970466c4528cb80b2363d0c0683da2d9c23c4f4 Reviewed-on: https://chromium-review.googlesource.com/392267 Commit-Queue: John Bauman <jbauman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
John Bauman 5dc37d05 2016-10-01T00:00:19 Revert "Fix glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, ...)" This reverts commit ca40662aa81f7735d3510fa52e55d28503c7f9ec. https://chromium.googlesource.com/angle/angle/+/ca40662aa81f7735d3510fa52e55d28503c7f9ec broke angle_end2end_tests on the Win Debug bots. Examples: https://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Debug%20%28NVIDIA%29/builds/18718 https://build.chromium.org/p/chromium.gpu.fyi/builders/Win8%20Debug%20%28NVIDIA%29/builds/15905 Tests failing: Texture2DTest.QueryBinding/ES2_D3D11 Texture2DTest.QueryBinding/ES2_D3D9 Texture2DTest.QueryBinding/ES2_D3D11_9_3 Change-Id: If9da864f49e0de3a134d43ae36c2a99e9b5a2a53 Reviewed-on: https://chromium-review.googlesource.com/391130 Reviewed-by: John Bauman <jbauman@chromium.org>
John Bauman ca40662a 2016-09-28T14:22:27 Fix glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, ...) BUG=angleproject:1332 Change-Id: I591b9520bc1122eb6232803ac86b6d0322f8c349 Reviewed-on: https://chromium-review.googlesource.com/390323 Commit-Queue: John Bauman <jbauman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang f607c60a 2016-09-21T11:46:48 Fix validation of ReadPixels format and type. The validation for ReadPixels allows for two combations of format/type: 1. Based on the current framebuffer's component type. * GL_RGBA/GL_UNSIGNED_BYTE if the framebuffer is a normalized (signed or unsigned). * GL_RGBA_INTEGER/GL_INTEGER if the framebuffer is an integer format. * GL_RGBA_INTEGER/GL_UNSIGNED_INTEGER if the framebuffer is an unsigned integer format. * GL_RGBA/GL_FLOAT if the framebuffer is any type of float framebuffer (added in EXT_color_buffer_float). * These combations are detailed in the ES2 spec on pg 105 or ES3 on pg 193. 2. The implementation read format/type returned from glGetIntegerv. * These formats are added by specs, OES_texture_float, EXT_texture_rg, EXT_read_format_bgra, etc. Update the GL and D3D backends to perform the conversion from GL_HALF_FLOAT to GL_HALF_FLOAT_OES. Continue allowing reading as BGRA_EXT to support Skia. Should be removed in the future. BUG=607283 BUG=angleproject:1478 Change-Id: I0312cad4d5f138ab036f383d221f8ccd19a77f6d Reviewed-on: https://chromium-review.googlesource.com/346232 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 2e60034b 2016-09-19T13:56:40 D3D11: Store Buffer SRVs in native storage. This allows us to not store std::pairs to identify SRVs. Instead we can release the cached SRVs directly when we re-create the native buffer. BUG=angleproject:1513 Change-Id: I6f6d5edc659aa843c9439b97661073415f1a772b Reviewed-on: https://chromium-review.googlesource.com/385818 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 8fcdf6ee 2016-09-16T10:45:30 Supress failures in end2end tests for new Intel OpenGL driver. Change-Id: I442eac44212406b0fd9fb64b2e4e914bf61f8503 Reviewed-on: https://chromium-review.googlesource.com/386280 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 7ffdda9a 2016-09-08T13:26:51 D3D11: Don't allow fast unpack from GL_ALPHA8. This format is one that doesn't support buffer SRV creation. It seems like there is no equivalent dEQP test for this format. BUG=angleproject:1503 Change-Id: I9ecdb9406ca0b62dd54b450d2b50341d76584b2b Reviewed-on: https://chromium-review.googlesource.com/381435 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez e731d8aa 2016-09-07T10:56:25 TextureTest: suppress failure for newly added test. BUG=angleproject:1493 BUG=chromium:638323 Change-Id: I5cab149c735158fe810f002e47cc3c5c75bc503b Reviewed-on: https://chromium-review.googlesource.com/381951 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 14718767 2016-09-06T15:56:54 Remove usage of std::log2 in tests. For some reason, this was giving a link error on Android. Change it to use the mathutil version to be sure. BUG=angleproject:1493 BUG=chromium:638323 Change-Id: I454ba4609d7818f50c668bb7c1a3b684f9ca8444 Reviewed-on: https://chromium-review.googlesource.com/381671 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9e3d7aa0 2016-09-02T15:19:43 D3D11: Work around small mipped stencil textures. AMD has a bug with 2x2 and 1x1 mips of depth/stencil textures. Formats D24S8 and D32FS8 both seem to render black for the very small mips. We can work around this by selectively caching a copy of the texture data that only has depth information, since stencil isn't filterable in OpenGL ES. BUG=angleproject:1493 BUG=chromium:638323 Change-Id: Iebef42c4680018d9854dbe789d677823167213dd Reviewed-on: https://chromium-review.googlesource.com/380037 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
Yuly Novikov 3c754194 2016-06-27T19:36:41 Skip Texture2DTestES3.UnpackSkipImages2D test on Adreno Android GLES Due to a bug in Adreno glTexImage2D with GL_UNPACK_SKIP_IMAGES. BUG=angleproject:1429 TEST=Texture2DTestES3.UnpackSkipImages2D Change-Id: Iccb4cc968915a623f0aed099b81e759c6e4343f7 Reviewed-on: https://chromium-review.googlesource.com/356494 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov ad6c0452 2016-06-24T22:24:37 Skip SamplerInStruct AsFunctionParameter tests on Adreno Android GLES Due to Adreno bug in compiling struct function parameter in shader. BUG=angleproject:1427 TEST=SamplerInStructAsFunctionParameterTest SamplerInStructArrayAsFunctionParameterTest SamplerInNestedStructAsFunctionParameterTest Change-Id: I979312885f2047e78b61530c97703854a4be1586 Reviewed-on: https://chromium-review.googlesource.com/356125 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov afcec834 2016-06-21T22:19:51 Skip Texture2DTestES3.TextureLuminance16ImplicitAlpha1 on Adreno Android GLES Due to Adreno bug in GL_HALF_FLOAT support BUG=angleproject:1420 TEST=Texture2DTestES3.TextureLuminance16ImplicitAlpha1 Change-Id: Id9bc12da21048a557325f076202ec482675320e3 Reviewed-on: https://chromium-review.googlesource.com/354782 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@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>
Olli Etuaho 218cf9ee 2016-05-20T13:55:24 Fix unpacking overlapping unpack buffer rows on NVIDIA GL When unpack parameters are set so that rows being read overlap in the unpack buffer stored in GPU memory, NVIDIA GL driver may not upload the last pixels of the last one or more rows of a texture. The driver may also crash when the amount of overlap is high. This issue affects both TexImage* and TexSubImage* calls. Work around the issue by uploading textures row by row when the rows being read overlap in the unpack buffer. The workaround could possibly be optimized by uploading several of the first rows with a single call in some cases where the amount of overlap is low, but this is expected to be a rarely used corner case, so the added complexity that the optimization would create seems like a bad tradeoff. The issue does not seem to be triggered when the layers (images) of a 3D texture overlap, as long as the rows inside the images don't. The workaround has been ported from Chromium. This patch adds setting dirty bits when unpack state is set in StateManagerGL. The included test case also reveals some issue in the D3D backend, but this is left to be addressed later. BUG=angleproject:1376 TEST=angle_end2end_tests Change-Id: I7dbe73ebb70bbbc284fa92381546f4f2f832d333 Reviewed-on: https://chromium-review.googlesource.com/346430 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 989cac34 2016-06-08T16:18:49 Validate that unpack skip is in bounds Unpack skip needs to be taken into account when determining which part of the unpack buffer is read. This is now done in the out-of-bounds check when validating texture upload calls. Unpack skip code is removed from D3D9 backend, since skip is not supported in GLES2. BUG=angleproject:1411 TEST=angle_end2end_tests Change-Id: I0db4db0877a352613c57e2820e5b650edb5a73ab Reviewed-on: https://chromium-review.googlesource.com/352450 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 95faa233 2016-06-07T14:01:53 Do not apply UNPACK_SKIP_IMAGES for 2D textures on D3D Resubmitted with test skip added for Intel OpenGL. GLES 3.0.4 section 3.8.3: "For the purposes of decoding the texture image, TexImage2D is equivalent to calling TexImage3D with corresponding arguments and depth of 1, except that UNPACK_SKIP_IMAGES is ignored." An "applySkipImages" boolean parameter is added to the functions in the D3D backend that apply skip offset to the unpack pointer. In case 2D texture data is uploaded, the parameter is set to false and UNPACK_SKIP_IMAGES is not applied. BUG=angleproject:1406 TEST=angle_end2end_tests Change-Id: I5878439e3d38dbae89cc2452a056c2d6bbf9e0b3 Reviewed-on: https://chromium-review.googlesource.com/351330 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang a1d6c4dc 2016-06-09T18:00:42 Revert "Do not apply UNPACK_SKIP_IMAGES for 2D textures on D3D" The Windows Intel GPU FYI bot started failing the Texture2DTestES3.UnpackSkipImages2D/ES3_OPENGL test after this CL. Example: https://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20%28New%20Intel%29/builds/866 This reverts commit ac3575b27296398baebeb6c891871c6dac7df338. Change-Id: I5120261f5cf1ece9b21e4a94f63f85e014d2d8e4 Reviewed-on: https://chromium-review.googlesource.com/351280 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho ac3575b2 2016-06-07T14:01:53 Do not apply UNPACK_SKIP_IMAGES for 2D textures on D3D GLES 3.0.4 section 3.8.3: "For the purposes of decoding the texture image, TexImage2D is equivalent to calling TexImage3D with corresponding arguments and depth of 1, except that UNPACK_SKIP_IMAGES is ignored." An "applySkipImages" boolean parameter is added to the functions in the D3D backend that apply skip offset to the unpack pointer. In case 2D texture data is uploaded, the parameter is set to false and UNPACK_SKIP_IMAGES is not applied. BUG=angleproject:1406 TEST=angle_end2end_tests Change-Id: Iedc2b05377adee8d5c2504511a87421f4b1db18d Reviewed-on: https://chromium-review.googlesource.com/350465 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Vincent Lang 25ab4510 2016-05-13T18:13:59 Implement GL_EXT_texture_norm16 extension BUG=angleproject:1365 Change-Id: I972b156ecb41ff44bc1f6365373ab386bacc85f1 Reviewed-on: https://chromium-review.googlesource.com/346530 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho e8528d89 2016-05-16T17:50:52 Fix determining texture mipmap completeness The code didn't previously take base level properly into account when determining how many levels to check when checking for texture completeness. The code is refactored so that the "q" value in spec, that is the maximum mipmap level for determining completeness, can be queried from TextureState. This value is used now for checking completeness. This requires moving ImageDescs under TextureState. Functions that operate on the ImageDesc array are also moved from Texture to TextureState. TextureState members are also renamed to start with the "m" prefix and made private. Also handle levels outside the base/max level range consistently in eglCreateImageKHR validation. We interpret the spec so that if the level used for the EGL image is not a part of the texture levels that affect texture completeness, an error is generated. BUG=angleproject:596 TEST=angle_end2end_tests Change-Id: I038ef24aa83e0a6905ca3c0bbada5989eecb00d9 Reviewed-on: https://chromium-review.googlesource.com/344880 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho be815a4f 2016-05-12T20:38:38 Apply effective base and max level on GL backend This works around GL drivers that neglect to clamp the base level or max level of immutable textures. BUG=angleproject:596 BUG=610800 TEST=angle_end2end_tests Change-Id: Ie4e04aaa9253f2befd73bccefa7759486b3ef487 Reviewed-on: https://chromium-review.googlesource.com/344590 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 87fc71c4 2016-05-11T14:25:21 D3D: Reallocate storage when texture format changes with base level Different levels of the same texture may have different formats, so changing the base level may affect the format that should be used for the storage. Take this into account in the D3D backend. The added test fails on some GL drivers. TEST=angle_end2end_tests BUG=angleproject:596 Change-Id: I5380e942694a75685ebb510edb01c0489e0d5179 Reviewed-on: https://chromium-review.googlesource.com/344230 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 0f2ef7f9 2016-05-11T12:51:05 Suppress and end2end failure caused by a Mesa bug BUG=610800 Change-Id: I4ee6ba589afc98277c3cf50b8f57afb184b11216 Reviewed-on: https://chromium-review.googlesource.com/343994 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho a314b61c 2016-03-10T16:43:00 Determine D3D texture storage size with correct base level The size of the texture storage is now determined by extrapolating the level zero texture dimensions from the base level dimensions. This fixes crashing when images for levels below the base level are not defined, and also fixes texture storage dimensions being calculated wrong in case the levels outside the used level range have dimensions that are inconsistent with the dimensions inside the used level range. Checking texture level completeness in TextureD3D is now done based on the dimensions of the base level, and levels that are outside the base level to max level range are not taken into account. Textures are marked incomplete in case their base level is greater than their max level. Changing the base level can also affect the size of the storage required for the texture. Old storage is now discarded when the base level is changed and the new base level calls for different storage dimensions. Code in TextureD3D is refactored so that "base level" actually means the base level of the texture specified through the GLES API, and "level zero" is used where TextureD3D would sometimes previously use "base level". Changing either the base level or max level can also affect texture completeness, so invalidate the cached completeness in Texture if they are changed. Some of the added tests are still failing on Intel and NVIDIA OpenGL drivers because of driver bugs. Tests also fail on OSX. BUG=angleproject:596 TEST=angle_end2end_tests, dEQP-GLES3.functional.texture.* (no regressions), dEQP-GLES3.functional.shaders.texture_functions.* (no regressions), dEQP-GLES3.functional.state_query.texture.* (no regressions) Change-Id: Icd73d6e29f84a341ed5ff36d5ec5cb2f469cb4e8 Reviewed-on: https://chromium-review.googlesource.com/333352 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>
Olli Etuaho a1c917f2 2016-04-06T13:50:03 Suppress samplers in structs test failures on Intel OpenGL Some of the tests made to verify D3D implementation of samplers in structs are failing on Intel's OpenGL drivers, so suppress the failures. Since the test was crashing in shader program setup, shader program setup needs to be moved out of the SetUp() function of the texture tests. BUG=600758 TEST=angle_end2end_tests Change-Id: I1b6e788d900425e914572d2a3d7ef1fc43146f50 Reviewed-on: https://chromium-review.googlesource.com/337500 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 9696316d 2016-03-21T11:54:33 Support ESSL structs containing samplers on D3D Since HLSL can't natively handle samplers in structs, samplers need to be extracted out of structs into separate variables in the translated shader code. In HLSL 4.1, samplers that were in structs go into the normal sampler arrays and are identified by index constants. In other HLSL versions, samplers that were in structs are translated as uniform variables. These transformations are done inside the HLSL output classes, not as tree transformations. This helps to keep the uniform API provided by the shader translator intact. Wherever a struct containing samplers is passed into a user-defined function, the translated HLSL code passes the separate sampler variables alongside a struct where the samplers have been removed. The D3D backend in libANGLE queries the uniform registers of any samplers that were in uniform structs, and adds them to the register maps, so that correct sampler state gets assigned to them. The extracted sampler variables are prefixed with "angle_" instead of the usual "_" to prevent any name conflicts between them and regular variables. BUG=angleproject:504 TEST=angle_end2end_tests, dEQP-GLES*.functional.shaders.struct.uniform.* (all pass), dEQP-GLES*.functional.uniform_api.* (most now pass) Change-Id: Ib79cba2fa0ff8257a973d70dfd917a64f0ca1efb Reviewed-on: https://chromium-review.googlesource.com/333743 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 9e3c615e 2016-03-29T21:58:33 Suppress end2end failures for the new Linux Intel bot. Since this is a new bot, we should make it green ASAP so we can catch any new regressions. BUG=angleproject:1346 Change-Id: I2c1288b8115a9d7980d5a3f37753b35cbb837486 Reviewed-on: https://chromium-review.googlesource.com/336050 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 356f5165 2016-03-18T14:19:41 Add a texture data fill helper function to tests Several tests need to initialize arrays of RGBA texture data. Add a helper function for this to reduce duplication and to make the code more readable. BUG=angleproject:596 TEST=angle_end2end_tests Change-Id: Id4a35b34a8fad25c2dc263ad8635dd43355a4f17 Reviewed-on: https://chromium-review.googlesource.com/333911 Reviewed-by: Corentin Wallez <cwallez@chromium.org> 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>
Olli Etuaho 6ee394a1 2016-02-18T13:30:09 Add initializer function to more texture formats All GL RGB formats that ANGLE stores as RGBA formats under the covers need to have their alpha channel set to 1. See GLES 3.0.4 table 3.24 for the relevant spec. In some cases, this is handled by the dataInitializerFunction associated with the format. Previously, some texture formats had the function set correctly, but not all. Associating formats with the datainitializerFormat is now a responsibility of the gen_texture_format_table.py script. The new automation there makes sure that all GL RGB formats emulated with RGBA formats get a data initializer function. Tests are added in end2end_tests for most of the RGB formats. BUG=angleproject:1318 TEST=angle_end2end_tests Change-Id: Iad860357f33d87c625445ea6c58a53af47e0b547 Reviewed-on: https://chromium-review.googlesource.com/328253 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho bce743ab 2016-01-15T17:18:28 Use texture base level to implement textureSize on D3D11 HLSL HLSL GetDimensions call doesn't take the texture base level into account, so ANGLE needs to use the texture base level passed in uniforms to emulate ESSL textureSize() which does take it into account. After this change the relevant dEQP tests pass on NVIDIA, Intel is still suffering from an issue where a wrong value is returned when the lod is > 0 (tested on Intel HD Graphics 4600). AMD is also suffering from an unknown issue. BUG=angleproject:596 TEST=dEQP-GLES3.functional.shaders.texture_functions.texturesize.* (all pass on NVIDIA now), angle_end2end_tests Change-Id: I13e33d126008ecdf2b89461a3fb5040949cf19e2 Reviewed-on: https://chromium-review.googlesource.com/322123 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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>
Austin Kinross d544cc9f 2016-01-11T15:26:42 Fail any ANGLE test if it outputs D3D11 SDK message in debug mode Also: - Disable some Feature Level 9_3 tests that trigger SDK messages - Fix a debug object name issue. If you try to assign a debug name to an object twice then you get an SDK warning message. This can occur if you 'create' two objects (e.g. Rasterizer States) with identical DESCs on the same device, since D3D11 can optimize this and return the same object both times. - Disable the message checks in Line Loops tests, since the tests trigger incorrect D3D11 SDK messages on Win7 machines BUG=angleproject:667;angleproject:1282 Change-Id: I7284fb3a11377afde24e0014e21dbcea80ebb126 Reviewed-on: https://chromium-review.googlesource.com/321393 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Austin Kinross <aukinros@microsoft.com> Tested-by: Austin Kinross <aukinros@microsoft.com>
Olli Etuaho a7416ff7 2016-01-18T12:22:55 Fix texture completeness check when base level > 0 is used ANGLE would previously treat a texture as incomplete whenever its base level was above 0. This was because the base level wasn't being taken into account correctly when determining what size the image at a specific mip level should be. Fix this by taking the base level into account when determining the expected size. BUG=angleproject:596 TEST=angle_end2end_tests Change-Id: I4b05514aed2858797ea46cf3570c3c40e5efc508 Reviewed-on: https://chromium-review.googlesource.com/322132 Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho c8c99a0a 2016-01-14T16:47:22 Add a texture test with a mix of different sampler types This test makes sure that even if sampler / texture registers get grouped together based on type in the HLSL backend of the shader translator, the D3D renderer still has the right register index information for each ESSL sampler. BUG=angleproject:1261 TEST=angle_end2end_tests Change-Id: Id09f96cfa903cd20c8e7229980fa363bb07b6045 Reviewed-on: https://chromium-review.googlesource.com/322200 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 1a679900 2016-01-14T12:21:47 Test shadow sampler + 3D sampler in the same shader Shadow samplers use a different sampler object type in D3D11 HLSL than other ESSL samplers. They need to be able to coexist in the same shader. BUG=angleproject:1261 TEST=angle_end2end_tests Change-Id: I960f6a41c0237ed912b072527e14aebeca98cf7c Reviewed-on: https://chromium-review.googlesource.com/322120 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>
Olli Etuaho 51f1c0f0 2016-01-13T16:16:24 Add a workaround for default framebuffer sometimes being SRGB On some GL driver/window system combinations the default framebuffer may do SRGB conversion, which affects the values written there by draw operations and read by readPixels. This is known to happen at least on some Intel systems. For this reason, use an FBO with a known format instead in the texture end2end tests. This enables turning on most TextureTest cases on the OpenGL backend. Tested on Intel HD 4600. BUG=angleproject:1261 TEST=angle_end2end_tests Change-Id: I5a39bd1dadf15b7c52793a0f66d67e9f61618b83 Reviewed-on: https://chromium-review.googlesource.com/321612 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 19d48db1 2016-01-13T14:43:21 Fix incorrect delete function call in TextureTest The test must call glDeleteBuffers to delete a buffer instead of glDeleteTextures. This was one reason behind the texture tests failing on the GL backend. BUG=angleproject:1261 TEST=angle_end2end_tests Change-Id: I67042f6948146f3c3fca9e01231b0c4935a6f08d Reviewed-on: https://chromium-review.googlesource.com/321611 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross 5faa15bf 2016-01-11T13:32:48 Fix null sampler warning in TextureTest.TextureNPOT_GL_ALPHA_UBYTE The test deliberately tries to render a scene using an invalid texture. ANGLE rendered this correctly, but when it bound the dummy 1x1 black texture that's used instead of invalid textures, it didn't bind a sampler state. This meant that D3D had no pixel shader samplers bound, and outputted a debug warning. Also, technically the test should have been setting GL_UNPACK_ALIGNMENT=1, but that wasn't impacting the result of the test. BUG=angleproject:1248 Change-Id: I871706d518077ea840a585ae0df8f9176e130cb1 Reviewed-on: https://chromium-review.googlesource.com/321391 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 2173db3d 2016-01-12T13:55:14 Add sampler array tests This adds some coverage for samplers that is missing from dEQP. The shaders in the added tests both have a sampler array with two samplers. The test shaders sample both textures, add up the results, and the tests then check that the results of the shaders are correct. Only constant indexing is used to access the sampler arrays. One test accesses the sampler array in the main function, another one first passes the array as a parameter to a user-defined function. BUG=angleproject:1261 TEST=angle_end2end_tests Change-Id: I9a0100705ac0da4905d50da37c0149fdbdd24c42 Reviewed-on: https://chromium-review.googlesource.com/321623 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>