src/libANGLE/validationES.cpp


Log

Author Commit Date CI Message
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 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>
Shahbaz Youssefi d38531e8 2025-07-23T09:39:11 Fix extension check for xfb mode validation With geometry and tessellation shaders, it's possible to use different primitive modes between transform feedback and draw, as long as they are from the same class. The code accidentally allowed this only if both extensions are supported, but it should be allowed if either is. Bug: angleproject:428561247 Change-Id: Ia18d4ac15a3d0739ce18dc0e1f3d3f0b1aea621c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6780744 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Tim Van Patten 6d18ed63 2025-07-08T16:26:53 ValidateGetTexLevelParameterBase: Remove ES 2.0 check This CL addresses review comments in: https://crrev.com/c/6710993 1. Remove the ES_2_0 check for GL_MEMORY_SIZE_ANGLE in ValidateGetTexLevelParameterBase() since the GL_ANGLE_memory_size extension already requires OpenGL ES 2.0, making the version check redundant. 2. Update the test MemorySizeTest.BasicUsageTexture to use the function glGetTexLevelParameterivANGLE() if the context version is below OpenGL ES 3.1 and the extension GL_ANGLE_get_tex_level_parameter is available. Bug: b/409384875 Change-Id: I831d4b35eec20fcb4aff331c5a642a749bd52e67 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6715885 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Tim Van Patten 2e9de3c7 2025-07-07T16:58:18 ValidateGetTexLevelParameterBase: Support GL_MEMORY_SIZE_ANGLE ANGLE supports the extension GL_ANGLE_memory_size, which adds the new parameter GL_MEMORY_SIZE_ANGLE. However, the parameter value is not supported in ValidateGetTexLevelParameterBase(), so any calls using it always fail with GL_INVALID_ENUM. The parameter is supposed to be tested by MemorySizeTest.BasicUsageTexture/*, but the portion of the test validating GL_MEMORY_SIZE_ANGLE is never executed because it requires an OpenGL ES 3.1+ context, but the test is only instantiated for GLES 2.0 and 3.0. Based on all the above: 1. Add support for GL_MEMORY_SIZE_ANGLE to ValidateGetTexLevelParameterBase(), requiring GLES 2.0+ and the extension memorySizeANGLE is enabled. 2. Instantiate MemorySizeTest to run on GLES 2.0, 3.0, 3.1, and 3.2, so the entire test is run on devices that support GLES 3.1+ contexts. Bug: b/409384875 Test: angle_end2end_tests --gtest_filter=MemorySizeTest.* Change-Id: I70c5721c5da18cb8edbc9a7e18038d5d9fb486da Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6710993 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Charlie Lao 2269011c 2025-06-30T14:08:11 Remove BitSet::to_ulong and BitSetArray::to_ulong BitSet::to_ulong() is a bit redundant with bits(), and has a risk of losing upper bits on windows platform where unsigned long is 32 bit. This CL removes the usage of it and replaced with bits(). BitSetArray::to_ulong() method only captures up to 64 bits, all other bits are dropped silently which is wrong. This CL fix this and serialize it as a vector of uint64_t. BitSetArray::to_ulong() is removed in this CL. Bug: angleproject:42264163 Change-Id: I663b2cdacc0e930ee616e333131e831ec124a9d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6691283 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Yuxin Hu 5220e634 2025-06-16T11:14:22 Fix glCopyImageSubData validation check part 2 For compressed texture, we also need to check if the copy subregion starting points (offset) are aligned with the compressed block. This change also moves *FillsEntireMip check to the ValidateCompressedRegion() function, as it is easier to do a per-dimension check. Bug: b/419048313 Bug: angleproject:42264179 Bug: angleproject:42265887 Change-Id: I0f415e575bbc77bdf5178e2b5fc1260c43e7de4b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6648198 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com>
Yuxin Hu 79ec8b34 2025-06-12T14:32:42 Fix glCopyImageSubData validation check When checking if the copy subregion meets the compressed texture alignment requirements, we should consider if the copy subregion covers the entire width and height of texture level. It is not required to make texture size aligned with compressed texture block size when creating the texture image (e.g. width and height do not have to be multiple of 6 when calling glTexStorage2D for GL_COMPRESSED_RGBA_ASTC_6X6 textures). If the copy subregion width and height equals to the width and height of the texture level, even if they are not aligned with the compressed texture block size, the copy is allowed. This is currently covered by fillsEntireMip check. However, fillsEntireMip enforces copy subregion width, height, and depth all equal to the texture level width, height, and depth, where we should not check depth because we don't enforce depth alignment for compressed texture. For example, for a 2D texture array that has dimension of 32*16*2 in current level, a copy region with width=32, heigh=16, depth=1 should be considered as fillsEntireMip. In the spec, it says: "The source and destination subregions must be contained entirely within the specified level of the corresponding image objects". Right now we only check if width and height are within the image bounds, this change adds a check to make sure depth is also within the image bounds. Bug: b/419048313 Change-Id: I6e5339cfdfd5785f935a059638c22c9646c12162 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6634232 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shufen Ma c53c908c 2025-06-11T15:36:48 Refine GetProgramiv validation An INVALID_OPERATION error is generated if TESS_CONTROL_OUTPUT_- VERTICES is queried for a program which has not been linked successfully, or which does not contain objects to form a tessellation control shader. An INVALID_OPERATION error is generated if TESS_GEN_MODE, TESS_GEN_SPACING, TESS_GEN_VERTEX_ORDER, or TESS_GEN_POINT_MODE are queried for a program which has not been linked successfully, or which does not contain objects to form a tessellation evaluation shader. Bug: angleproject:424050946 Change-Id: I9d6110d2783efb21efbcb62d9da7b35590c89f61 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6637010 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Shufen Ma <Shufen.Ma@arm.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Tingwei Guo ef29d42e 2025-05-22T15:52:49 Support ASTC decode mode extensions in ANGLE Added support for GL_EXT_texture_compression_astc_decode_mode and GL_EXT_texture_compression_astc_decode_mode_rgb9e5 in ANGLE. Also added corresponding end-to-end tests for ASTC decode mode queries, including ASTC decode mode queries and rendering with ASTC texture formats with different decode modes on GL_TEXTURE_2D works. Bug: angleproject:419403188 Change-Id: I0f2dced8468c4e25597740d1de346b2f699bb81e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6575285 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 79cef542 2025-05-15T00:00:00 Autogen EGL image extension entry points Bug: angleproject:409484297 Change-Id: I0e4a83c5e902f010a66fefa4fa6cc4169ab5529f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6596617 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 6462880b 2025-05-15T00:00:00 Autogen support checks for query extensions Bug: angleproject:409484297 Change-Id: I91e6b7318c62868e65d48ceb380b7c2d53c447ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6596569 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev 392dc591 2025-05-15T00:00:00 Remove GL_CHROMIUM_sync_query Fixed: angleproject:420627279 Change-Id: I26dac7c55a7cf6b04121658144e1387be65d2569 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6593552 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev 5fd79e6a 2025-05-15T00:00:00 Remove unused parameter from ValidateGetVertexAttribBase Bug: angleproject:409484297 Change-Id: I98fdfe8dbaeb6bc08a0c0a7a4a032850fcbdd37f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6558251 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mavis Deng 30479104 2025-04-28T16:01:46 Add support for GL_EXT_texture_norm16 in glCopyImageSubDataEXT Add the following compatible norm16 formats in EXT_copy_image: RGBA16_EXT RGBA16_SNORM_EXT Bug: angleproject:412517249 Change-Id: I4939705915940dacaf3168acf1a7cc7abb0870ba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6490613 Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Mavis Deng <mavis.deng@arm.com> Commit-Queue: 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>
Mavis Deng 32f3f043 2025-04-28T16:15:15 Return GL_INVALID_ENUM for invalid target of CopyImageSubData From spec: INVALID_ENUM is generated if either srcTarget or dstTarget - is not RENDERBUFFER or a valid non-proxy texture target - is TEXTURE_BUFFER, or - is one of the cubemap face selectors described in table 3.17, if the target does not match the type of the object. Bug: angleproject:412524049 Change-Id: I2110223059db170e8882efc9666654d318b14ed3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6490614 Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Auto-Submit: Mavis Deng <mavis.deng@arm.com> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 8b388145 2025-04-24T00:00:00 Autogen support checks for robust client memory entry points No functional changes. Bug: angleproject:409484297 Change-Id: I9d27f8444b01b7881336ffcf3f480018efbe90e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6519381 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 1c7fa5f8 2025-04-24T00:00:00 Add missing support checks to robust client memory entry points Ensured that implemented RobustANGLE entry points have the same command support checks as their base variants. * ReadnPixelsRobustANGLE requires OpenGL ES 3.2, or any of the robustness extensions. * GetQueryivRobustANGLE requires OpenGL ES 3.0 or any of the query extensions. * GetQueryObjectuivRobustANGLE requires OpenGL ES 3.0 or any of the query extensions. * GetInteger64vRobustANGLE requires OpenGL ES 3.0 or GL_EXT_disjoint_timer_query. * GetBufferParameteri64vRobustANGLE requires OpenGL ES 3.0. * TexImage3DRobustANGLE requires OpenGL ES 3.0 or GL_OES_texture_3D. * TexSubImage3DRobustANGLE requires OpenGL ES 3.0 or GL_OES_texture_3D. Bug: angleproject:410108264 Change-Id: I7bd4b07331a4eaee2b80232a7e54bd7370cee045 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6508731 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: 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 50707ca6 2025-04-18T00:00:00 Remove duplicate validation declarations Removed redundant function declarations and aligned function definitions with the autogenerated declarations. Bug: angleproject:409484297 Change-Id: Ieb49399ff28e64c4e6a84180a3190895f3c08e20 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6491475 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 84e3b8f1 2025-04-18T00:00:00 Fix GetInteger64vRobustANGLE validation * Removed incorrect validation code. * Implemented capture support. * Added a new test. Fixed: angleproject:413595073 Change-Id: Ib84ae410fbd7a18d4a8bbb2545fe2952938088e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6491648 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 4c1c7c08 2025-04-18T00:00:00 Include entry point names in error messages Moved entry point name injection to ErrorSet::validationError to ensure that error messages handled via GL_KHR_debug always contain the corresponding entry point names. Updated affected tests. Fixed: angleproject:412384507 Change-Id: I9e898cadca0634505d70b36dbbb00feedb6c10b2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6480177 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Alexey Knyazev db12f43b 2025-04-04T00:00:00 Autogen context version checks for 3.0 entry points * Added a missing version check for the GetBufferParameteri64v entry point. * The following commands are now rejected on ES 2.0 even if the GL_OES_texture_3D extension is enabled: * CompressedTexImage3D * CompressedTexSubImage3D * CopyTexSubImage3D * TexImage3D * TexSubImage3D Bug: angleproject:409484297 Change-Id: I82374157596fd292efbf67c6bb582eb874348b73 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6469895 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Yuxiang Qian e39bcdc3 2025-04-09T17:26:34 Support GLES query counter bits ANGLE only support query GL_QUERY_COUNTER_BITS_EXT with TIME_ELAPSED_EXT or TIMESTAMP_EXT, but other targets should also be supported. Since the values are stored in 32 bits, we just return 32 for other target. An end2end test is added. Bug: angleproject:409674598 Change-Id: I98941f4dd36ef62c57bcb87475ebb9f626c1bbf9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6437686 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 6e992fa2 2025-03-28T00:00:00 Ensure consistency of context lost aware validation Some commands must generate CONTEXT_LOST but still return a value. Moved error generation to the Context to ensure validation consistency. Bug: angleproject:406922380 Change-Id: Ie5dae39bada951366afb86cab4324f2247c84ab7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6433684 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
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 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 2a4ea88e 2025-03-28T00:00:00 Simplify CopyImageSubData validation * Removed duplicated switch cases. * Reduced the number of enum conversions. * Used correct error message. Bug: angleproject:42262256 Change-Id: If686b5a0a0b29884b6b5c655df130f6ad918a61a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6433680 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 5462a528 2025-04-04T15:12:01 Add "likely" hints to glDrawElements validation ValidateDrawStates in particular is large (almost 3KB assembly), this appears to make a difference in synthetic benchmarks on Android. Bug: b/383305597 Change-Id: I4fd07d7080da70e370947b971e61f6d36c293c42 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6431272 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 6631db11 2025-03-28T00:00:00 Ensure ValidateTexParameterBase consistency Invalid calls must not reach the context. Bug: angleproject:406922380 Change-Id: If514b57409ceebe52182fdb3af3807b4d6236201 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6428766 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Robic Sun 45de9be0 2025-03-27T16:38:28 num_views layout qualifiers are allowed only in vs Bug: angleproject:385038758 Change-Id: I415c9d83b227673f9fbeeb30e8f51d69c34212ef Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6414749 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Robic Sun <Robic.Sun@arm.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Alexey Knyazev c51c1679 2025-03-28T00:00:00 Ensure ValidateEGLImageTargetTexture2D entry point consistency Invalid calls must not reach the context. Bug: angleproject:406922380 Change-Id: Id546e54faac68d1b47b32df701ec00cd6fba1d6d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6419042 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 603fd115 2025-03-28T00:00:00 Ensure ValidateLoseContextCHROMIUM entry point consistency Invalid calls must not reach the context. Bug: angleproject:406922380 Change-Id: I5d0d74ea28ae16efba1bd447f6187a36c05c45c7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6417008 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 4536457b 2025-03-28T00:00:00 Ensure ValidateCompressedTex[Sub]Image*Robust consistency Invalid calls must not reach the context. Bug: angleproject:406922380 Change-Id: I3c3849c08f17fda76f4cf1f2b4ec989d3da81431 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6415818 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 1b34d2a1 2025-03-28T00:00:00 Ensure ValidateUniform* consistency Uniform calls are valid when location is -1 or ignored. Bug: angleproject:406922380 Change-Id: I7f829f7f8a67ba6bac39ff8ee06c7f26c1421417 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6408952 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Xinyu Fang 94e93cb5 2025-03-14T10:24:02 Add validation of type mismatch for glQueryCounterEXT The list of modified validation API: - ValidateQueryCounterEXT Bug: angleproject:403313561 Change-Id: Iff0b5c90417df7c1ae6ecf871892fa5bad7533d3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6355765 Auto-Submit: Xinyu Fang <xinyu.fang@arm.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton 4b39a6a9 2025-03-08T14:16:29 Generate errors for framebuffer invals during PLS Generate GL_INVALID_OPERATION for InvalidateFramebuffer, InvalidateSubFramebuffer, and DiscardFramebufferEXT (and add them to the PLS allow list so we can test the new validation). This is part of a final preparation before deleting the allow list. Bug: angleproject:40096838 Change-Id: If8ffb9c1998ca739798171ae4643a3c9ad3ee049 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6335750 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Chris Dalton 35ffe55c 2025-03-09T15:00:27 Block framebuffer queries on overridden PLS state Generate an error from glGetFramebufferAttachmentParameteriv() when querying a color attachment that has been overridden by PLS. Bug: angleproject:40096838 Change-Id: I83e68c3527f034f9a24822cf4f57789f81b9b6af Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6338390 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Yuxiang Qian e41cbdb5 2025-02-26T17:51:06 Complete the implementation of GL_EXT_buffer_storage Currently, glBufferStorageEXT doesn't set buffer usage to DYNAMIC_DRAW. Also, validation of glGetBufferParameter* misses check for GL_BUFFER_IMMUTABLE_STORAGE_EXT and GL_BUFFER_STORAGE_FLAGS_EXT. This patch fixes these issues. Also, an end2end test is added. Bug: angleproject:399689628 Change-Id: Iecf6bd921f4fff849a5f059adf40043d08edfb7a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6312515 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Aurora Zhang 4fae3323 2025-03-03T14:21:07 ValidateEGLImageObject should not skip 3D EGLImage * Vulkan and GL backends already support 3D EGLImage, so remove related part in ValidatioinEGLImageObject. * Add a new end2end test for 3D EGLImage. Bug: angleproject:399774384 Change-Id: I6c39298a2f2d4c2dded2d6ddd8b98cdb8a22616a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6311581 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Aurora Zhang <Aurora.Zhang@arm.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>
Robic Sun b5584cfd 2025-02-05T15:14:52 ValidTexLevelDestinationTarget should add external related cases GL_TEXTURE_EXTERNAL_OES is not documented in OES_EGL_image_external spec, but we consider that to be an omission in the spec. Bug: angleproject:394380758 Change-Id: Idb5523c173ae0a5910af97639dadff3c5adf9fdf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6232504 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com>
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 f45b9951 2025-01-16T10:05:06 Inline ValidateUniformCommonBase Same way as driver_overhead_2 based PGO does it. It makes sense as the function is small and only has a few callers. This happens to reduce .so size by ~10KB due to ValidateProgramUniform* (ES31) changes: clang no longer inlines ValidateProgramUniformBase into those and it becomes a function call - but a call in the same translation unit instead of a call into ValidateUniformCommonBase in another unit. Seems like we get the same number of calls but better locality. Perf imact difficult to estimate due to effects of section layout changes but I do see an improvement when comparing PGO builds, disabling this optimization for an affected function then re-enabling it with this CL. Bug: b/383305597 Change-Id: Ib76d33d01b165049335e61c007ee79bec53219c5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6175711 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Shufen Ma e510bb61 2025-01-08T09:56:39 Check offset alignment for ReadPixels An INVALID_OPERATION error is generated if a pixel pack buffer object is bound and data is not evenly divisible by the number of basic machine units needed to store in memory the corresponding GL data type from table 8.4 for the type parameter. Bug: angleproject:352963094 Change-Id: I057ed0997313daffbb31d19c94e408b600fce03b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6155815 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Neil Zhang cfe87e34 2024-12-16T16:29:39 Add multisample support for glCopyImageSubDataEXT As GL_TEXTURE_2D_MULTISAMPLE/GL_TEXTURE_2D_MULTISAMPLE_ARRAY been introduced by GLES3.1, glCopyImageSubDataEXT should support those types. Bug: angleproject:381727390 Change-Id: Ib3571ea38dc8d8ceb1bc9ad0c8a6e04d28b0ec33 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6146194 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Kimmo Kinnunen 19ef77a2 2025-01-09T15:37:34 Validate glEGLImageTargetRenderbufferStorageOES renderbuffer glEGLImageTargetRenderbufferStorageOES changes the renderbuffer. Avoid crashing if there is no renderbuffer bound. Bug: angleproject:388616184 Change-Id: I05eacb7a5907d2ca9cde8e91aa7814daa3008c71 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6163503 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shufen Ma a614c8ab 2024-12-10T11:14:29 Check alpha in ColorMask for YUV target ColorMask is used to mask the writing of R, G, B and A values to all active draw buffers. r, g, b, and a indicate whether R, G, B, or A values, respectively, are written or not (a value of TRUE means that the corresponding value is written) except when the color buffer is in YUV color space, in that case setting any one of the r, g, b, and a values as false would generate draw time INVALID_OPERATION error. Bug: angleproject:383174962 Change-Id: I38c2510c307dd8158e71c920986cb497ca923ff9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6083471 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Shufen Ma 2d71fe0d 2024-11-04T14:15:34 Check formats compatibility first in CopyImageSubData validation During validation for CopyImageSubData, first check if the src and dst formats are compatible. Before this patch, the check was put after region checking. If the formats are not compatible, then the block size used during region check is not reasonable. Bug: angleproject:377144455 Change-Id: I3245ae1351e127cb70d0d75d75ca34f0106d12b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5982240 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.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>
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>