src/libANGLE/validationES2.cpp


Log

Author Commit Date CI Message
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>
Yizhou Jiang 7818a85c 2018-09-06T15:02:04 Implement GL_ANGLE_texture_multisample API part Support GL_ANGLE_texture_multisample extension. This patch adds enums of multisampled texture and texStorage2DMultisampleANGLE API. TEST=angle_end2end_tests.exe --gtest_filter=TextureMultisampleTest* TEST=angle_end2end_tests.exe --gtest_filter=NegativeTextureMultisampleTest.Negtive* BUG=angleproject:2275 Change-Id: I2cab997edc33aa2d0be6082381545335423f64e0 Reviewed-on: https://chromium-review.googlesource.com/c/804613 Commit-Queue: Yizhou Jiang <yizhou.jiang@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho f2ed2995 2018-10-04T13:54:42 Add support for EXT_texture_compression_bptc After validation, the enums are simply forwarded to the native drivers. The BPTC formats are supported on both OpenGL and D3D. The included test coverage covers the API quite well, but only has basic coverage for correct decoding of texture data. More coverage for texture data could be added later. BUG=angleproject:2869 TEST=angle_end2end_tests Change-Id: I3de37972dcf13c6fa3fc1bc429a2627523a4a082 Reviewed-on: https://chromium-review.googlesource.com/c/1261675 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill a139f01a 2018-10-10T16:13:03 Inline ValidateBindBuffer. This method is only called in one place. Inlining reduces the need to make a jump and push/pop variables from the stack. It also adds a specialized error handler for validation errors. This reduces the amount of code generated for errors. The prior method generates a lot of code when dealing with string streams. Improves performance of the binding performance test. Bug: angleproject:2763 Change-Id: I52af7046b398072975bf5bda583efac9a9b9a8cb Reviewed-on: https://chromium-review.googlesource.com/c/1270219 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill ac66f982 2018-10-09T18:30:01 Optimize ValidateBindTexture type check. This switch can be cached in a very fast packed map. The map contents only change if different extensions are exposed. This reduces the number of instructions we hit in ValidateBindTexture. Bug: angleproject:2763 Change-Id: I6ba8a4124d85e4c193d0dee3e03e50713d51b1f4 Reviewed-on: https://chromium-review.googlesource.com/c/1262739 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@google.com>
Jamie Madill 31116738 2018-10-09T18:30:01 Inline many more hotspots for the Texture draw test. Bug: angleproject:2763 Change-Id: Ib8193e7ff5ee7763b92f4775fb7e9adaa51c9305 Reviewed-on: https://chromium-review.googlesource.com/c/1262738 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@google.com>
Brandon Jones 4e6f2aea 2018-09-19T11:09:51 Implement ANGLE_copy_texture_3d Extension Adds copyTexture3DANGLE and copySubTexture3DANGLE that adds copy operations on volumetric textures. Bug: angleproject:2762 Test: angle_end2end_tests Change-Id: I0076989c2b7ed69abfc73143c325065bdb06a360 Reviewed-on: https://chromium-review.googlesource.com/c/1207216 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 44a6fbfd 2018-10-02T13:38:56 Optimize resolveLink. This changes the program query to resolve the link if required. If the validation layer is skipped the link is resolved in the gl::Context. Resolving the link on program query allows us to avoid resolving the link on most of the gl::Program query APIs. This improves inlining and particularly affects uniform update. It fixes a performance regression introduced by the parallel shader linking extension. Gives a 17% increased score on a uniform benchmark. Also fixes two missing cases of checking for the extension in our validation code. Note that some bugs might still exist when the validation layer is disabled. Bug: angleproject:2851 Change-Id: I5d725eede3fa147cedf2ce0129791b3412a97a61 Reviewed-on: https://chromium-review.googlesource.com/1255509 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@google.com>
Olli Etuaho ab5fb5ed 2018-09-18T17:23:28 Reland "Support EXT_blend_func_extended in the GLES2 context" This re-lands EXT_blend_func_extended implementation. A lot of the implementation has been rewritten on top of changes that have been done since the last attempt. For now we only expose the extension on desktop GL. To support GLES, we'd need to investigate what's the most robust way to handle the compiler output and make the binding of the fragment outputs conditional. The extension is disabled on AMD and Intel because of test failures. BUG=angleproject:1085 TEST=angle_end2end_tests Change-Id: I619ae3162769b90aad095ddec158ce6c57a114a8 Reviewed-on: https://chromium-review.googlesource.com/1233713 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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 16e28fd3 2018-09-12T11:03:05 More micro-optimization for draw call validation. Mostly inlining checks on the hot draw call path. Slight increase in draw call validation performance. (Up to 13%) Bug: angleproject:2747 Change-Id: I34c4d7f412c3bca5e559e9bfb5689c0618bb7536 Reviewed-on: https://chromium-review.googlesource.com/1171506 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 064458a8 2018-08-30T14:02:02 Remove separate ANGLE_texture_multisample_array We can just expose OES_texture_storage_multisample_2d_array instead. The compiler was already changed to accept OES_texture_storage_multisample_2d_array, and now the change is made also at the API level. Out-of-bounds access guarantees provided by ANGLE were the only big difference between the ANGLE spec and the OES spec, so it's simpler to just expose the native extension. Safe out-of-bounds accesses can be guaranteed without having them in the extension spec. This also adds missing texStorage3DMultisample entry point to the proc table, which will enable running dEQP tests. BUG=angleproject:2775 TEST=angle_end2end_tests Change-Id: Idf376ee877a3374a33de177df023f0531ec8f01d Reviewed-on: https://chromium-review.googlesource.com/1196722 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho d310a434 2018-08-24T15:40:23 Add validation and negative tests for multisample arrays This adds errors for binding and allocating multisample array textures. New tests in TextureMultisampleTest.cpp check that the errors are generated as specified. Tests for querying supported sample counts are also improved and extended for multisample array textures. BUG=angleproject:2775 TEST=angle_end2end_tests Change-Id: I6a0fe7ae04bb3d0072f6cbe09026b05e2bc47325 Reviewed-on: https://chromium-review.googlesource.com/1188576 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 6e5bf36f 2018-08-15T09:53:17 GLES1: Fixes for Gets() test - Fixed wrong face parameter for glGetMaterial*. - Enabled GL_LINE_SMOOTH capability in state only (no rendering yet) - Enabled logical operation capability in state only (no rendering yet) - Fixed wrong handling of GL_RGB/ALPHA_SCALE and GL_POINT_COORD_REPLACE_OES Test: Enable and pass Gets() GLES1 conformance test BUG=angleproject:2306 Change-Id: Ib5c50a2055129b76ad24053baf0dac24dcc00761 Reviewed-on: https://chromium-review.googlesource.com/1176161 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Olli Etuaho f0e3c19a 2018-08-15T13:37:21 Add error messages for BlitFramebuffer related errors These are particularly helpful when debugging multiview rendering that requires a framebuffer blit. Existing blitFramebuffer error message strings are moved to ErrorStrings.h. BUG=angleproject:1617 TEST=angle_end2end_tests Change-Id: I6e8b45355045d80abf044714ac4b9d818c53bf46 Reviewed-on: https://chromium-review.googlesource.com/1175125 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
jchen10 3fd614d0 2018-08-13T12:21:58 Refactor Context dependency for resolveCompile The context parameter of Shader::resolveCompile method causes a bad impact that many methods in Shader, Program etc. have to have a same context parameter. By removing it, these methods can be decoupled from Context. BUG=chromium:849576 Change-Id: Ia5545ee9dce45794550f6086bc0e6c4707e1276e Reviewed-on: https://chromium-review.googlesource.com/1172202 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 3003f048 2018-07-23T14:41:57 Don't generate error for compressed texture formats in glFramebufferTexture2D This validation error was added in 0186813531a7e8f47d584ca7fb54a73ed99d19be without explanation. Shouldn't be an error according to GLES 2.0.25 spec. Bug: 844846 Change-Id: Idc6d4d76304cbede7aa6d96bdccaefec40272b84 Reviewed-on: https://chromium-review.googlesource.com/1147149 Reviewed-by: Antoine Labour <piman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Olli Etuaho 94c91a95 2018-07-19T15:10:24 Don't allow multiview clear during timer query This brings the ANGLE_multiview spec in line with WEBGL_multiview. This also fixes the test so that the timer query extension is requested when it is being tested. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ibd5c117a5ae2642d26137d9ad44420d6601ba762 Reviewed-on: https://chromium-review.googlesource.com/1143283 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jiang e2c00841 2018-07-13T16:50:49 GenerateMipmaps should generate INVALID_OPERATION in ES 2.0 with EXT_sRGB According to the OpenGL extension spec EXT_sRGB.txt, EXT_SRGB is based on ES 2.0 and generateMipmap is not allowed if texture format is SRGB_EXT or SRGB_ALPHA_EXT. BUG=769989 TEST=SRGBTextureTest.SRGBValidation* TEST=SRGBTextureTest.SRGBAValidation* Change-Id: Ic51da224fcd318187865a44630af6fca5c3ad2de Reviewed-on: https://chromium-review.googlesource.com/1137924 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Yizhou Jiang <yizhou.jiang@intel.com>
Jamie Madill ca2ff38b 2018-07-11T09:01:17 Refactor internal format pixel math methods. This removes the use of the ErrorOrResult class from these methods. This will enable more performant Error handling. Also cleans up the ANGLE_TRY_CHECKED_MATH macro to be more general. Bug: angleproject:2713 Change-Id: I349947d320907839ca88ec1f9251e6ddc3858a08 Reviewed-on: https://chromium-review.googlesource.com/1128920 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill a2f043d8 2018-07-10T17:21:20 dEQP: Implement platform error handling. Also downgrades several Vulkan UNIMPLEMENTED() to WARN(). Also downgrades a couple D3D-specific errors to warnings. Also downgrades an undefined behaviour integer clear error to warning. Also includes suppressions for failing D3D11 ES 3.1 SSBO tests. Also includes suppressions for failing Android GLES format tests. Also includes suppressions for failing Android Vulkan buffer tests. Bug: angleproject:2552 Bug: angleproject:2567 Bug: angleproject:1951 Bug: angleproject:2405 Change-Id: Ie619085021d42012cd578b669f7ff4252ca41a58 Reviewed-on: https://chromium-review.googlesource.com/1062791 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Lingfeng Yang f97641c1 2018-06-21T19:22:45 GLES1: Texture parameters Note: minimum buffer size is now checked for texture parameters in GLES2. - Mipmap generation hint - Crop rect - Update test expectations BUG=angleproject:2306 Change-Id: Ib459b8191111732a1326b44f2226b72ca297325a Reviewed-on: https://chromium-review.googlesource.com/1111575 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
jchen10 82af620e 2018-06-22T10:59:52 ParallelCompile: Add entry points. Add the extension text, entry points and validations. BUG=chromium:849576 TEST=angle_end2end_tests Change-Id: I4c06ee30e4f4fe9bb1c1fecada747b9c78fed0ea Reviewed-on: https://chromium-review.googlesource.com/1103789 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Lingfeng Yang 9c4c0926 2018-06-13T09:29:00 Reland "GLES1: Point rasterization (partial implementation)" This is a reland of 4004ae0e033a0169de3cb53c0a036833ad47178a Fix: Put the missing early-out in ValidatePointParameterCommon Original change's description: > GLES1: Point rasterization (partial implementation) > > - Not included: Smooth points > > - GL_OES_point_sprite > - Update test expectations. Note: due to different random sampling, > edge cases were hit in UserClip. Disabling that test for now. > > BUG=angleproject:2306 > > Change-Id: If8367bc3321804b3299d3bc381d6a8e236754baa > Reviewed-on: https://chromium-review.googlesource.com/1101910 > Reviewed-by: Corentin Wallez <cwallez@chromium.org> > Commit-Queue: Lingfeng Yang <lfy@google.com> Bug: angleproject:2306 Change-Id: Id8e71352a77ff0ce71cb604965effbfb8aca613e Reviewed-on: https://chromium-review.googlesource.com/1108458 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Frank Henigman a58d69e9 2018-06-20T18:07:11 Revert "GLES1: Point rasterization (partial implementation)" This reverts commit 4004ae0e033a0169de3cb53c0a036833ad47178a. Crash in PointParameterTest.NegativeEnum/ES1_OPENGL. https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac%20FYI%20GPU%20ASAN%20Release/1178 angle_end2end_tests on Intel GPU on Mac on Mac-10.12.6 angle_end2end_tests on ATI GPU on Mac Retina on Mac-10.12.6 Original change's description: > GLES1: Point rasterization (partial implementation) > > - Not included: Smooth points > > - GL_OES_point_sprite > - Update test expectations. Note: due to different random sampling, > edge cases were hit in UserClip. Disabling that test for now. > > BUG=angleproject:2306 > > Change-Id: If8367bc3321804b3299d3bc381d6a8e236754baa > Reviewed-on: https://chromium-review.googlesource.com/1101910 > Reviewed-by: Corentin Wallez <cwallez@chromium.org> > Commit-Queue: Lingfeng Yang <lfy@google.com> TBR=geofflang@chromium.org,jmadill@chromium.org,cwallez@chromium.org,lfy@google.com Change-Id: I776ce0506d349382b3af035c962aa2c3f6826b99 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2306 Bug: angleproject:2680 Reviewed-on: https://chromium-review.googlesource.com/1108457 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Lingfeng Yang 4004ae0e 2018-06-13T09:29:00 GLES1: Point rasterization (partial implementation) - Not included: Smooth points - GL_OES_point_sprite - Update test expectations. Note: due to different random sampling, edge cases were hit in UserClip. Disabling that test for now. BUG=angleproject:2306 Change-Id: If8367bc3321804b3299d3bc381d6a8e236754baa Reviewed-on: https://chromium-review.googlesource.com/1101910 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Yuly Novikov f15f886c 2018-06-04T18:59:41 Differentiate texture and renderbuffer framebuffer attachment capabilities ANGLE used to describe the abitily to attach textures and renderbuffers of a specific format to a framebuffer using a single notion of "renderable". However, for some formats, only one can be supported, but not the other. Split TextureCaps::renderable into textureAttachment and renderbuffer. Also, split InternalFormat::renderSupport into textureAttachmentSupport and renderbufferSupport. The only functional change is in a few places which now explicitly check for texture or renderbuffer attachement support. Information in format support tables was duplicated for the two capabilities, so behavior should remain the same. It should be corrected in future CLs. Note: additional information in those tables may need to be added in order to properly support GenerateMipmap and TexStorage2DMultisample, this is beyond the scope of this CL. Bug: angleproject:2567 Change-Id: I18bce4100525be35709d8bbf4de08ec812aab502 Reviewed-on: https://chromium-review.googlesource.com/1086491 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Lingfeng Yang 7ba3f425 2018-06-01T09:43:04 GLES1: Fog API and rendering - Update test expectations BUG=angleproject:2306 Change-Id: Ic5aa5f052bcbe9c5adaf0eb0c6c06df66fd1720c Reviewed-on: https://chromium-review.googlesource.com/1082978 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Lingfeng Yang 060088a5 2018-05-30T20:40:57 GLES1: Clip plane API and rendering - Add unit tests for the API - Update test expectations + Pass through point size from the vertex array to the shader, required for new tests to pass. BUG=angleproject:2306 Change-Id: Ib19436c1f4cb12873adea94f734c821363f9e27d Reviewed-on: https://chromium-review.googlesource.com/1079993 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Lingfeng Yang d0febe7a 2018-05-17T22:36:52 Reland "GLES1: Entry points for lighting and materials" This is a reland of 4a09c1a245c406e402b3996b7ed33798b897e60f Entry points have been autogenerated again. Original change's description: > GLES1: Entry points for lighting and materials > > - glLight*/glMaterial and their queries > - Use new packed enums in these entry points, except for lightmodel > which stays GLenum to be consistent with other generic glGet's > - State.cpp: New glGet* queries related to light model and > light/normal rescale enablement > - GLES1State.cpp: Functions to get/set lighting/material state > - Validation for lighting/materials > > + Add a few convenience methods to random_utils for sampling > non-negative floats and a sampler for random booleans > > BUG=angleproject:2306 > > Change-Id: If7ba0c0a0dc75f88fbaa986b904f1ea96ee6512e > Reviewed-on: https://chromium-review.googlesource.com/1065502 > Commit-Queue: Lingfeng Yang <lfy@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: angleproject:2306 Change-Id: I434273acd5200dd9f4925e239a032cc8db31a434 Reviewed-on: https://chromium-review.googlesource.com/1072849 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Jamie Madill 493f9571 2018-05-24T19:52:15 Add PrimitiveMode packed GLenum. Bug: angleproject:2574 Change-Id: I3d7bd7ca0d69a364a611dc04799ea34906fc4a6c Reviewed-on: https://chromium-review.googlesource.com/1067114 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Lingfeng Yang 668e507f 2018-05-24T17:12:14 Revert "GLES1: Entry points for lighting and materials" This reverts commit 4a09c1a245c406e402b3996b7ed33798b897e60f. Reason for revert: Seems to break the build Original change's description: > GLES1: Entry points for lighting and materials > > - glLight*/glMaterial and their queries > - Use new packed enums in these entry points, except for lightmodel > which stays GLenum to be consistent with other generic glGet's > - State.cpp: New glGet* queries related to light model and > light/normal rescale enablement > - GLES1State.cpp: Functions to get/set lighting/material state > - Validation for lighting/materials > > + Add a few convenience methods to random_utils for sampling > non-negative floats and a sampler for random booleans > > BUG=angleproject:2306 > > Change-Id: If7ba0c0a0dc75f88fbaa986b904f1ea96ee6512e > Reviewed-on: https://chromium-review.googlesource.com/1065502 > Commit-Queue: Lingfeng Yang <lfy@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,jmadill@chromium.org,cwallez@chromium.org,lfy@google.com Change-Id: Ifabd708ded87c7484ad6d466508e2c2d6ea2557c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2306 Reviewed-on: https://chromium-review.googlesource.com/1071828 Reviewed-by: Lingfeng Yang <lfy@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 4a09c1a2 2018-05-17T22:36:52 GLES1: Entry points for lighting and materials - glLight*/glMaterial and their queries - Use new packed enums in these entry points, except for lightmodel which stays GLenum to be consistent with other generic glGet's - State.cpp: New glGet* queries related to light model and light/normal rescale enablement - GLES1State.cpp: Functions to get/set lighting/material state - Validation for lighting/materials + Add a few convenience methods to random_utils for sampling non-negative floats and a sampler for random booleans BUG=angleproject:2306 Change-Id: If7ba0c0a0dc75f88fbaa986b904f1ea96ee6512e Reviewed-on: https://chromium-review.googlesource.com/1065502 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang e88e4548 2018-05-03T15:05:57 Implement extensions exposing ETC2 compressed texture formats in ES2. BUG=angleproject:2527 Change-Id: I000f68366de4119375b6d3c79bc2eff3ebd5db9e Reviewed-on: https://chromium-review.googlesource.com/1042885 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Lingfeng Yang 23dc90b8 2018-04-23T09:01:49 GLES1: Enable/disable for texture targets BUG=angleproject:2306 Change-Id: I08ac9ef91753112f8185d16423925cf265f0384e Reviewed-on: https://chromium-review.googlesource.com/1023987 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang e24032a2 2018-03-28T15:41:46 The 'format' of unsized SRGB internal formats should be SRGB too. EXT_sRGB requires calling TexImage with SRGB as the 'format' parameter. This was causing issues when we would take an InternalFormat struct representing an unsized sRGB format and be unable to use it's format member to make GL calls without transforming it. BUG=693090 Change-Id: I8b9baf2591a998a0088e5275f42ffc568e37100d Reviewed-on: https://chromium-review.googlesource.com/984965 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 427064d2 2018-04-13T16:20:34 Fix perf regression with checkStatus. Returning an Error was costing us performance in extra error checks. This intead uses the Context to process the Error immediately, and returns a value from isComplete and checkStatus. Improves performance in draw call validation. Bug: chromium:822235 Change-Id: I0793fc690e86137425fed593d45083e40aee8db9 Reviewed-on: https://chromium-review.googlesource.com/1011370 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 01074436 2018-04-16T10:19:51 GLES1: gl(Enable|Disable)ClientState + Introduce the GL_OES_point_size_array extension for point size array support. BUG=angleproject:2306 Change-Id: Ib1a60b7dcd0497eb807f0d3c80bc95b4748d9a96 Reviewed-on: https://chromium-review.googlesource.com/1014282 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill cc129377 2018-04-12T09:13:18 ImageIndex: Consolidate layer/cube face. In terms of the Texture or Image resource, a cube face refers to a layer of a 2D texture. This layer has a special meaning for cube textures, but it is represented as a layer with a layer index. Cube array textures are no different, they just use a different indexing scheme for the array layers. This also cleans up the ImageIndex helper to have a class structure with private data, and cleans up a few cases to use generic Make functions and iterators where they were setting properties of the index directly. This will make it easier to have ImageIndexes address entire levels of a Cube map in the future, and makes the layer count logic in Vulkan cleaner. Bug: angleproject:2318 Change-Id: Iea9842e233f974a9896282ca224cb001f7882bd1 Reviewed-on: https://chromium-review.googlesource.com/987525 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Brandon Jones 416aaf95 2018-04-10T08:10:16 Autogenerate ANGLE extension entry points Modify autogeneration script to pull data from gl_ext.xml and generate entry_points_gles_2_0_ext_autogen.cpp/h as a replacement for entry_points_gles_2_0_ext.cpp/h Bug:angleproject:2263 Bug:angleproject:1309 Change-Id: Ie21079f8ec5f85c657b891f6d6d59306a4c3b5fe Reviewed-on: https://chromium-review.googlesource.com/1005409 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Brandon Jones fe4bbe6c 2018-04-06T13:50:14 Create Stubs For Unimplemented Extensions Create context and validation stubs for unimplemented extensions. This will allow us to use an autogeneration script in the future to generate entry_points_gles_2_0_ext.cpp. Bug:angleproject:2263 Change-Id: If3ad3ebd823d65085c7f143cce9e09187e65d4da Reviewed-on: https://chromium-review.googlesource.com/998440 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Brandon Jones 59770806 2018-04-02T13:18:42 Refactor ANGLE Extensions Context Calls Refactors ANGLE extensions context calls into a common format for future autogeneration. Any work that occurred in the entry point has been moved into its own context member function. Bug:angleproject:2263 Change-Id: I91cb3aca6a8c135ed3ae80a723d6cf16b54aeda6 Reviewed-on: https://chromium-review.googlesource.com/990809 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 038dd539 2018-03-29T17:31:52 GLES1: glMultiTexCoord4(f|x) BUG=angleproject:2306 + common validation for multitexturing units + clang-format Change-Id: I6eb456c273490e85fc7008e7e11d15e22dd20276 Reviewed-on: https://chromium-review.googlesource.com/987298 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Brandon Jones d104918f 2018-03-28T10:02:20 Refactor ANGLE Extensions Validation Refactors ANGLE Extensions Validation functions into a common format for future autogeneration. Any writes to output parameters that occurred within the ANGLE entry point have been moved into the corresponding validation function. Bug:angleproject:2263 Change-Id: I7a678310ad481c1379596a493fcb0b0383fcf3b8 Reviewed-on: https://chromium-review.googlesource.com/985244 Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 96310cda 2018-03-28T11:56:28 GLES1: glClientActiveTexture + adds query for GL_MAX_TEXTURE_UNITS BUG=angleproject:2306 Change-Id: Ie89fa6a067551170856bf0f7e6d7b4452b3da132 Reviewed-on: https://chromium-review.googlesource.com/984894 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 13b708f2 2018-03-21T12:14:10 GLES1: glAlphaFunc BUG=angleproject:2306 Change-Id: I0bf229d3ab8a4a1217c12b434dcd8fa67d7cbadc Reviewed-on: https://chromium-review.googlesource.com/973897 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei Shao 385b3e03 2018-03-21T09:43:28 Use packed enums on shader types in ANGLE renderer This patch uses a packed internal enum ShaderType everywhere we need a shader type instead of the GLenum value of the shader type. This patch also uses program::getAttachedShader(type) everywhere we need to get gl::Shader from a program in ANGLE. BUG=angleproject:2169 Change-Id: I28a7fa1cfe35622c57a486932911110688eaadec Reviewed-on: https://chromium-review.googlesource.com/972844 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill e98b1b5d 2018-03-08T09:47:23 Framebuffer: Handle errors in checkStatus. This pipes a lot more errors around in the Validation, where they now will be caught. Bug: angleproject:2372 Change-Id: Ibb4e47ddc932995a02dd92e10578b7a4097182a9 Reviewed-on: https://chromium-review.googlesource.com/954406 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5b772312 2018-03-08T20:28:32 Nuke ValidationContext. This pattern never really took off. It was intended to be used to unit-test our Validation logic, but it become so complex because of interactions with Framebuffer::syncState that we could never really make use of it. Nuke it entirely and simplify the Context class. Bug: angleproject:2372 Change-Id: I40b9d46ce7706511a210da496ee19192cf609366 Reviewed-on: https://chromium-review.googlesource.com/954291 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
James Darpinian e8a93c6e 2018-01-04T18:02:24 New transform feedback buffer binding rules Detects undefined behavior when a buffer is bound to a transform feedback binding point and a non transform feedback binding point at the same time. Also moves the transform feedback buffer generic binding point out of the transform feedback object and into the context's global state, to match driver behavior. This way binding a new transform feedback object does not affect GL_TRANSFORM_FEEDBACK_BUFFER_BINDING which is similar to how VAOs work with GL_ARRAY_BUFFER_BINDING. Bug: 696345 Change-Id: If3b9306cde7cd2197a8ce35e10c3af9ee58da0b8 Reviewed-on: https://chromium-review.googlesource.com/853130 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Brandon Jones 2878379d 2018-03-05T09:37:32 Add NPOT validation to copyTextureCHROMIUM copyTextureCHROMIUM should generate INVALID_VALUE when using a NPOT texture and level not equal to zero, so we should add validation to catch this case. BUG=angleproject:2380 Change-Id: I7ca2e657287c11d560db0ad296f8e87ed0c19798 Reviewed-on: https://chromium-review.googlesource.com/956018 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuly Novikov e3688d27 2018-03-07T22:14:54 Revert "Add NPOT validation to copyTextureCHROMIUM" This reverts commit 2202680c6a5d08ba74d57ce675af2266dddb205c. Reason for revert: ASAN found error https://ci.chromium.org/buildbot/chromium.gpu.fyi/Mac%20FYI%20GPU%20ASAN%20Release/210 Original change's description: > Add NPOT validation to copyTextureCHROMIUM > > copyTextureCHROMIUM should generate INVALID_VALUE when using a NPOT > texture and level not equal to zero, so we should add > validation to catch this case. > > BUG=angleproject:2380 > > Change-Id: I0ea50a981e4d8f10f5913969f6b629617b57aa15 > Reviewed-on: https://chromium-review.googlesource.com/951713 > Commit-Queue: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,jmadill@chromium.org,brandon1.jones@intel.com Change-Id: I04dcbd5e1d97b1bd968b26a06e4d3e4d175be0d8 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2380 Reviewed-on: https://chromium-review.googlesource.com/953343 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Brandon Jones 2202680c 2018-03-05T09:37:32 Add NPOT validation to copyTextureCHROMIUM copyTextureCHROMIUM should generate INVALID_VALUE when using a NPOT texture and level not equal to zero, so we should add validation to catch this case. BUG=angleproject:2380 Change-Id: I0ea50a981e4d8f10f5913969f6b629617b57aa15 Reviewed-on: https://chromium-review.googlesource.com/951713 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 99d492c2 2018-02-27T15:17:10 Use packed enums for the texture types and targets, part 2 This completes the refactor by using the packed enums in the gl:: layer and in the backends. The packed enum code generation is modified to support explicitly assigning values to the packed enums so that the TextureTarget cube map faces are in the correct order and easy to iterate over. BUG=angleproject:2169 Change-Id: I5903235e684ccf382e92a8a1e10c5c85b4b16a04 Reviewed-on: https://chromium-review.googlesource.com/939994 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez f0e89be6 2017-11-08T14:00:32 Use packed enums for the texture types and targets, part 1 In OpenGL there are two enum "sets" used by the API that are very similar: texture types (or bind point) and texture targets. They only differ in that texture types have GL_TEXTURE_CUBEMAP and target have GL_TEXTURE_CUBEMAP_[POSITIVE|NEGATIVE]_[X|Y|Z]. This is a problem because in ANGLE we use GLenum to pass around both types of data, making it difficult to know which of type and target a variable is. In addition these enums are placed somewhat randomly in the space of OpenGL enums, making it slow to have a mapping from texture types to some data. Such a mapping is in hot-code with gl::State::mTextures. This commit stack makes the texture types and target enums be translated to internal packed enums right at the OpenGL entry point and used throughout ANGLE to have type safety and performance gains. This is the first of two commit which does the refactor for all of the validation and stops inside gl::Context. This was the best place to split patches without having many conversions from packed enums to GL enums. BUG=angleproject:2169 Change-Id: Ib43da7e71c253bd9fe210fb0ec0de61bc286e6d3 Reviewed-on: https://chromium-review.googlesource.com/758835 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Nico Weber 41b072b6 2018-02-09T10:01:32 Prepare for -Wimplicit-fallthrough in ANGLE. Disable the warning for flex-generated output, which contains lots of intentional fallthrough. Fixes a bug where GL_SAMPLE_ALPHA_TO_ONE_EXT would fall through to GL_COVERAGE_MODULATION_CHROMIUM and hence behave like that. Fixes a bug in the D3D9 state management where invalidating DIRTY_BIT_POLYGON_OFFSET would also invalidate the stencil bits. One somewhat common incorrect pattern in ANGLE is nested switch statements that look like so: switch (a) { case a1: switch (b) { case b1: ... break; } case a2: ... } The assumption here seems to be that the breakk exits the outer case (here a1), while it in fact only exits the inner switch, so that we fall through to a2. In most places, I fixed this by adding an explicit `break` after the inner switch. This fixes a bug wher GL_PATH_JOIN_STYLE_CHROMIUM would fall through to GL_PATH_MITER_LIMIT_CHROMIUM in validation (but since the join style enum is always > 0, this happened to not have an effect in practice). This also fixes 87 bugs in GetLoadFunctionsMap() where invalid values would previously return an unrelated function map instead of the empty load function map. Bug: chromium:810767 Change-Id: Ib51388c73fbfc229160e2c10f8fb9364cc7c996c Reviewed-on: https://chromium-review.googlesource.com/911529 Commit-Queue: Nico Weber <thakis@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill fa920ebb 2018-01-04T11:45:50 Entry Points: Auto-generate extensions EPs. This is partially complete - it is missing the auto-gen for custom ANGLE and Chromium extensions that aren't present in gl.xml. We can upstream some of these extensions, but will also need to make custom handling for some extensions that are too volatile or under- specced to upstream to Khronos. This also tweaks some of the Context method names to match what the auto-generator expects. It also updates some TexStorage entry points. Also includes a specialized error return value for glTestFenceNV. Also removes the TexImage3DOES entry point which was neither used nor accessible to the application. Bug: angleproject:2263 Change-Id: I3667c22b1b15f84ab4c7dfecb5745aaf73d11e76 Reviewed-on: https://chromium-review.googlesource.com/846420 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 007530ea 2017-12-28T14:27:04 Entry Points: Refactor Extensions Part 2. This moves the validation and entry point files to use a consistent syntax. This will facilitate auto-generation. Bug: angleproject:2263 Change-Id: If5d06e97db66783d7b3d7fb1d6365f8218d956ae Reviewed-on: https://chromium-review.googlesource.com/846022 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2b7bbc28 2017-12-21T17:30:38 Entry Points: Refactor Extensions Part 1. This moves the validation and entry point files to use a consistent syntax. This will facilitate auto-generation. Bug: angleproject:2263 Change-Id: Ica2dbffff3898103c6827ae7f6b1154a45d14a85 Reviewed-on: https://chromium-review.googlesource.com/841345 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez e4477001 2017-12-01T14:39:58 Add PackedEnumBitSet, use it for buffer binding validation Includes angle::BitSetT changes from jmadill@chromium.org BUG=angleproject:2169 Change-Id: I9f896613f5c6cdc91281cb9a00134f67291870d9 Reviewed-on: https://chromium-review.googlesource.com/804177 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Bryan Bernhart (Intel Americas Inc) 2eeb1b34 2017-11-29T16:06:43 WebGLCompat: Fix depthstencil query results. getFramebufferAttachmentParameter returns incorrect result for framebuffers in an inconsistent state. BUG=angleproject:2259 Change-Id: I76fa99f1b8847c30469d344bd93dedd9cf6657bf Reviewed-on: https://chromium-review.googlesource.com/798318 Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill acf2f3ad 2017-11-21T19:22:44 Apply Chromium style fixes. This addresses several minor code quality issues that are validated in Chromium, but not yet applied to ANGLE: * constructors and destructors must be defined out-of-line * auto is not allowed for simple pointer types * use override everywhere instead of virtual * virtual functions must also be defined out-of-line Slightly reduces binary size for me (~2k on Win, 150k on Linux). Bug: angleproject:1569 Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6 Reviewed-on: https://chromium-review.googlesource.com/779959 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei Shao 89be29a5 2017-11-06T14:36:45 ES31: Implement creation and attaching geometry shader on OpenGL This patch intends to implement the creation of a geometry shader and attaching a geometry shader to a program on OpenGL back-ends. This patch also adds all geometry shader related dEQP-GLES31 test failures to deqp_gles31_test_expectations.txt. BUG=angleproject:1941 TEST=angle_end2end_tests Change-Id: Ib0b497030255b15dacd967e48bc59eef0009af46 Reviewed-on: https://chromium-review.googlesource.com/757979 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang e8afa902 2017-09-27T15:00:43 Make GL_ANGLE_framebuffer_blit enableable. BUG=angleproject:1523 Change-Id: I5d6df35d2e65be6d73ec6100e3351ba5f9ff53a2 Reviewed-on: https://chromium-review.googlesource.com/688639 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jeff Gilbert 48590358 2017-11-07T16:03:38 Remove formatType arg from computeCompressedImageSize. BUG=angleproject:2230 Change-Id: Ie291ba05efa89bc4ea52966e975d5a21431a461f Reviewed-on: https://chromium-review.googlesource.com/757877 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 336129f6 2017-10-17T15:55:40 Use a packed enum for buffer targets. BUG=angleproject:2169 Change-Id: I4e08973d0e16404b7b8ee2f119e29ac502e28669 Reviewed-on: https://chromium-review.googlesource.com/723865 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
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>
Geoff Lang 86f8116b 2017-10-30T15:10:45 Make compressed texture format extensions enableable. Fix allowing CompressedTexSubImage calls on ETC1 texture types (disallowed in the extension spec). BUG=angleproject:1523 Change-Id: Ic90175ff4626da0170b6c94f204a9d31fd0154a7 Reviewed-on: https://chromium-review.googlesource.com/744443 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 63458a3e 2017-10-30T15:16:53 CopyTextureCHROMIUM: Validate the texture target enums first. INVALID_ENUM should be generated before any INVALID_VALUE errors based on the texture state. BUG=angleproject:1932 Change-Id: If74440602d56b1a86fa24ff87c38d2b0dec2bfb2 Reviewed-on: https://chromium-review.googlesource.com/744448 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Bryan Bernhart (Intel Americas Inc) 2a35741b 2017-09-05T10:42:47 WebGLCompatibility: Disable ES format extensions by default. Prevents format validation errors with WebGL context. BUG=angleproject:1523 Change-Id: Iddc525eeb467de0139e166dad0893f3bea3ef35f Reviewed-on: https://chromium-review.googlesource.com/650807 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Bryan Bernhart (Intel Americas Inc) 335d8bf2 2017-10-23T15:41:43 WebGLCompatibility: Fix shader validation using define macros. Backslash as line-continutation character is not permitted to be used within a pre-processor directive for WebGL1. BUG=angleproject:2093 Change-Id: I649a914b9bc544a3e4f9e7eff23b95a62c9b7008 Reviewed-on: https://chromium-review.googlesource.com/734218 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 111a99e8 2017-10-17T10:58:41 Check that the requested extension is supported by the backend. Previously, we would only check that the extension was requestable and not verify that the driver could support it. BUG=angleproject:1523 Change-Id: I5273920fc08a20beda54d4afaeb406c6c1c2056f Reviewed-on: https://chromium-review.googlesource.com/723559 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 2e568cfb 2017-09-18T17:05:22 Add generator for packed GL enums. For testing this also converts two unimportant GLenums, gl::BufferUsage and gl::CullModeFace. BUG=angleproject:2169 Change-Id: If1e86a97d0fed3fd567303aca6506ec579503076 Reviewed-on: https://chromium-review.googlesource.com/688000 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang b433e872 2017-10-05T14:01:47 Change robust resource init into a context creation attribute. Enabled support on OpenGL even through the extension is not fully implemented so that testing with Chromium/Passthrough commmand decoder is still possible. BUG=angleproject:1635 Change-Id: Ia417b1779aace1eae19514325701a79cd33f4ef3 Reviewed-on: https://chromium-review.googlesource.com/678479 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 000dab88 2017-09-27T14:27:07 Make pack and unpack image extensions enableable. BUG=angleproject:1523 Change-Id: Ic728a777ad7e05373de03ee98e9b0a17101cd45d Reviewed-on: https://chromium-review.googlesource.com/688102 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 536eca10 2017-09-13T11:23:35 Simplify GenerateMipmap validation now that sized format info is tracked. The previous validation used some workarounds because it didn't know if the texture format was sized or not. Now that the InternalFormat struct tracks this, the validation can work correctly for floating point formats. BUG=angleproject:2149 Change-Id: I583db4a36137a57dd1b7fc81cd4e3b6d5972fc67 Reviewed-on: https://chromium-review.googlesource.com/665163 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 50cac57a 2017-09-26T17:37:43 Make GL_EXT_blend_minmax enableable. BUG=angleproject:1523 Change-Id: I73df8d9a23c3d22792abde44b495be7478abfc22 Reviewed-on: https://chromium-review.googlesource.com/685648 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Yunchao He f0fd87d8 2017-09-12T04:55:05 Code refactoring in validation part. Some code refactoring in this change: 1) It moves some public methods to static. These methods are only used in validationES3.cpp. They are not necessay to be exposed to public. 2) The error messages to check context version are inconsistent. It makes them to be consistent. BUG:angleproject:2005 Change-Id: I5af4c3300634ccc44aac386c90dcb0522acbff83 Reviewed-on: https://chromium-review.googlesource.com/661324 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Brandon Jones 72f58fa3 2017-09-19T10:47:41 Change Returned Error For Invalid Hint When using FRAGMENT_SHADER_DERIVATIVE_HINT_OES as a hint with OES_standard_derivatives disabled, we should return INVALID_ENUM, not INVALID_OPERATION. Bug: angleproject:2158 Change-Id: I5759f1e8bb19d2caed278506054aebc5d82d431c Reviewed-on: https://chromium-review.googlesource.com/673374 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Brandon Jones ed5b46f1 2017-07-21T08:39:17 Add additional ES2 and WebGL 1.0 Validation Adds validation for various cases. Adds corresponding unit tests. Change-Id: I9451d286bcf2d6fa32de495e5d0bdec1eb5c955d Reviewed-on: https://chromium-review.googlesource.com/633157 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 70b5bb00 2017-08-28T13:32:37 Rename gl::FenceSync to gl::Sync. The spec refers to Sync objects, FenceSyncs being a subtype. The motivation for this fix is to clear up the FenceSync_ entry point for auto-generation. BUG=angleproject:1309 Change-Id: I94c440476d701628575e7a3eea68b6dd110f41c3 Reviewed-on: https://chromium-review.googlesource.com/636516 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 12e957f8 2017-08-26T21:42:26 Refactor uniform block and other query EPs. Also some minor fixes to validation and error messages. BUG=angleproject:747 Change-Id: I4f97a45c2d39a8deec2255620e5cc2bcb8cad7b9 Reviewed-on: https://chromium-review.googlesource.com/637126 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill d7576737 2017-08-26T18:49:50 Refactor VAO entry points. This also touches the extension EPs for ES2. BUG=angleproject:747 Change-Id: Iaa04d97465e518f6b0496e64bc7a737914709b8f Reviewed-on: https://chromium-review.googlesource.com/637124 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang c0094eca 2017-08-16T14:16:24 Validate the combination of type and internal format for CopyTextureCHROMIUM. Sized internal formats with invalid types would pass validation because GetInternalFormatInfo does not validate that the type is a valid upload type for the given internal format. TEST=conformance2/textures/misc/tex-image-with-bad-args-from-dom-elements.html BUG=angleproject:1932 Change-Id: I07fd542630a4508383263c1fe3d7a80c037d7ca0 Reviewed-on: https://chromium-review.googlesource.com/617508 Commit-Queue: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Brandon Jones afa75152 2017-07-21T13:11:29 Refactor More Validation Error Messages Replace many error string literals with variables existing in ErrorStrings.h BUG=:angleproject:1644 Change-Id: If5665a6787a1fa8d789811d774711c3705dfb0ab Reviewed-on: https://chromium-review.googlesource.com/598588 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 79f7104a 2017-08-14T16:43:43 Validate that transform feedback buffers are not mapped. Mapping a buffer that is bound for active transform feedback or starting transform feedback on a mapped buffer is undefined behaviour under section 2.10.3.2 of the ES 3.0 spec "Effects of Mapping Buffers on Other GL Commands". The spec suggests that an error is generated in this case. TEST=ES3MapBufferRangeTest.TransformFeedback BUG=754000 Change-Id: I613defd07cc1a4348682d992cda61cc898936720 Reviewed-on: https://chromium-review.googlesource.com/614483 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 13c0dd46 2017-07-04T18:27:01 Add texture rectangle extension. This is needed to support binding IOSurfaces to textures on OSX. This commit adds support in the API and tests, but didn't need to implement compiler changes as it already supported ARB_texture_rectangle. Implementation of CHROMIUM_opy_texture for rectangle texture and the spec are left for follow-up commits. Change-Id: I45c66be763a9d3f6f619640f9f95f39b05c70867 Reviewed-on: https://chromium-review.googlesource.com/559106 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kenneth Russell 6938285b 2017-07-21T16:38:44 Fix BlitFramebuffer validation for BGRA sources and targets. It is legal to blit between GL_RGBA8 and GL_BGRA8 sources and destinations when resolving multisampled renderbuffers. Expand BlitFramebuffer's validation to handle this case. Query GL_MAX_VERTEX_OUTPUT_COMPONENTS on the Core Profile to work around an error generated on macOS when querying GL_MAX_VARYING_COMPONENTS. Expand the BlitFramebuffer tests to cover these cases and start running them on the OpenGL backend. Fix detectition of multisampled D3D11 rendertargets when the sample count is 1. BUG=angleproject:891 Change-Id: Ief5531756651caa66f612e647d3d5c05c8c51ff5 Reviewed-on: https://chromium-review.googlesource.com/587459 Reviewed-by: Kenneth Russell <kbr@chromium.org>
Corentin Wallez 26cf35a8 2017-07-26T11:01:02 Revert "Fix BlitFramebuffer validation for BGRA sources and targets." This reverts commit 17d270311efcd8c72f251a67e726518278e81c26. Reason for revert: - New test fails on NVIDIA and AMD on Windows when using the backbuffer FAST_PATH. - SetUp code ASSERT_GL_NO_ERROR (line 269) but a GL error happens on all Windows and Linux Intel OpenGL. Original change's description: > Fix BlitFramebuffer validation for BGRA sources and targets. > > It is legal to blit between GL_RGBA8 and GL_BGRA8 sources and > destinations when resolving multisampled renderbuffers. Expand > BlitFramebuffer's validation to handle this case. > > Work around a bug in macOS' OpenGL driver querying the number of > samples for GL_BGRA8. > > Query GL_MAX_VERTEX_OUTPUT_COMPONENTS on the Core Profile to work > around an error generated on macOS when querying > GL_MAX_VARYING_COMPONENTS. > > Expand the BlitFramebuffer tests to cover these cases and start > running them on the OpenGL backend. > > BUG=angleproject:891 > > Change-Id: I4829585d2b6428ce0bc7509c4734d33709a0930b > Reviewed-on: https://chromium-review.googlesource.com/582268 > Commit-Queue: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,kbr@chromium.org Change-Id: I220bc482194cf7fad5e7e732a6d043ce0d504d79 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:891 Reviewed-on: https://chromium-review.googlesource.com/586428 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kenneth Russell 17d27031 2017-07-21T16:38:44 Fix BlitFramebuffer validation for BGRA sources and targets. It is legal to blit between GL_RGBA8 and GL_BGRA8 sources and destinations when resolving multisampled renderbuffers. Expand BlitFramebuffer's validation to handle this case. Work around a bug in macOS' OpenGL driver querying the number of samples for GL_BGRA8. Query GL_MAX_VERTEX_OUTPUT_COMPONENTS on the Core Profile to work around an error generated on macOS when querying GL_MAX_VARYING_COMPONENTS. Expand the BlitFramebuffer tests to cover these cases and start running them on the OpenGL backend. BUG=angleproject:891 Change-Id: I4829585d2b6428ce0bc7509c4734d33709a0930b Reviewed-on: https://chromium-review.googlesource.com/582268 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang cab92ee4 2017-07-19T17:32:07 Fix WebGL validation of characters in shader source strings. Shader source strings are allowed invalid ESSL characters when they are in comments. Added a simple comment parser to determine which characters should be validated. BUG=angleproject:2093 Change-Id: If78a4ecbd61f1700fc18dcb844f3de03314a6a39 Reviewed-on: https://chromium-review.googlesource.com/578567 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 3847f94d 2017-07-12T11:17:28 Validate that the mip level is not too large for CopyTextureCHROMIUM. When the mip level was greater than the maximum, it could cause an out-of-bounds read when trying to query the Texture's size and format later in the validation. BUG=740426 Change-Id: Ibd6c977981e5f8b7368c161b7969d9e916c6095b
Commit Bot f69ac0a5 2017-07-12T14:18:57 Merge "Add support for new internalformats in copyTextureCHROMIUM"
Corentin Wallez 59c41597 2017-07-11T13:19:54 Fix Clear validation assert for default FBOs The validation was iterating over maxDrawBuffers attachments when default framebuffers only have one attachment. Use the framebuffer's drawBufferCount instead. Also adds a regression test in the form of a WebGLComptibility test for glClearBuffer with the default framebuffer. BUG=angleproject:2091 Change-Id: I07ee524db1fcb8a99dab4043248c0885100fd216
Brandon Jones 340b7b8b 2017-06-26T13:02:31 Add support for new internalformats in copyTextureCHROMIUM This adds support in blit11::copyTexture for LUMA, LUMA_ALPHA, and ALPHA formats as destinations. Added is handling for each case to match up the corresponding shader. This required new premultiply and unmultiply D3D11 shaders for some cases. Changed copyTextureCHROMIUM validation to allow new formats. Tests have been created to demonstrate using copyTextureCHROMIUM with the new formats with default parameters, as well as with the unpackPremultiply and unpackUnmultiply parameters. BUG=:angleproject:2101 Change-Id: Id8cd303a46fe70710bc18172fc938552a6e4cfaf
Brandon Jones 6cad5667 2017-06-14T13:25:13 Improve Debugging Strings This change replaces common string literals used for error messages with const string variables mapped in a new header file. Additionally, more validation for WebGL naming scenarios has been added, along with unit tests. BUG=:angleproject:1644 Change-Id: Icff44a456aa78221c6df12b0454a7cc147a7d26e Reviewed-on: https://chromium-review.googlesource.com/535974 Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6be3d4cd 2017-06-16T15:54:15 Fix incorrect format set being used for destination copy formats. This validation matches Chrome's. BUG=angleproject:1932 Change-Id: I2dc75c21924231ab75000dff92ef92cbc12adf55 Reviewed-on: https://chromium-review.googlesource.com/538956 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang e7bd218c 2017-06-16T16:13:13 Accept GL_FRAGMENT_SHADER_DERIVATIVE_HINT in ES3 contexts. BUG=angleproject:2070 TEST=deqp/functional/gles3/shaderderivate_dfdx TEST=deqp/functional/gles3/shaderderivate_dfdy TEST=deqp/functional/gles3/shaderderivate_fwidth Change-Id: I4e10343036a813c122ca41913324051b5c02e785 Reviewed-on: https://chromium-review.googlesource.com/538861 Reviewed-by: Jamie Madill <jmadill@chromium.org>