src/tests/gl_tests/WebGLCompatibilityTest.cpp


Log

Author Commit Date CI Message
Tobin Ehlis 1a01b4b3 2019-11-11T16:41:07 Refactor end2end test macros This is a foundational CL to enabling the end2end tests on swiftshader. Refactored infrastructure with new ANGLE_INSTANTIATE_TEST_ES* macros that will run tests over all various combinations of all platforms for different ES versions. Just skipping failing tests initially to get the refactor landed. Bug: angleproject:4081 Bug: angleproject:4092 Change-Id: I017f6c3267179e49b6ae08cc7488096b423dcdb5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1904635 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Geoff Lang 19dd51b0 2019-11-04T11:28:19 GL: Expose PBO extensions Ensure WebGLCompatibilityTest.EnablePixelBufferObjectExtensions functions in surfaceless mode by creating a framebuffer to do the test glReadPixels from. BUG=angleproject:4079 Change-Id: I109b3cdeb85625a6a97832ecf8130d53a4074af9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1893058 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Tobin Ehlis 7af2676b 2019-10-23T16:18:57 Fix TextureAttachment support for unsized DS formats Unsized DS formats should not pick up support from ES3 automatically. Also unsized DEPTH COMPONENT textures should not be allowed as texture attachments without also having support for GL_ANGLE_depth_texture or GL_OES_depth_texture extensions. This change modifies some unsized formats to require extension support for TextureAttachment use. There are a couple of tests bugs that were exposed by this change so updated those tests as well. This CL only changes TextureAttachment support, but it's quite possible that renderbuffer (and texture) support may also need to be updated. Will attempt that in a follow-on. Bug: angleproject:3952 Change-Id: I75d15330dc418c421cd2855135e1e8100a89b2e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1877135 Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
James Darpinian c42da4e5 2019-10-03T13:46:28 Extend ANGLE_request_extension with DisableExtension ARB_texture_rectangle is the only currently supported disablable extension. This allows us to use ARB_texture_rectangle in WebGL implementations without exposing it to WebGL user shaders. Bug: angleproject:3956 Bug: angleproject:3770 Change-Id: I80b10d2e9c9feebe545ce15195721487165ecc51 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1838418 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 188b679b 2019-08-15T09:02:43 Remove GL/EGL function pointers from tests. The auto-gen loader code should be able to handle all these cases. Bug: angleproject:3393 Change-Id: If0a90fb29d79f2892fdf76fe0cb91ed0036ee1e3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1756083 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Yunchao He 5a542996 2019-06-26T10:55:57 Test RGB32F texture format on Intel Linux Bug: angleproject:1958 Change-Id: I52787100fbc9a24b025393eafdede34750c4ca7e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1678732 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov f857b501 2019-06-26T20:15:46 Skip end2end tests failing on Intel Ubuntu 19.04 Mesa 19.0.2 Failing: MaskedScissoredClearTest.Test/ES2_OpenGL_clear_cd MaskedScissoredClearTest.Test/ES2_OpenGL_clear_cd_mask_c MaskedScissoredClearTest.Test/ES2_OpenGL_clear_cds MaskedScissoredClearTest.Test/ES2_OpenGL_clear_cds_mask_c MaskedScissoredClearTest.Test/ES2_OpenGL_clear_cds_mask_cs MaskedScissoredClearTest.Test/ES2_OpenGL_clear_cds_mask_s MaskedScissoredClearTest.Test/ES2_OpenGL_clear_d MaskedScissoredClearTest.Test/ES2_OpenGL_clear_ds MaskedScissoredClearTest.Test/ES2_OpenGL_clear_ds_mask_s MaskedScissoredClearTest.Test/ES3_OpenGL_clear_cd MaskedScissoredClearTest.Test/ES3_OpenGL_clear_cd_mask_c MaskedScissoredClearTest.Test/ES3_OpenGL_clear_cds MaskedScissoredClearTest.Test/ES3_OpenGL_clear_cds_mask_c MaskedScissoredClearTest.Test/ES3_OpenGL_clear_cds_mask_cs MaskedScissoredClearTest.Test/ES3_OpenGL_clear_cds_mask_s MaskedScissoredClearTest.Test/ES3_OpenGL_clear_d MaskedScissoredClearTest.Test/ES3_OpenGL_clear_ds MaskedScissoredClearTest.Test/ES3_OpenGL_clear_ds_mask_s BlitFramebufferTest.MultisampleDepthClear/ES3_OpenGL DrawBuffersTest.FirstHalfNULL/ES2_Vulkan DrawBuffersTest.Gaps/ES2_Vulkan WebGLCompatibilityTest.DrawBuffers/ES2_Vulkan Crashing: Texture3DTestES3.DrawWithLevelsOutsideRangeWithInconsistentDimensions/ES3_OpenGL Bug: angleproject:2782, angleproject:3614, angleproject:3616 Change-Id: Ib9bc72d8fd050ba1db1269d5fb3b38e80636211e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1679630 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi 9fa248e1 2019-05-06T14:55:18 Vulkan: Implement EXT_draw_buffers In GLES, color attachments are referenced by their indices. These indices match between the API and GLSL. For example, if a shader has: layout(location=0) out color; layout(location=3) out roughness; Then GLES would bind and enable GL_COLOR_ATTACHMENT0 and GL_COLOR_ATTACHMENT3. In Vulkan, the framebuffer object and the corresponding renderpass define the color attachments, and they don't allow gaps in color attachments as GLES does. A render subpass creates the mapping between the color attachments as defined in the framebuffer and the attachments used by the shader (with possible gaps). This change packs the enabled GL color attachments for the sake of the framebuffer, and sets the subpass up in such a way that the shaders continue to use the same color output indices as GLES. In the example above, we have the attachment indices as follows: Status | GLES | GLSL | RenderPass | Subpass enabled 0 0 0 0 disabled 1 - VK_ATTACHMENT_UNUSED disabled 2 - VK_ATTACHMENT_UNUSED enabled 3 3 1 1 That is, the array of color attachments in the Vulkan framebuffer/renderpass is: [0] = GL color attachment 0 [1] = GL color attachment 3 And the array of color attachment references in the Vulkan render subpass is: [0] = 0 (index 0 of the renderpass attachment array) [1] = VK_ATTACHMENT_UNUSED [2] = VK_ATTACHMENT_UNUSED [3] = 1 (index 1 of the renderpass attachment array) Bug: angleproject:2394 Change-Id: Ib6cd2b60882643ea152986eee453270d09cd4aed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1595442 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 5cbaa3f8 2019-05-07T15:49:22 Don't inherit ANGLETest SetUp and TearDown. Instead of inheriting from testing::Test's SetUp and TearDown we add new methods 'testSetUp' and 'testTearDown'. This helps prevent a common error of forgetting to call the base class method. Also add a check in the ANGLETest destructor that SetUp and TearDown have been called. Bug: angleproject:3393 Change-Id: Iab211305cc06ffea9ca649e864ddc9b180f2cba0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1593960 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill b8149075 2019-04-30T16:14:44 Clean up ANGLE test extension functions. None of these functions needed to be member functions. Also make the naming more consistent. Bug: angleproject:3393 Change-Id: I7aafe2269a48af703a87bd9a8cf4cfab9e177dd3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574673 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
shrekshao 15ce8227 2019-03-18T19:25:21 Fix error report when active color buffer has no fs output Also modify or remove some tests to sync up with the expected behavior stated in spec. Related to https://github.com/KhronosGroup/WebGL/pull/2780 If any draw buffer with an attachment does not have a defined fragment shader output, draws generate INVALID_OPERATION. Also remove Framebuffer masking for inactive outputs. This workaround is no longer necessary as the WebGL spec has changed. It also was never fully working and had bugs with certain orders of calls. Bug: angleproject:2872 Bug: chromium:927908 Bug: chromium:943538 Change-Id: I73715a6ab851ae3db7096f49ea0a9fdd6f576703 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1530018 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
shrekshao 8413faba 2019-04-04T17:13:18 Fix formsRenderingFeedbackLoopWith check To make it pass the following webgl conformance test https://github.com/KhronosGroup/WebGL/blob/master/sdk/tests/conformance/rendering/rendering-sampling-feedback-loop.html It used to fail due to 1. Didn't check if texture unit is sampler complete 2. Only checked active drawbuffers. But drawbuffer settings shouldn't be taken into account when checking drawing feedback loop. On top of applying these 2 functional fixes, I also tried to do some optimization by unwrapping the nested for loop for program sampler bindings and texture unit in `Program::samplesFromTexture` and putting them outside of the draw buffer loop according to the old comment by Antonie @piman. https://codereview.chromium.org/2461973002/ > ... turning it around (for each texture check if it's also an attachment, instead of for each attachment check if it's a bound texture). In particular, we have an upper bound on the number of attachments, so we can look them up outside the loop into a fixed size buffer on the stack - and the very common case will be to only have 1 of them making the inner loop cheap. But this unwraps sort of breaks the code structure. An alternative way would be passed in a framebuffer pointer into `Program::samplesFromTexture` but that would ends up in tight class coupling. I am a bit unsure here. Would like to hear if think this change is okay in terms of code style. In addition to further speed up this check (as it runs for every draw validation) I added a cache mLastColorAttachmentId indicating the last i of GL_COLORATTACHMENTi that is not GL_NONE to shorten this inner loop. In most scenario we won't have up to max number of color attachments. A side note: this is still failing https://github.com/KhronosGroup/WebGL/blob/master/sdk/tests/conformance2/rendering/depth-stencil-feedback-loop.html But it's because the test case doesn't fit the spec at this moment. I will update this test later. Bug: chromium:660844 Change-Id: I6d718dada71a5d989caac04de03f2454f2377612 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553963 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shrek Shao <shrekshao@google.com>
Tim Van Patten 208af3eb 2019-03-19T09:15:55 Update TexImage2D Parameter Checking Update the parameter checking performed within ValidateTexImage2D() to pass the following tests: dEQP-GLES2.functional.negative_api.texture.teximage2d_invalid_format dEQP-GLES2.functional.negative_api.texture.teximage2d_invalid_internalformat dEQP-GLES2.functional.negative_api.texture.texsubimage2d_invalid_type Bug: angleproject:3250 Bug: angleproject:3251 Test: angle_deqp_gles2_tests --use-angle=vulkan Change-Id: I4d9be4fe0a9b377e61e3132db262750e6285464b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1534519 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 979f3bbe 2019-03-14T10:23:29 Mark RGB HALF_FLOAT_OES as renderable with EXT_color_buffer_half_float and WebGL The EXT_color_buffer_half_float spec states: If OES_texture_half_float is supported, textures created with: <internalformat> = RGBA <format> = RGBA <type> = HALF_FLOAT_OES are renderable. But WebGL content relies on being able to render to both RGB and RGBA unsized HALF_FLOAT_OES textures. Framebuffers may still return unsupported for this format. BUG=941671 Change-Id: I42d909d26508b9cdf7cda6d1dc025b0e2ed87732 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1523530 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 76bd848c 2019-02-13T13:00:44 Vulkan: Support ETC, S3TC and BPTC compressed textures Fixes the format table so the correct Vulkan format for the types are generated. Additionally, implements CHROMIUM_copy_compressed_texture as well as other functions relevant to initializing compressed textures. Bug: angleproject:2670, angleproject:2904 Change-Id: I682d36574262525027cddf8f329515f38cd77dc0 Reviewed-on: https://chromium-review.googlesource.com/c/1468048 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@google.com>
shrekshao fa0db6cc 2019-02-21T11:40:28 Use string literal style for shader string in WebGLCompatibilityTest Bug: None Change-Id: I75255cfda3793c539ac8a6ee2c50b8526bfc9286 Reviewed-on: https://chromium-review.googlesource.com/c/1493113 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Jamie Madill <jmadill@google.com>
shrekshao c87e0053 2019-02-21T11:40:28 add ext_float_blend feature and test Bug: chromium:930993 Change-Id: I8edbd01c5c9f1ed63243cc4a42f6de44c92db8bd Reviewed-on: https://chromium-review.googlesource.com/c/1481242 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Jamie Madill <jmadill@google.com>
Yuly Novikov 559aaca5 2019-02-14T18:24:07 Fix texture and buffer data bugs in tests found by ASAN. Bug: angleproject:3153 Change-Id: Iacb7b2b97b9fc5c68fbee03c66d71eb72a53b4d6 Reviewed-on: https://chromium-review.googlesource.com/c/1474342 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 6b695c3f 2019-02-10T10:02:33 Vulkan: Enable WebGLCompatiblityTest. Contains several useful tests including some that cover bugs with compressed texture support. And some uses of CopyTexImage. Bug: angleproject:2904 Bug: angleproject:2914 Change-Id: I90398ce2c513ace07cb9d414cd9a65c79e63aadb Reviewed-on: https://chromium-review.googlesource.com/c/1462058 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis 2b0553ce 2019-02-08T10:07:21 Implement EXT_instanced_arrays Bug: angleproject:3015 Change-Id: Ib01cc5e0df6db27981cb843a6bd386de5d10c2db Reviewed-on: https://chromium-review.googlesource.com/c/1452740 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill c09ae15c 2019-02-01T14:16:32 Enable -Wextra-semi and -Wextra-semi-stmt. This will prevent users from accidentally making semicolon errors in the future. Bug: chromium:926235 Change-Id: I79a6fa376fb1ad8f0fcf1b65b1f572a035d1f4e9 Reviewed-on: https://chromium-review.googlesource.com/c/1446493 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nico Weber <thakis@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>
James Darpinian 471b8d4c 2018-11-21T15:37:47 WebGL, D3D: Forbid multiple TF outputs in one buffer Implementing a WebGL spec change: https://github.com/KhronosGroup/WebGL/pull/2658 Fixes WebGL 2 conformance test: conformance2/transform_feedback/same-buffer-two-binding-points.html Also applying the change to D3D backends because they can't support multiple transform feedback outputs in one buffer. Bug: chromium:866089 Change-Id: I8d7eda14225c13efb7ca1ed974239332be4e79a6 Reviewed-on: https://chromium-review.googlesource.com/c/1347749 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov d082819c 2018-06-15T15:51:07 Fix format support conditions This fixes format support tables in formatutils.cpp and formatutilsgl.cpp to conform to the core and extension GLES specs, for a large portion of the formats. ExtsOnly SupportRequirement was enhanced to accept multiple sets of extensions. Format is supported if all the extensions in one of the sets are available. Also fixes determining support for extensions based on those formats. And some fixes to tests which fail due to more strict format support. Bug: angleproject:2567 Change-Id: I6050fff9c597f658fdcea2477bff59a603cdb7e8 Reviewed-on: https://chromium-review.googlesource.com/1105612 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@google.com>
Jamie Madill 38fe6840 2018-09-19T07:20:00 Remove secondary Texture rendering loop check. This check was not used. It applied only to rendering Feedback Loops. The behaviour is undefined in non-WebGL and for WebGL we have a separate validation check. Also update the feedback loop tests to ignore the current GL states. This change is based on feedback from the OpenGL ES working group. Bug: angleproject:2763 Bug: chromium:763695 Change-Id: I9882b4f9af2d43fc7b5604ff36dadcc79dfd378f Reviewed-on: https://chromium-review.googlesource.com/1228373 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@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>
Bryan Bernhart 22f7aafb 2018-08-23T14:13:51 Add webgl checks in GetActiveUniformsiv. Add validation that disallows GL_UNIFORM_NAME_LENGTH from being used. BUG=angleproject:1523 TEST=angle_end2end_tests Change-Id: Id70e25ab79fd93ae4eb8b8343819458a4a0e4a71 Reviewed-on: https://chromium-review.googlesource.com/1187511 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 2363356f 2018-07-17T15:02:36 Make sure index ranges outside of the GLint range are handled correctly. IndexRange uses size_t values but DrawCallParams::mFirstVertex is a GLint. This makes sure all casting is safe. BUG=864528 Change-Id: Iaa95019615af4d3f79b12bbcb0df13b44cb54339 Reviewed-on: https://chromium-review.googlesource.com/1140898 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill a2d1d2db 2018-08-01T11:34:46 Context: Cache VAO element limits. Cache the minimum value for non instanced and instanced active attributes. The cache is updated in the following places: 1. Context: bindVertexArray. 2. Context: any executable change (linkProgram/useProgram/programBinary). 3. Vertex Array: any state change call. 4. Buffer: a dependent buffer resize. This greatly reduces the time we're spending in ValidateDrawAttribs. Bug: angleproject:1391 Change-Id: I84bb222a1b9736e6165fe40e972cd4299ca1178d Reviewed-on: https://chromium-review.googlesource.com/1150516 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill dc358af7 2018-07-31T11:22:13 Context: Cache attributes masks. This cache is updated in the following locations: 1. GLES1: clientActiveTexture. 2. GLES1: disableClientState/enableClientState. 3. Context: linkProgram/useProgram/programBinary. 4. Context: bindVertexArray. 5. Vertex Array: most state changes. Improves performance by about 6% in the GL no-op test. Also includes fixes for keeping the client memory attribs mask in sync. The cache also includes a boolean if there are any enabled client attributes. Bug: angleproject:1391 Change-Id: I93b6a2c8492355958fd5483f14b70535729091d6 Reviewed-on: https://chromium-review.googlesource.com/1147437 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Brandon Jones 2a018158 2018-06-08T15:59:26 Change Validation For Indexed Draw Without ELEMENT_ARRAY_BUFFER Changed WebGL Validation to return INVALID_OPERATION any time an indexed draw call is made without a bound ELEMENT_ARRAY_BUFFER. Spec was changed to no longer require count > 0 in order to cause error. Make same spec change to GL_ANGLE_client_arrays extension. BUG:angleproject:2639 Change-Id: I23963f357119d081890aa5387b2863e1d42b92a5 Reviewed-on: https://chromium-review.googlesource.com/1093984 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 9aef81c7 2018-04-30T14:56:15 Validate blitFramebuffer for overflows on all platforms We can validate to avoid triggering driver issues even if the native GLES spec is not telling us to. This will fix WebGL in Chromium when it's being run with the --use-cmd-decoder=validating --use-angle=gl config. BUG=chromium:830046 TEST=WebGL conformance tests Change-Id: I2d61182cb6cbe46b52e1d9b7ed6b4035defee082 Reviewed-on: https://chromium-review.googlesource.com/1033743 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 8d5571ac 2018-04-23T12:29:31 Restrict BlitFramebuffer dimensions in WebGL mode Don't allow blitFramebuffer dimensions to overflow 32-bit integer range as specified in WebGL 2.0 section 5.41. BUG=chromium:830046 TEST=WebGL 2 conformance tests, angle_end2end_tests Change-Id: Ia232291b09c94e1e4f837441c6720a78bab672fb Reviewed-on: https://chromium-review.googlesource.com/1023856 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 629bb259 2018-04-20T11:01:33 Fix WebGL compat feedback loop null deref. This regressed in "Optimize ValidateDrawAttribs: Part 2." Bug: chromium:834943 Bug: angleproject:1391 Change-Id: I217719d76b0524ed7900e18bcc4ca1280ec7b6ff Reviewed-on: https://chromium-review.googlesource.com/1020280 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang b0f917fa 2017-12-05T13:41:54 Fix being unable to request some extensions implemented in the GL layer. Some extensions are forced on in Context::initCaps even though the backend's native extensions do not mark the extension as supported. These extensions were not requestable because the Context::isExtensionRequestable only checks if the backend supports the extension. Make GL_OES_vertex_array_object requestable to cover the issue. BUG=angleproject:1523 Change-Id: Ie64df8e270924727ecf9cd3f993443abeb3ef658 Reviewed-on: https://chromium-review.googlesource.com/809197 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 025aafdf 2017-10-30T15:16:37 Make EGL image extensions enableable. BUG=angleproject:1523 Change-Id: I6e890380bafb9f81595ab603996259fe6177e9e0 Reviewed-on: https://chromium-review.googlesource.com/744447 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang d54d3045 2017-11-07T14:56:07 Make EXT_texture_storage enableable. BUG=angleproject:1523 Change-Id: I55ef1233fb42e2dc3eda26c3aa4e14c700f98bf0 Reviewed-on: https://chromium-review.googlesource.com/756868 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
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>
Ken Russell b9f92504 2018-01-27T19:00:26 Update stencil validation rules for WebGL Based on kbr's patch: https://chromium-review.googlesource.com/c/angle/angle/+/890605 Implements new rules in this revised WebGL conformance test: https://github.com/KhronosGroup/WebGL/pull/2583 BUG=chromium:806557 Change-Id: I84701dd7156f0bc4a45ba68e63cb962d2d54c2e5 Reviewed-on: https://chromium-review.googlesource.com/952567 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 8b92c53b 2018-03-22T01:05:02 Skip EnableQueryExtensions test on Win/AMD/GL. This test seems to be causing device lost. Bug: angleproject:2423 Change-Id: If759aa6478df89d1cf5a5fd199a6065300c4c8ec Reviewed-on: https://chromium-review.googlesource.com/974888 Reviewed-by: 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>
Bryan Bernhart (Intel Americas Inc) 5f19810d 2017-12-12T14:21:39 WebGLCompat: Fix depth & stencil query results. getFramebufferAttachmentParameter returns incorrect result for framebuffers in an inconsistent state. BUG=angleproject:2281 Change-Id: Ifb83ecaf16c95bf1237b2c4f2684de6aa2d55c46 Reviewed-on: https://chromium-review.googlesource.com/823224 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
Bryan Bernhart (Intel Americas Inc) 491b0d60 2017-11-10T12:48:22 WebGLCompatibility: Allow GL_DEPTH_STENCIL_ATTACHMENT. Permits depth-stencil attachment points for WebGL. BUG=angleproject:2090 Change-Id: I7f5a7c63f2a4a76116ce5639833e5fd8d7f50ffb Reviewed-on: https://chromium-review.googlesource.com/764591 Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@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>
Geoff Lang fa125c9e 2017-10-24T13:01:46 Validate GL_COLOR_ATTACHMENT0 separately from the draw buffers attachments. EXT_draw_buffers may not be enabled but the maxColorAttachments cap is always initialized so make sure to validate for the extension instead of just checking that the attachment is in the valid range. BUG=angleproject:2058 Change-Id: I5b48cb496bf96cbc0911295aa5bf87784ce9241b Reviewed-on: https://chromium-review.googlesource.com/735749 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>
Geoff Lang 2348e21a 2017-09-27T17:46:25 Make GL_OES_get_program_binary enableable. BUG=angleproject:1523 Change-Id: Iad002e8cbc354b9a9d08a30ba57a293f889ecffb Reviewed-on: https://chromium-review.googlesource.com/688640 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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 4751aabb 2017-10-30T15:14:52 Fix minor issues with ANGLE_texture_rectangle. * Some texture parameters were not initialized correctly. * Binding points were not created for enableable texture extensions. BUG=angleproject:1650 BUG=angleproject:1523 Change-Id: Id3436fe1dbb4069eafad97e722ac519a6b59e5db Reviewed-on: https://chromium-review.googlesource.com/744446 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 2c5c41f9 2017-10-31T10:58:09 Skip WebGLCompatibilityTest.InvalidTextureFormat on Ozone. Attempting to figure out why the Linux Ozone (Intel) is failing. BUG=779346 Change-Id: I94bb50f0b7746c90fe31ea1a9107319864d85438 Reviewed-on: https://chromium-review.googlesource.com/746372 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang d84a00b9 2017-10-27T17:27:26 Make GL_OES_rgb8_rgba8 enableable. Allow unsized RGB/UNSIGNED_BYTE without the rgb8rgba8 extension. BUG=angleproject:1523 Change-Id: Ic7b4236c7b8389952b093719f26840ea2bbd01bf Reviewed-on: https://chromium-review.googlesource.com/742501 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 660b28cc 2017-10-30T12:58:56 Disable WebGL texture_rg tests on all OpenGL ES. BUG=angleproject:1523 BUG=779346 Change-Id: I019597bea3f17f178d584b8a6f070d0640511781 Reviewed-on: https://chromium-review.googlesource.com/743852 Reviewed-by: Geoff Lang <geofflang@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>
Corentin Wallez 91c8de88 2017-10-12T16:32:44 WebGLCompat: Add test for ANGLE_instanced_arrays Also adds a test for an integer overflow in DrawArrays validation. BUG=602737 Change-Id: I71c5bd155cf919964f46e2b0b48267253cab91eb Reviewed-on: https://chromium-review.googlesource.com/716841 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez c3bc9841 2017-10-11T15:15:59 WebGLCompatibility: test for vertex OOB caused by indices BUG=602688 Change-Id: I49a1a9b3753159c91058a7754534383fbc8a778e Reviewed-on: https://chromium-review.googlesource.com/713740 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: 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 63c5a597 2017-09-27T14:08:16 Make GL_ANGLE_instanced_arrays enableable. BUG=angleproject:1523 Change-Id: Id1dd5d0426c1b55bfd6cca8b0c8c73596080f2a9 Reviewed-on: https://chromium-review.googlesource.com/688101 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 488130e0 2017-09-27T13:53:11 Make GL_ANGLE_framebuffer_multisample enableable. BUG=angleproject:1523 Change-Id: Idc2cf338ba1fb5142ef2596603d291790fd6ddd6 Reviewed-on: https://chromium-review.googlesource.com/688100 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 8c5b31c2 2017-09-26T18:07:44 Make query extensions enableable. BUG=angleproject:1523 Change-Id: If2da4bff180664de997c981165672858c19ebe78 Reviewed-on: https://chromium-review.googlesource.com/685649 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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>
Geoff Lang 8c7133ca 2017-09-26T17:31:10 Make GL_OES_fbo_render_mipmap enableable. BUG=angleproject:1523 Change-Id: If50a4bf5e33bf0b9ad76a9c6bb999cf4d620c709 Reviewed-on: https://chromium-review.googlesource.com/685647 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 3fab7634 2017-09-26T15:45:54 Make PBO and map buffer extensions enableable. BUG=angleproject:1523 Change-Id: Ia934a186ce490083f93b59eedd3bdf48e0fcb727 Reviewed-on: https://chromium-review.googlesource.com/685799 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 7d4602fc 2017-09-13T10:45:09 Allow ReadPixels with GL_FLOAT type and EXT_color_buffer_half_float. BUG=angleproject:2148 Change-Id: If3fa4a42a7343ed133f85be1a4d9d0fa48b427cd Reviewed-on: https://chromium-review.googlesource.com/665158 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@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>
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>
Yuly Novikov caa5cda0 2017-06-15T21:14:03 Validate uniforms and attributes name conflicts when linking Uniforms and attribute names have global scope, according to: GLSL 1.017 sections 4.2.6, 4.3.3 and 4.3.4. Thus, they can't have same names. BUG=angleproject:2014 Change-Id: Ibeb064aca877e404a67b9e3e9b57a0cc42e86f9f
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
Geoff Lang 69df242c 2017-07-05T12:42:31 Don't validate attribute types match for gl_VertexID and gl_InstanceID. TEST=conformance2/glsl3/no-attribute-vertex-shader TEST=deqp/functional/gles3/instancedrendering BUG=angleproject:2012 Change-Id: I234410fabf6a8fcd87040c8085ca5dce82fa8932 Reviewed-on: https://chromium-review.googlesource.com/559851 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 0dc97810 2017-06-22T14:38:44 WebGL2 Compat: having no 0 divisor is now valid BUG=angleproject:TBD Change-Id: Icb19a685290f4313ad567391cab5152eda91a346 Reviewed-on: https://chromium-review.googlesource.com/544545 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Jamie Madill e7b96340 2017-06-23T15:06:08 Fix uint indices WebGL test to draw something. This test was specifying a draw with two indices instead of six. This wasn't producing any error on most configurations, but on Android it was producing a driver error that was only visible in Debug. BUG=angleproject:2086 Change-Id: I7c3cee4cc10d6c37e3bac8ed9fbc16ecb2cb9e63 Reviewed-on: https://chromium-review.googlesource.com/546539 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Corentin Wallez db9e5d31 2017-06-12T12:05:45 D3D11: Only apply attachments that are written by the program This works around a bug in the AMD driver that writes 0's to the first attachment if it isn't written by the pixel shader. BUG=angleproject:2048 Change-Id: I384fd60c0e0a37fbc0fd7b69fe1ec74fe4ffac8f Reviewed-on: https://chromium-review.googlesource.com/531630 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Geoff Lang a71a98ee 2017-06-19T15:15:00 Allow '\' characters in shader source for WebGL2. TEST=deqp/data/gles3/shaders/preprocessor.html BUG=angleproject:2016 Change-Id: Ia5240a1ff65ebadc15604a5c3eb63042953c43a5 Reviewed-on: https://chromium-review.googlesource.com/540198 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 672f7f3f 2017-06-15T17:42:17 WebGL Compat: forbid client side arrays, even unused BUG=angleproject:2064 Change-Id: I9a9c2df9a158799dbdc490446352cdf30fb87ca6 Reviewed-on: https://chromium-review.googlesource.com/537812 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez c084de14 2017-06-05T14:28:52 ProgramD3D: only broadcast when the GL_EXT_draw_buffers is enabled The behavior is undefined in GL ES when multiple attachments are used with gl_FragColor but WebGL clarifies that: - If the extension is enabled, broadcast happens - If the extension isn't enabled, only the first attachment is written BUG=angleproject:2048 Change-Id: I6d85ba91df77d42fb8863a03f1faa006cd7817bf Reviewed-on: https://chromium-review.googlesource.com/523809 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Frank Henigman fccbac2c 2017-05-28T17:29:26 Validate precision in uniform blocks for WebGL. In WebGL mode turn on checking that precision qualifiers match in corresponding vertex/fragment uniform blocks. Add test for this behavior. BUG=angleproject:2015 Change-Id: Ie035138e8c46e430bdcf8fb5bbc3e0a3ab7d6391 Reviewed-on: https://chromium-review.googlesource.com/517724 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 6e898aa3 2017-06-02T11:17:26 Allow sized GL_RGB[A]_32F to be used for TexImage2D with the chromium extensions. GL_CHROMIUM_color_buffer_float_rgb[a] allows these sized formats to be used in TexImage2D even in ES2. With this patch, the conformance/extensions/oes-texture-float and conformance/extensions/oes-texture-half-float tests now pass for WebGL1 and WebGL 2 contexts. BUG=angleproject:1958 Change-Id: I568dea5da42ba310463d2690c3e764c48598311b Reviewed-on: https://chromium-review.googlesource.com/522349 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Corentin Wallez e7557744 2017-06-01T13:09:57 WebGL compatibility: remove UB for draw buffers in the GL backend. WebGL adds two rules: - Fragment outputs declared but not written to should default to black. - FBO attachments for outputs not declared in the shader should not be written to (it is UB in OpenGL ES). Fix the first one by using the SH_INIT_OUTPUT_VARIABLES compiler options, and the second one by messing with glDrawBuffers so that the enabled draw buffers are always a subset of the ones declared by the shader. BUG=angleproject:2048 Change-Id: I1d851c190959c1acfc3e41d837e6990aec1d4086 Reviewed-on: https://chromium-review.googlesource.com/521682 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 9ab5b822 2017-05-30T16:19:23 Validate that vertex shader input matches the vertex attribute types. BUG=angleproject:2012 TEST=conformance2/rendering/attrib-type-match Change-Id: Ic282e0933a5c3c377322dd484534fcc1dfcb3840 Reviewed-on: https://chromium-review.googlesource.com/517974 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Geoff Lang fc32e8b7 2017-05-31T14:16:59 WebGL: Validate shader entry point names do not contain invalid characters. Section 6.20 of the WebGL spec states that all shader-related entry points that accept strings must validate that the string does not contain characters that are not valid in ESSL. TEST=conformance/misc/invalid-passed-params BUG=2016 Change-Id: I220d9dd79c4b0e8e0195277093268b9e1e66f9d9 Reviewed-on: https://chromium-review.googlesource.com/519445 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang e0cff190 2017-05-30T13:04:56 Validate that fragment shader output matches the draw buffer type. TEST=conformance2/rendering/fs-color-type-mismatch-color-buffer-type BUG=angleproject:1688 Change-Id: I17848baf40b6d32b5adc1458fe2369b850164da3 Reviewed-on: https://chromium-review.googlesource.com/518246 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Geoff Lang 40762ef3 2017-05-08T13:47:03 Supress floating point texture failures on various Intel bots. BUG=angleproject:1958 Change-Id: Ia168cd1bd48b9a443da6662efeaace1f792861f3 Reviewed-on: https://chromium-review.googlesource.com/498408 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@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 966c940b 2017-04-18T12:38:27 Fix validation for compressed texture functions. * No validation that the format matched the texture level's format for SubImage calls. * WebGL does not allow the base level to be smaller than the block size. * ANGLE used to allow mips of size 3 when this is disallowed. * Don't early-exit validation when dimensions are 0, imageSize validation happens later. TEST=conformance/extensions/webgl-compressed-texture-s3tc BUG=angleproject:1998 Change-Id: I05f5a0b5180344d67b036fdecc17edd2256e85ab Reviewed-on: https://chromium-review.googlesource.com/480442 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang e491578f 2017-04-12T15:19:07 WebGL: Validate the read and write buffers for BlitFramebuffer are unique. TEST=conformance2/rendering/blitframebuffer-test BUG=angleproject:1990 Change-Id: I0caeaac824f1689867134f34f74e5ef2c2f1b016 Reviewed-on: https://chromium-review.googlesource.com/475990 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 407d4e77 2017-04-12T14:54:11 Perform ANGLE_instanced_arrays validation for WebGL contexts. TEST=conformance2/rendering/instanced-arrays BUG=angleproject:1988 Change-Id: Ie513dcc7b1af540764fd5fe3790d3e6e3457f048 Reviewed-on: https://chromium-review.googlesource.com/475136 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang ff5c63ee 2017-04-12T15:26:54 Allow dynamically enabling shading language extensions. GL_OES_standard_derivatives, GL_EXT_shader_texture_lod and GL_EXT_frag_depth. TEST=conformance2/extensions/promoted-extensions-in-shaders TEST=conformance/glsl/misc/shader-with-dfdx.frag BUG=angleproject:1719 Change-Id: Ic0bd50c6a222940cc8de903f88f19a4f5ee08088 Reviewed-on: https://chromium-review.googlesource.com/476030 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang a0e0aebb 2017-04-12T15:06:29 Validate that framebuffer attachments all have the same size for WebGL. TEST=conformance2/rendering/draw-buffers BUG=angleproject:1989 Change-Id: Ifcbc766dea99a8361261713fde7a6b6ad724fd55 Reviewed-on: https://chromium-review.googlesource.com/475083 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 76e6565e 2017-03-27T14:58:02 Validate clear attachment formats match color clear types. TEST=conformance2/rendering/clear-func-buffer-type-match.html BUG=angleproject:1954 Change-Id: Iefeb38041608f11781f87aadb8611737ba2ee96f Reviewed-on: https://chromium-review.googlesource.com/461270 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang d7d526ad 2017-02-21T16:48:43 Allow enabling GL_EXT_texture_filter_anisotropic. BUG=angleproject:1721 Change-Id: I7cbc734915cde7d09165a3fcfe9a6bc0d7149aff Reviewed-on: https://chromium-review.googlesource.com/445959 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Frank Henigman a5eb2941 2017-03-09T17:03:54 Remove unused/unnecessary stuff. Change-Id: Ib409fee5422765cc4124a59a690a93c0fb2de8e7 Reviewed-on: https://chromium-review.googlesource.com/456123 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Corentin Wallez ded1b5a6 2017-03-09T18:58:48 WebGL Compat: make sure to test the correct error In ForbidsClientSideElementArrayBuffer we test that WebGL Compatibility returns a GL_INVALID_OPERATION but on NVIDIA Shield, the pointer had the top bit set and caused a GL_INVALID_VALUE to be generated instead. Use a intptr_t(1) for indices to test the correct error. BUG=angleproject:1523 Change-Id: I1497694264befa14b2b6df167b4f20fdbb707983 Reviewed-on: https://chromium-review.googlesource.com/452547 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez fe9306a8 2017-02-01T17:41:05 WebGLCompatibility: Add test for "negative" offset in DrawElements BUG=angleproject:1523 BUG=chromium:668223 Change-Id: I2d21c15b53fa204b3cb2b0be849cfe91ca63046b Reviewed-on: https://chromium-review.googlesource.com/435884 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Frank Henigman 146e8a1c 2017-03-02T23:22:37 WebGL validation of constant color & alpha blend. In WebGL, generate INVALID_OPERATION if constant color and constant alpha are used together as source and destination blend functions. BUG=angleproject:1817 Change-Id: I9b2d05ab5017c013bb89c13256efbd80198de91b Reviewed-on: https://chromium-review.googlesource.com/448940 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Yuly Novikov 817232ef 2017-02-22T18:36:10 Validate invariance of built-in variables when linking According to ESSL 1.00.17 paragraph 4.6.4 BUG=angleproject:1876 Change-Id: I61e142c31dce11eec28fe240a9bc9ce2c632daf6 Reviewed-on: https://chromium-review.googlesource.com/446870 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>