src/libANGLE/validationES.h


Log

Author Commit Date CI Message
Mohan Maiya e38dab0a 2022-01-10T10:58:40 Add missing implementation for glGetnUniformuiv() GL_KHR_robustness became core in GLES 3.2 and added glGetnUniformuiv() function in gles_3_2 entry points but this function was missing implementation in Context.cpp. Also fixes ES32 validation for glGetnUniform*v Bug: angleproject:6593 Tests: KHR-NoContext.es32.robustness.getnuniform Change-Id: Ic26190e59d448d93ae9e2e0d2a7faff14c3776f8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3373436 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Maksim Sisov beda2459 2021-12-09T14:24:08 Add support for GL_MESA_framebuffer_flip_y 2/* This is a second CL that adds actual implementation for GL_MESA_framebuffer_flip_y extension. Also, some tests are added to verify the functionality. Please note that bots do not support this extension yet, and the tests were verified by running them locally. Bug: chromium:1231934 Change-Id: Iea483aa13a298df6b5cf0b7b5ffb795a4666e3bd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3329603 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Maksim Sisov <msisov@igalia.com>
Gregg Tavares cf9ab647 2021-12-10T15:42:36 Add early out validation in drawArraysCommon Bug: angleproject:6791 Change-Id: I60de6806dae9c917c6db24a18f586e3b0aa2154e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3331414 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
YuxinHu 2aa5286d 2021-10-12T17:05:48 Add Entry Point name to validation errors Add gl/gles entry point names to validation error messages some special cases: 1. Debug::insertPerfWarning() is invoked from multiple places, such as TextureVK, ContextVK, adding an extra entryPoint function parameter in these files will need extra investigations. I am passing the entryPoint name GLInvalid as a temp workaround. 2.ErrorSet::hangleError() is invoked from multiple Context*.cpp files, adding an extra entryPoint function parameter in these files will need extra investigations. I am passing the entryPoint name GLInvalid as a temp workaround. 3. Debug::insertMessage(), Debug::popGroup(), Debug::pushGroup() can be invoked from more than one GL entry points, e.g. Debug::pushGroup() can be invoked from either GL_APIENTRY GL_PushDebugGroup() or GL_APIENTRY GL_PushDebugGroupKHR() through context->pushDebugGroup() call. Right now the same entry point name glPushDebugGroup will be printed out in the error message for both cases. However, we should be able to tell the actual entry point by checking which version: KHR version or core version the application uses, and this helps avoid the confusion. For now we will let the same entry point name getting printed for both cases. Bug: angleproject:6523 Change-Id: I64a5463d9168d8444d376d1f428c3b3d894f2ea9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3215063 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Jamie Madill 49ac15a5 2021-09-20T11:29:01 Optimize VAO bindings. This CL makes the XFB binding tracking WebGL-only. That will speed up VAO binding changes in non-WebGL considerably. Also has a few inline micro-optimizations that may not have a large effect. Bug: angleproject:6371 Change-Id: Ib0a26a3b956dcd6ff78626e5cd6514b46270d882 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3170116 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1ca1589f 2021-09-13T10:56:58 Give GLES extension bools a vendor suffix. This is in preparation for auto-generation which will give all of these bools suffixes. Bug: angleproject:6379 Change-Id: I7e3f6c9b644c41a2165e6bf7b62d661fd352a250 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3158503 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang bccb0d56 2021-05-11T13:53:05 Add messages for framebuffer completeness errors. This also creates a common code path for all framebuffer completeness errors (FramebufferStatus::Incomplete) which helps for adding a debug breakpoint. Bug: angleproject:5949 Change-Id: Ib102dbf86e020777e56c6dc6b78dda8ebdba2127 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2888110 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 351e6e8c 2021-01-26T17:08:59 Add 'UniformBlockIndex' struct Add the new structure 'UniformBlockIndex'. This is in preparation for capturing glUniformBlockBinding() calls, which requires the (new) corresponding ParamType::TUniformBlockIndex. Bug: angleproject:5564 Change-Id: I88613dd96d058659dd253e8088fab49670c32316 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2651287 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill b912eec5 2020-11-27T11:08:41 Vulkan: Support GL_EXT_tessellation_shader. Shader translator changes done in http://crrev.com/c/2633936 Adds a new DIRTY_BIT_PATCH_VERTICES state to Context. Supportes state query and transform feedback. 4 test suppressions remain as follow-up fixes. Adds a new varying packing mode for a simple Vulkan rule set. Based on work by Mohan Maiya (m.maiya@samsung.com). Test: dEQP-GLES31.functional.tessellation.* Bug: angleproject:3572 Change-Id: I4cad2cca30adb754fd12c83027673906541f566a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568234 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Mohan Maiya ccd0b7e1 2020-11-30T08:37:04 Add support for OES_framebuffer_object extension Expose OES_framebuffer_object extension for GLES1 contexts. Bug: angleproject:5401 Test: FramebufferObjectTest* Change-Id: I63b504f580cdab4655b4bfbd3438bcd807b422ea Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2561795 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill cfe14e28 2020-11-19T18:11:42 EGL: Remove egl::Error from validation code. Instead of using an egl::Error return value, errors are recorded on the egl::Thread immediately at the call site. This makes the code work the same way as in the GL entry points. Updates the EGL "try" macros to include a special handler for the EGL validation entry points. Uses a special ValidationContext helper class to preserve the existing info. Bug: angleproject:5378 Change-Id: I897f221a41fe406676950600e4ac559081b9f541 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551790 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Brandon Schade 1e494cae 2020-10-07T19:26:01 Vulkan: Add support for EXT_copy_image Add support for GL_EXT_copy_image which allows image data transfer between image objects. This is implemented by using the vkCmdCopyImage API call. Bug: angleproject:3593 Test: dEQP-GLES31.functional.copy_image.* Change-Id: I30a34a8711b5d2e5834064d7453e03d6ec0df478 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2393955 Commit-Queue: Brandon Schade <b.schade@samsung.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill f6f20601 2020-09-13T23:29:55 Vulkan: Optimize Attribute Change Perf (4/5) This patch series optimizes programs that use the pattern: for (;;) { glVertexAttribPointer(...) glDraw(...) } Change 4: Inline ValidateProgramDrawStates. A hotspot in most draw calls that change state. In total the patch series reduces test iteration time by 25%. This change reduces the listed "null" benchmark time from 295 -> 286 ns. Test: DrawCallPerfBenchmark.Run/vulkan_null_attrib_change Bug: angleproject:5045 Bug: b/168493024 Change-Id: I80959c9d06030709d7f4eba696e43614c33d5a8f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2409176 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi f776eb9c 2020-08-01T23:45:24 Vulkan: EXT_multisampled_render_to_texture2 support The previous change that implemented EXT_multisampled_render_to_texture already provisioned this extension in the Vulkan backend. This change implements the front-end for this extension and enables it in the Vulkan backend. Bug: angleproject:4836 Change-Id: I7080260972e61727c5716051c236f635668cb67b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2330510 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill e09f7a14 2020-04-30T17:43:12 Validation: Fix some function types. These were slightly mismatching the header types. They seemed to link fine despite producing some warnings in a tool. Bug: angleproject:4598 Change-Id: I19cfe4d87eca409c82a7c8cf25fff6f8a4c83ca9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2175057 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill 57d95828 2020-04-30T17:35:50 Revert "Add type for attribute locations." This reverts commit 9349c14344b2d1fd6bc357063b602bc2626c140f and commit d43b057435e6c9e3194dd20627681ffca0c0808e. It's no longer needed after we bind attribute locations before link. Original CL message: This will allow the capture/replay tool to easily intercept and label attribute locations for remapping. There's some inconsistency in implementation in the GL desktop front- end. This is a quick fix and the full implementation is left for when we implement the full desktop GL API set. Bug: angleproject:4598 Change-Id: Ic510159d4d1982eff41560503cabf983a1be0381 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2174076 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9349c143 2020-04-29T16:36:17 Add type for attribute locations. This will allow the capture/replay tool to easily intercept and label attribute locations for remapping. There's some inconsistency in implementation in the GL desktop front- end. This is a quick fix and the full implementation is left for when we implement the full desktop GL API set. Bug: angleproject:4598 Change-Id: Ibf11bcb8669d27265ea376494a2e3124825cf3be Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2171933 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Alexis Hetu 95741743 2020-04-27T18:09:42 Validation fix for draw with primcount <= 0 A buffer size validation check was returning an invalid operation error based on buffer size, even when primcount is <= 0 (so the buffer isn't used). Fixes the following WebGL 1.0.4 test with SwANGLE: conformance/extensions/angle-instanced-arrays-out-of-bounds.html Bug: b/154628007 Change-Id: Ibfe4eb57f17cd07100fb8dfbe8069e9ec7515160 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2168546 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Tim Van Patten 405f8e7b 2020-02-24T17:38:10 Vulkan: Support Program Pipeline Objects Add support for PPOs to the Vulkan back end. Bug: angleproject:3570 Change-Id: I5403456929847c185467b008d810f31ecfcb60cc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2072652 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill a18f4145 2020-02-19T22:42:12 Trace/Replay: Add uniform location type. This is a large refactor that replaces instances of "GLint location" for uniform locations with "UniformLocation location". This boxed type is similar to the ResourceID types that we use to capture resource IDs more easily. Eventually this will give us a more portable replay. Bug: angleproject:4411 Change-Id: I848e861c3956d95b6b953f57f8b6a2c4a676766f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2066117 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill bd4e756a 2020-02-17T09:49:45 Const-ify the validation layer. Enforces that the validation layers should be working pretty much read- only with the exeption of updating caches. Requires a few tricks: - updates EP code generation to add 'const' to pointer parameters - enables a kludge const_cast to enable the robust query extension - makes some members of Framebuffer mutable to work around syncState - makes 'is' queries and other methods in Context/State const Will allow us to more safely expose the no_error extension. Bug: angleproject:1280 Change-Id: Id9756757854c9e68fc096ecec8d93759fbe6b3a4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2060689 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev 33b1e31e 2020-02-08T17:48:56 Fix compressed formats validation with TEXTURE_3D Bug: angleproject:4385 Change-Id: Ibc1b482ec851d8076aacad84ab67fe20a745c122 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2045512 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Shahbaz Youssefi 232d009d 2019-11-27T10:12:23 Fix string literal comparison in validation String literals shouldn't be compared by pointer, especially if the literal is declared in a header (so the two pointers can come from different translation units, because the string literal might have a different copy in each). Use strcmp instead. Bug: angleproject:4175 Change-Id: I6002ccb185f48928b67ce8a7b3508e427761a8c3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1940568 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Xinyi He 4c7db77e 2019-10-31T15:42:31 Vulkan: Set limitation on maxComputeWorkGroupCount According to Table 20.45 and Chapter 17 in the ES 3.1 spec, MAX_COMPUTE_WORK_GROUP_COUNT is get as a GLint by using GetIntegeri_v. However, it is an unsigned integer in the Vulkan. It needs to set limitation on maxComputeWorkGroupCount[] during translating. 1. Change the data type to GLint stored in Caps. 2. Ensure that the limitation is set during initialization. 3. Add workaround for angleproject:4120 Bug: angleproject:4066 Change-Id: I1659ba1d560e30b9599cace0feeab8a18890c3ff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1890586 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill dfc20daf 2019-10-28T13:51:42 Plumb more logic for ANGLE_get_image. Also implements and tests validation / negative API. Bug: angleproject:3944 Change-Id: I3385a4255f4fab6a12eee2abfa5ffcce2107359a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1879961 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Mingyu Hu 2d0e5b55 2019-08-27T13:49:07 GL_EXT_multisampled_render_to_texture extension. Part 2. For textures that use this extension, a multisampled texture is implicitly created for the texture. Upon write or read, the multisampled texture is either return to be drawn to or resolved and returned as a single sampled texture. This is the functionality change with end2end tests. Bug: angleproject:980428 Change-Id: I5776875a132fed7a3f4f00fb02f9e8e250684630 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1773717 Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Mohan Maiya fea65766 2019-09-19T09:30:38 Vulkan: Add support for OES_vertex_type_10_10_10_2 - Add support to CPU/GPU convert vertex formats - Add test cases for type conversion in angle_end2end_tests - Fix a bug in shader script by adding a ceil when calculating bytes Bug: angleproject:3192 Test: angle_end2end_tests --gtest_filter=VertexAttributeTest*Packed1010102* Change-Id: I57bab9fc1c1041cd734746d0e52a33717b635ec0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1788495 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Jiacheng Lu feb8507f 2019-09-03T13:22:04 Use VertexArrayID in place of GLuint handle Bug: angleproject:3804 Change-Id: I0454533eff13218a6aa1e1672ffcd0e76aedb399 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769716 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiacheng Lu 120b61d3 2019-08-21T12:51:58 Use ShaderProgramID in place of GLuint handles Bug: angleproject:3804 Change-Id: I5dc640004c2cc054c53261e8e939b6a9f5fc23bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762363 Commit-Queue: Jiacheng Lu <lujc@google.com> Reviewed-by: Tobin Ehlis <tobine@google.com>
Jiacheng Lu 814a0a1b 2019-08-22T11:50:43 Use QueryID in place of GLuint handle Bug: angleproject:3804 Change-Id: I921bbe7f67c025ab2b624fe14530c04ac17346f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1765889 Reviewed-by: Jiacheng Lu <lujc@google.com> Commit-Queue: Jiacheng Lu <lujc@google.com>
Jiacheng Lu ee79e2ff 2019-08-20T11:28:36 Use SamplerID in place of GLuint handles Update all Sampler handles to type SamplerID, preparing for midframe capture of sampler. Bug: angleproject:3804 Change-Id: I9337919f97d61e28718987612d642c569b90246a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1761780 Commit-Queue: Jiacheng Lu <lujc@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2ab08edc 2019-08-12T16:20:21 Use TextureID in place of GLuint handles. Bug: angleproject:3611 Change-Id: Ie6156e8732b3ca4dc6c4439c059a5481a4dfd250 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1738753 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7c7dec01 2019-08-06T17:44:11 Use RenderbufferID in place of GLuint handles. This will allow frame capture/replay to more easily emulate object handle manipulation. It also provides a bit of type safety. Also generalizes ResourceMap to handle non-GLuint IDs. Bug: angleproject:3611 Change-Id: I174fd260f326e0dbe2aca3f818215c91d82cf48c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1706559 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang d9c17107 2019-07-10T14:56:26 Add support for GL_OES_texture_compression_astc This extension adds 3D compressed texture formats, something ANGLE has not seen before. This requires tracking a compressed block depth for validation and image size computations. Update the ldr and hdr extension checks to be in line with the spec. HDR requires LDR and is not detectable by texture formats alone. Expose all of the ASTC extensions on the GL backend. BUG=angleproject:3675 Change-Id: Id04c7c8ef8541e9556579536cdba899b64303caf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1695923 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 4c0a2361 2019-06-25T10:56:29 Update ValidateSamplerParameterBase to use const parameters. ValidateSamplerParameterBase is called with both const and non-const parameter pointers which caused our explicit template instantiations to not cover all cases resulting in link errors. Force the parameters to always be const so that our instantiations cover everything. BUG=angleproject:3555 Change-Id: Ibf92572ba80a689c75dcdc70e5153d9941da76f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1676305 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 857880e5 2019-05-27T13:39:15 GL: Add extensions to enable hardware video decode on Android. The Android SurfaceTexture API has to be initialized with a texture id which Chrome has to query from an ANGLE external texture. It also rebinds and sets the texture dimensions on calls to SurfaceTexture.updateTexImage so ANGLE must be notified about these changes so that state tracking and validation continue to function. BUG=967410 Change-Id: I92e9077f75835b088da3a8caffb3ff40e9ad0361 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1630293 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2664da8b 2019-04-08T16:26:52 Correct texImage uses of texture type -> target. Similarly to how the subImage calls were corrected. glTexImage and the family of related functions apply to a single texture target. This means we need a different TexImage call for each cube face. This is distinct from TexStorage calls which take a Cube map directly. Note this is mostly a refactoring change. But it does increase code consistency and should allow for more efficient code reuse. Bug: angleproject:3356 Change-Id: I252f8983cdda3a8f0223c44cbbe8d8e2dd319a88 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558673 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
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 d51fbe34 2019-01-25T15:03:39 Fold buffer access validation into extensions. We only need to perform vertex array buffer validation if the WebGL compatiblity extension is enabled and robust access is not available. Although sometimes the range checks are useful for determining undefined behaviour they are not required by the OpenGL spec. They also slow down state updates significantly. This migrates the OOR tests into specific WebGL tests. It also requires a change to a Chromium test on the passthrough decoder. Improves perf by about 10% in the Vulkan VBO state change test. Also fixes some robust resource access cases for D3D11. Bug: angleproject:3000 Change-Id: Ice37f38f01c2f27bf32ed55657a30e69d8508335 Reviewed-on: https://chromium-review.googlesource.com/c/1390362 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c8c7d400 2019-01-16T13:27:15 Use a table for vertex attrib type validation. No clearly sampled effect on performance but should require fewer instructions. May lead to future improvements. Bug: angleproject:3014 Change-Id: I64e155926ae2c553b059265780e72e91f91f097c Reviewed-on: https://chromium-review.googlesource.com/c/1393906 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill dd34b3b9 2019-01-16T09:59:54 Pack VertexAttribType enum. This improves performance slightly in vertex array format checks. Instead of needing to switch on GLenum values we can use packed arrays and tables to determine the values we need. Does not significantly affect performance but will enable future work. Bug: angleproject:3074 Change-Id: I6f4821a463e9b41fe3f8c8967eb3ed4c1d6b84be Reviewed-on: https://chromium-review.googlesource.com/c/1393903 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9fa54eab 2019-01-02T18:38:33 Optimize and inline more validation. Previously on each draw call we were checking both the instanced and non-instanced attributes for overflow. On on-instanced draw calls we don't need to do any special checks for instanced attributes. Also we can inline more into the headers. This improves draw call performance slightly. Bug: angleproject:2966 Change-Id: Idf5861d2d9daf9fffd5c84f6a1ea5b23ac8ab713 Reviewed-on: https://chromium-review.googlesource.com/c/1390357 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Markus Tavenrath <matavenrath@nvidia.com>
Jamie Madill 1e853266 2018-12-21T09:07:38 Cache common DrawElements states. Similar to how we cache the base common draw states. This will improve DrawElements performance. Several state checks are optimized into a single 'if' check of a cached value. Also includes a regression test for mapping the element array buffer. Bug: angleproject:2966 Change-Id: Ia6e524a58ad6b7df2e455d67733e15d324b1b893 Reviewed-on: https://chromium-review.googlesource.com/c/1357150 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill f5c88e7e 2018-12-08T09:56:38 Refactor and inline DrawElements validation. This moves ValidateDrawBase into a common inline function. It also moves some checks in ValidateDrawElementsCommon into ValidateDrawElementsBase. "Base" is called from DrawElementsIndirect while "Common" is only called from non-indirect entry points. But this improves conformance because the missing checks in "Base" apply to DrawIndirect as well. In a follow-up patch many checks in "Base" will be cached into a single value. Much like what we did for ValidateDrawBase. Also inlines ValidateDrawElements which just calls through to "Common". Bug: angleproject:2966 Change-Id: Ibe0c5db25f403dd52a50dc73373ebb50cedad003 Reviewed-on: https://chromium-review.googlesource.com/c/1357147 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 8dc27f99 2018-11-29T11:45:44 Use packed enum for DrawElementsType. The packing and unpacking take a few extra instructions. But it completely obviates the need for any switches in the validation code. Speed is slightly faster or the similar depending on the back-end. Also add gl_angle_ext.xml to GL entry point generator inputs. This was missing and would cause the code generation to miss certain changes. Bug: angleproject:2985 Change-Id: I1ea41a71db71135000166ead8305ec42d22ff7b3 Reviewed-on: https://chromium-review.googlesource.com/c/1351729 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Yizhou Jiang 7310da33 2018-11-05T14:40:01 Implement GetMultismaplefvANGLE and SampleMaskiANGLE of texture multisample extension This patch adds GetMultismaplefvANGLE and SampleMaskiANGLE api. TEST=TextureMultisampleTest.CheckSamplePositions* TEST=NegativeTextureMultisampleTest.Negtive* BUG=angleproject:2275 Change-Id: Ib1e8b856059229bbe88328a28cf2a892f4673214 Reviewed-on: https://chromium-review.googlesource.com/c/1319252 Commit-Queue: Yizhou Jiang <yizhou.jiang@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4f6592fa 2018-11-27T16:37:45 Remove gl::Error. Removes several TODOs. Only egl::Error remains. Also slightly decreases binary size. Bug: angleproject:2491 Change-Id: I3a9d1c22eb0884ca9e37362463fddd0083faf826 Reviewed-on: https://chromium-review.googlesource.com/c/1337462 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill e0472f3d 2018-11-27T16:32:45 Slight refactor to ErrorStrings.h. Allows for better readability. Also sort the error strings by ID. Bug: angleproject:2957 Change-Id: Ib3900a4c90507ac84496fd5ff916417eb768667b Reviewed-on: https://chromium-review.googlesource.com/c/1337461 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 610640fa 2018-11-21T17:28:41 Don't use gl::Error in validation. Instead pass error code and error message directly to the Context. As a side effect every validation error has an associated message now. Reduces binary size by almost 100k. Bug: angleproject:2957 Change-Id: I045e8ab57f8f9d787654a32f6f037011fe3a9f24 Reviewed-on: https://chromium-review.googlesource.com/c/1335890 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 778bf09d 2018-11-14T09:54:36 Auto-generate validation headers. This will make them easier to maintain. Add to add new features. Bug: angleproject:2964 Change-Id: I8c1f92e0d0ca15fc4f555f6c537fa9311320ef7d Reviewed-on: https://chromium-review.googlesource.com/c/1334429 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Austin Eng 1bf18ce9 2018-10-19T15:34:02 Implement GL_ANGLE_multi_draw This patch adds entrypoints glMultiDrawArraysANGLE, glMultiDrawElementsANGLE, glMultiDrawArraysInstancedANGLE, annd glMultiDrawElementsInstancedANGLE Bug: chromium:890539 Change-Id: Ic9c374c53892460f44ca6e73a253b78473ac2dff Reviewed-on: https://chromium-review.googlesource.com/c/1282268 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
Yizhou Jiang c0b6c639 2018-09-06T15:02:04 Implement GetTexLevelParameter api of texture multisample extension This patch adds GetTexLevelParameterivANGLE and GetTexLevelParameterfvANGLE. TEST=TextureMultisampleTest.GetTexLevelParameter* TEST=NegativeTextureMultisampleTest.Negtive* BUG=angleproject:2275 Change-Id: Id702ba31df36ab65f46b697d480b5bf01b87e360 Reviewed-on: https://chromium-review.googlesource.com/c/1295830 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yizhou Jiang <yizhou.jiang@intel.com>
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>
Jamie Madill 956ab4d9 2018-10-10T16:13:03 Optimize several functions for the Program perf test. This gives the same or slightly better performance in the ProgramDraw perf test. Also only set the Program object as dirty when there are dirty bits set in the Program itself. Bug: angleproject:2877 Change-Id: I07b428b40d3e3c24e0a42c970524756b6dc3a30e Reviewed-on: https://chromium-review.googlesource.com/c/1271475 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill d84b6737 2018-09-06T15:54:35 Cache ValidateDrawStates. This improves performance of all draw call validation. The error that should be generated on the draw call is cached in the Context. The cache is updated in several places. Bug: angleproject:2747 Change-Id: I178617623731608e2e7166b53ab6489d8b742ff5 Reviewed-on: https://chromium-review.googlesource.com/1158612 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
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>
Jamie Madill e7d80f33 2018-08-08T15:49:23 Refactor ValidateDrawBase. Split the parameter-dependent and parameter-independent validation. This will more easily let us cache independent validation in Context. Bug: angleproject:2747 Change-Id: I78a12798cd03a398392ca213bf51e2079295b97e Reviewed-on: https://chromium-review.googlesource.com/1158610 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
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>
Jamie Madill d4703d50 2018-05-24T17:31:43 Move packed enum code to common/ This makes it accessible in the utilities files. Bug: angleproject:2574 Bug: angleproject:2169 Change-Id: I0fdd34b4233e72b7534cb2b09f451539c1a394cd Reviewed-on: https://chromium-review.googlesource.com/1067110 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jiawei Shao 80c32ccb 2018-04-25T09:48:36 ES31: Add extra transform feedback rules in EXT_geometry_shader This patch adds the additional transform feedback rules required in EXT_geometry_shader. In this extension, more draw commands and render primitives are allowed for transform feedback. BUG=angleproject:1941 TEST=dEQP-GLES31.functional.geometry_shading.vertex_transform_feedback.* angle_end2end_tests Change-Id: Iedc27dca5c24ca45cd4226a1a0066107c0b40e1d Reviewed-on: https://chromium-review.googlesource.com/1055192 Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Corentin Wallez ad3ae90a 2018-03-09T13:40:42 Use packed enums for QueryType. BUG=angleproject:2169 Change-Id: I129a9d8e295859daa071a298dab9fe1895315cc0 Reviewed-on: https://chromium-review.googlesource.com/957318 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 8ceea819 2018-04-10T03:07:13 Refactor packed enum generation to support EGL enums. Convert the very simple EGL texture type enum. BUG=angleproject:1618 Change-Id: Ieea382a282a8f2544f2982627e8445e6e5cea826 Reviewed-on: https://chromium-review.googlesource.com/1019386 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
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>
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>
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>
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>
Luc Ferron 9dbaeba8 2018-02-01T07:26:59 Validation layer fixes for compressedtexsubimage* dEQP tests * Change order of validation in ValidateCompressedTexSubImage3D to get the errors in the same order as the dEQP tests are expecting them. * ES 3.1: Section 8.7, page 169: If the internal format is ETC2/EAC, the target must be a GL_TEXTURE_2D_ARRAY. * ES 3.1: Section 8.7, page 171: For sub textures, ET2/EAC formats also requires exact size to be validated. Bug: angleproject:2327 Change-Id: Ib049c70a52ed5683885a73fb06503898a85786d1 Reviewed-on: https://chromium-review.googlesource.com/897726 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
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>
Jiajia Qin 5451d532 2017-11-16T17:16:34 Refactor ES31 entry points BUG=angleproject:2254 Change-Id: I4e837a831e0950330b243bd8aa01831af0a70cc4 Reviewed-on: https://chromium-review.googlesource.com/775604 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>
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>
Jamie Madill 9696d073 2017-08-26T23:19:57 Clean up the ES3 entry points for auto-generation. Removes some unnecessary includes, and moves some validatoinfunctions to the ES3-only file. BUG=angleproject:1309 Change-Id: I3b274014c48f6f39b5e67223987c91fbc5b4d390 Reviewed-on: https://chromium-review.googlesource.com/636519 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@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 f0e0449e 2017-08-26T15:28:42 Format ES3 query entry points. Also refactor some query extension entry points. BUG=angleproject:747 Change-Id: I5a8a3b2616a3872b5645a655641ec9c12739f804 Reviewed-on: https://chromium-review.googlesource.com/636062 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
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>
Jamie Madill 4928b7ca 2017-06-20T12:57:39 Proliferate gl::Context everywhere. This gives the D3D back-end access to the GL state almost anywhere. This uses the onDestroy hook for Textures to push errors up from destructors, although they still don't quite make it to the Context. There are places, such as in EGL object (Context/Surface) destruction, where we end up calling through to GL implementation internals without having access to a gl::Context. We handle this via a proxy Context to a Display, basically a null context, that has access to impl-side state like the Renderer pointer if necessary. It does not have access to the normal GL state. Also Pass gl::Context to RefCountObject::release(). Since we're using destroy() methods now, we should not ever call the destructor directly. BUG=angleproject:1156 Change-Id: Ie4c32ad6bf6caaff0289901f30b5c6bafa2ce259 Reviewed-on: https://chromium-review.googlesource.com/529707 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 61e16b44 2017-06-19T11:13:23 Context: Bind current display/surface. Looking at the EGL spec, it says for eglGetCurrentDisplay: "The display for the current context in the calling thread, for the current rendering API, is returned." This implies that MakeCurrent binds a display to a Context. There's also pretty clear language for the read/draw Surface as well, that they can only be bound to one Context/thread at a time. Hence we don't need to duplicate this storage in the egl::Thread structure, merely storing a pointer to the current Context, which has access to the read/draw Surface and current Display. BUG=angleproject:1156 Change-Id: Ia3b99d50b3591012c43e851834c1af02ff62a33f Reviewed-on: https://chromium-review.googlesource.com/538865 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang dbcced8e 2017-06-06T15:55:54 When validating image size, use format for SubImage calls. internalFormat is GL_NONE when validating these calls for glTexSubImage and leads to an expected minimum size of 0. Add extra unsized formats that are never supported to the format tables. These are needed for determining the size of input data. BUG=angleproject:2054 Change-Id: Ic827a279a246ff92c9f279232574521692b1c6f2 Reviewed-on: https://chromium-review.googlesource.com/526356 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill be849e4f 2017-05-02T15:49:00 GLES2: Clean up entry points for auto-gen. This cleans up a few things: * refactors a few remaining missed EPs * removes unnecessary includes * rename one Context entry point * moves some ES2 EP validation to validationES2 The last item makes for a significant diff, but this is a refactor change only, with no functionality change. BUG=angleproject:747 Change-Id: I7860cc4b6260b6c22faa5f2885297333c0cdb4ed Reviewed-on: https://chromium-review.googlesource.com/483426 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 876429b7 2017-04-20T15:46:24 Update gl2.h and update entry points. Some method signatures were updated. Types like GLclampf and GLvoid were replaced with other equivalents. BUG=angleproject:1309 Change-Id: I05e8e2072c5a063d87ad96a855b907424661e680 Reviewed-on: https://chromium-review.googlesource.com/475011 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 9c9b40ac 2017-04-26T16:31:57 Use parameter cache to skip passing IndexRange. For DrawElements et al., we can use a simple design to store entry point parameters and compute index ranges lazily. This allows us to compute the index range outside of the validation layer. Fixing this will let us implement a few things, such as the no error extension. It will also allow auto-generation of the entry points, since we won't have to have special cases for certain entry points. It will also help fix the syncState layering problem. Now the cached parameter helper (which is owned by the Context) can make the impl layer calls, instead of the validation layer calling the impl directly. We use a small array in Context to gather parameters in a generic way without reallocation on call. We also check type safety by storing a type info struct which can handle inheritance between type classes. Optional variables for the cache determine when to re-compute values. The intent with gatherParams is to call this in every entry point, and have in most cases be a no-op. In some cases like for IndexRange, we store some parameters for later use. The inheritance scheme enables auto-generation of the entry points by keeping signatures similar. BUG=angleproject:747 Change-Id: I871e99e1334cf6e61ef8da62fde3ced094903f8a Reviewed-on: https://chromium-review.googlesource.com/474119 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
Corentin Wallez b2931601 2017-04-11T15:58:57 Add robust entry point for CompressedTex(Sub)Image BUG=angleproject:1354 Change-Id: I925db827c4ccf4e6f037a058f8f6b960a56047e1 Reviewed-on: https://chromium-review.googlesource.com/474964 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c1d770e8 2017-04-13T17:31:24 Refactor remaining GLES 2.0 entry points. This will pave the way for several features, like auto-generation. BUG=angleproject:747 Change-Id: Ic390ac412f4e6b61346629093f185a4c07ea0284 Reviewed-on: https://chromium-review.googlesource.com/474118 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang e93dabaa 2017-03-30T13:54:40 Output the number of columns and rows written for robust ReadPixels. BUG=angleproject:1354 Change-Id: Ib78f74d7b1a449468e2c477955f6795dc5dbc811 Reviewed-on: https://chromium-review.googlesource.com/463786 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@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 2d62ab72 2017-03-23T16:54:40 Apply WebGL validation to glVertexAttribIPointer. TEST=deqp/functional/gles3/shaderstatequery.html BUG=angleproject:1523 BUG=chromium:668223 Change-Id: I24230144f8529d84cdbde3d5a8ad9178481550a9 Reviewed-on: https://chromium-review.googlesource.com/458680 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Shao 80957d99 2017-02-20T21:25:59 ES31: Implement Vertex Attrib Binding entry points This patch intends to implement all entry points related to Vertex Attrib Binding. (1) Add entry points and validation code on following APIs: - VertexAttribFormat - VertexAttribIFormat - VertexAttribBinding - BindVertexBuffer - VertexBindingDivisor (2) Add queries on following parameters: - VERTEX_ATTRIB_BINDING - VERTEX_ATTRIB_RELATIVE_OFFSET - VERTEX_BINDING_DIVISOR - VERTEX_BINDING_OFFSET - VERTEX_BINDING_STRIDE - VERTEX_BINDING_BUFFER BUG=angleproject:1593 TEST=angle_end2end_tests TEST=angle_unittests TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_relative_offset_* TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_bindings_* TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_stride_* TEST=dEQP-GLES31.functional.state_query.vertex_attribute_binding.* TEST=dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.vertex_attrib_pointer TEST=dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.vertex_attrib_format TEST=dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.vertex_attrib_i_format Change-Id: I4b477a82df6aad89b89b088580a06d66963e6666 Reviewed-on: https://chromium-review.googlesource.com/446124 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill e8fb640d 2017-02-14T17:56:40 Update RenderbufferStorage EPs to new style. This will facilitate changes for WebGL compatibility. BUG=angleproject:747 BUG=angleproject:1708 Change-Id: I62e5d684ca10a843b5e958afe9954c1065bfeb19 Reviewed-on: https://chromium-review.googlesource.com/442093 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 44ff5a76 2017-02-03T15:15:43 Validate xoffset and yoffset are multiples of blocksize. Affects glCompressedTexSubImage and glCopyCompressedTexSubImage calls. BUG=668223 Change-Id: Ie71faa1fa7dac12cec51a2e29e0ce212ac54e411 Reviewed-on: https://chromium-review.googlesource.com/437605 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>