src/libANGLE/validationES.cpp


Log

Author Commit Date CI Message
Alexey Knyazev 0bb109aa 2024-11-28T00:00:00 Fix validation for 2D multisample array textures * Fixes: * TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY query must be rejected if the functionality is not enabled. * GetInternalFormativ must accept TEXTURE_2D_MULTISAMPLE_ARRAY on unextended OpenGL ES 3.2 contexts. * Added validation to the OpenGL ES 3.2 TexStorage3DMultisample entry point. * Cleanups: * Removed OES suffix from the enum conversion. * Incorrect extension name in the error message. * Do not create a 2D multisample array zero texture object if the backend does not support the functionality. * Replaced redundant FramebufferTexture validation with an assertion. * Do not allocate texture binding vectors for 2D multisample array textures if the backend does not support the functionality. * Aligned the 2D multisample array texture target assert in RecordBindTextureTypeError with the actual error condition. Fixed: angleproject:381270278 Change-Id: Idbbc86e2efe1bbc25d9570d515b67c1a32255d99 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6063068 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shufen Ma 3f312d98 2024-11-04T14:04:50 ES31: GetTexLevelParameter{if} validation for TEXTURE_2D_MULTISAMPLE GL_INVALID_VALUE is generated if target is GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_2D_MULTISAMPLE_ARRAY, or GL_TEXTURE_BUFFER, and level is not zero. Bug: angleproject:376497150 Change-Id: Ib05ef30a04699e590804d1059387a6920c38971c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5982239 Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Neil Zhang 01dee1cb 2024-10-14T15:04:28 Add implementation for GL_EXT_texture_storage_compression Bug: angleproject:352364583 Change-Id: I3dab4c68d5d0206d681e165e991217bd3de8eeb6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6011055 Auto-Submit: Neil Zhang <Neil.Zhang@arm.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 7a1da65f 2024-11-25T00:00:00 Fix GetTexLevelParameter validation * Adjusted ValidTextureTarget and ValidTexLevelDestinationTarget helpers to allow multisample 2D array target on unextended OpenGL ES 3.2 contexts. * Adjusted ValidTexLevelDestinationTarget helper to disallow 2D array, 2D multisample, and 3D texture targets when the corresponding functionality is not available. * Removed redundant texture object validation from ValidateGetTexLevelParameterBase. * Adjusted ValidateGetTexLevelParameterBase to disallow parameters not available in the current context. Fixed: angleproject:380291920 Change-Id: Id2fcd1e2c81be25f1d545d213bd2508185592f20 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6049081 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Chris Dalton a05a0e15 2024-09-25T22:33:36 Validate PLS shaders against context state Add shader introspection for PLS uniforms and validate that they match context state during draw calls. Bug: angleproject:40096838 Change-Id: I76cdf8add03de8f8b0b3e772c15c0087c1d97e98 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5893962 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Amirali Abdolrashidi ef55ca0a 2024-10-17T14:44:22 Update copy validation regarding ext textures * Updated the validation functions for the following function to accept TEXTURE_EXTERNAL_OES: glCopyImageSubDataEXT() * Updated unit test CopyTextureTestES3.CopyImageSubDataToEGLImage * Using TEXTURE_EXTERNAL_OES as target for glFramebufferTexture2D() requires EXT_YUV_target. Therefore, the texture related to it is used instead. Bug: angleproject:361372990 Change-Id: I905d4cf89522ae3158516b42b15705d1044c6e97 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5940404 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi aec90a8d 2024-10-07T10:56:24 Fix ignoring blit bits when attachments are missing GLES requires that the bits provided to glBlitFramebuffer are silently ignored if either the read or draw framebuffer is missing the corresponding attachment. In WebGL, this is forbidden. ANGLE was forbidding this because of WebGL, but a recent CTS test revealed that we shouldn't be doing that when !WebGL. Bug: angleproject:370917919 Change-Id: I202fbf665d8a102f0aea72709b80dfdabeb71a2e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5912614 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Dan Glastonbury c335ddfa 2024-07-19T11:48:54 Check only important stencil bits in partialClearNeedsInit When determining if a partial clear is taking place, instead of checking all bits of the stencil masks, only check the lowest bits corresponding to the bit depth of the active drawing stencil attachment. This results in combinations of masks, such as 0xFFFFFFFF and 0x7FFFFFFF as 0xFF and 0xFF, which are equal and not different. Change-Id: Id94082b6f689af92b00fb6d9a6cf65a1e3b4396a Bug: chromium:354025373 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5721289 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 245c1243 2024-07-12T14:28:31 Revert "Disallow read color type conversions for norm16 formats" This reverts commit e5b442dedd8030d64a6ca2cb34ba0ec37895adfa. Reason for revert: Broke Skia tests; possibly not going for this any more, as discussed on https://issuetracker.google.com/351644552#comment11 Original change's description: > Disallow read color type conversions for norm16 formats > > OpenGL ES is not supposed to convert 16-bit color buffers to > 8-bit pixel types or vice versa during readPixels operation. > > Fixed: angleproject:351644552 > Change-Id: I9e51ddc82f62f958b983b5d4609f7e983a941e83 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5686233 > Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:351644552 Change-Id: Ib0222e4cc5eae944db96fdd3f72c8980dfe09adf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5702736 Reviewed-by: Solti Ho <solti@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Alexey Knyazev e5b442de 2024-07-04T00:00:00 Disallow read color type conversions for norm16 formats OpenGL ES is not supposed to convert 16-bit color buffers to 8-bit pixel types or vice versa during readPixels operation. Fixed: angleproject:351644552 Change-Id: I9e51ddc82f62f958b983b5d4609f7e983a941e83 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5686233 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi e86ba9ab 2024-06-26T13:38:18 Vulkan: Fix querying support of prim restart patch * Added a cap to reflect support for primitive restart for patches. * primitiveRestartForPatchesSupported * In Vulkan, it is determined through the following component from the existing related device feature: * primitiveTopologyPatchListRestart * Updated querying PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED via glGet(). * Now it is only available on ES 3.2 or if tessellation shaders are supported. Otherwise, there will be a validation error. * It returns primitiveRestartForPatchesSupported. * Added a unit test that queries this value and ensures that it remains the same regardless of whether primitive restart is enabled. Bug: angleproject:349610458 Change-Id: If43a5326f0886cf10e38b4e73a868f46b1052533 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5661108 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi d193d51b 2024-06-17T22:46:08 Replace issue ids post migration to new issue tracker This change replaces anglebug.com/NNNN links. Bug: None Change-Id: I8ac3aec8d2a8a844b3d7b99fc0a6b2be8da31761 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637912 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Amirali Abdolrashidi 1fa6c020 2024-05-28T14:44:09 Vulkan: Add multisample line width query support * As part of GLES 3.2 support, added support to query the following through glGetFloatv(): * GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY * GL_MULTISAMPLE_LINE_WIDTH_RANGE * Added some tests to check the limits of the values above. * Updated comment regarding ES 3.2 spec table number. Bug: angleproject:42266081 Bug: b/336860504 Change-Id: I2c359bbb9003b3e76f342f7419477bdb1caaf88f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5576760 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi d9943e44 2024-04-09T23:53:48 Remove Program::syncState The last bit of responsibility still left in Program::syncState was to wait for post-link tasks for the sake of EGLBlobCacheTest tests. A new extension, GL_ANGLE_program_binary_readiness_query is created so that the wait can be done in the test itself. This extension is ultimately useful for applications as well, so they can avoid blocking the CPU by calling glGetProgramBinary prematurely. Bug: angleproject:8297 Change-Id: Ied6b755cb9b060198f82c7948bfd03441435a578 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5440302 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: mohan maiya <m.maiya@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
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>
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>
Roman Lavrov 2a433353 2023-11-02T14:29:19 Skip unnecessary default blend equation validation Skip the bitset loop when all equations are the default 0 Together with crrev.com/c/5008031, 2~2.5% improvement in overall instruction count (cpu cycles also improved but a bit less) in driver_overhead_2, which doesn't set equations. If not skipped, to/from GLenum conversion added ~1% (the trace has ~10k glDraw calls per frame so this is a hot path) (tested on Android with angle_enable_share_context_lock=false) Bug: b/300968773 Change-Id: Ic03ab36f071e36cecc78f4c107e3e82a08390e11 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5002007 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 8b4901d0 2023-11-06T10:43:14 Avoid GLenum conversion in BlendStateExt blend and equation The following functions now return value as is without ToGLenum conversion (that is often unnecessary): getEquationColorIndexed getEquationAlphaIndexed getSrcColorIndexed getDstColorIndexed getSrcAlphaIndexed getDstAlphaIndexed (at least) getEquationColorIndexed is on the hot path with noticeable performance impact; this CL also moves the implementation to the header to allow inlining. Bug: b/300968773 Change-Id: Ie223abe14b12afd7844686863ee5806945d10e45 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5008031 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Geoff Lang 729e19ac 2023-10-24T15:31:17 Remove essl3 extension requirement for ES3 texture parameters The extensions are not clear about support for the swizzle parameters with external textures. Other parameters are mentioned with specific validation (which is handled in ValidateTexParameterBase). Simply let the other validation handle these parameters and allow the swizzle to be forwarded. Bug: chromium:1493448 Change-Id: Ic34d4c124c5493fef796322b5237541e557fd7ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4973157 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Alexey Knyazev 1988108e 2023-10-12T00:00:00 Tighten draw buffers validation for dual-source blending Use the front-end DRAW_BUFFER* state instead of the internal mask, which is unset for missing attachments. Bug: angleproject:1085 Bug: angleproject:7177 Change-Id: I5311d1f26043f15035e51957920bf9cd553c3007 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4935858 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 9ca025d2 2023-09-18T15:50:48 Flatten BufferVariable/ShaderVariableBuffer/InterfaceBlock struct InterfaceBlock inherits from ShaderVariableBuffer, ShaderVariableBuffer is not a trivially copyable struct, this made InterfaceBlock not trivially copyable. InterfaceBlock is being used by some app traces for uniform blocks. BufferVariable inherits from sh::ShaderVariable which is very complicated and not trivially copyable. This CL flattens all of these three structs to simple structs without inheritance, and wraps all trivially copyable data into one POD struct, thus load/save are cheaper. Bug: b/275102061 Change-Id: I96f89176ce3d3131cb1d3ea3280c3c36c257560f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4874610 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Roman Lavrov <romanl@google.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>
Shahbaz Youssefi 06411d16 2023-09-06T13:23:34 GL: Use the executable instead of program In a few places, the program was still being directly referenced instead of the executable (in particular when dealing with multiview). Bug: angleproject:8297 Change-Id: I15d0865bf58376a9f85efeec739dd93b49ceaea7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4846475 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: 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>
Alexey Knyazev 9624db05 2023-08-21T00:00:00 Validate missing fragment outputs for dual-source blending * A secondary fragment output must be declared when dual-source blending is enabled in WebGL contexts. * Omitting locations for multiple fragment outputs is not allowed in WebGL contexts. Bug: angleproject:1085 Change-Id: I57febdc02c9ccc571971a81b6671869f19b0aa96 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4834672 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi 6ff209bc 2023-08-30T00:02:30 Clean up InfoLog usage during link The info log doesn't really belong to ProgramExecutable; it belongs to ProgramState. However, it is placed there for convenience since many functions access it. This change cleans up usage of InfoLog so the one in ProgramExecutable is consistently used, but also that is turned into a reference to ProgramState's InfoLog. This is necessary for a follow up change that restores the previous executable on link failure (and would thus otherwise lose the info log of the failing link). Bug: angleproject:8297 Change-Id: I088408e3fce9ebb35b1ec4ad3dc599bdb90bf5c5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4825624 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Alexey Knyazev 8b0af482 2023-08-21T00:00:00 Validate active draw buffers for dual-source blending Fail if more than MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT draw buffers are enabled when dual-source blending is used. Drive-by: Do not invalidate draw state on changing blend equations if KHR_blend_equation_advanced is not enabled. Bug: angleproject:1085 Bug: angleproject:7177 Change-Id: Ieff80ce777c53b1d8183e1d0a52b7d2224347448 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4823164 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi f3c1de36 2023-08-17T15:29:24 Make shader recompile while parallel linking safe Prior to this change, Program* objects held references to Shader* objects. This poses a problem where a shader recompile can race with a program link, if the program link is done in parallel. As a result, a good chunk of the link job is done serially and under the share group lock. After this change, that is no longer a problem, and most of the link can be made lockless/parallelized. This change separates out the "compiled state" from the rest of the shader state. This was already done for the front-end state (for the sake of caching), but is also now done for the backends that need it. The compiled state in turn is placed in a shared_ptr, and is shared with the program. When a shader is compiled, its own shared_ptr is replaced with a new object, leaving all programs currently compiling unaffected and using the previous compilation results. Once a program is linked, its references to compiled shader states is updated. Bug: angleproject:8297 Change-Id: Iff7094a37088fbad99c6241f1c48b0bd4c820eb2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4791065 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Jeff Vigil 1bd45c4f 2023-07-17T14:18:53 Add tiling mode for GL_EXT_memory_objects Add set and get TexParameter for pName GL_TEXTURE_TILING_EXT Add test case to VulkanImageTest for import LINEAR memory object Bug: angleproject:8274 Change-Id: I4432093e41f45e3926a27e3dee00d48c0438cae5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4752793 Reviewed-by: Jeff Vigil <j.vigil@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: mohan maiya <m.maiya@samsung.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>
Alexey Knyazev 143fa68f 2023-07-27T00:00:00 Disallow read type conversions for signed 16-bit color buffers Signed 16-bit color buffers should not be converted to unsigned or 8-bit pixel types during readPixels operations. Bug: angleproject:8048 Change-Id: I27eaeb3d543732b5079bd53ef4fad1711ce3c3ef Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4727392 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: 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>
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>
Alexey Knyazev b57d5638 2023-06-29T00:00:00 Reland "Cleanup multiview support" This is a reland of commit 9a7c0b88ba68e328d3f5f7991a6df0ab5de92311 Original change's description: > Cleanup multiview support > > * Removed remaining mentions of ANGLE_multiview > > * Removed AST transformations used only in > the side-by-side multiview implementation > > * Changed the type of the internal ViewID_OVR > variable to use the dedicated qualifier > > * Removed side-by-side multiview support > from the D3D11 renderer > > * Removed an unused helper for side-by-side > multiview support from the OpenGL renderer > > * Removed obsoleted test suppressions Fixed: angleproject:3341 Change-Id: I3ce9304c79c0873462c73e8cf02b85f7a1aaf874 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4669604 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi f0deadab 2023-07-06T15:19:03 Revert "Cleanup multiview support" This reverts commit 9a7c0b88ba68e328d3f5f7991a6df0ab5de92311. Reason for revert: Suspected cause of crash on Canary Original change's description: > Cleanup multiview support > > * Removed remaining mentions of ANGLE_multiview > > * Removed AST transformations used only in > the side-by-side multiview implementation > > * Changed the type of the internal ViewID_OVR > variable to use the dedicated qualifier > > * Removed side-by-side multiview support > from the D3D11 renderer > > * Removed an unused helper for side-by-side > multiview support from the OpenGL renderer > > * Removed obsoleted test suppressions > > Fixed: angleproject:3341 > Change-Id: I5e0706cbf26ea820b51400124ddbf2624b738f17 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4660046 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Bug: chromium:1462504 Bug: chromium:1462505 Bug: chromium:1462506 Bug: chromium:1462478 Bug: chromium:1462531 Change-Id: Ie0e76b1c6823db19f68bb67fdfc8abc00cc62f88 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4666209 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Alexey Knyazev 9a7c0b88 2023-06-29T00:00:00 Cleanup multiview support * Removed remaining mentions of ANGLE_multiview * Removed AST transformations used only in the side-by-side multiview implementation * Changed the type of the internal ViewID_OVR variable to use the dedicated qualifier * Removed side-by-side multiview support from the D3D11 renderer * Removed an unused helper for side-by-side multiview support from the OpenGL renderer * Removed obsoleted test suppressions Fixed: angleproject:3341 Change-Id: I5e0706cbf26ea820b51400124ddbf2624b738f17 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4660046 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Amirali Abdolrashidi 61eda436 2023-06-15T14:47:35 Fix TexImage3D validation for 2D arrays below ES3 Currently if we try to define a 2D texture array in ES2, a crash occurs during its validation. Since texture3DOES only adds support to 3D textures, we should make sure the validation only passes if ES3 and above are used. * Added check for 2D texture array usage in validating glTexImage3D(). Bug: angleproject:8213 Change-Id: Ib477d8b6eec89c35d605a1b575bfb5519d19452e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4618955 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 8bc7fffb 2023-06-21T10:54:27 Include framebuffer completeness reason in draw errors Framebuffers have a much more detailed "reason" string for framebuffer completeness errors. Make sure that reason is printed when a draw call fails due to incomplete framebuffer. Rework how draw validation errors are stored to keep the extra GL error enum. Bug: chromium:1455725 Change-Id: I5984452c5aab4f8ccb73d43bd63bca1aae53e847 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4632578 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Vikas Soni b5fa8728 2023-04-20T14:59:28 Add extension to skip texture renderability validation in ANGLE. Add a new extension to skip the texture renderability validation in ANGLE. Bug: angleproject:0000 Change-Id: Ia9e5a1eff233f5aced4706b7d3c183058d474c41 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4455549 Auto-Submit: vikas soni <vikassoni@chromium.org> Commit-Queue: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: vikas soni <vikassoni@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>
Saifuddin Hitawala 877cd04c 2023-03-02T10:24:14 Reland "Add vulkan format image fallback for R16G16B16" Suppressed misbehaving trace test in https://crrev.com/c/4317088 This is a reland of commit 71f6d54c8d3662693283281651e57c994a10cf08 Original change's description: > Add vulkan format image fallback for R16G16B16 > > This change adds a vulkan format image mapping fallback from R16G16B16 > to R16G16B16A16, R32G32B32_FLOAT and R32G32B32A32_FLOAT for both > UNORM and SNORM variants. > > This is done because in Chrome we want to use R16/RG16 formats which > are exposed to Skia over the EXT_texture_norm16. Currently, > EXT_texture_norm16 requires RGB16_EXT which if not present is not > supported even if R16_EXT and RG16_EXT are supported. This fallback > helps us support R16/RG16 as well over RGBA16. > > It also updates validationES checks for GL_RGBA signed and unsigned > normalized checking if type is GL_SHORT or GL_UNSIGNED_SHORT. > > It adds a method LoadToFloat that allows a type (GLushort or GLshort) > to be loaded into float format types. This is then used as part of > fallbacks for load_functions_data.json. > > Bug: None > Change-Id: I5c6879cd2ed5dd6e3440877f4891f269d96d88a1 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4294694 > Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> Bug: None Change-Id: I101dd9e8c62e6794692c9f89c4944297e195f710 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4317089 Reviewed-by: Cody Northrop <cnorthrop@google.com> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Roman Lavrov b3178411 2023-03-07T15:08:46 Revert "Add vulkan format image fallback for R16G16B16" This reverts commit 71f6d54c8d3662693283281651e57c994a10cf08. Reason for revert: crashing win-trace https://ci.chromium.org/ui/p/angle/builders/ci/win-trace/3527/overview Also reproducible on Linux: % src/tests/capture_replay_tests.py --gtest_filter="Texture2DNorm16TestES3.TextureNorm16R16 Original change's description: > Add vulkan format image fallback for R16G16B16 > > This change adds a vulkan format image mapping fallback from R16G16B16 > to R16G16B16A16, R32G32B32_FLOAT and R32G32B32A32_FLOAT for both > UNORM and SNORM variants. > > This is done because in Chrome we want to use R16/RG16 formats which > are exposed to Skia over the EXT_texture_norm16. Currently, > EXT_texture_norm16 requires RGB16_EXT which if not present is not > supported even if R16_EXT and RG16_EXT are supported. This fallback > helps us support R16/RG16 as well over RGBA16. > > It also updates validationES checks for GL_RGBA signed and unsigned > normalized checking if type is GL_SHORT or GL_UNSIGNED_SHORT. > > It adds a method LoadToFloat that allows a type (GLushort or GLshort) > to be loaded into float format types. This is then used as part of > fallbacks for load_functions_data.json. > > Bug: None > Change-Id: I5c6879cd2ed5dd6e3440877f4891f269d96d88a1 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4294694 > Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Geoff Lang <geofflang@chromium.org> Bug: None Change-Id: I8373aee3a1d2c2279a3882ff7203d88483e29f4e No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4316422 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Saifuddin Hitawala 71f6d54c 2023-03-02T10:24:14 Add vulkan format image fallback for R16G16B16 This change adds a vulkan format image mapping fallback from R16G16B16 to R16G16B16A16, R32G32B32_FLOAT and R32G32B32A32_FLOAT for both UNORM and SNORM variants. This is done because in Chrome we want to use R16/RG16 formats which are exposed to Skia over the EXT_texture_norm16. Currently, EXT_texture_norm16 requires RGB16_EXT which if not present is not supported even if R16_EXT and RG16_EXT are supported. This fallback helps us support R16/RG16 as well over RGBA16. It also updates validationES checks for GL_RGBA signed and unsigned normalized checking if type is GL_SHORT or GL_UNSIGNED_SHORT. It adds a method LoadToFloat that allows a type (GLushort or GLshort) to be loaded into float format types. This is then used as part of fallbacks for load_functions_data.json. Bug: None Change-Id: I5c6879cd2ed5dd6e3440877f4891f269d96d88a1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4294694 Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev 3fed0866 2023-02-22T00:00:00 Implement EXT_texture_mirror_clamp_to_edge Support GL_MIRROR_CLAMP_TO_EDGE_EXT address mode when native support is available. Adjusted validation, sorted switch cases by target enums order. Added new TextureMirrorClampToEdge* end2end tests. Drive-by: fixed texture address computation for integer formats with GL_MIRRORED_REPEAT on D3D11. Fixed: angleproject:7968 Change-Id: Iaf29c8b4b32a7630c2a871f832d171f4bc4e2672 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4289137 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Alexey Knyazev a2efea13 2023-03-01T00:00:00 Add ANGLE_stencil_texturing This extension allows texturing of the stencil component of a packed depth stencil texture on OpenGL ES 3.0 contexts. Trivially exposed on backends that support OpenGL ES 3.1, which requires this feature. Adjusted the tests to check for the new extension string instead of the context version. Bug: angleproject:8051 Change-Id: I4d833acbc72e7374bde91d4c861598a0fdaf9b90 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4295312 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Kimmo Kinnunen 62d35a60 2023-02-10T13:05:14 Metal Fix norm16 subimage uploads w/ signed types The supported texture format tables would have entries for a signed or unsigned internal format and matching type. The texSubImage variants do not communicate the sized internal format, rather unsized format type. Data parameters are validated based on format, not internal format. For these, the signed variants were missing. Add texture format table entries for signed types that match the format parameters. Add a precautionary validation case so that future such bugs would not pass the control flow forward, into the copying phase. Fixed: angleproject:8014 Change-Id: I5b00cca8672691fdb953f62093d62feaa724db99 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4238881 Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Alexey Knyazev ad582b26 2023-02-07T00:00:00 GL: Expose EXT_texture_border_clamp * Adjusted validation * Exposed both EXT and OES extension names * Fixed border color when lumaWorkaround is enabled Bug: angleproject:7969 Change-Id: Ia5622d4ecbc0b6338ee3651ab58bf1ca5276bbc4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4231843 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 87815de2 2022-12-01T00:00:00 Adjust GetFramebufferAttachmentParameterivBase validation GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT state queries should be allowed for ES 2.0 clients when floating-point color buffer extensions are enabled. Bug: angleproject:7853 Change-Id: I4a0a3b336e44648635233be54f598a3ab20cf717 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4071926 Reviewed-by: Kenneth Russell <kbr@chromium.org> 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>
Jamie Madill 8403e4c5 2022-10-10T20:59:29 EGL: Resource IDs for Surface, Context and EGL Image. This will make these classes play nicely with resource maps. As these objects are used in a lot of places, and simplified C can't handle unordered_map, it's necessary to index the maps by simple packed IDs in capture/replay code. This indirection will also have increased safety as we validate EGL resource ID handle values before accessing the memory directly. Also hides some of the other EGL capture methods behind helper methods to simplify the C code and hide assignments and other complex maps. Bug: angleproject:7758 Change-Id: Ibc7bb56430d3068bd38877c9dfb011979d4ea234 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3957164 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
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>
Shahbaz Youssefi 97926f80 2022-09-15T00:10:49 GL: Implement GL_ANGLE_logic_op Enabled only on Desktop GL where logic op is available. Bug: angleproject:7654 Change-Id: I3c17ffb5b21abf31aec247319a625526f1bec37d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3898316 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
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>
Lingfeng Yang 7d6f3d94 2022-07-14T13:25:04 glValidateProgramPipelines: Skip draw state error check Certain apps will call this API while having a surfaceless context, making it improperly fail. dEQP tests that previously relied on the full draw states check were actually relying on the part where the draw state check included a check that the pipeline object had programs/shaders. Relax the validation of the pipeline to only include that validation, and not also the framebuffer state / VBO state / etc. Bug: b/223456677 Change-Id: I9211761934668aae8a20f07ac4f36b7f6c1281da Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3764434 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Lingfeng Yang be24acbd 2022-07-14T13:16:33 Vulkan: Support GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES This CL adds basic support for GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES to the Vulkan backend, and also allows the enum through validation. Bug: b/223456677 Change-Id: If0dcb467bb72bdfc9ced4862231a676eef471a6c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3764432 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Constantine Shablya b47603e0 2022-06-14T05:47:54 Implement GL_NV_read_depth_stencil The implementation will perform two readPixels calls, once for each aspect, and then interleave and pack the result. Bug: angleproject:4688 Change-Id: I46390df893de50b93e855e9333ffab567215a2bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3702686 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com> Auto-Submit: Constantine Shablya <constantine.shablya@collabora.com>
Alexey Knyazev 3b5b7a29 2022-07-03T00:00:00 Caps: Check if ANGLE_texture_multisample is enabled Updated RenderbufferMultisampleTest.IntegerInternalformat and adjusted getRenderbufferParameteriv validation. Bug: angleproject:7479 Change-Id: Ieaeda4e8a8c11c3d1023f40a90639f3ecfcba9bd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3738148 Reviewed-by: Gregg Tavares <gman@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
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>
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>
Alexey Knyazev 33b254fe 2022-05-28T00:00:00 Fix ValidateFragmentShaderColorBufferMaskMatch for indexed masks Adjust WebGL-specific validation, add test. Bug: angleproject:4394 Change-Id: I4d51d6d7639a4ec3115025c858434491845440a2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3673298 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 8291f2d3 2022-05-20T00:00:00 Fix ValidCompressedSubImageSize for 3D uploads Add CompressedTexSubImage3DValidation* tests Bug: angleproject:4056 Change-Id: I088273b6349729fadf2c21ca7b349e44dc9ce5f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3657408 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuxin Hu fe2c82ad 2022-04-26T12:39:44 check integer overflow in Texture copyImage The code that checks forceCopySubImage could run into integer overflow error for these values: sourceArea.x + sourceArea.width sourceArea.y + sourceArea.height With gn arg is_ubsan=true, these two equations lead to crash. Add the code to check integer overflow Bug: chromium:1314268 Bug: angleproject:5246 Change-Id: I6dee98457a44797ffb806ef8bd05f052c9aaa733 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3597713 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Mohan Maiya 02b96848 2022-04-21T16:32:31 Vulkan: Add support for GL_QCOM_shading_rate Layer GL_QCOM_shading_rate over VK_KHR_fragment_shading_rate Test: ShadingRateQcomTest* Bug: angleproject:7172 Change-Id: I3f040dbfad3906facd4349937fed2ce9a464b824 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3599874 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Alexey Knyazev 62ca6449 2022-04-13T09:36:40 Reland "Fix BlendStateExt::mMaxColorMask initialization" This is a reland of commit 50d008a7efcab80f34eb742148d05389b2ed247e Besides fixing the BlendStateExt color mask initialization bug, the following changes were made: * All fields were made private with accessor functions. * A new assertion was added that ensures 64-bit storage for factors and equations. This allowed dropping one redundant mask. * Two new helper functions were added. * BlendStateExt::mMaxDrawBuffers was renamed to mDrawBufferCount. * The BlendStateExt class is now aligned to 8 bytes with an assertion. * Expanded test coverage. Also fixed incorrect usage of BlendStateExt fields in: * StateManagerGL::syncBlendFromNativeContext * StateManagerGL::restoreBlendNativeContext Original change's description: > Fix BlendStateExt::mMaxColorMask initialization > > This variable should not have its unused bits set. > > To avoid confusion with other masks of the same class, > the variable was renamed to mAllColorMask. > > Bug: angleproject:7200 > Change-Id: I72542d49ff8da3dbb8d61c5034ce37c1e8fcc6e1 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3581990 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Bug: angleproject:7200 Change-Id: I87a5fe0f9dfbbf5e525b9120f772aa9adb39ce5f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3593234 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Peng Huang c3f15962 2022-04-14T10:11:56 Fix OOB problem in validationES.{h,cpp} maxVertexAttributes may less than the gl::MAX_VERTEX_ATTRIBS for some GLES2 devices, so using gl::MAX_VERTEX_ATTRIBS may cause OOB problem. Bug: chromium:1258869 Change-Id: I09609db35143fbf17b4228c7fe5f38a987e4f1d9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3584637 Auto-Submit: Peng Huang <penghuang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c5271e8e 2022-04-04T23:28:35 Vulkan: Emulate GL_KHR_blend_equation_advanced Based on a change by Brandon Schade <b.schade@samsung.com> In the translator, when advanced blend is enabled, an input attachment is added. Based on the listed advanced blend equations, emulation code is added that performs those equations' functions. The blend equation itself is passed through a driver uniform. Note that the advanced blend extension only allows a single output to use advanced blend, and that should be at location 0. In the Vulkan backend, when advanced blend is used, the driver uniform to select the equation is updated and normal blending is disabled. Bug: angleproject:3586 Change-Id: Icc42e8be238d34fca149087eb9cfe616a7643a6b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3575738 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
John Cunningham f5d20de8 2022-03-23T17:34:14 WebGL ReadPixels validation is incorrect. Remove GL_UNSIGNED_INT_24_8 from the supported types in ValidReadPixelsTypeEnum. Run the format/type validation before the check for missing attachment. Bug: angleproject:7119 Change-Id: Ie788084d0f41fef6847791de8c53be830eba7564 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3546723 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Alexey Knyazev 479f1988 2022-03-17T11:50:46 Simplify ValidCompressedBaseLevel Bug: angleproject:7099 Change-Id: I9592aebde56808556f72b2b94a39f94d077f9db2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3529527 Reviewed-by: Brandon Schade <b.schade@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi 3ddb21fd 2022-02-23T14:15:48 Front-end support for KHR_blend_equation_advanced Bug: angleproject:3586 Change-Id: I27086295e7455ce8848db1c6004917fea40202e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3484785 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Brandon Schade 459bdc2f 2022-03-16T12:04:38 Reintroduce validation check only for D3D To avoid undefined behavior, D3D requires the base mip level to have multiple-of-4 dimensions. Add this validation check back in. Bug: angleproject:7099 Change-Id: Id51f6cd4c745455062b864c0d291b9857e985e35 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3530499 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Brandon Schade <b.schade@samsung.com>
Brandon Schade 6baf1675 2022-03-04T11:04:46 Remove invalid validation check on compressed texture formats Remove the ValidCompressedDimension() check for non-WebGL contexts of compressed formats. This is because compressed texture images can have dimensions that are neither multiples of four nor small values like one or two. Test: gtest_filter=*DXT1CompressedTextureTest.NonBlockSizesMipLevels* Bug: angleproject:7099 Change-Id: Ic86c15dd3187ffab0665f6db21434fffcbe04fef Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3526017 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Brandon Schade <b.schade@samsung.com>
Jamie Madill 708ce9cf 2022-03-14T10:37:31 Fix crash when pausing XFB then deleting a buffer. Fix is to validate XFB buffer bindings even if we're paused. This is undefined behaviour so we can use any non-crashing solution. Bug: chromium:1305190 Change-Id: Ib95404cdb13adbde7f34d6cc77473a8b3cbf1de7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3522283 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
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>
Jeff Vigil 2b00f4f5 2022-02-01T13:59:50 Fix bug in protected content validation 1. It is valid for a protected context to sample from an unprotected texture 2. It is necessary to match protected state of framebuffer attachment and the context Bug: angleproject:6602 Change-Id: Ia3138c1a6dc46ff6b85fc5948c6a04ef48fba8a8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3430241 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Brandon Schade 38fada35 2022-01-27T18:16:18 Vulkan: Add support for OES_primitive_bounding_box Add OES version of the primitive bound box extension Bug: angleproject:3576 Test: dEQP-GLES31.functional.primitive_bounding_box.* Change-Id: Ie44d952992a68dfffd5c124dda8dd11069f0c1e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3425086 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Brandon Schade <b.schade@samsung.com>
Mohan Maiya d4c8209b 2022-01-10T13:30:06 Fix validation of copyImageSubData related to texture completeness Fixed an edge case in validation code where we were not properly ignoring format rules for texture completeness as required for copyImageSubData by the ES 3.2 specification Bug: angleproject:5363 Tests: KHR-GLES32.core.copy_image.r32*_texture Change-Id: Ibf8a6f4708e2135f0eb6f4ba58d4ce413f11ce5b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3379224 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Mohan Maiya e38dab0a 2022-01-10T10:58:40 Add missing implementation for glGetnUniformuiv() GL_KHR_robustness became core in GLES 3.2 and added glGetnUniformuiv() function in gles_3_2 entry points but this function was missing implementation in Context.cpp. Also fixes ES32 validation for glGetnUniform*v Bug: angleproject:6593 Tests: KHR-NoContext.es32.robustness.getnuniform Change-Id: Ic26190e59d448d93ae9e2e0d2a7faff14c3776f8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3373436 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Maksim Sisov beda2459 2021-12-09T14:24:08 Add support for GL_MESA_framebuffer_flip_y 2/* This is a second CL that adds actual implementation for GL_MESA_framebuffer_flip_y extension. Also, some tests are added to verify the functionality. Please note that bots do not support this extension yet, and the tests were verified by running them locally. Bug: chromium:1231934 Change-Id: Iea483aa13a298df6b5cf0b7b5ffb795a4666e3bd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3329603 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Maksim Sisov <msisov@igalia.com>
Tim Van Patten 4f42a4d3 2021-12-01T18:57:48 Add more support for GL_RGBX8_ANGLE Update EquivalentBlitInternalFormat(), ValidReadPixelsFormatEnum(), and ValidReadPixelsFormatType() to support GL_RGBX8_ANGLE. Also update ANGLE_rgbx_internal_format.txt to indicate the new support in glBlitFramebuffer() and glReadPixels() for GL_RGBX8_ANGLE. Bug: angleproject:6690 Test: BlitFramebufferTestES31.BlitMultisampledRGBX8ToRGB8 Test: WebGL2CompatibilityTest.ReadPixelsRgbx8AngleUnsignedByte Change-Id: I75b6d5cb46eebbc904b86cc8e6bd18aca5403684 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3312367 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Jamie Madill ce6f9c8f 2021-11-19T14:52:48 Update checked numerics library. This library hadn't been updated in quite some time and had bugs which affected UBSAN in some operators. Bug: angleproject:5795 Change-Id: I40f658655034ce03df29cf4c71acb3f6fe96bef0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3289941 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3a9f18f1 2021-10-18T10:44:38 Refactor program pipeline handling. In preparation for moving more code from gl::Program to gl::ProgramExecutable so it can be shared with ProgramPipeline. Bug: angleproject:6566 Change-Id: Icb7ecccb37ae8e0d7d5fef8968f0dd7ef6fe6150 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3226305 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
YuxinHu 2aa5286d 2021-10-12T17:05:48 Add Entry Point name to validation errors Add gl/gles entry point names to validation error messages some special cases: 1. Debug::insertPerfWarning() is invoked from multiple places, such as TextureVK, ContextVK, adding an extra entryPoint function parameter in these files will need extra investigations. I am passing the entryPoint name GLInvalid as a temp workaround. 2.ErrorSet::hangleError() is invoked from multiple Context*.cpp files, adding an extra entryPoint function parameter in these files will need extra investigations. I am passing the entryPoint name GLInvalid as a temp workaround. 3. Debug::insertMessage(), Debug::popGroup(), Debug::pushGroup() can be invoked from more than one GL entry points, e.g. Debug::pushGroup() can be invoked from either GL_APIENTRY GL_PushDebugGroup() or GL_APIENTRY GL_PushDebugGroupKHR() through context->pushDebugGroup() call. Right now the same entry point name glPushDebugGroup will be printed out in the error message for both cases. However, we should be able to tell the actual entry point by checking which version: KHR version or core version the application uses, and this helps avoid the confusion. For now we will let the same entry point name getting printed for both cases. Bug: angleproject:6523 Change-Id: I64a5463d9168d8444d376d1f428c3b3d894f2ea9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3215063 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Jamie Madill 49ac15a5 2021-09-20T11:29:01 Optimize VAO bindings. This CL makes the XFB binding tracking WebGL-only. That will speed up VAO binding changes in non-WebGL considerably. Also has a few inline micro-optimizations that may not have a large effect. Bug: angleproject:6371 Change-Id: Ib0a26a3b956dcd6ff78626e5cd6514b46270d882 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3170116 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuxin Hu dc08289d 2021-09-13T16:48:58 Add a cubemap array texture validation In ValidateTexture3DDestinationTarget(), Check if the cube map array extension is enabled if the TextureTarget is CubeMapArray. This helps catch the missing extension error earlier in ValidateES3TexImage3DParameters(), and the program won't crash when getTextureByType() is called later in ValidateES3TexImageParametersBase(). Bug: angleproject:6152 Change-Id: I2f1876f81688e7eef68bdf99276a3a9fafa224da Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3161440 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@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>
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>
Hailin Zhang e1befb35 2021-09-09T15:53:32 fix a EXT_buffer_storage issue. According to spec, GL_MAP_PERSISTENT_BIT_EXT indicates that it is not an error for the GL to read data from or write data to an immutable buffer while it is mapped. Bug: b/188685164 Change-Id: I899a978dbf9c1d1ad3489063028fd5500c4bd5e1 Signed-off-by: Hailin Zhang <hailinzhang@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3151278 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Jamie Madill 3ae1f336 2021-09-03T09:34:10 WebGL: Make unsuccessful links fail subsequent draw calls. This protects against incomplete state updates during a failed link call that can interfere with draw calls. Bug: angleproject:6358 Bug: chromium:1241123 Change-Id: Ie892654c3a58c69d6e35ba3c41758ab6269d8193 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3140496 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Alexey Knyazev 77151a6c 2021-08-26T19:32:35 Cleanup ValidateES2CopyTexImageParameters; add test Compressed and depth formats are rejected earlier with ValidateCopyTexImageParametersBase. Added a new Texture2DTest.CopyAfterCompressed test to ensure that validation code for non-subImage case does not fail new assertions. Bug: angleproject:5731, chromium:1216276 Change-Id: I11d2ac3389418731b6cc6e2bd5c9655b1590b02d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3122156 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Kenneth Russell d8cb9967 2021-08-04T18:15:51 In WebGL, constrain base level of compressed textures. Enforce that if a mipmap level > 0 is specified for a compressed texture, that it implies that the size of the base level of the texture is a multiple of the format's block size. Makes the test changes in https://github.com/KhronosGroup/WebGL/pull/3304 largely pass. There are some needed follow-on fixes to that PR, and this CL changes a sub-test result in the existing S3TC and S3TC-sRGB tests which will need to be suppressed Chromium-side first. Bug: angleproject:6245 Change-Id: I7723d7882091b78a353d8d273e80b819dd384021 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3072568 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jeff Vigil 6136620b 2021-03-25T15:43:06 Reland "EGL: GLES: Implement GL_EXT_protected_textures" This is a reland of 6210a9b34a721df2c84cf69170ad9bf7ba40e4aa This removes changes in gl backend. Original change's description: > EGL: GLES: Implement GL_EXT_protected_textures > > Implement EGL_EXT_protected_content Images > Add protected member to Images and Textures > Add error when creating objects if not supported or > does't match native buffer > When creating siblings pass protected state > Add extension caps > Add Validation > Add GetTexParameter and SetTextparameter > Add protected to Texture and state > Expand tests for images and textures > > Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest > > Bug: angleproject:3965 > Change-Id: I35a89b4e80bba6d9b6831c68e71630eef304dacb > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802852 > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest Bug: angleproject:3965 Change-Id: Id36d697c53afc0f0dadf92bda4565f9157f4fc2a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3076825 Commit-Queue: Brandon Schade <b.schade@samsung.com> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Brandon Schade c664601d 2021-04-26T17:08:06 Allow drawing if a fragment shader isn't present According to the OpenGL ES 3.1 spec: 7.3 PROGRAM OBJECTS If there is no active program for the vertex or fragment shader stages, the results of vertex and fragment shader execution will respectively be undefined. If there isn't an active program for only one of these shader stages, the results of the other shader stage are still defined. To handle this, we no longer no-op the draw call if one of these is missing. We only no-op the draw if there's no vs. This allows for transform feedback to be captured when there's only a geometry and vertex shader. Tests: KHR-GLES32.core.geometry_shader.api.program_pipeline_vs_gs_capture Tests: KHR-GLES32.core.separable_programs_tf.geometry_active Tests: ProgramPipelineTest31.PipelineWithoutVertexShader* Tests: ProgramPipelineTest31.PipelineWithoutShaders* Bug: angleproject:5579 Change-Id: If9849cc398c307232435b167ab12431fa4258201 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2906723 Commit-Queue: Brandon Schade <b.schade@samsung.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Brandon Schade 217acac2 2021-07-21T12:42:56 Vulkan: Add support for EXT_primitive_bounding_box 1. Added support for EXT_primitive_bounding_box extension 2. Renamed shader variable gl_BoundingBoxEXT[] to ANGLEBoundingBox[] Bug: angleproject:3576 Test: dEQP-GLES31.functional.primitive_bounding_box.* Change-Id: I15fa9af50c6fd8e86d225670ddd8eb39f6e65d35 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3053618 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>