src/libANGLE/validationES3.cpp


Log

Author Commit Date CI Message
Alexey Knyazev 52fa6779 2024-11-14T00:00:00 Refactor indexed parameter query validation * Moved indexed parameter validation to queryutils. * Fixed indexed blend state enums being disallowed on unextended OpenGL ES 3.2 contexts. * Replaced redundant validations with assertions. Fixed: angleproject:380291906 Change-Id: I4d5a9c01be5a00cd834504b38a3ddaeb5fa4edb9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6043710 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 9c202275 2024-11-14T00:00:00 Fix SAMPLE_MASK_VALUE indexed query validation The SAMPLE_MASK_VALUE enum must be accepted when ANGLE_texture_multisample is enabled. Fixed: angleproject:380291919 Change-Id: Ieb834ca4c78982fbf1a121c0a70db7413574679a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6038524 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi 518e162e 2024-11-15T00:07:14 Fix validation for 3D depth/stencil textures They should fail with GL_INVALID_OPERATION: > Textures with a base internal format of DEPTH_COMPONENT, DEPTH_STENCIL > or STENCIL_INDEX are supported by texture image specification > commands only if target is TEXTURE_2D, TEXTURE_2D_MULTISAMPLE, > TEXTURE_2D_ARRAY, TEXTURE_2D_MULTISAMPLE_ARRAY, TEXTURE_CUBE_MAP or > TEXTURE_CUBE_MAP_ARRAY. Using these formats in conjunction with any > other target will result in an INVALID_OPERATION error. Bug: angleproject:379674017 Change-Id: Icdd4cea24601f6744a3a85bdf8ef07946569a16f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6019830 Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi b16d105f 2024-10-03T10:25:32 Remove Desktop GL front-end support For Desktop GL applications, please use Zink! Bug: angleproject:370937467 Change-Id: Ie734634bb62a2e98c80e1b32d8b3d34624da3c04 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5905428 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Amirali Abdolrashidi 85875b96 2024-07-11T14:59:27 Fix validation regarding cube map array dims When defining cube map array textures, the depth represents the number of layer-faces, and does not change with mip level. * Updated validation for glTexImage3D(). * The width and the height for a mip level should not exceed the max cube map size for that mip level. * The depth limit has been set to max 3D texture size (similar to glTexStorage3D()) * The spec states that this limit should be at least the value of the implementation-based constant MAX_RECTANGLE_TEXTURE_SIZE. * Added unit tests to check multiple cases for cube map array validation for TexStorage3D, TexImage3D, and TexSubImage3D. Bug: b/338621235 Bug: angleproject:42262247 Change-Id: I0857e68de02238ffd288e34879fb7dfa6e3f545f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5698571 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 92148c2c 2024-06-17T11:13:46 GL: Implement GL_EXT_clear_texture. This extension is useful because it allows clearing textures without changing the framebuffer. Chrome uses this on Android when it's available. Bug: angleproject:347047859 Change-Id: I765d9991c4549b3655446d9f51847d1095792dbd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5631810 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev abf7b612 2024-03-28T00:00:00 Optimize WebGL clear type validation Use cached component type masks instead of iterating over all attachments every time. Fixed: angleproject:8618 Change-Id: I45b83639120c0b4f50027d1d85fe9158f5cf187d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5407657 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Mohan Maiya d05c9a5e 2024-01-25T13:01:49 Frontend support for QCOM foveated extensions Add frontend state management to support foveated rendering extensions. Bug: angleproject:8484 Test: Texture2D*Foveation* Change-Id: I0e1be9f11b2d442207674562da760f5bfd7debc8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5208091 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Stephen White a950f005 2023-12-06T18:58:35 Move compressed format validation to Vk backend. Add test to call glCompressedTexSubImage3D() from a pixel unpack buffer. This currently fails on OpenGL. Bug: angleproject:8449 Change-Id: I863b602e39a14878af8745ff62b408bdd879bc98 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5100348 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Shahbaz Youssefi 18a68f6d 2023-12-07T16:23:10 Fix vertex attribute limit check Bug: angleproject:8448 Change-Id: Ie5d2b71f0be86b31ec74a1d55501b60a25245668 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5101508 Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Yuxin Hu 3944ffce 2023-11-13T18:32:13 Add missing validation code The validation code for below GLES 3.2 entry points is added: GL_TexParameterIiv GL_TexParameterIuiv GL_GetTexParameterIiv GL_GetTexParameterIuiv GL_SamplerParameterIiv GL_SamplerParameterIuiv GL_GetSamplerParameterIiv GL_GetSamplerParameterIuiv Also add extension check in validation functions of entry points that are exposed through these two extensions: GL_OES_texture_border_clamp GL_EXT_texture_border_clamp The validation functions of GL_OES_texture_border_clamp extension are moved to validationESEXT.cpp for readability. Bug: b/286572199 Bug: b/224537784 Change-Id: I77ed22e8dc961a30a5d86b0597c25555d15c517b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5028139 Auto-Submit: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 0015d1e2 2023-10-05T00:00:00 Allow ETC1_RGB8 for 2D array textures When GL_EXT_compressed_ETC1_RGB8_sub_texture is enabled, ETC1_RGB8 format must be accepted for 2D array textures. Bug: angleproject:5731 Change-Id: Ic5e647ffd4e7d2a171e25ea8cf3f41514cf37072 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4915918 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Alexey Knyazev 817f4b81 2023-07-10T00:00:00 Restrict color writemasks for RGB9_E5 color buffers Per-channel write operations to shared exponent color buffers are loosely defined and may cause driver validation errors. Restricted the set of allowed color writemasks for RGB9_E5 color buffers so that RGB channels must be either all enabled or all disabled. Added a Metal-specific adjustment to ignore alpha writemask for RGB9_E5 color buffers. Removed an unused function from RenderPipelineColorAttachmentDesc. Bug: angleproject:8043 Change-Id: I902c3b70ddc6d8e65069d98a4a02a82122f413a5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4685566 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Alexey Knyazev 435d575c 2023-07-10T00:00:00 Skip component type validation of non-existent draw buffers The default framebuffer is initialized with just one draw buffer slot so WebGL-specific validation causes an assertion when clearing not present draw buffers. Bug: angleproject:2831 Change-Id: I23ceb3f31dd8bae005fe8497cf20c49880f37938 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4683451 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
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>
Geoff Lang 954b3339 2023-06-21T11:13:38 Add internal format to TexStorage validation errors Print the hex value of the internal format when generating error messages about invalid internal formats in glTexStorage. Bug: chromium:1455725 Change-Id: Ia99c8891c5510590a3fcaf3699476942bf80b57c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4632579 Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev b26b01a2 2023-03-09T00:00:00 Implement EXT_render_snorm Bug: angleproject:8048 Change-Id: Id01beaea9565f8ab374c732fef70ec0ac0d8743e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4334303 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Chris Dalton a65f6a9d 2023-03-07T16:11:44 Make PLS queries robust There's no reason not to mirror the ANGLE_robust_client_memory API here. Bug: chromium:1421437 Change-Id: Ifb8b1a9675abe2ceb35272dc905f3c38f29dceda Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4317485 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Jamie Madill fdada9ee 2022-12-13T14:52:53 Re-land: "Make SyncIDs a packed type." This re-land fixes the sync map size tracking. This prepares syncs to use a simple resource map like other types, which will make life easier in the trace interpreter. Bug: angleproject:7775 Change-Id: If2114c51d5b68503890eacbf549182823667fedc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4178012 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8971a592 2023-01-18T14:35:09 Revert "Make SyncIDs a packed type." This reverts commit 9de913077a5fcc3d2f2e327b56bbe30efe2fde96. Reason for revert: Fails win-trace, somewhat flakily. Original change's description: > Make SyncIDs a packed type. > > This prepares syncs to use a simple resource map like other > types, which will make life easier in the trace interpreter. > > Bug: angleproject:7775 > Change-Id: Ic2867f6133256f5ce2320eb2b322c1059266b201 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4103720 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Cody Northrop <cnorthrop@google.com> Bug: angleproject:7775 Change-Id: I29534b14c973fa34a4cb7457d534cd6156f33cd2 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4178010 Auto-Submit: Jamie Madill <jmadill@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Jamie Madill 9de91307 2022-12-13T14:52:53 Make SyncIDs a packed type. This prepares syncs to use a simple resource map like other types, which will make life easier in the trace interpreter. Bug: angleproject:7775 Change-Id: Ic2867f6133256f5ce2320eb2b322c1059266b201 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4103720 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Alexey Knyazev 86a194c3 2022-11-24T00:00:00 Fix expected texture target for 3D blocks ASTC 3D blocks are supported only for TEXTURE_3D targets. Bug: angleproject:3675 Change-Id: I5fa2ee87666bd69272419dc1d604348f7376aa46 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4055649 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev fc1c8cd1 2022-11-01T00:00:00 Refactor validation of partial compressed texture uploads Optimized ValidCompressedSubImageSize for valid usage and simplified its control flow. Fixed false negative validation when the replaced image region does not fill the entire level but nevertheless reaches the image boundaries. Updated InternalFormat::getCompressedImageMinBlocks to use IsPVRTC1Format helper function. Fixed InternalFormat::computeCompressedImageSize for 3D compressed texture blocks. Removed redundant checks from ValidateES3TexImageParametersBase. Optimized IsPVRTC1Format helper function to be a constexpr. Adjusted tests, added suppressions for Intel and Adreno. Bug: angleproject:7473 Change-Id: I6fadce949785a35e2706b06eeb00e878aa3710a7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4037671 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Dan Glastonbury 40e4bc63 2022-11-09T12:40:48 Make DrawRangeElements validation consistent with DrawElements According to the WebGL specification, when an empty buffer is bound to GL_ELEMENT_ARRAY_BUFFER binding point, one of the possibilities is to return an error when trying to draw with an index count other than zero. This is the behavior of DrawElements variants but not DrawRangeElements. This change brings variants of DrawRangeElements behavior in line with that of DrawElements. Bug: angleproject:7822 Change-Id: I6844efd1038d95c652b72e52209dfdd74f006f9b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4015418 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Chris Dalton 3605b399 2022-10-20T17:00:02 Move PLS clear values back into context state The API that required packing raw data into a buffer was un-ergonomic for developers and difficult to implement for WebGL vendors. Bug: angleproject:7279 Change-Id: If7c98908c285462c5775e8e2d8811883be139f64 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3972376 Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton 9f693aa3 2022-10-22T14:45:59 Implement an allow list for PLS In order to guarantee no data is lost while using the EXT_shader_pixel_local_storage extension, we need to restrict applications to a small subset of commands while pixel local storage is active. This CL implements the allow list for GL entrypoints using wildcard matching inside the code generator, and adds custom validation for the more specific restrictions that go into effect when PLS is active. Bug: angleproject:7279 Change-Id: I5dd48bd93c10e8775f32be32a4fcf17855eb2f0e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3932552 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Constantine Shablya ff7aa214 2022-09-29T19:56:28 GL_PALETTE* sampling Implement GL_PALETTE* formats by decoding them into a R8G8B8A8_UNORM image at load time. Test: angle_end2end_tests --gtest_filter="PalettedTextureTest.*" Bug: angleproject:7599 Bug: angleproject:7688 Bug: angleproject:7710 Change-Id: I94d51e2c480fcdd39f1a0ad241b311d3b4de1579 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3863251 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Constantine Shablya <constantine.shablya@collabora.com>
Chris Dalton 8b2aff28 2022-09-12T10:27:28 Implement the ANGLE_shader_pixel_local_storage API Implements the OpenGL ES API for ANGLE_shader_pixel_local_storage and adds thorough validation and testing as outlined in the spec. This feature is still implemented entirely in the frontend, but the extension now works end-to-end with a passing test suite, and can be used externally. Over time we can start gradually moving the implementation into backends as appropriate. Bug: angleproject:7279 Bug: angleproject:7647 Change-Id: I1c861a0fca96423be02e17bbe1fb7f57b99ea63f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3886462 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Alexey Knyazev 81811166 2022-09-19T00:00:00 Reject GL_HALF_FLOAT_OES on WebGL 2.0 This type enum is not exposed in WebGL 2.0 contexts. Skipped OES enum testing on ES 3.0 contexts in half-float texture WebGL compatibility tests. Bug: angleproject:7668 Change-Id: I56138aa686192a873b308ba58633e6a1fc808a1d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3900019 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Mohan Maiya d375547c 2022-08-12T15:54:39 Do not link program pipeline in glUseProgramStages 1. The commit 3a9f18f135fe82 caused a link to occur everytime glUseProgramStages is called. This is redundant since the program pipeline can be linked just before usage, thus allowing for multiple stages to be bound before linking the executable. 2. Mark PPO as a dirty object and link the PPO in dirty object handler 3. Early return if the same program is being bound to the same stage of the pipeline. 4. Added ProgramPipelineObjectBenchmark perf test that switches programs before a draw and observed following data - 1. vulkan profile - 1. wall_time before patch - 102000 ns 2. wall_time after patch - 38000 ns 2. vulkan_null profile - 1. wall_time before patch - 125000 ns 2. wall_time after patch - 52000 ns Bug: angleproject:5102 Bug: angleproject:6566 Test: ContextNoErrorPPOTest31.*Vulkan Test: ProgramPipelineTest31.*Vulkan Test: ProgramPipelineObjectBenchmark* Change-Id: Idbc2fcb4875bbd040e9ec847eb2a8f96f287173c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3830170 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Lubosz Sarnecki 02eb5f49 2022-08-19T12:41:11 validation: Annotate kEnumNotSupported errors with values. Use validationErrorF to annotate all unsupported enum errors with the corresponding value of the enum in hex. This makes the errors more meaningful and reduces the amount of debugging required to find out the invalid enum used. Add kEnumInvalid error string in cases an InvalidEnum is provided and can't be resolved to the given GL enum. Before: glEnable: GL error: HIGH: Enum is not currently supported. After: glEnable: GL error: HIGH: Enum 0x809D is currently not supported. Bug: angleproject:7595 Bug: angleproject:7596 Change-Id: Iff060a1c3a2f482f4df5b5b7ea036b93025df7d9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3849475 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Lubosz Sarnecki cedc23d8 2022-08-19T12:41:20 validation: Annotate kInvalidInternalFormat errors with values. Use validationErrorF to annotate all internal format errors with the corresponding value of the internal format enum in hex. This makes the errors more meaningful and reduces the amount of debugging required to find out the invalid format used. Before: glCompressedTexImage2D: GL error: HIGH: Invalid internal format. After: glCompressedTexImage2D: GL error: HIGH: Invalid internal format 0x8B94. Bug: angleproject:7595 Bug: angleproject:7596 Change-Id: I6b9c116863e0116f96b8ff0e71e9734947a1c1c6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3849476 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Alexey Knyazev df879d49 2022-07-22T00:00:00 Return INVALID_VALUE for online BC compression As per discussion with OpenGL ES WG, implementations are allowed to generate INVALID_VALUE when online BC compression is not supported. Bug: angleproject:6441 Change-Id: I0e282c970f1e03afbc590dc9a46b8ce38d869691 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3780923 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev a4e00c64 2022-06-30T00:00:00 Expose EXT_compressed_ETC1_RGB8_sub_texture on Metal and GL Updated the test to ensure that this extension is exposed on Apple GPUs when using Metal. Updated emulatedEtc1 limitation to hide this extension when the main ETC1 extension is hidden. Real WebGL apps cannot enable this extension because it is not exposed in WebIDL. Removed bogus entry from IsETC1Format and use the helper consistently in all validation functions. Simplified GetNativeCompressedFormat. Bug: angleproject:7471 Change-Id: I61321fadad7d962358d0fefecd08aaddaedd2ec2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3737762 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Brandon Schade afcca86c 2022-07-05T11:25:04 Fix ValidateCompressedTexSubImage3D compressed format check Fix the ValidateCompressedTexSubImage3D to perform compressed format validation only when we have a compressed format Bug: chromium:1341624 Change-Id: I5c8b3ef548cfa63b86e077f3c9e4c15e83dc7988 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3747203 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Brandon Schade 3a799ba5 2022-05-16T17:26:38 Fix ValidateES3TexImageParametersBase for glTexImage*D From the OpenGL ES 3.2 spec: GL_INVALID_VALUE error is generated if internalformat is not one of the valid formats in tables 8.2 or 8.3. glTexImage*D should not accept compressed format. Add check in validation to account for this. Bug: angleproject:6441 Tests: KHR-GLES31.core.compressed_format.api.invalid_teximage_with_compressed_format Change-Id: I7152aefa433f42dcc40cf693538639df26c31341 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3648587 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop 2a5193f6 2022-06-22T17:46:15 Textures: Allow compressed texture from PBO Apex Legends is using a pixel unpack buffer to populate a compressed 3D texture. We had an explicit check in validation that prevented it, possibly due to emulated formats. Rather than prevent it altogether, check whether the format is emulated and proceed if not. Also add a test that exposes the problem. Test: PBOCompressedTexture3DTest Bug: b/236478448 Bug: angleproject:7464 Change-Id: I90105a396bf0a465c62d67910aad2819ba7f8831 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3719161 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Brandon Schade 669d7b75 2022-05-25T15:14:35 Fix validation checks in glCompressedTexSubImage3D - Add missing ASTC formats to the checklist in CompressedSubTextureFormatRequiresExactSize. - Add missing validation checks in ValidateES3TexImageParametersBase relating to internal formats Test: KHR-GLES32.core.compressed_format.api.invalid_format_array Test: KHR-GLES32.core.compressed_format.api.invalid_offset_or_size Test: *ETC2RGB8_CubeMapValidation* Test: *CompressedTexture*Test* Bug: angleproject:6441 Change-Id: Icc80d78602ea997be11606587b43d29e72e48f3a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3670768 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Brandon Schade <b.schade@samsung.com>
Faye Zhang 714f680f 2022-06-08T16:19:20 Implement GL_EXT_base_instance * Added the validation functions for DrawElementsInstancedBaseVertexBaseInstance(), DrawElementsInstancedBaseInstance(), and DrawArraysInstancedBaseInstance() according to the specs. * Added generic implementation for glDrawElementsInstancedBaseInstance() that can be called by back-ends. * Added flags for back-ends so they can enable the extension. * Added tests for DrawElementsInstancedBaseVertexBaseInstance(), glDrawElementsInstancedBaseInstance(), and DrawArraysInstancedBaseInstance(). * Disabled ES3_D3D11__DynamicDraw tests due to angleproject:7441 bug. Bug: angleproject:6983 Bug: angleproject:7441 Change-Id: Ia664b01c87bc64c05e29adec23a8f80792eaa037 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3697206 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Faye Zhang <ffz@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Brandon Schade 527557b9 2022-04-28T14:35:30 Fix ValidateFramebufferTextureLayer for cubemap arrays GL_INVALID_VALUE is generated if texture is a cube map array texture and layer is larger than MAX_ARRAY_TEXTURE_LAYERS-1. GL_INVALID_VALUE is generated if texture is a cube map array texture and level is larger than the log base 2 of MAX_CUBE_MAP_TEXTURE_SIZE. Fix validation to account for the spec. Bug: angleproject:3584 Tests: dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.framebuffer_texture_layer Change-Id: I51028145fa83ef5eb46c39030a28984411ca801e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3615613 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Brandon Schade <b.schade@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 5c85fd4e 2022-04-11T12:29:00 Add error check on resuming XFB with deleted buffer. Bug: chromium:1305190 Change-Id: I22c6f6400b05ca32c922fba9a3b9d4b5841ca8b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3578378 Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop a1c9ba70 2022-04-04T11:29:13 Update validation of glFramebufferTextureLayer for cube maps The ES 3.2 spec explicitly mentions cube map parameters for the call: For cube map textures, layer is translated into a cube map face as described in table 8.24. For cube map array textures, layer is translated into an array layer and a cube map face as described for layer-face numbers in section 8.5.3 but does not list it when enumerating errors: An INVALID_OPERATION error is generated if texture is non-zero and is not the name of a three-dimensional, two-dimensional array, two-dimensional multisample array or cube map array texture. There is a bug filed about this: https://gitlab.khronos.org/opengl/API/-/issues/134 Per discussion, it should not be an error to use a cube map with glFramebufferTextureLayer. It will be fixed in the spec. Test: DrawBuffersTestES3.CubeMapTextures Test: DrawBuffersTestES3.CubeMapArrayTextures Bug: angleproject:7168 Bug: angleproject:7169 Change-Id: I6ef9af4b2bf05dc2dee841c68fb4f896c30c8c03 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3569337 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Mohan Maiya 078da78f 2022-03-17T13:06:58 Vulkan: Support GL_EXT_EGL_image_storage extension This extension provides a mechanism for creating texture objects that are both EGLImage targets and immutable and removes the possibility of implicit orphaning. EGL images created from external sources now support types other than 2D. Tests covering the new feature were added to ImageTest.cpp. Bug: angleproject:6346 Change-Id: Id3e328f352deb1af47062be232384229a8b1c341 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3530489 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Alexey Knyazev b9b64b15 2022-03-15T06:31:32 Fix typo in DrawElementsInstancedBaseVertexBaseInstanceANGLE Bug: angleproject:3402 Change-Id: I490695e45b4bec31ea9226c6a7df4d426759c53f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3524341 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Jamie Madill d9002eef 2022-03-01T16:14:47 Protect against deleting a current XFB buffer. Bug: chromium:1295411 Change-Id: I097f272c38e444e0af71aa55c0dc508a07aa0bd3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3498262 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Sergey Ulanov 3c727e44 2022-01-31T22:18:22 Allow GL_RGBX8_ANGLE for texture copy destination Updated IsValidCopyTextureDestinationInternalFormatEnum() to allow GL_RGBX8_ANGLE. Bug: chromium:1269826 Change-Id: I07533560d8f0d6f9d114e7c05927f670c6f96891 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3426820 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 96fd9b72 2022-01-10T13:17:43 Fix validation of glCompressedTexImage3D GLES 3.2 spec allows for glCompressedTexImage3D to accept TEXTURE_CUBE_MAP_ARRAY as a target as well. Account for this during validation. Bug: angleproject:5393 Tests: KHR-GLES32.core.texture_cube_map_array.etc2_texture Change-Id: Ieb75e63021bea2ea6f8fcc68bd6b666d0bd7f5dc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3379225 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Mohan Maiya b2cf52e6 2021-11-10T14:49:09 Bug fix in unpack buffer validation For an implementation that supports GL_EXT_buffer_storage extension it is valid to read or write from a buffer that is partially or fully mapped if it was allocated by a call to glBufferStorageEXT with the GL_MAP_PERSISTENT_BIT_EXT included in <flags> Bug: angleproject:5056 Bug: angleproject:6689 Test: BufferStorageTestES3.TexImage2DPixelUnpackBufferMappedPersistently Change-Id: Ia4b6967aab02bbfb101d5253b9c83d314bc92f5f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3278482 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
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 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>
Jamie Madill 9ada074a 2021-09-10T16:18:19 Move capability values from gl::Extensions to gl::Caps. Several extensions stored extra information in the wrong structure. Move them to the Caps structure in prepraration for auto-generating the Extensions struct. Bug: angleproject:6379 Change-Id: If5643b72039e299cb0f7c49591d13b3c7cd8a36c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3158403 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Alexey Knyazev 47279c72 2021-08-15T23:20:32 Adjust compressed texture validation; add test - Format check happens before target check to accommodate for unknown / disabled format enums. - PVRTC1 and ETC1 enums are not allowed for 2D Array and 3D targets. - PVRTC1 sRGB formats require enabling two extensions. - New noCompressedTexture3D limitation for older Metal versions. The test checks that only the appropriate entry points are affected after enabling compressed texture extensions. Bug: angleproject:5731, angleproject:6280 Change-Id: I4943cd3a82f60f9348215caa8639e0bc3e8b45db Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3094018 Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Alexey Knyazev 1fb846cb 2021-08-03T01:57:49 Validate texStorage dimensions with compressed formats Bug: angleproject:6230 Change-Id: I501ec1e6974bdc7e6731dcb88045edb0aa22b888 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3067329 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop 0bd5cac2 2021-08-06T17:56:58 Allow BufferSubData with persistently mapped buffers Per the GL_EXT_buffer_storage extension: What commands are affected by the relaxed errors for persistently mapped buffers? RESOLVED: In GL 4.5 the following commands have the relaxed language BufferSubData, ClearBufferSubData, CopyBufferSubData, GetBufferSubData and InvalidateBufferSubData. Of these commands the only ones that apply to ES 3.1 are BufferSubData and CopyBufferSubData. However, if additional extensions add any of the other commands and EXT_buffer_storage is supported, they would have the same behavior in ES. Therefore we need to allow BufferSubData and CopyBufferSubData on persistently mapped buffers. Current we fail these scenarios in validation. This was detected when running Fortnite on Android using the game's GLES backend. Also added two tests: - StorageCopyBufferSubDataMapped to recreate the exact Fortnite scenario using glCopyBufferSubData. - StorageBufferSubDataMapped is a contrived case to cover glBufferSubData Test: BufferStorageTestES3.StorageCopyBufferSubDataMapped/* Test: BufferStorageTestES3.StorageBufferSubDataMapped/* Bug: b/180418810 Bug: angleproject:5658 Change-Id: Ib678e84f367934656ec10f0f4ad0d35ac687f0b0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3078316 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Mohan Maiya 669acb00 2021-06-08T13:36:38 Add YUV format utils and validation code 1. Add YuvFormatInfo struct and a few YUV format helpers 2. Update ES3 validation code to account for YUV formats Bug: angleproject:5773 Change-Id: I82ababe8bf2a065e7d5c4f868e4a512ba8c9d7d2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2947766 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill cf853b30 2021-06-03T13:54:44 Add missing buffer validation to BeginTransformFeedback. A change to Vulkan exposed this missing validation. In the Vulkan back-end we do some caching on BeginXFB, which would perform an invalid memory access. Adding the missing validation correctly traps the error before we reach the back-end. Bug: chromium:1171685 Bug: angleproject:4622 Change-Id: I5c92575a07149e431c4f260a4555ff196822c64e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2937022 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Mohan Maiya c8ee13c7 2021-04-02T12:19:33 Vulkan: Fix a validation bug in glBeginTransformFeedback Add logic to check the program or the pipeline before erroring out when validating glBeginTransformFeedeback. Bug: angleproject:5557 Test: ProgramPipelineXFBTest31.VaryingIOBlockSeparableProgramWithXFB* Change-Id: I0df8a8d87b3632745bc91dc2673f2fac31c6cdb1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2743440 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
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>
Jonah Ryan-Davis fb35201a 2020-12-22T13:14:41 GL: Expose NV_framebuffer_blit for ES2 contexts when available ANGLE_framebuffer_blit is already exposed but has restrictions on scaling/flipping and mismatched color buffer formats. When NV_framebuffer_blit, EXT_framebuffer_blit, or an ES3 context is available we can expose a less restrictive BlitFramebuffer. Bug: angleproject:5474 Bug: chromium:1157057 Change-Id: I916ee39c8d6120216f91461080eb3ee9ca777e29 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2601165 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@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>
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>
Geoff Lang 089ef0fa 2020-10-14T11:31:56 Expose glGetTexLevelParameter{if}v before ES 3.1. Add a new extension, ANGLE_get_tex_level_parameter which allows users to query texture size and format information before ES 3.1. This is very useful for re-using existing textures instead of re-allocating. Bug: chromium:1132514 Change-Id: I71f6bad8bdacb91875cc81b4884d4c3099235f3f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2469959 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Kenneth Russell 08c4d094 2020-07-16T18:48:59 Improve WebGL 2.0 readPixels support. Emulate GL_PACK_SKIP_PIXELS and GL_PACK_SKIP_ROWS on macOS, where it appears the OpenGL driver ignores these parameters. Add WebGL 2.0-specific validation constraints for pixel pack and unpack parameters. Bug: angleproject:4849 Change-Id: Iab566299223e05484a009817acb1ed2816023823 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2303905 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
James Darpinian 18d412cb 2020-06-18T11:57:53 Fix readBuffer validation The argument to glReadBuffer should be validated against GL_MAX_COLOR_ATTACHMENTS, not GL_MAX_DRAW_BUFFERS. Bug: angleproject:4766 Change-Id: Ic184934bd01e68b936266eae69543ae66fd68ea3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2252978 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Jonah Ryan-Davis 7fde3673 2020-05-25T15:48:06 GL: Support GL_OES_texture_cube_map_array in frontend/GL backend GL_OES_texture_cube_map_array is core in 3.2. This CL adds the necessary validation for the frontend, as well as support for this extension on the GL backend. The next step is to add the changes to the translator. Bug: angleproject:3584 Change-Id: I751a9c9f71a553b05fdf6673250290806d8cfbff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2215306 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
shrekshao 78ef4133 2020-05-15T23:24:18 Fix invalid enums for OES_draw_buffers_indexed Make sure the new enums are invalid before the extension is enabled. Add a angle_end2end_test for that. Bug: angleproject:4394, chromium:1058744 Change-Id: Ib88f6159294dab2eb7d3662b96c44424ab132782 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2205179 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shrek Shao <shrekshao@google.com>
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>
Cody Northrop 74e816bf 2020-03-26T17:40:25 Vulkan: Expose extension for ETC1 usage with subimage updates This CL implements the GL_EXT_compressed_ETC1_RGB8_sub_texture extension, which was added to relax restrictions on using ETC1_RGB8_OES for subimage updates. Test: Temple Run on Android Bug: b:152512564 Change-Id: I78cfd7dfd54fab36dee59a93b3ec3bfce17e73e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2123232 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexis Hetu 91f44a9a 2020-03-20T12:08:24 ASTC: LDR support doesn't imply HDR support There are SwiftShader related failures related to enabling the textureCompressionASTCHDRKHR feature without properly checking if the VK_EXT_texture_compression_astc_hdr extension is available, so HDR support shouldn't be enabled only based on the LDR support being enabled. Bug: angleproject:4447 Change-Id: Icde34892c9e2efff4b71e8c4e960c2fcff786700 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2080594 Commit-Queue: Alexis Hétu <sugoi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Alexey Knyazev 605ab763 2020-02-24T19:43:32 D3D11: Implement OES_draw_buffers_indexed Existing CONSTANT_COLOR/CONSTANT_ALPHA limitation was generalized to independent blend states with draw call invalidation and a new end2end test. dEQP tests that are incompatible with this limitation result in INVALID_OPERATION and are marked as FAIL. D3D11 renderer always normalizes and deduplicates requested blend states based on their enabled features and bound framebuffer. Bug: angleproject:4394 Change-Id: I284796e18be71de1b5bfb087d36f6a45be4c3f70 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2070575 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
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>
Charlie Lao fed0dda1 2020-01-31T12:59:31 Remove getIndexRange call from ValidateDrawRangeElements The spec doesn't require implementation to validate indices against range. This extra validation is costing performance dearly, thus should be removed. Bug: angleproject:4373 Change-Id: I61b0628e75de368d9e869008b7c99c429222fd6f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033495 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Tobin Ehlis <tobine@google.com>
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>
Yan 17b3c2f3 2019-10-14T14:13:59 Implement SamplerVideoWEBGL for WEBGL_video_texture extension on desktop WEBGL_video_texture is an extension that will improve uploading video frame to WebGL performance. (https://www.khronos.org/registry/webgl/extensions/proposals/WEBGL_video_texture/) This extension introduced a new texture type TEXTURE_VIDEO_IMAGE_WEBGL and a new sampler type samplerVideoWEBGL to sample it. In chromium implementation, TEXTURE_VIDEO_IMAGE_WEBGL maps to different native texture type based on platform. On desktop, it maps to GL_TEXTURE2D(Currently supported). On Android, it should map to GL_TEXTURE_EXTERNAL(TODO). SamplerVideoWEBGL needs to be mapped to sampler2D or samplerExternalOES according to TEXTURE_VIDEO_IMAGE_WEBGL implementation. This patch implements samplerVideoWEBGL in Angle to support WEBGL_video_texture on desktop. In this case, samplerVideoWEBGL should map to sampler2D. Bug: chromium:776222, angleproject:3889 Change-Id: Idb0a5fcde37ca75ccc1181226b91f257212e7500 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1866274 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tom Anderson 5f3456e3 2019-12-03T14:16:19 Expose GL_ARB_sync for GL BUG=chromium:1028799 R=jonahr CC=vasilyt Change-Id: Id17c4061b206953b1e904bf7938cb371612e33fd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1948534 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jonah Ryan-Davis <jonahr@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>
shrekshao 35f74cd6 2019-10-31T16:47:10 Reorder BaseVertexBaseInstance draw calls parameters To match the parameter order of MultiDraw* calls. And potentially expose in chromium directly with ANGLE_ prefix. Bug: angleproject:3402, chromium:891861 Change-Id: I19548f4c3c7faa422e43905850b218039de43015 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1894241 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
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>
Jamie Madill f703443b 2019-09-21T14:10:35 Use Resource IDs in RefCountObject. This lets us use strongly typed IDs pretty much everywhere. Only one or two additional places still use GLuint IDs. Mostly for external queries and for Framebuffer Attachments. With some clever type reflection helpers lets us define a single template function for handling operator== and != for resource IDs. Refactor in preparation for more Capture/Replay work. Bug: angleproject:3611 Change-Id: I1c0c848e89eb8a4b769714d57686f816daf01634 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1815550 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com>
Tim Van Patten 46c88567 2019-09-04T11:17:49 Correct glCompressedTexSubImage3D() Parameter Checking GL_INVALID_OPERATION is generated if format is an ETC2/EAC format and the target is not GL_TEXTURE_2D_ARRAY. Bug: angleproject:3895 Test: dEQP-GLES3.functional.negative_api.texture.compressedtex*image3d Test: KHR-GLES2.texture_3d.compressed_texture.negative_compressed_tex_image Change-Id: I7f653192328f0bb067cc4a0c0285a2d3acec7024 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1784060 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiacheng Lu c3f7873b 2019-08-30T15:00:52 Use TransformFeedbackID in place of GLuint handle Bug: angleproject:3804 Change-Id: Ib8fbec89f28645790df98a184f47303f4a8d64c1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1779343 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@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 2c5d48a6 2019-08-23T09:28:35 Use FramebufferID in place of GLuint handle Bug: angleproject:3804 Change-Id: I5e1b5f1903b05a91468379e00ec130802315cdc2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769039 Reviewed-by: Jiacheng Lu <lujc@google.com> Commit-Queue: Jiacheng Lu <lujc@google.com>
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 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>
shrekshao cdecd97c 2019-06-25T14:22:41 Add Draw base vertex and base instance function entrypoints Split from https://chromium-review.googlesource.com/c/angle/angle/+/1705035/27 This patch adds entrypoints glDrawArraysInstancedBaseInstanceANGLE, glDrawElementsInstancedBaseVertexBaseInstanceANGLE, glMultiDrawArraysInstancedBaseInstanceANGLE, and glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE Implementation will come in a later separate patch. Bug: chromium:891861, angleproject:3402 Change-Id: I18e19b850cddd79be4798b9ae7efe0680a050c7f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1750125 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Geoff Lang <geofflang@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>
James Darpinian 7e48c9eb 2019-08-06T17:17:19 Add explicit integer casts WebKit uses the -Wshorten-64-to-32 flag which warns on these cases. Bug: 3439 Change-Id: I8c1de60da0f173ca2036e2120e79b857f5f2775f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1740866 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Kenneth Russell <kbr@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>