src/libANGLE/validationES2.cpp


Log

Author Commit Date CI Message
Charlie Lao 35b92525 2025-08-13T15:27:32 Remove lock from GenVertexArrays/IsVertexArray VertexArrays are per context anyway and is thread safe, so there is no need for shared lock. This CL moves mVertexArrayMap from Context to PrivateState so that it won't be accessed by other APIs. Bug: b/433331119 Change-Id: I466a79762e887dbec78b796b52028420837cff59 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6977163 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Geoff Lang 0cc9b7be 2025-09-03T11:33:37 Support more YUV formats in CopyTextureCHROMIUM Add support for formats in GL_ANGLE_yuv_internal_format as source textures to glCopyTextureCHROMIUM. These formats are common AHardwareBuffer formats and Chrome uses them as copy texture sources when decoding video. Bug: chromium:405308165 Change-Id: Ic817cce83b676ee9a517bee4fac6ef94a174961f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6908295 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Tom Sepez 25390156 2025-08-21T00:13:19 Suppress unsafe buffers on a file-by-file basis in src/ [1 of N] In this CL, we suppress many files but stop short of actually enabling the warning by not removing the line from the unsafe_buffers_paths.txt file. That will happen in a follow-on CL, along with resolving any stragglers missed here. This is mostly a manual change so as to familiarize myself with the kinds of issues faced by the Angle codebase when applying buffer safety warnings. -- Re-generate affected hashes. -- Clang-format applied to all changed files. -- Add a few missing .reserve() calls to vectors as noticed. -- Fix some mismatches between file names and header comments. -- Be more consistent with header comment format (blank lines and trailing //-only lines when a filename comment adjoins license boilerplate). Bug: b/436880895 Change-Id: I3bde5cc2059acbe8345057289214f1a26f1c34aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6869022 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao ae4aead5 2025-07-24T16:35:38 Remove sharedContextLock from glVertexAttrib{Divisor|Binding} With prior CLs all the functions used by glVertexAttribDivisor*, glVertexBindingDivisor and glVertexAttribBinding only access VertexArrayPrivate. This CL removes shared context lock from these APIs. Bug: b/433331119 Change-Id: Ib1632797c53d2cd7a31c21e93c0e69385c71a27f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6814157 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao fa29f604 2025-07-02T13:23:31 Remove sharedContextLock from {Enable|Disable}VertexAttribArray VertexArray objects are per context objects. In theory they do not need to protected by shared context lock. The reason we are taking locks because all these functions end up accessing Buffer object which are shared. In prior CLs we have removed subject observer usage from VertexArray which means VertexArray no longer accessed from other thread. In prior CLs we also split VertexArray into two classes: VertexArrayPrivate which has no buffer, and VertexArray which is subclass from VertexArrayPrivate and owns buffer. In this CL, glEnableVertexAttribArray and glDisableVertexAttribArray calls no longer take shared context lock. ContextPrivateEnableVertexAttribArray and ContextPrivateDisableVertexAttribArray are called from these two APIs and they only have access to StatePrivate. State Private holds a VertexArrayPrivate pointer, which means they do not have anyway to access buffer objects. The main challenge I run into here is mCachedActiveClientAttribsMask, mCachedActiveBufferedAttribsMask, mCachedActiveDefaultAttribsMask, mCachedHasAnyEnabledClientAttrib, mCachedNonInstancedVertexElementLimit, mCachedInstancedVertexElementLimit. These StateCache variable needs to be updated when these two APIs are called, and calculating these variable needs access to buffer object. The solution here is adding a bool mIsCachedActiveAttribMasksValid in the PrivateStateCache so that instead of immediately update these mCached* variable, we just set mIsCachedActiveAttribMasksValid to false. Then whenever any of these mCached* variable is needed, we will check mIsCachedActiveAttribMasksValid and calculate these cached variables. It adds one if check when accessing these caches, but the other benefit is that we may have avoided duplicated calculation when multiple states changed. Bug: b/433331119 Change-Id: I3227c72bc40501712db93fb3d540b835f07150b5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4514436 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Igor Nazarov 3e52318c 2025-06-26T10:46:00 Vulkan: Ensure always using resolved Window Surface size `WindowSurfaceVk::getWidth/Height()` methods return cached, previously resolved Surface size. Using these methods while current Window Surface size is unresolved may return stale values, causing undesired behavior. Appropriate ASSERTs were added to these methods to prevent such usage. Added ASSERTs revealed few places with incorrect usage: - In `Context::makeCurrent()` to set initial viewport or for capture. - In `IsPartialBlit()` and `ValidateReadPixelsBase()` validations. - In `SerializeFramebufferAttachment()` during capture. Rest of the code was thoroughly checked if it is possible to call `WindowSurfaceVk::getWidth/Height()` when size is unresolved. All other places always call these methods after framebuffer state synchronization, which acquires swapchain images and resolves the surface size. Added `ensureSizeResolved()` method that is called during validation and in the `SerializeFramebufferAttachment()` method. It is possible to use existing `Framebuffer::syncState()` method as alternative, but this solution was discarded since it may potentially interfere with `State::syncDirtyObjects()` method. The `Surface::getUserSize()` replaces old methods as optimization, to prevent calling relatively expensive method twice from `Context::makeCurrent()` to get width and height of the `drawSurface`. Test: angle_trace_tests --gtest_filter=EGLSurfaceTest.ResizeBeforeMakeCurrent/* Test: angle_trace_tests --gtest_filter=EGLSurfaceTest.ResizeBeforeMakeCurrentPostSizeQuery/* Test: angle_trace_tests --gtest_filter=EGLSurfaceTest.ResizeAndReadPixelsRobustANGLE/* Test: angle_trace_tests --gtest_filter=EGLSurfaceTest.ResizeAndBlitFramebufferANGLE/* Bug: angleproject:397848903 Change-Id: I082e13d0b8db5fd7d08ff25b102df1f283e1256d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6792928 Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 2f8193ec 2025-06-25T13:17:47 Validate buffers bound for transform feedback are not modified. The ES spec says it is undefined to write to a buffer that is currently being used for transform feedback output but recommends generating an error. Generate INVALID_OPERATION in this case. Bug: chromium:427162086 Change-Id: I727d18c2035509fe2e5d60680eb5198e40a60e33 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6673310 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Alexey Knyazev 7855312a 2025-05-15T00:00:00 Adjust multi draw validation * Fixed validation of negative drawcount for all MultiDraw*ANGLE entry points. * Added missing extension checks to MultiDraw*BaseInstanceANGLE entry points. Fixed: angleproject:420956723 Change-Id: I3a058471446cd96a883970d4e38ba5af2fa07a8c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6597176 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 720f6bbe 2025-05-15T00:00:00 Fix attribute and uniform name validation * Fixed null name error messages to refer to correct parameters. * BindUniformLocation * Added name checks for null and all reserved prefixes. * Fixed error code for reserved prefixes. * GetAttribLocation & GetUniformLocation * Moved reserved prefixes check to the Context. * Fixed and expanded tests. Fixed: angleproject:418986804 Change-Id: I62760b3010fd38ee2e31e4ff88d9910647b329dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6568552 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 1e7442b2 2025-04-24T00:00:00 Fix KHR_debug operations DebugMessageInsert: * Used correct error message when the severity parameter is invalid and aligned parameter validation order with the command declaration. DebugMessageInsert and PushDebugGroup: * Fixed message length validation. * Fixed message insertion when the explicit length is zero. Object[Ptr]Label: * Fixed label length validation. Added new tests. Fixed: angleproject:417621246 Fixed: angleproject:417684698 Change-Id: I00cd939a83c5b9ae7dddefc51222278615bc0df9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6544152 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 64888cb8 2025-04-24T00:00:00 Align multiview extensions usage with the specs As per the specs, the OVR_multiview2 extension requires and implicitly enables the OVR_multiview extension. Cleaned up the extension state checks and added dependency tests. No functional changes. Fixed: angleproject:417173927 Change-Id: I67d2c19f4ed2f2450bf7fe2a92625cc9525ca020 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6535750 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev 82c75df3 2025-04-24T00:00:00 Fix GetDebugMessageLog validation Used the same validation for GetDebugMessageLog and GetDebugMessageLogKHR entry points; added tests. Simplified validation redirects for: - ObjectLabel and ObjectLabelKHR - GetObjectLabel and GetObjectLabelKHR - ObjectPtrLabel and ObjectPtrLabelKHR - GetObjectPtrLabel and GetObjectPtrLabelKHR Fixed: angleproject:417493213 Change-Id: Id1fad6c94db78da403e70f40f44630632d375472 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6543489 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 9e6f44bc 2025-04-18T00:00:00 Autogen support checks for extension entry points As a side effect, added missing support checks for the following extension entry points: - GL_ANGLE_memory_object_flags - TexStorageMemFlags2DMultisampleANGLE - TexStorageMemFlags3DANGLE - TexStorageMemFlags3DMultisampleANGLE - GL_EXT_buffer_storage - BufferStorageEXT - GL_EXT_external_buffer - BufferStorageExternalEXT - GL_EXT_robustness - GetnUniformfvEXT - GetnUniformivEXT - ReadnPixelsEXT - GL_EXT_separate_shader_objects - ProgramUniform4ivEXT - ProgramUniform4uivEXT - GL_MESA_framebuffer_flip_y - FramebufferParameteriMESA - GetFramebufferParameterivMESA - GL_OES_matrix_palette - CurrentPaletteMatrixOES - LoadPaletteFromModelViewMatrixOES - MatrixIndexPointerOES - WeightPointerOES - GL_OES_query_matrix - QueryMatrixxOES - GL_OES_texture_cube_map - GetTexGenf*OES - TexGen*OES - GL_QCOM_framebuffer_foveated - FramebufferFoveationConfigQCOM - FramebufferFoveationParametersQCOM - GL_QCOM_texture_foveated - TextureFoveationParametersQCOM Bug: angleproject:409484297 Change-Id: I7fe05afe2a4575ae5d913bf9f60d5575404f808b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6494399 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 846dcf86 2025-04-18T00:00:00 Autogen context version checks for 2.0 entry points Bug: angleproject:409484297 Change-Id: I03b323ba5b8f9d45d41c0ff0188b3f7a7004722e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6490226 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 4b9525b2 2025-04-04T00:00:00 Remove all getClientMajorVersion helpers Client version checks should use proper struct compare operations. Bug: angleproject:408843436 Change-Id: I92cd91d1e7e6daa761f79060835aa534c5671264 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6467460 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 408f5853 2025-04-04T00:00:00 Make gl::Version data members private * Further simplified gl::Version implementation by making data members private and merging them. * Used proper version struct comparisons instead of accessing individual version components. * Moved known version constants to Version.h for broader availability. * Removed no longer used helpers: * PrivateState::getClientMinorVersion() * State::getClientMinorVersion() * Context::getClientMinorVersion() Bug: angleproject:408843436 Change-Id: I3ae8f495269d649253fa2381ecbfc018a184fa20 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6460787 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Alexey Knyazev 96628296 2025-04-04T00:00:00 Fix GL_OES_texture_3D entry points validation * Added missing checks to the extension entry points to generate proper error messages. * Ensured that the extension entry points are invalid on unextended OpenGL ES 3.x contexts. * Fixed invalid usage of the extension entry points in PLS tests. Fixed: angleproject:409959473 Change-Id: If579e6171751dea1049e1ed85020f485d1e9deb2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6449807 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev cb60429d 2025-04-04T00:00:00 Fix BlitFramebuffer entry point validation * Fixed validation for BlitFramebufferNV and BlitFramebuffer (ES 3.0). * Updated tests. Fixed: angleproject:409579363 Change-Id: I11ef69433a5ae947c0deb069bd0abfa0144e9661 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6444471 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev cbd6cdc9 2025-03-28T00:00:00 Ensure CopyTexImageParameters validation consistency * Validation must succeed for no-op commands. * Moved no-op conditions handling to the Context. Bug: angleproject:406922380 Change-Id: I9102955198b755844d05c0c4f07832664ff24100 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6439412 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton 0f356a34 2025-04-02T14:14:43 Update invalidation commands to disable PLS Previously, commands that flush or invalidate tiled memory were specified to generate an error if issued while PLS was active. Remove all provisions around Flush(), Finish() and ClientWaitSync(), and add a test to ensure these commands have no effect on PLS. The reason we can make this change now is because we no longer support EXT_shader_pixel_local_storage, which previously prevented us from allowing these 3 commands. Update the invalidation commands to disable PLS instead. This is more in line with the general design pattern of PLS. Update the wording of the spec to reflect this better organization. Also clean up some legacy code that was no longer used. Bug: angleproject:40096838 Change-Id: I9687deaf17a583f8757ffcd050eda154b4e7a949 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6427324 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Alexey Knyazev 84056594 2025-03-28T00:00:00 Ensure ValidateCopyTextureCHROMIUM consistency Moved ValidImageSizeParameters out of IsValidCopyTextureDestinationLevel to not generate two errors for a single command call. Bug: angleproject:406922380 Change-Id: Ie96e1c51743d5973f258a49aa2613d72b47e1bfb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6433915 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 01d1c7b4 2025-03-28T00:00:00 Ensure EXT_debug_marker validation consistency * Moved no-op conditions handling to the Context. * Removed redundant comments. Bug: angleproject:406922380 Change-Id: I1064312b2e5940d6b97c95f22544bbc9749fc1ec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6433224 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 1f77aa6b 2025-03-28T00:00:00 Align GetValidShader and GetValidProgram usage * Added comments and made the error condition more obvious at all call sites. * Ensured that only one error is generated by GetActiveUniform, GetAttribLocation, and ProgramUniform* entry points. Bug: angleproject:406922380 Change-Id: I26244b86b44749488dd63b538a2e7f94873a87b7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6430029 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev eb52b568 2025-03-28T00:00:00 Remove unsupported 1D and DSA entry points OpenGL ES does not support 1D textures, removed TexStorage1DEXT. OpenGL ES does not support DSA, removed EGLImageTargetTextureStorageEXT. Added an explicit command blocklist. Added hashes for *_vulkan_secondaries_* def files. Fixed: angleproject:407932145 Change-Id: Iec34fa475f34a0fa832a49223c51ff1f87b1915d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6426049 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev f56c8e02 2025-03-28T00:00:00 Fix & cleanup advanced blend equations support * Made advanced blend equation extensions enableable to facilitate better testing. * Made initial BLEND_ADVANCED_COHERENT state to be unconditionally true regardless of the extension support. If the coherent extension is unsupported, that state must not be observable anyway. * Ensured that advanced blend equation functionality is supported on unextended OpenGL ES 3.2 contexts. * Removed redundant ES 2.0+ context version checks because these extensions must never be enabled on ES 1.x contexts. * Fixed ValidateBlendBarrierKHR to set the correct error code and properly mark invalid calls. * Added more negative test cases and enabled tests on OpenGL ES 3.0 contexts. Bug: angleproject:42262258 Bug: angleproject:406922380 Change-Id: I709376ad40b09972a31a691ca3813e87dd2c8165 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6421857 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev eec873ed 2025-03-28T00:00:00 Fix FramebufferTexture2DMultisampleEXT validation Generate an error when the samples value is negative. Bug: angleproject:406922380 Change-Id: I508f3ddf82e30291fdcc3086ab19ebfa4f84947c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6421716 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 64dc6096 2025-03-28T00:00:00 Ensure ValidateDelete{Program|Shader} consistency Deleting program zero is valid. Deleting shader zero is valid. Bug: angleproject:406922380 Change-Id: I2a26be8200585fae3a70c0a904be96ff590ebe7b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6409251 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 05d15800 2025-03-28T00:00:00 Ensure ValidatePixelStorei consistency Added missing return and frontend assertion for the GL_PACK_REVERSE_ROW_ORDER_ANGLE parameter. Covered by WebGLCompatibilityTest.EnablePackReverseRowOrderExtension Bug: angleproject:406922380 Change-Id: Iafa7646c0429d1269315e1003fac98d61231af55 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6409831 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Robic Sun 1b494f3d 2025-03-11T19:40:51 Add validation of null pointers for certain APIs Bug: angleproject:397315932 Change-Id: I1b4758e326efd2e28d5a4f589c7b156065594911 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6342394 Auto-Submit: Robic Sun <Robic.Sun@arm.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Chris Dalton b600a42c 2025-03-13T15:18:40 Remove the PLS allow list All the interactions with render passes have been properly solved now, and there is no longer a need for the allow list. Bug: angleproject:40096838 Change-Id: I0219fb8824820e076c128f10f49c85f0f76270ef Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6355312 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Cody Northrop db48967f 2025-03-05T09:07:10 Reland "Add GL_BGRA_EXT as a sized renderable format" This reverts commit 4bfb9da6f98b3e28905cc759a77bff750dfe3ff7. Reason for revert: More mapping fixes for GL backend Original change's description: > Revert "Reland "Add GL_BGRA_EXT as a sized renderable format"" > > This reverts commit 8f2fbbd1a0d16471596afad57c88f950a1ee3032. > > Reason for revert: http://anglebug.com/399913714 > > Original change's description: > > Reland "Add GL_BGRA_EXT as a sized renderable format" > > > > This reverts commit 22dfe435daa7c680c07bb8d4f1d98ab765e60ad0. > > > > Reason for revert: Fixed mapping back to BGRA_EXT for GL backend > > > > Original change's description: > > > Revert "Add GL_BGRA_EXT as a sized renderable format" > > > > > > This reverts commit 80093a7d8f850c3ab551ddb4972c2f1f27511433. > > > > > > Reason for revert: suspect for blocking rolling ANGLE into Chroimum > > > https://chromium-review.googlesource.com/c/chromium/src/+/6283973 > > > https://ci.chromium.org/ui/p/chromium/builders/try/chromeos-amd64-generic-rel-gtest/372754/overview > > > > > > Original change's description: > > > > Add GL_BGRA_EXT as a sized renderable format > > > > > > > > dEQP tests were updated to cover GL_BGRA_EXT as a sized renderable > > > > format. It was apparently always supposed to be, based on the > > > > wording of the spec. > > > > > > > > This CL adds that support and updates expectations, along with a few > > > > extra tests. > > > > > > > > Includes contributions from Robic.Sun@arm.com. > > > > > > > > Test: angle_end2end_tests, angle_deqp_*_tests > > > > Bug: b/42267264 > > > > Bug: angleproject:394384906 > > > > Change-Id: Ia10bcd61f66c5d99a3d27a2cfd6008c991ddcaa7 > > > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6235444 > > > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > > > Commit-Queue: Cody Northrop <cnorthrop@google.com> > > > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > > > > > Bug: b/42267264 > > > Bug: angleproject:394384906 > > > Change-Id: I64572361cfed33b4ea17eabf278f580471d045c2 > > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6285628 > > > Auto-Submit: Yuly Novikov <ynovikov@chromium.org> > > > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> > > > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > > > Bug: b/42267264 > > Bug: angleproject:394384906 > > Change-Id: I1bd9df904d93fd54286cbfce53fe89db89e842b9 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6310699 > > Commit-Queue: Cody Northrop <cnorthrop@google.com> > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > Bug: b/42267264 > Bug: angleproject:394384906 > Bug: angleproject:399913714 > Change-Id: I9f79f39a6d9cba3b23c261005bc3e012d70cd1cf > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6312977 > Auto-Submit: Cody Northrop <cnorthrop@google.com> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bug: b/42267264 Bug: angleproject:394384906 Bug: angleproject:399913714 Change-Id: Ifc98fcbb0883dc4a55ad358825e9c1935fa26eaa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6330036 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Chris Dalton 1ead4cbd 2025-03-07T09:49:21 Allow texture modification commands while PLS is active Just do a little extra validation and bounce modifications if they would modify an active PLS plane. Bug: angleproject:40096838 Change-Id: I6f27951f5d0ef5dfaf23b5a005a2d94a749e2c4f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6337703 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Xinyu Fang f1a29079 2025-02-27T16:47:17 Add validation of invalid parameters for certain APIs The list of modified validation APIs: - ValidatePixelPack - ValidateDebugMessageControlKHR Bug: angleproject:399412222 Change-Id: I07a5603431db6b0f89139fdd21d2d0a050b30027 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6307365 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Xinyu Fang <xinyu.fang@arm.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton 6c2737be 2025-03-06T13:09:44 Allow RASTERIZER_DISCARD while PLS is active Writes to pixel local storage can just be discarded as normal. The only special interaction we need is that BeginPixelLocalStorageANGLE always clears the PLS attachments, even if RASTERIZER_DISCARD is enabled. Bug: angleproject:40096838 Change-Id: I43d00af96b287134d73f08802cea58694fe7d717 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6332026 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop 4bfb9da6 2025-02-28T12:49:28 Revert "Reland "Add GL_BGRA_EXT as a sized renderable format"" This reverts commit 8f2fbbd1a0d16471596afad57c88f950a1ee3032. Reason for revert: http://anglebug.com/399913714 Original change's description: > Reland "Add GL_BGRA_EXT as a sized renderable format" > > This reverts commit 22dfe435daa7c680c07bb8d4f1d98ab765e60ad0. > > Reason for revert: Fixed mapping back to BGRA_EXT for GL backend > > Original change's description: > > Revert "Add GL_BGRA_EXT as a sized renderable format" > > > > This reverts commit 80093a7d8f850c3ab551ddb4972c2f1f27511433. > > > > Reason for revert: suspect for blocking rolling ANGLE into Chroimum > > https://chromium-review.googlesource.com/c/chromium/src/+/6283973 > > https://ci.chromium.org/ui/p/chromium/builders/try/chromeos-amd64-generic-rel-gtest/372754/overview > > > > Original change's description: > > > Add GL_BGRA_EXT as a sized renderable format > > > > > > dEQP tests were updated to cover GL_BGRA_EXT as a sized renderable > > > format. It was apparently always supposed to be, based on the > > > wording of the spec. > > > > > > This CL adds that support and updates expectations, along with a few > > > extra tests. > > > > > > Includes contributions from Robic.Sun@arm.com. > > > > > > Test: angle_end2end_tests, angle_deqp_*_tests > > > Bug: b/42267264 > > > Bug: angleproject:394384906 > > > Change-Id: Ia10bcd61f66c5d99a3d27a2cfd6008c991ddcaa7 > > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6235444 > > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > > Commit-Queue: Cody Northrop <cnorthrop@google.com> > > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > > > Bug: b/42267264 > > Bug: angleproject:394384906 > > Change-Id: I64572361cfed33b4ea17eabf278f580471d045c2 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6285628 > > Auto-Submit: Yuly Novikov <ynovikov@chromium.org> > > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> > > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > Bug: b/42267264 > Bug: angleproject:394384906 > Change-Id: I1bd9df904d93fd54286cbfce53fe89db89e842b9 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6310699 > Commit-Queue: Cody Northrop <cnorthrop@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: b/42267264 Bug: angleproject:394384906 Bug: angleproject:399913714 Change-Id: I9f79f39a6d9cba3b23c261005bc3e012d70cd1cf No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6312977 Auto-Submit: Cody Northrop <cnorthrop@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Xinyu Fang e914b53d 2025-02-18T17:13:08 Add validation of null pointers for certain APIs Bug: angleproject:397315932 Change-Id: I3b253a7ca0bbdf4fd55cf67943971426d825cd24 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6275697 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Cody Northrop 8f2fbbd1 2025-02-27T13:33:06 Reland "Add GL_BGRA_EXT as a sized renderable format" This reverts commit 22dfe435daa7c680c07bb8d4f1d98ab765e60ad0. Reason for revert: Fixed mapping back to BGRA_EXT for GL backend Original change's description: > Revert "Add GL_BGRA_EXT as a sized renderable format" > > This reverts commit 80093a7d8f850c3ab551ddb4972c2f1f27511433. > > Reason for revert: suspect for blocking rolling ANGLE into Chroimum > https://chromium-review.googlesource.com/c/chromium/src/+/6283973 > https://ci.chromium.org/ui/p/chromium/builders/try/chromeos-amd64-generic-rel-gtest/372754/overview > > Original change's description: > > Add GL_BGRA_EXT as a sized renderable format > > > > dEQP tests were updated to cover GL_BGRA_EXT as a sized renderable > > format. It was apparently always supposed to be, based on the > > wording of the spec. > > > > This CL adds that support and updates expectations, along with a few > > extra tests. > > > > Includes contributions from Robic.Sun@arm.com. > > > > Test: angle_end2end_tests, angle_deqp_*_tests > > Bug: b/42267264 > > Bug: angleproject:394384906 > > Change-Id: Ia10bcd61f66c5d99a3d27a2cfd6008c991ddcaa7 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6235444 > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > Commit-Queue: Cody Northrop <cnorthrop@google.com> > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > Bug: b/42267264 > Bug: angleproject:394384906 > Change-Id: I64572361cfed33b4ea17eabf278f580471d045c2 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6285628 > Auto-Submit: Yuly Novikov <ynovikov@chromium.org> > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: b/42267264 Bug: angleproject:394384906 Change-Id: I1bd9df904d93fd54286cbfce53fe89db89e842b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6310699 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuly Novikov 22dfe435 2025-02-20T06:46:07 Revert "Add GL_BGRA_EXT as a sized renderable format" This reverts commit 80093a7d8f850c3ab551ddb4972c2f1f27511433. Reason for revert: suspect for blocking rolling ANGLE into Chroimum https://chromium-review.googlesource.com/c/chromium/src/+/6283973 https://ci.chromium.org/ui/p/chromium/builders/try/chromeos-amd64-generic-rel-gtest/372754/overview Original change's description: > Add GL_BGRA_EXT as a sized renderable format > > dEQP tests were updated to cover GL_BGRA_EXT as a sized renderable > format. It was apparently always supposed to be, based on the > wording of the spec. > > This CL adds that support and updates expectations, along with a few > extra tests. > > Includes contributions from Robic.Sun@arm.com. > > Test: angle_end2end_tests, angle_deqp_*_tests > Bug: b/42267264 > Bug: angleproject:394384906 > Change-Id: Ia10bcd61f66c5d99a3d27a2cfd6008c991ddcaa7 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6235444 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Cody Northrop <cnorthrop@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: b/42267264 Bug: angleproject:394384906 Change-Id: I64572361cfed33b4ea17eabf278f580471d045c2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6285628 Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop 80093a7d 2025-02-03T08:50:21 Add GL_BGRA_EXT as a sized renderable format dEQP tests were updated to cover GL_BGRA_EXT as a sized renderable format. It was apparently always supposed to be, based on the wording of the spec. This CL adds that support and updates expectations, along with a few extra tests. Includes contributions from Robic.Sun@arm.com. Test: angle_end2end_tests, angle_deqp_*_tests Bug: b/42267264 Bug: angleproject:394384906 Change-Id: Ia10bcd61f66c5d99a3d27a2cfd6008c991ddcaa7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6235444 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Kimmo Kinnunen 82e25a32 2025-02-03T15:07:33 Make all " < 0" error messages consistent Use the form: Error is due to reason: <error message> Bug: angleproject:392938089 Change-Id: I9e72858cf76a46ab874ffc211afdae1eb93ca05d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6225600 Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Roman Lavrov 0afc3323 2025-01-21T12:46:28 Add fast path to ValidCap for most frequent cases glEnable/Disable are commonly called with the ones that are now on the fast path. GL_POLYGON_OFFSET_FILL seems slightly less common but still frequent enough to be inlined. This noticeably reduces the number of function calls in DO2 trace as well as branch predictor load (confirmed by cpu counter stats from a mobile device), and just this change appears to improve wall_time a bit. Bug: b/383305597 Change-Id: I8fa42de64d79f6638b312891f440d796dd95c57c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6184086 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 6e813222 2025-01-06T10:48:58 Inline other trivial forwarding validation calls Following Shabi's comment on https://crrev.com/c/6108030 Otherwise these end up as actual "trampoline" function calls Bug: b/383305597 Change-Id: Ie1e7f57d6b630736aa8de914ba4abe3c2d5ee09d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6148833 Auto-Submit: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov 195c3a20 2024-12-19T19:09:38 Inline non-PPO getActiveLinkedProgram and ValidateUniform1-4* The non-PPO part of getActiveLinkedProgram is small, and ValidateUniform1-4* are just a single call to ValidateUniform, and end up an actual function call due to being located in a different translation unit (validationES.cpp vs validationES2.cpp) Estimated 0.5-1% improvement to driver_overhead_2 wall_time on pixel 8 Bug: b/383305597 Change-Id: I256bf11952f36bbd5033f191df19aa293dbeefdf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6108030 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Panfeng Hou a504b6a2 2024-11-25T15:59:05 Support GL_OES_required_internalformat Enable GL_OES_required_internalformat GLES extension. Bug: angleproject:364069034 Change-Id: Ia57548469abff189472aa20b13ca99179c45f2c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6038448 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Panfeng Hou <panfeng.hou@arm.com>
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>
Chris Dalton 7070a9e9 2024-11-20T00:21:16 Remove draw buffer validation clauses from PLS It was cumbersome to implement all this validation browser side for WebGL. Rather than making it an error to update blend and color mask on reserved PLS draw buffers, glBeginPixelLocalStorageANGLE() can just implicitly disable blend, and enable the color mask on overridden draw buffers. Later calls to enable blend or change the color mask on overridden planes are silently ignored until glEndPixelLocalStorageANGLE(). Bug: angleproject:40096838 Change-Id: Ic7e1c5113e7d3fad3b80d0178075df646540d743 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6045421 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Alexey Knyazev a3452c24 2024-11-14T00:00:00 Fix SAMPLE_MASK toggle validation The SAMPLE_MASK enum must be accepted when ANGLE_texture_multisample is enabled. Bug: angleproject:380291919 Change-Id: I6aeb11dfbb65e6c05e493d1053679c7547c009c9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6039158 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mavis Deng 68ba532b 2024-10-09T14:38:01 Add validation for ObjectLabel The validation of ObjectLabel is empty. Move the validation in ValidateObjectLabelKHR to a new ValidateObjectLabelBase (except the extension check), and make ValidateObjectLabel and ValidateObjectLabelKHR both call ValidateObjectLabelBase after the version/extension check. An end2end test is added Bug: angleproject:360903471 Change-Id: Iabfd3c16c5423b2ab2fe5e417fe75eed00237c92 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5919129 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 166b72c9 2024-09-30T19:07:26 GL_ANGLE_blob_cache implementation. Bug: chromium:370538323 Change-Id: Ic51a951e78b48b315e36f518bcc39ff2d54660a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5900761 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 492cf265 2024-09-27T13:44:22 Stubs for GL_blob_cache_angle Bug: chromium:370538323 Change-Id: Ib56b28c24305db8931f382b16a24975b7277fa7e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5900760 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi a1dea207 2024-06-13T11:40:39 Implement KHR_blend_equation_advanced_coherent * Updated the validation for glBlendBarrier() and ~KHR(). * GL state now includes mBlendAdvancedCoherent. * Updated glEnable() to accept GL_BLEND_ADVANCED_COHERENT_KHR. * It can be queried via glGetIntegerv(), etc. * EXTENDED_DIRTY_BIT_BLEND_ADVANCED_COHERENT added. * Added a corresponding bit to ExternalContextState. * If coherence is supported, there should be no need to use blend barriers, as, based on the spec, the advanced blend ops should then follow order like the basic blend ops. * Relevant tests: *GLES31.functional.blend_equation_advanced.coherent* * On Linux/NVIDIA: From "Not supported" to "Passed" Bug: angleproject:42262258 Change-Id: I7e0e43bdc71524eec111c2d3b024fe73c9795e55 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5634381 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Geoff Lang <geofflang@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>
Alexey Knyazev 147ba459 2024-05-30T00:00:00 Allow polygonMode* commands with active PLS Drive-by: * Test that polygonOffsetClampEXT is allowed when PLS is active. Fixed: angleproject:345253437 Change-Id: I5d9f60b3e70eaf8da19017a8b9d6c2592cb4f4f8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5601849 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev ceb3c0e1 2024-03-28T00:00:00 Remove redundant AND from ValidateClear Component types of disabled draw buffers are already set to zero. Bug: angleproject:8618 Change-Id: I193dc6249158c6314076fedc7b4f43261d81f074 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5419708 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@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>
Geoff Lang e489dac0 2024-02-02T13:52:47 Allow BGRA -> RGBA for glCopyTex[Sub]Image The opposite RGBA->BGRA was already allowed for handling platform- specific default framebuffers. This allows the copying a IOSurface- backed framebuffers to RGBA textures. Bug: chromium:1523778 Change-Id: I124a4acc8c8fcdd1d3aae861d756d17022c4b4cc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5254778 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@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 fb6b960c 2023-11-27T14:24:28 Remove GL_CHROMIUM_texture_filtering_hint This was using an unregistered Vulkan extension to set the precision of SwiftShader's internal filtering for the sake of Chrome. That's baked in at build instead. Bug: angleproject:8349 Bug: chromium:726075 Change-Id: I12849d2d29d99626f22a92ee9d74366f78658476 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5063344 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
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>
Christopher Cameron a1e3abc0 2023-09-22T10:14:43 Add ES2 support for copying GL_SRGB8_ALPHA8 to GL_RGBA8 Bug: angleproject:7907 Change-Id: I02ae9785ea1f942e85983c18155cfd75ec39b5c2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4887271 Commit-Queue: ccameron chromium <ccameron@chromium.org> Reviewed-by: Geoff Lang <geofflang@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 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>
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>
Shahbaz Youssefi fd80ef86 2023-07-12T13:35:44 Remove redundant mip-level-size validation The ValidImageSizeParameters function already calls ValidMipLevel. The few places that called ValidMipLevels are fixed not to redundantly do so. Bug: angleproject:8224 Change-Id: I8e0745edb68be97a6903d7801560212cc53d0d6c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678285 Reviewed-by: Roman Lavrov <romanl@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Chris Dalton 7aadc962 2023-05-05T19:28:17 Ban transform feedback and blend extensions with PLS Transform feedback can lead to render pass breaks in the Vulkan backend. EXT_blend_func_extended may restrict the number of draw buffers depending on API state, which can invalidate a PLS implementation. KHR_blend_equation_advanced does not allow multiple draw buffers, which is required by some PLS implementations. Bug: angleproject:7279 Change-Id: Id89f0e485ee65f55d802b121018f13b0028d8029 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4510716 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Alexey Knyazev 73f9cf00 2023-03-31T00:00:00 GL: Implement polygon mode extensions * Implemented polygon mode extensions on the OpenGL backend * Supported capture and serialization of the new commands and state * Added PolygonModeTest end2end tests Bug: angleproject:1791 Bug: angleproject:8132 Change-Id: I3bc08546a02f110dd739950129bee25ccc507bf6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4492683 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton ef20f191 2023-03-29T14:05:04 Make the PLS allow list more permissive Allow ClipControlEXT, FlushMappedBufferRange, Gen*, PolygonOffset*, ProvokingVertexANGLE, and KHR_debug commands. Allow caps DEPTH_CLAMP_EXT, CLIP_DISTANCE[0..7]_EXT. Ban indexed caps besides BLEND, SCISSOR_TEST, SCISSOR_TEST_EXCLUSIVE_NV. Clarify that the index restrictions on indexed caps only apply to BLEND. Bug: chromium:1421437 Change-Id: Ibdb0acaebfa992ad37c928481d5ecb10496f22e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4382502 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Alexey Knyazev e809e7bd 2023-03-13T00:00:00 Reland "Implement EXT_depth_clamp" This is a reland of commit f8c1418319ac2aef4b3101e322005b1d0f73120f Host GPU bugs are observable in iOS Simulator Original change's description: > Implement EXT_depth_clamp > > * Added depthClamp to the RasterizerState > * Added DepthWriteTest end2end tests covering > both clipped and clamped depth writes > > Capture > * Updated serialized rasterizer state > * Updated CaptureMidExecutionSetup > > OpenGL > * Requires GL 3.2 or ARB_depth_clamp > on desktop contexts > * Maps to EXT_depth_clamp on ES > > D3D11 > * Maps to the opposite of > D3D11_RASTERIZER_DESC.DepthClipEnable > * The new tests uncover several edge cases where > a workaround is needed to implement unextended > OpenGL semantics on top of D3D > > Metal > * Maps to the setDepthClipMode command > > Bug: angleproject:8047 > Bug: angleproject:8077 > Change-Id: I1b3448e5b84443e4be18af9bc22d2f8495ac8267 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4347753 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Bug: angleproject:8047 Bug: angleproject:8077 Change-Id: I8c5f8304276c97c51b2c3382cd2764592ee0c3fe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4349938 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Mohan Maiya 07074968 2023-03-17T19:13:39 Validate gl[Push,Pop]DebugGroup Bug: angleproject:8089 Test: DebugTestES32.DebugGroup* Change-Id: I3a20822a072cea8f4a8a58445917a4ebb86db9da Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4350852 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxin Hu 4a77b0f5 2023-03-18T00:16:24 Revert "Implement EXT_depth_clamp" This reverts commit f8c1418319ac2aef4b3101e322005b1d0f73120f. Reason for revert: This change breaks angle_end2end_tests on Metal backend: https://ci.chromium.org/ui/p/chromium/builders/ci/ios-angle-intel/26035/overview Original change's description: > Implement EXT_depth_clamp > > * Added depthClamp to the RasterizerState > * Added DepthWriteTest end2end tests covering > both clipped and clamped depth writes > > Capture > * Updated serialized rasterizer state > * Updated CaptureMidExecutionSetup > > OpenGL > * Requires GL 3.2 or ARB_depth_clamp > on desktop contexts > * Maps to EXT_depth_clamp on ES > > D3D11 > * Maps to the opposite of > D3D11_RASTERIZER_DESC.DepthClipEnable > * The new tests uncover several edge cases where > a workaround is needed to implement unextended > OpenGL semantics on top of D3D > > Metal > * Maps to the setDepthClipMode command > > Bug: angleproject:8047 > Bug: angleproject:8077 > Change-Id: I1b3448e5b84443e4be18af9bc22d2f8495ac8267 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4347753 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Bug: angleproject:8047 Bug: angleproject:8077 Change-Id: I829add68c006c72b7b4acf03aee3efa8a9a16fac No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4350876 Reviewed-by: Alexis Hétu <sugoi@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Alexey Knyazev f8c14183 2023-03-13T00:00:00 Implement EXT_depth_clamp * Added depthClamp to the RasterizerState * Added DepthWriteTest end2end tests covering both clipped and clamped depth writes Capture * Updated serialized rasterizer state * Updated CaptureMidExecutionSetup OpenGL * Requires GL 3.2 or ARB_depth_clamp on desktop contexts * Maps to EXT_depth_clamp on ES D3D11 * Maps to the opposite of D3D11_RASTERIZER_DESC.DepthClipEnable * The new tests uncover several edge cases where a workaround is needed to implement unextended OpenGL semantics on top of D3D Metal * Maps to the setDepthClipMode command Bug: angleproject:8047 Bug: angleproject:8077 Change-Id: I1b3448e5b84443e4be18af9bc22d2f8495ac8267 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4347753 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 815a4aae 2023-03-01T00:00:00 Fix stencil format exposure * Removed invalid STENCIL format table entry * Removed incorrect OpenGL ES 2.0 validation * Removed obsolete end2end test suppressions * Hid GL_OES_texture_stencil8 from ES 2.0 contexts * Marked unsized STENCIL_INDEX as never texturable * Marked unsized STENCIL_INDEX as never renderable Bug: angleproject:3231 Fixed: angleproject:5136 Change-Id: I3f2cb8240344db410773b6a5bde460a43eb32a2e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4307120 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Cody Northrop 1148a662 2023-02-15T08:25:51 Update GL_ARM_shader_framebuffer_fetch token support These were missed during initial implementation because the target app doesn't use them, and there are no tests for vendor extensions. The implementation is basically a noop, but allows setting and querying state, unblocking apps. Also add a test that has basic usage. Test: FramebufferFetchES31.BasicTokenUsage_ARM Bug: b/269233744 Bug: angleproject:8025 Change-Id: Ic107150d4afd9c4c4984c58a1dafb1c18e608997 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4255965 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Mohan Maiya 1d9b8d80 2023-01-24T16:50:32 Reland "Add support for glShaderBinary" This is a reland of commit 228973e73135924ddf6116e0b63eff5a1ccbf232 with the following fixes - 1. Apply patch from Yuly to fix chromium build errors 2. Fix ShaderBinaryTest instantiation call 3. Add ShaderBinaryTest to expectations file for IOS Original change's description: > Add support for glShaderBinary > > This patch adds the following - > 1. ANGLE_shader_binary extension and GL_SHADER_BINARY_ANGLE token. > 2. Compiler support to generate shader binaries. > 3. Update compiler to use SH_SPIRV_VULKAN_OUTPUT as output type for > Vulkan translator. > 4. Support to load GL_SHADER_BINARY_ANGLE binaries. > 5. end2end tests for glShaderBinary. > > Tests: ShaderBinaryTest* > Bug: angleproject:7833 > Change-Id: I191d5ba7c4d5304696f5e743c851dc945fa57858 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4137306 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: mohan maiya <m.maiya@samsung.com> > Reviewed-by: Charlie Lao <cclao@google.com> Bug: angleproject:7833 Change-Id: I21135c52e2bae955342a99aff5631ba0e687eff1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4195852 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Yuly Novikov 0c9cbf39 2023-01-26T12:07:51 Revert "Add support for glShaderBinary" This reverts commit 228973e73135924ddf6116e0b63eff5a1ccbf232. Reason for revert: breaks compile on ANGLE into Chromium roll https://cr-buildbucket.appspot.com/build/8790942326644064097 https://cr-buildbucket.appspot.com/build/8790942759045412865 https://cr-buildbucket.appspot.com/build/8790942417069789217 Leaks detected on ASAN https://cr-buildbucket.appspot.com/build/8790946657703508337 Original change's description: > Add support for glShaderBinary > > This patch adds the following - > 1. ANGLE_shader_binary extension and GL_SHADER_BINARY_ANGLE token. > 2. Compiler support to generate shader binaries. > 3. Update compiler to use SH_SPIRV_VULKAN_OUTPUT as output type for > Vulkan translator. > 4. Support to load GL_SHADER_BINARY_ANGLE binaries. > 5. end2end tests for glShaderBinary. > > Tests: ShaderBinaryTest* > Bug: angleproject:7833 > Change-Id: I191d5ba7c4d5304696f5e743c851dc945fa57858 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4137306 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: mohan maiya <m.maiya@samsung.com> > Reviewed-by: Charlie Lao <cclao@google.com> Bug: angleproject:7833 Change-Id: Ice19576acbc1351810ff0cd769ac17ad6c0abdf3 No-Try: true No-Presubmit: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4197375 Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Mohan Maiya 228973e7 2023-01-24T16:50:32 Add support for glShaderBinary This patch adds the following - 1. ANGLE_shader_binary extension and GL_SHADER_BINARY_ANGLE token. 2. Compiler support to generate shader binaries. 3. Update compiler to use SH_SPIRV_VULKAN_OUTPUT as output type for Vulkan translator. 4. Support to load GL_SHADER_BINARY_ANGLE binaries. 5. end2end tests for glShaderBinary. Tests: ShaderBinaryTest* Bug: angleproject:7833 Change-Id: I191d5ba7c4d5304696f5e743c851dc945fa57858 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4137306 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com>
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 067ace47 2022-12-21T00:00:00 Add ANGLE_clip_cull_distance extension Added an extension spec. Trivially exposed it on GL, Vulkan, and D3D11. Adjusted tests and validation to allow no cull distance support for this extension string. Removed extra built-in variable definitions. Bug: angleproject:7904 Change-Id: Ic60772dfe28132c316eaa29aadc1afd66e3b0fa7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4114290 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 27727e50 2022-11-21T00:00:00 Fix ProvokingVertex typos Aligned the parameter name with the upstream specs Moved ValidateProvokingVertexANGLE to validationESEXT.cpp Bug: angleproject:2829 Change-Id: I820a90c20ef0a1873640c933b1de52526cac7e70 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4043701 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
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>
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>
Solti b9df3551 2022-08-15T17:42:53 update CopyTextureCHROMIUM to match Chromium Overview: This CL makes the validation of *CopyTextureCHROMIUM* and *CopySubTextureCHROMIUM* in ANGLE behave consistently with CHROMIUM. The new behavior is: ``` INVALID_OPERATION is generated on ES 2.0 if <sourceId> refers to an external texture (OES_EGL_image_external), <destId> refers to a texture with an integer-type internal format, and the underlying context does not support OES_EGL_image_external_essl3. ``` Tests: ===== CopyTextureCHROMIUM ===== add a test in ES 2.0 to test the API with the error case. ===== CopySubTextureCHROMIUM ===== add a test in ES 3.0 to test the error case. in ES 2.0, the error case cannot happen because "glTexImage2D()" doesn't support integer formats - ran all CopyTextureTest on gLinux: ```autoninja -C out/Debug && xvfb-run out/Debug/angle_end2end_tests --gtest_filter=*CopyTextureTest* --verbose``` - ran all CopyTextureTest on Android test phone: ```autoninja -C out/Android && out/Android/angle_end2end_tests --gtest_filter=*CopyTextureTest* --verbose``` Bug: angleproject:4228 Change-Id: I1cb77c72750add5f399013d3d30eed7acf8d0a50 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3826166 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Solti 428b6788 2022-08-15T17:54:27 Update CHROMIUM_copy_texture.txt to match the code [Overview] The internal format list in the code mismatches the one in the spec txt. see the link below for the missing formats in the spec txt: - http://screen/vDkHo3MFXpE3eQF.png Therefore the CL is matching the spec txt to the code. [Test] CQ DRY RUN completed and passed Bug: angleproject:4228 Change-Id: Ib66fb00b65ce2164779ca7649ec0652910a8e467 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3830892 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
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 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>
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>
Geoff Lang c458b5ad 2022-04-01T11:38:17 Fix CheckedNumeric using the wrong type. Validation for glBufferSubData checks that the buffer is large enough for size+offset but verifies they fit in a size_t which is a different type than the deduced type for size+offset on 32-bit systems. Use decltype to ensure that we always verify there is no overflow on the correct type. Bug: chromium:1298867 Change-Id: I82f534b2d227d3273a763e626ebeae068dc918dc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3563515 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Peng Huang 04782d86 2022-04-09T08:26:52 Validate vertex attrib index against caps.maxVertexAttributes Bug: chromium:1258869 Change-Id: I2d2c45b11177b0f6f4785a894c15357515b33e9e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3580577 Auto-Submit: Peng Huang <penghuang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Sergey Ulanov 2ab8f48f 2022-02-04T08:23:09 Allow glCopyTexImage2D from BGRX and RGBX to GL_LUMINANCE glCopyTexImage2D was failing with GL_INVALID_OPERATION when copying from GL_RGBX8_ANGLE buffer to GL_LUMINANCE texture, while it should be supported. Also updated validator to allow copying from RGBX & BGRX to GL_RED_EXT, GL_RG_EXT. Bug: chromium:1269826 Change-Id: I865dcdd46921730968995822d71ba34b39e49262 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3439129 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Peng Huang c48e35b9 2022-02-04T01:44:36 Add more info in BlitFramebuffer error message Bug: chromium:1290638 Change-Id: Id1faab26df2f19b90ec85aff6852334e8fda03ce Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3436326 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@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>