src/libANGLE/validationES31.cpp


Log

Author Commit Date CI Message
Amirali Abdolrashidi ebb56cee 2024-05-31T15:10:37 Implement OES_tessellation_shader Based on the specs, there are no functional differences between OES and EXT. * Added validation for glPatchParameteriOES() and the core glPatchParameteri(). * Added the extension support for GLSL. * EXT_shader_io_blocks is implicitly enabled for the EXT geometry and tessellation shader extensions. * OES_shader_io_blocks is implicitly enabled for the OES versions of said extensions. * Added a test to make sure using this extension works instead of EXT. * Turned the repeated test code into a function: * testTessellationTextureBufferAccess * Skipped the tests that fail on various platforms. * It seems that these tests were being skipped before enabling this extension ("Not supported"). Bug: b/344030760 Bug: angleproject:345306326 Bug: angleproject:345304850 Bug: angleproject:345312771 Change-Id: I905da0132bf6525cb453dcaa613e4deb3155c4dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5595611 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi 29561184 2023-09-06T22:08:33 Remove forward-to-executable helpers from program This helps avoid accidental usage of the executable that is in the program instead of the installed executable in the GL context. The program's executable is still accessed in specific cases of: - During link - GL program queries Bug: angleproject:8297 Change-Id: I40a956e740944f2ecfbf6e4a3060aac08c21f7f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864448 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 7b0bb0f6 2023-09-01T13:52:28 Properly "install" program executables According to GL: - The program has an executable - The executable is overwritten during link. - After a failed link, queries of the executable may return half-linked information - On glUseProgram, the executable is installed in the context - On glUseProgramStages, the executable is installed in the program pipeline - After a successful link, the executable is updated wherever the previous executable of the program was installed. This change implements exactly the above: - The program's and the program pipeline's executables are now shared_ptr. References to an executable in the context and PPO are also through a shared_ptr. Installing an executable thus translates to sharing the executable. - The context and PPOs are made to not reference the program directly, but work solely through the executable. As a result, the program is free to create a new executable for link. With this change, the link job will be free to modify the executable as necessary because that will not be accessed until the link is done. Note that previous changes made the backend executable accessed through the frontend one, and moved all link results to the frontend and backend executables as appropriate. Bug: angleproject:6358 Bug: angleproject:8297 Change-Id: Ie636b23ff7420ad284d18b525ec4f5fb559dd9d1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4823089 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Charlie Lao ee019f58 2023-08-01T17:03:24 Group fixed sized data of LinkedUniform into a struct Most of gl::LinkedUniform struct is a basic types and can be simply initialized with memcpy. This CL groups these together and encapsulate them with get APIs. The load/save is now a single memcpy for the entire fixed size data structure of basic types. Bug: b/275102061 Change-Id: I49120c06ec941c783790ac0ecb0ee314a4234b26 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4740298 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 74cf6a3a 2023-07-12T14:44:17 Ensure lockless entry point validations only access private data Bug: angleproject:8224 Change-Id: I19e867923b088879f9f37d0a3b4ff8b681470be0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678352 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c9a42949 2023-07-12T15:07:17 Make validation make straight calls to ErrorSet ... and avoid going through the context (just to get a const cast). This change is also in preparation for an follow up where some entry points directly use ErrorSet and don't access context at all. Bug: angleproject:8224 Change-Id: Idef0a88d9407870e7a84b4fe6967fbff175c269b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678350 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Hailin Zhang b7474d0a 2022-04-28T14:44:54 D3D11: Add GL_EXT_texture_buffer support tested: deqp-gles31.exe --deqp-gl-context-type=egl --deqp-case=dEQP-GLES31.functional.texture.texture_buffer.* passed Bug: b/206367167 Change-Id: I31a6f84bd701a737735a6bac2f4eef780c24a979 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3639722 Commit-Queue: Hailin Zhang <hailinzhang@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
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>
Amirali Abdolrashidi 17bf6e98 2021-11-11T20:53:31 Implement GL_EXT_multi_draw_indirect * Added the validation functions for multiDrawArraysIndirect() and multiDrawElementsIndirect() according to the specs. * Added generic implementation for the two functions that can be called by back-ends. * Added unit tests for the multiDrawIndirect functions. * Added flags for back-ends so they can enable the extension. * Minor cleanup in MultiDrawTest.cpp Bug: angleproject:6439 Change-Id: I4e5f1cab05c6de330aef82d115492dcc9d2fad44 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3276043 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@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 e84b0154 2021-09-13T16:04:20 Update extension boolean names. This is in preparation for auto-gen, which uses a simple naming scheme. This fixes the bool names to be totally consistent with the extension names. Bug: angleproject:6379 Change-Id: Ia212449be04accb0e4f006b55b1813ab4481fa0b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3157417 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Cody Northrop <cnorthrop@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>
Brandon Schade f9dbd4ef 2021-03-29T16:31:26 Vulkan: Add Validation checks in FramebufferTextureEXT This change makes FramebufferTextureEXT set a validation error if <level> is not a supported texture level. This change also makes FramebufferTextureEXT set a validation error if <texture> is the name of a buffer texture. Test: KHR-GLES32.core.geometry_shader.layered_fbo.fb_texture_invalid_level_number Test: KHR-GLES32.core.geometry_shader.layered_fbo.fb_texture_argument_refers_to_buffer_texture Bug: angleproject:5579 Change-Id: Iedba8adc8faec02822374c3c1862b7abd031fcc2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2796152 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Brandon Schade 69f2fb00 2021-03-08T10:49:31 Vulkan: Expose OES_geometry_shader extension Modify the symbol table generation script to accept a list of supported extensions. This allows for the EXT and OES versions of the geometry shader extension to be exposed. Test: angle_deqp_khr_gles31_tests --deqp-case=*geometry_shader* Bug: angleproject:3571 Change-Id: Ia7127a03dbd3fce78957f0505d3ce0c9bab6cb15 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2765011 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Brandon Schade dee8dad4 2021-04-20T23:26:55 Vulkan: Fix geometry shader qualifier validation Added missing validation to handle in/out qualifier for geometry shaders Test: KHR-GLES32.core.geometry_shader.nonarray_input.* Bug: angleproject:5579 Change-Id: I9ee0853526ce296df1f56fb7783f9847b31e49bc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2901256 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 6cfbe252 2021-01-27T13:42:55 Fix geometry/tessellation checks to account for ES3.2 Bug: angleproject:5557 Bug: angleproject:5579 Change-Id: Iae54940cefb5ba516dc173413b35b646e1968ba6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2653906 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 2baa6288 2021-01-27T13:55:36 Fix validation of glCreateShaderProgramv for geometry/tessellation Bug: angleproject:5557 Bug: angleproject:5579 Change-Id: I581d7485d0e8771f3f23dea4255139d56052bee9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2653910 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@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>
Jamie Madill fa449cf3 2021-01-06T10:02:12 Fix separable Geometry Shaders. Was a needed fix for a new varying test. Bug: angleproject:3571 Bug: angleproject:5496 Change-Id: I49ae69967510b7a6330ea217a0e0e19e3bebe865 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2613198 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Mohan Maiya ed87c16a 2020-11-15T11:30:47 Vulkan: Add GL_EXT_separate_shader_objects support All the functionality needed for this extension has already been implemented as part of core GLES31. Hook into that along with changes to validation layer to allow non-GLES31 contexts to call into these APIs as long as the extension is exposed. Bug: angleproject:3570 Test: ProgramPipelineTest.GenerateProgramPipelineObjectEXT* Change-Id: I92a61a47517c5cb9573874b2add6a744c9edb755 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2539121 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 0c3d0b21 2020-11-11T15:08:08 Fix texture buffer validation w.r.t to non-existing buffer Bug: angleproject:3573 Test: dEQP.KHR_GLES31/core_texture_buffer_texture_buffer_errors Change-Id: I031abd94d6c06e539a2a89a82f2af604a6f3b5b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2533493 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill fbaae6ce 2020-07-24T11:47:12 GL: Add support for GL_OES/EXT_texture_buffer This extension is core in 3.2 Based on a CL by Jonah Ryan-Davis. Bug: angleproject:3573 Bug: angleproject:4933 Change-Id: Ib5ce038414075a5cdce36e9404e25d7af33fb39c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2519401 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop 8f57f60f 2020-10-08T22:38:25 Add ES 3.1 check to ValidateBindImageTexture This fixes a crash that occured in the Lego trace when run with an ES 3.0 context. * At the end of each frame it unbinds all the image units using glBindImageTexture, which is an ES 3.1 call. * During validation, we verify things using ANGLE's internals, but they are only set up when the context is >= ES 3.1. * This led to a crash. * The fix is to check the ES context early and bail, which aligns with other entry points. Test: LEGO MEC Bug: b/161716126 Bug: angleproject:4048 Change-Id: I9aee2ee173436f5de5062758a70e0909f6fc9a7f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2462163 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Mohan Maiya 9f5eb0b8 2020-10-05T08:18:05 Vulkan: Add OES_sample_shading extension support Support OES_sample_shading extension if the underlying Vulkan ICD supports sampleRateShading. Bug: angleproject:3587 Tests: dEQP-GLES31.functional.sample_shading.* Change-Id: I1b324c1ad3ea3b2157d3cbe0abcdf7085aa4231b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444213 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya a2d9abef 2020-10-01T16:28:59 Vulkan: Add OES_sample_shading extension entry points Addition of just the entry points for OES_sample_shading extension. Bug: angleproject:3587 Change-Id: I7ef5ceb846d130c2d1e0b4ea7dcbe92452b5d7d3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444212 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya a2d8bbb5 2020-09-18T18:18:34 Vulkan: Add GL_EXT_buffer_storage extension support Addition of support for immutable storage to buffer objects. Also adds new end2end tests for these usecases * Basic BufferStorage * SubData update * map/unmap buffer Bug: angleproject:5056 Tests: angle_end2end_tests --gtest_filter=BufferStorageTestES3*Vulkan Change-Id: Iba74b372ad033711927b63c6a04cec0eeb4db699 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2419952 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Mohan Maiya 9e2953c2 2020-09-23T07:57:22 Vulkan: Enable OES_texture_storage_multisample_2d_array The implementation for OES_texture_storage_multisample_2d_array already exists. This patch just enables the appropriate capability flag only if the underlying Vulkan ICD supports standardSampleLocations Bug: angleproject:3583 Tests: angle_end2end_tests --gtest_filter="*TextureMultisampleArrayWebGLTest*Vulkan" dEQP-GLES31.functional.state_query.internal_format.texture_2d_multisample_array.* dEQP-GLES31.functional.state_query.texture_level.texture_2d_multisample_array.* Change-Id: I2ea89041d9aa8c7d94c9ba732f12528c809807ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2416979 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Jonah Ryan-Davis 4f7f4387 2020-07-24T11:44:02 Add entry points for OES/EXT_texture_buffer This extension is core in 3.2 Bug: angleproject:3573 Change-Id: If08736759da2fdc680cfa396d354dbfa97d1a60f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2317040 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
shrekshao 204720bd 2020-05-08T18:08:37 Fix GetBooleani_v validation and params length for WebGL OES_draw_buffers_indexed WebGL 2 seems to be ES300 context and will fail the ValidateGetBooleani_v at context->getClientVersion() >= ES_3_1. Also for getIndexedParameter pname==GL_COLOR_WRITEMASK, the length shall be 4. Bug: angleproject:4394, chromium:1058744 Change-Id: Ia60506b6b1f120ed06acbcea0cb1f4581c70b32b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2191424 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shrek Shao <shrekshao@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>
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>
Tim Van Patten 7e0699a2 2020-02-05T17:04:06 Create the ProgramExecutable Class The ProgramExecutable class is being created to collect data structures that are common to both Programs and ProgramPipelines, as well as any shared functions. This allows callers to request the current ProgramExecutable from the State and make Program-/ProgramPipeline-specific queries without needing to know exactly which responded. This will also allow the necessary data structures to only be populated and stored within the ProgramExecutable when necessary and reused as often as necessary. Bug: angleproject:3570 Change-Id: I101f08ab03421894667b4a426a04d2147489f0e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2040512 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
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>
Alexis Hetu 94de306d 2020-01-14T16:18:56 Extensions suffixes Added NV/OES suffixes to relevant Extensions members. Bug: angleproject:3104 Change-Id: Ia1798157086230bde8d11c6fcb4fe93211e996ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2013168 Reviewed-by: Alexis Hétu <sugoi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Courtney Goeltzenleuchter 4b53273c 2019-11-21T09:42:42 Vulkan: Fix validation issue with swiftshader Need to check that a VBO is actually bound (or rather no client arrays are bound) and return appropriate error. Test: angle_deqp_khr_gles31 --use-angle=swiftshader --gtest_filter=dEQP.KHR_GLES31/core_draw_indirect_negativenoVBOarrays Bug: angleproject:3564 Change-Id: Ic200993f9afcc3b43706ac0b509b10fa905857f7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1922303 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com>
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>
Tim Van Patten 790abf03 2019-08-28T13:57:52 Vulkan: Support program interface queries for inputs Program interface queries are a generic way to query attributes of the program like uniforms, samplers, attributes, etc. This change supports those queries for program inputs. Bug: angleproject:3596 Test: dEQP-GLES31.functional.program_interface_query.* Test: ProgramInterfaceTest.cpp Change-Id: Ie904274f4efd87357256f559b69e148e8eda6119 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1775458 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.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 9deb3bfa 2019-08-23T15:57:50 Use MemoryObjectID in place of GLuint handle Bug: angleproject:3804 Change-Id: I7ca86089fe1e72c136c0fc1947ad43cecee122eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769544 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 56ba54cc 2019-08-08T13:03:34 Support separate read and draw surfaces in eglMakeCurrent Update ANGLE's default framebuffer implementation to support reading and writing to different surfaces within the same framebuffer. Bug: angleproject:2620 Test: EGLSurfaceTest[3] Change-Id: I4b1ea04ca87a751f80cf190bf3adec148fc4fce3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1744746 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@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 378c1881 2019-08-22T16:55:39 Use ProgramPipelineID in place of GLuint handle Bug: angleproject:3804 Change-Id: Ice37a4b3d43008e5bcd5d0a7528514d5bb504066 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1767322 Reviewed-by: Jiacheng Lu <lujc@google.com> Commit-Queue: Jiacheng Lu <lujc@google.com>
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 3b3fe837 2019-08-06T17:44:12 Use BufferID in place of GLuint handles. Introduces enable_if handling for "FromGL". Avoids the use of any macro code to handle resource id casting. Bug: angleproject:3611 Change-Id: I1a6d10c3c9cc6ba0dc072bad1d62c33551f05d87 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1736127 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Mingyu Hu 7d64c486 2019-03-12T14:27:40 GL_ANGLE_multiview has been renamed to GL_OVR_multiview2. changes include: 1) GL_OVR_multiview to GL_OVR_multiview2 extension directive change 2) Removal of all references to side by side. We no longer support multiple views in a single 2DTexture. Only 2DTextureArray's are supported 3) WebGL 2 (ES3) is required for multiview Bug: angleproject:3341 Change-Id: Ie0c1d21d7610f8feebdb2e4d01c6947f57e69328 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552023 Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Michael Spang 7a8c3e5e 2019-04-03T14:49:57 Generate entrypoints for GL_EXT_memory_object & GL_EXT_semaphore This adds entrypoints for two new extensions that will be useful for importing external Vulkan objects into ANGLE. Bug: angleproject:3289 Change-Id: I206dc76eda5c6c8d836db7c6413c5544326aa722 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552024 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Qin Jiajia 9b050f84 2019-03-01T13:31:14 Fix that 0 is a valid memory barrier Bug: angleproject:2280 Change-Id: Iad82d5838a7efdb6f6287aafb9ab980e9e86468d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1496017 Reviewed-by: Jamie Madill (use @chromium please) <jmadill@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
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 c3dc5d48 2018-12-30T12:12:04 Merge gl::Context and gl::ContextState. This reduces the number of indrections when accessing the Extensions or Caps structures. It will provide a small speed-up to some methods. It also cleans up the code. Bug: angleproject:2966 Change-Id: Idddac70758c42c1c2b75c885d0cacc8a5c458685 Reviewed-on: https://chromium-review.googlesource.com/c/1392391 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Markus Tavenrath <matavenrath@nvidia.com>
Jamie Madill c3e3731c 2018-11-30T15:25:39 Give every validation error a constant. Makes the code more consistent and organized. Also reduces binary size by about 4k. Also refactors validation for GetBufferPointerv. Bug: angleproject:2957 Change-Id: Ib076ce936193e9840eef2499bf815489cdb48479 Reviewed-on: https://chromium-review.googlesource.com/c/1350489 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 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 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>
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>
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 cd0a0a3c 2018-10-18T18:41:57 Introduce SubjectBindingPointer. We can share the same pointer for the subject binding and the binding pointer. This further allows us to optimize buffer re-binding. The shared memory increases cache coherency and reduces the number of instructions needed. Bug: angleproject:2891 Change-Id: Id3162fa79de203f75989e7289ea02cb2ea1bec73 Reviewed-on: https://chromium-review.googlesource.com/c/1270217 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Geoff Lang 79b91407 2018-10-04T15:11:30 Add an extension for querying esimated GPU memory size of resources. BUG=892288 Change-Id: I56fc3ab00c06d711e1a21eb1ad4b2224126730dc Reviewed-on: https://chromium-review.googlesource.com/c/1262021 Reviewed-by: Yuly Novikov <ynovikov@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 785e8a0b 2018-10-04T17:42:00 Remove gl::LinkResult. Instead of returning a small struct from LinkProgram calls we use angle::Result. Linking can have 3 cases: - the link was successful -> angle::Result::Continue - the link failed -> angle::Result::Incomplete - there was an internal error -> angle::Result::Stop Note that any unexpected Incomplete is still an error. Each function that accepts Incomplete must check explicitly. This is the last user of ErrorOrResult. Bug: angleproject:2491 Change-Id: Idba23be27efe4b561720a4bdd8fe486b40779497 Reviewed-on: https://chromium-review.googlesource.com/c/1255645 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@google.com>
Olli Etuaho 0ca09753 2018-09-24T11:00:50 Add GLES3 support for EXT_blend_func_extended This adds GLES3 API support for EXT_blend_func_extended. The patch includes the API entrypoints, validation and also implementation on the desktop GL backend. Instead of having built-in fragment color variables, ESSL 3.00 has custom output variables, which can now be bound to either primary or secondary output color locations. The "index" set to a custom output variable determines whether it's used a primary or secondary blending source color. The shader layout qualifier takes precedence over the bind call. This is not specified in the EXT spec, but is specified in desktop OpenGL specs. BUG=angleproject:1085 TEST=angle_end2end_tests Change-Id: Ia24e8e5dadcc165e5e8fbd7c653c7fab6217db88 Reviewed-on: https://chromium-review.googlesource.com/c/1249361 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 44a6fbfd 2018-10-02T13:38:56 Optimize resolveLink. This changes the program query to resolve the link if required. If the validation layer is skipped the link is resolved in the gl::Context. Resolving the link on program query allows us to avoid resolving the link on most of the gl::Program query APIs. This improves inlining and particularly affects uniform update. It fixes a performance regression introduced by the parallel shader linking extension. Gives a 17% increased score on a uniform benchmark. Also fixes two missing cases of checking for the extension in our validation code. Note that some bugs might still exist when the validation layer is disabled. Bug: angleproject:2851 Change-Id: I5d725eede3fa147cedf2ce0129791b3412a97a61 Reviewed-on: https://chromium-review.googlesource.com/1255509 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@google.com>
Olli Etuaho 064458a8 2018-08-30T14:02:02 Remove separate ANGLE_texture_multisample_array We can just expose OES_texture_storage_multisample_2d_array instead. The compiler was already changed to accept OES_texture_storage_multisample_2d_array, and now the change is made also at the API level. Out-of-bounds access guarantees provided by ANGLE were the only big difference between the ANGLE spec and the OES spec, so it's simpler to just expose the native extension. Safe out-of-bounds accesses can be guaranteed without having them in the extension spec. This also adds missing texStorage3DMultisample entry point to the proc table, which will enable running dEQP tests. BUG=angleproject:2775 TEST=angle_end2end_tests Change-Id: Idf376ee877a3374a33de177df023f0531ec8f01d Reviewed-on: https://chromium-review.googlesource.com/1196722 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho d310a434 2018-08-24T15:40:23 Add validation and negative tests for multisample arrays This adds errors for binding and allocating multisample array textures. New tests in TextureMultisampleTest.cpp check that the errors are generated as specified. Tests for querying supported sample counts are also improved and extended for multisample array textures. BUG=angleproject:2775 TEST=angle_end2end_tests Change-Id: I6a0fe7ae04bb3d0072f6cbe09026b05e2bc47325 Reviewed-on: https://chromium-review.googlesource.com/1188576 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 89664843 2018-08-24T14:45:36 Add glTexStorage3DMultisampleANGLE entry point This adds the entry point but does not implement it yet. The entry point and enums are also added to the gl2ext_angle.h header file. BUG=angleproject:2775 TEST=angle_end2end_tests Change-Id: I24c231c52e7cbb13637880b21044e655935b51e8 Reviewed-on: https://chromium-review.googlesource.com/1188575 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Yuly Novikov f15f886c 2018-06-04T18:59:41 Differentiate texture and renderbuffer framebuffer attachment capabilities ANGLE used to describe the abitily to attach textures and renderbuffers of a specific format to a framebuffer using a single notion of "renderable". However, for some formats, only one can be supported, but not the other. Split TextureCaps::renderable into textureAttachment and renderbuffer. Also, split InternalFormat::renderSupport into textureAttachmentSupport and renderbufferSupport. The only functional change is in a few places which now explicitly check for texture or renderbuffer attachement support. Information in format support tables was duplicated for the two capabilities, so behavior should remain the same. It should be corrected in future CLs. Note: additional information in those tables may need to be added in order to properly support GenerateMipmap and TexStorage2DMultisample, this is beyond the scope of this CL. Bug: angleproject:2567 Change-Id: I18bce4100525be35709d8bbf4de08ec812aab502 Reviewed-on: https://chromium-review.googlesource.com/1086491 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiawei Shao 5f9482f4 2018-05-18T09:00:09 ES31: Implement FramebufferTextureEXT entry point This patch adds the entry point and related validation for FramebufferTextureEXT defined in OpenGL ES 3.1 extension EXT_geometry_shader. BUG=angleproject:1941 TEST=angle_end2end_tests Change-Id: Id6804e0b3971f52273562ce1a325d8377926a558 Reviewed-on: https://chromium-review.googlesource.com/1069842 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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>
Jiawei Shao b1e91380 2018-05-17T14:33:55 ES31: Implement EXT_geometry_shader framebuffer default layers on OpenGL This patch implements FRAMEBUFFER_DEFAULT_LAYERS_EXT as a legal framebuffer parameter required in OpenGL ES 3.1 extension EXT_geometry_shader on OpenGL back-ends. The query on FRAMEBUFFER_DEFAULT_LAYERS_EXT specifies the layer count used when the framebuffer has no attachments. BUG=angleproject:1941 TEST=dEQP-GLES31.functional.geometry_shading.query.framebuffer_default_layers Change-Id: I888465dfe23da53541ec2fedb8616027df532466 Reviewed-on: https://chromium-review.googlesource.com/1063560 Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
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>
Jiawei Shao c6f82872 2018-04-24T14:14:50 ES31: Add REFERENCED_BY_GEOMETRY_SHADER as program interface property This patch implements GL_REFERENCED_BY_GEOMETRY_SHADER as a valid property of program interfaces. BUG=angleproject:1941 TEST=angle_end2end_tests dEQP-GLES31.functional.geometry_shading.query.referenced_by_geometry_shader Change-Id: Id9659313d371dbfc7d00bf9d816df4449fbf29ec Reviewed-on: https://chromium-review.googlesource.com/1025281 Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
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 fe4bbe6c 2018-04-06T13:50:14 Create Stubs For Unimplemented Extensions Create context and validation stubs for unimplemented extensions. This will allow us to use an autogeneration script in the future to generate entry_points_gles_2_0_ext.cpp. Bug:angleproject:2263 Change-Id: If3ad3ebd823d65085c7f143cce9e09187e65d4da Reviewed-on: https://chromium-review.googlesource.com/998440 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Brandon Jones 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>
Jiawei Shao 385b3e03 2018-03-21T09:43:28 Use packed enums on shader types in ANGLE renderer This patch uses a packed internal enum ShaderType everywhere we need a shader type instead of the GLenum value of the shader type. This patch also uses program::getAttachedShader(type) everywhere we need to get gl::Shader from a program in ANGLE. BUG=angleproject:2169 Change-Id: I28a7fa1cfe35622c57a486932911110688eaadec Reviewed-on: https://chromium-review.googlesource.com/972844 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill e98b1b5d 2018-03-08T09:47:23 Framebuffer: Handle errors in checkStatus. This pipes a lot more errors around in the Validation, where they now will be caught. Bug: angleproject:2372 Change-Id: Ibb4e47ddc932995a02dd92e10578b7a4097182a9 Reviewed-on: https://chromium-review.googlesource.com/954406 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5b772312 2018-03-08T20:28:32 Nuke ValidationContext. This pattern never really took off. It was intended to be used to unit-test our Validation logic, but it become so complex because of interactions with Framebuffer::syncState that we could never really make use of it. Nuke it entirely and simplify the Context class. Bug: angleproject:2372 Change-Id: I40b9d46ce7706511a210da496ee19192cf609366 Reviewed-on: https://chromium-review.googlesource.com/954291 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
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>
Qin Jiajia a4ef843f 2018-02-22T16:02:24 ES31: Fix incorrect error code in DispatchComputeIndirect INVALID_VALUE error should be generated not INVALID_OPERATION if indirect is not a multiple of the size, in basic machine units, of uint. Meanwhile, we put the validation of indirect before indirect buffer so that the corresponding deqp cases can pass. BUG=angleproject:2324 Change-Id: I223ec1893a6dd613f84e51a98f02d5f79482952f Reviewed-on: https://chromium-review.googlesource.com/929900 Reviewed-by: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Yunchao He <yunchao.he@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
jchen10 910a3daf 2017-11-15T09:40:11 ES31 program query: support TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING corresponds to the set of output variables in the last non-fragment stage of program that would be captured when transform feedback is active. The resources enumerated by this query are listed as specified by the most recent call to TransformFeedbackVaryings before the last call to LinkProgram. This mainly collects these resources for query. BUG=angleproject:1920 TEST=angle_end2end_tests:ProgramInterfaceTest* dEQP-GLES31.functional.program_interface_query.transform_feedback_varying.* Change-Id: I0655b12c6d82cef1b44d4ca57ea55bb60d1f78fb Reviewed-on: https://chromium-review.googlesource.com/770450 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Qin Jiajia 62fcf62a 2017-11-30T16:16:12 ES31: Add DispatchComputeIndirect suport for OpenGL backend BUG=angleproject:2270 TEST=dEQP-GLES31.functional.compute.indirect_dispatch.* Change-Id: Id062a80188b2a37f28833aaae8e6d31bac382276 Reviewed-on: https://chromium-review.googlesource.com/802763 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Xinghua Cao 89c422ad 2017-11-29T18:24:20 ES31: Support memoryBarrier and memoryBarrierRegion APIs BUG=angleproject:2280 TEST=dEQP-GLES31.functional.compute.basic.image_barrier_single dEQP-GLES31.functional.compute.basic.image_barrier_multiple dEQP-GLES31.functional.compute.basic.ssbo_cmd_barrier_single dEQP-GLES31.functional.compute.basic.ssbo_cmd_barrier_multiple dEQP-GLES31.functional.synchronization.* Change-Id: If14debab21247dc4b446e86d1642fbc9376b6dd7 Reviewed-on: https://chromium-review.googlesource.com/798803 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yunchao He ece12535 2017-11-21T15:50:21 ES31: Fix the issue for relink rendering/compute program. When link or relink fails, if we try to install the unsuccessfully linked program (via UseProgram) and start rendering or dispatch compute, We can not always report INVALID_OPERATION for rendering/compute pipeline. The result depends on the previous state: Whether a valid program has been installed in pipeline before. If a valid program has been installed, it should be OK to use the old executable residing in the GL state to start rendering or dispatch compute. No error should be reported. This change also add unit tests for unsuccessfully linked/relinked program for rendering pipeline to avoid potential error. If a program successfully relinks when it is in use, the program might change from a rendering program to a compute program in theory, or vice versa. BUG=angleproject:2266 Change-Id: I4726112af2bc74f5beef25e35d2fcaa9f31e0768 Reviewed-on: https://chromium-review.googlesource.com/784273 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@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>
Yunchao He 85072e8f 2017-11-14T15:43:28 ES31: Fix detaching/deleting compute shader after LinkProgram. This change also moves the ShaderType enum from D3D renderer to angletype.h. And it uses a bit mask to track the linked shader stages. BUG=angleproject:2247 Change-Id: I5c7ee1445d353a02e24549ffcf6b0ac694dd1069 Reviewed-on: https://chromium-review.googlesource.com/768629 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
Jiajia Qin 3a9090fa 2017-09-27T14:37:04 ES31: Add BUFFER_VARIABLE and SHADER_STORAGE_BLOCK program interfaces This patch collects the shader storage block members information. It implements getShaderStorageBlockMemberInfo and getShaderStorageBlockSize for OpenGL backend. Meanwhile, it implements BUFFER_VARIABLE and SHADER_STORAGE_BLOCK interfaces for program query. BUG=angleproject:1920 TEST=angle_end2end_tests:ProgramInterfaceTest* dEQP-GLES31.functional.layout_binding.ssbo* dEQP-GLES31.functional.compute.basic.empty dEQP-GLES31.functional.compute.basic.ssbo_rw* dEQP-GLES31.functional.compute.basic.ssbo_local_barrier* dEQP-GLES31.functional.compute.basic.copy_image_to_ssbo_small dEQP-GLES31.functional.compute.basic.copy_ssbo_multiple_groups dEQP-GLES31.functional.compute.basic.copy_ssbo_multiple_invocations dEQP-GLES31.functional.compute.basic.copy_ssbo_single_invocation dEQP-GLES31.functional.compute.basic.copy_ssbo_to_image_small dEQP-GLES31.functional.compute.basic.shared_var* dEQP-GLES31.functional.compute.basic.ubo_to_ssbo* dEQP-GLES31.functional.compute.basic.write_multiple_arr* dEQP-GLES31.functional.compute.shared_var.basic_type.* dEQP-GLES31.functional.compute.shared_var.work_group_size.* dEQP-GLES31.functional.atomic_counter.* Change-Id: Ie8b81fde5a2e919aab77adb3d137c9ff2f193409 Reviewed-on: https://chromium-review.googlesource.com/712235 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
jchen10 58f67be0 2017-10-27T08:59:27 ES31 program query: support AtomicCounterBuffer and UniformBlock Calculates atomic counter buffer's shader reference according to its child counters. Merges GL_UNIFORM_BLOCK_* queries to GL_*. Refreshes deqp_gles31_test_expectations. BUG=angleproject:1920 TEST=angle_end2end_tests:ProgramInterfaceTest* dEQP-GLES31.functional.state_query.program.active_atomic_counter_buffers_get_programiv dEQP-GLES31.functional.layout_binding.ubo.* Change-Id: Ia23ddfef5f5dd7e15628f4c259273e1c01c14d80 Reviewed-on: https://chromium-review.googlesource.com/715436 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
jchen10 baf5d945 2017-08-28T20:45:48 ES31: Add UNIFORM support for ProgramInterface Add program resource properties for uniform. BUG=angleproject:1920 TEST=angle_end2end_tests:ProgramInterfaceTest* Change-Id: Ia5cf6219db43b8b1f73efbb3565d21c86e9d3ec0 Reviewed-on: https://chromium-review.googlesource.com/638050 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei Shao db342276 2017-09-27T10:21:45 ES31: Implement glSampleMaski on OpenGL This patch intends to implement glSampleMaski on OpenGL backends. Refers to: https://chromium-review.googlesource.com/c/487603 BUG=angleproject:1592 TEST=dEQP-GLES31.functional.state_query.*.sample_mask* TEST=dEQP-GLES31.functional.texture.multisample.*.sample_mask* Change-Id: If5ddd6ab57259593919a482be80fbdbe29f6f54d Reviewed-on: https://chromium-review.googlesource.com/573727 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yunchao He a336b90f 2017-08-02T16:05:21 ES31: Impl program pipeline object management entries for GL backend. The program pipeline object management entries are: GenProgramPipelines DeleteProgramPipelines BindProgramPipeline IsProgramPipeline BUG:angleproject:2123 Change-Id: I114d054b90caf2ee3f9befef7439552a1c309bc4 Reviewed-on: https://chromium-review.googlesource.com/629978 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
JiangYizhou 5b03f475 2017-01-09T10:22:53 ES31: Implement getMultisamplefv for D3D part. Implement getMultisamplefv for d3d part.Because standard D3D sample positions from https://msdn.microsoft.com/en-us/library/windows/ desktop/ff476218.aspx are fixed sample pattern,we put the sample positions into a constant array in renderer11_utils.cpp with a function to query it. BUG=angleproject:1590 TEST=dEQP-GLES31.functional.texture.multisample.samples_*.sample_position Change-Id: I6e6006ed1c4e22fe006522e9ffd3297247bee75e Reviewed-on: https://chromium-review.googlesource.com/594970 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
jchen10 d9cd7b7f 2017-08-30T15:04:25 ES31: Add glGetProgramInterfaceiv API Add API entry and validation checks(GLES 3.1 section 7.3). Add the first 4 interfaces(PROGRAM_INPUT, PROGRAM_OUTPUT, UNIFORM and UNIFORM_BLOCK) implementation. BUG=angleproject:1920 TEST=angle_end2end_tests:ProgramInterfaceTestES31.* Change-Id: Iab80ba332e2a5e2b3e677039359e60a420e3d6b0 Reviewed-on: https://chromium-review.googlesource.com/642729 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>