src/libANGLE/queryutils.cpp


Log

Author Commit Date CI Message
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 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>
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>
Chris Dalton 292bb458 2025-03-14T12:17:49 Cut MAX_COLOR_ATTACHMENTS_WITH_ACTIVE_PIXEL_LOCAL_STORAGE_ANGLE Since the number of real devices that support framebuffer fetch, but do not support draw_buffers_indexed, is effectively zero, MAX_COLOR_ATTACHMENTS_WITH_ACTIVE_PIXEL_LOCAL_STORAGE_ANGLE is an unnecessary complication. These hypothetical devices can fall back on shader images or just not support pixel local storage at all. This closes the door for WEBGL_shader_pixel_local_storage to ever be implemented on top of the ES2 extension that inspired it all, EXT_shader_pixel_local_storage, but WebGL can just use framebuffer fetch instead, or maybe even EXT_shader_pixel_local_storage2 some day. This dramatically simplifies the WEBGL_shader_pixel_local_storage extension. Bug: angleproject:40096838 Change-Id: I9c51f2ce000620f883cb7917d4e8618c8e9ee803 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6354657 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Yuxiang Qian 44853559 2025-02-25T17:29:54 Correct GLES renderbuffer default values For GLES renderbuffer, the initial value queried for RGBA bits should be 0, and the component type should be GL_NONE according to spec. Correct the default values on ANGLE now. An end2end test is also added. Bug: angleproject:399693196 Change-Id: If8366b3d2350add917054813d3cb9a6a23727da7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6312514 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxiang Qian a1be7e61 2024-11-26T14:39:18 Implement EGL_EXT_surface_compression This patch adds implementation of EGL_EXT_surface_compression to ANGLE, including new API eglQuerySupportedCompressionRatesEXT and adding EGL_SURFACE_COMPRESSION_EXT in EGLQuerySurface and EGLCreateWindowSurface/EGLCreatePlatformWindowSurface. Angle end2end test is added to verify the extension. Bug: angleproject:375496226 Change-Id: I06926930d94485a378fc831d552cf55fe7938a57 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6073355 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Le Hoang Quyen 6bb1bc9b 2024-12-10T16:56:33 Add an extension to report total memory usage of all GL objects Currently the extension will only count GL buffers, textures and render buffers' memory. Fixed: angleproject:383256300 Change-Id: I33ce6fafae8aa5b60071e66366d35dc098e1313b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6084013 Auto-Submit: Quyen Le <lehoangquyen@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
Yuxiang Qian a137d702 2024-10-24T18:24:14 Reland "Delay EGLQueryContext render buffer change" This is a reland of commit 233d9ee5c3525cc8290b3af52385ed59973438b4 Original change's description: > Delay EGLQueryContext render buffer change > > According to the EGL spec, EGL_RENDER_BUFFER of a context > should change after eglSwapBuffers is called if > eglSurfaceAttrib changes. Refine ANGLE implemnetation > to delay the render buffer change. > > Bug: angleproject:375528202 > Change-Id: Ida7736a09e3a83223a529dbfad48e0f952f91a38 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5982241 > Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:375528202 Change-Id: I38330d99a9e6987ad3f97b4a36c34029acb211b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6055500 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
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>
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>
Yuly Novikov 9c7ad319 2024-11-27T13:43:10 Revert "Delay EGLQueryContext render buffer change" This reverts commit 233d9ee5c3525cc8290b3af52385ed59973438b4. Reason for revert: ASSERT triggered on Linux NVIDIA 535.183.01 https://ci.chromium.org/ui/p/angle/builders/ci/linux-exp-test/1469/overview Original change's description: > Delay EGLQueryContext render buffer change > > According to the EGL spec, EGL_RENDER_BUFFER of a context > should change after eglSwapBuffers is called if > eglSurfaceAttrib changes. Refine ANGLE implemnetation > to delay the render buffer change. > > Bug: angleproject:375528202 > Change-Id: Ida7736a09e3a83223a529dbfad48e0f952f91a38 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5982241 > Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:375528202 Change-Id: I08fc76b1b764e57639e2c0708cb155d392f82f22 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6055417 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Yuxiang Qian 233d9ee5 2024-10-24T18:24:14 Delay EGLQueryContext render buffer change According to the EGL spec, EGL_RENDER_BUFFER of a context should change after eglSwapBuffers is called if eglSurfaceAttrib changes. Refine ANGLE implemnetation to delay the render buffer change. Bug: angleproject:375528202 Change-Id: Ida7736a09e3a83223a529dbfad48e0f952f91a38 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5982241 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 52fa6779 2024-11-14T00:00:00 Refactor indexed parameter query validation * Moved indexed parameter validation to queryutils. * Fixed indexed blend state enums being disallowed on unextended OpenGL ES 3.2 contexts. * Replaced redundant validations with assertions. Fixed: angleproject:380291906 Change-Id: I4d5a9c01be5a00cd834504b38a3ddaeb5fa4edb9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6043710 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 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>
Alexey Knyazev 6544daec 2024-11-14T00:00:00 Fix indentation in GetQueryParameterInfo No functional changes. Bug: None Change-Id: I4807dbdb14997cddfc12147f13d9614c429a663f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6041983 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov c4ec8dbb 2024-11-19T17:01:42 Vulkan: Expose EGL_ANDROID_front_buffer_auto_refresh Original CL implemented the functionality without exposing the corresponding extension. This CL exposes the extension on Android and adds necessary validation. Bug: angleproject:42265697 Change-Id: Ia01c68f04c41a850e531aa7b889de9e561f3a9db Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6035186 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi b16d105f 2024-10-03T10:25:32 Remove Desktop GL front-end support For Desktop GL applications, please use Zink! Bug: angleproject:370937467 Change-Id: Ie734634bb62a2e98c80e1b32d8b3d34624da3c04 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5905428 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Amirali Abdolrashidi 04632734 2024-06-20T17:23:27 Add EGL query option for minor version * Added the following: * EGL_CONTEXT_MINOR_VERSION * Added since EGL 1.5 * EGL_CONTEXT_MAJOR_VERSION * Another alias for EGL_CONTEXT_CLIENT_VERSION. * Added unit tests to query major and minor versions. Bug: angleproject:349179609 Change-Id: I99989c0f9f6659995caf9d7987551b97d477f22f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5648675 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
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>
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>
Mohan Maiya 318e5e02 2024-03-24T08:17:56 Vulkan: Update EGL_EXT_buffer_age implementation 1. Buffer age is always 1 when swap behavior is EGL_BUFFER_PRESERVED. 2. WindowSurfaceVk::getBufferAge no longer acquires a swapchain image. See commit: b46cf6989f6fe8db5f0759001f633681a96fadde 3. It is valid to pass attributes of eglQuerySurface API to eglQuerySurface64KHR API 4. Add deadlock fix to eglQuerySurface64KHR Bug: angleproject:3529 Bug: angleproject:6851 Tests: EGLLockSurface3Test.QuerySurfaceAndQuerySurface64Parity* Tests: EGLBufferAgeTest.QueryBufferAge* Change-Id: Idf3c4fc08364f671fb02e99111be2beb7a1d9f3d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5389461 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: 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 0c4d6446 2024-01-24T10:38:45 Rework uniform block <-> uniform buffer mapping In GLES, the shader declares which buffer binding a block (uniform, storage or atomic counter) is bound to. For example: layout(binding = 1) uniform ubo0 { ... }; layout(binding = 2) uniform ubo1 { ... }; layout(binding = 1) uniform ubo2 { ... }; In the above, ubo0 and ubo2 use data from the buffer bound to index 2 (through glBindBufferRange), while ubo1 uses data from the buffer bound to index 1. For uniform blocks in particular, omitting the binding is allowed, in which case it is implicitly bound to buffer 0. GLES allows uniform blocks (and only uniform blocks) to remap their bindings through calls to glUniformBlockBinding. This means that the mapping of uniform blocks in the program (ubo0, ubo1, ubo2) to the buffer bindings is not constant. For storage blocks and atomic counter buffers, this binding _is_ constant and is determined at link time. At link time, the mapping of blocks to buffers is determined based on values specified in the shaders. This info is stored was stored in gl::InterfaceBlock::binding (for UBOs and SSBOs), and gl::AtomicCounterBuffer::binding. For clarity, this change renames these members to ...::inShaderBinding. When glUniformBlockBinding is called, the mapping is updated. Prior to this change, gl::InterfaceBlock::binding was directly updated, trumping the mapping determined at link time. A bug here was that after a call to glProgramBinary, GL expects the mappings to reset to their original link-time values, but instead ANGLE restored the mappings to what was configured at the time the binary was retrieved. This change tracks the uniform block -> buffer binding mapping separately from the link results so that the original values can be restored during glProgramBinary. In the process, the support data structures for tracking this mapping are moved to ProgramExecutable and the algorithms are simplified. Program Pipeline Objects maintain this mapping identically to Programs and no longer require a special and more costly path when a buffer state changes. This change prepares for but does not yet fix the more fundamental bug that the dirty bits are tracked in the program executable instead of the context state, which makes changes not propagate to all contexts correctly. Bug: angleproject:8493 Change-Id: Ib0999f49be24db06ebe9a4917d06b90af899611e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5235883 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 073b6510 2024-01-11T07:40:32 Add missing GLES1 glGetBooleanv() enums In OpenGL ES 1, capabilities that can be queried using glIsEnabled() can also be queried using glGetBooleanv(). As such, some valid glGetBooleanv() calls were returning "Invalid pname" error. Added support for the missing enums in glGetBooleanv(). Bug: angleproject:8481 Tests: GLES1 - QueryTest* Change-Id: Ic3a50eda4eae5855cd9491dbf217b5f69c1669b4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5188456 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@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>
Shahbaz Youssefi 3680a5dc 2023-11-17T13:51:07 Vulkan: Let program warmup continue passed link The warmup task does not actually affect the link results, so there is no reason to wait for it when the application queries the link status. This change allows the warm up task to continue in parallel until the program is used at draw time. This allows the warm up to be more efficient when the link itself is not parallelized. For applications that create programs in the middle of every frame, it's still likely best to disable warm up (as the following immediate draw will already effectively do the warm up). Note that currently the warm up code in the Vulkan backend is not completely thread-safe, and so the program still blocks on that task before the first draw can happen (or the program is modified in any way). Bug: angleproject:8417 Change-Id: I0877fef39a0585c3279e32699ce817d4643d7cd6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5037538 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Charlie Lao 8fcd4a50 2023-09-19T14:08:14 Cleanup POD struct usage to make them more consistent In recent months, I have made many CLs to wrap various data structures into a trivially copy-able struct. Some of them uses different terminology. This CL replaces all of these to use a consistent name "pod" in the struct, and "mPod" in a class. This CL also turns ActiveVariable methods into macros to remove the code duplication. This CL also moves ProgramInput/ProgramOutput struct implementations from Program.cpp to ProgramExecutable.cpp Bug: b/275102061 Change-Id: Ia2a4210a9ea633f3d323bebe674ee74f8b90b363 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4877335 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com>
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>
Charlie Lao 65220256 2023-09-18T12:29:59 Add ProgramOutput struct for ProgramExecutable::mOutputVariables Right now ProgramExecutable::mOutputVariables is a vector of sh::ShaderVariable. ShaderVariable. itself is not a POD struct and can't memcpy. And most of variables are not needed for mOutputVariables. This CL adds a custom struct for mOutputVariables so that we only store what we actually needed and data can be memcpy. Bug: b/275102061 Change-Id: I045d0618b6dab5f8d58afe40e55147d12987cf61 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4862977 Commit-Queue: Charlie Lao <cclao@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 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>
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 5217beb2 2023-08-15T13:43:12 Reland "Tightly pack LinkedUniform by using int16_t" This is a reland of commit 152cf62b38874238095a91307e4ea9bcdedf8f46 Original change's description: > Tightly pack LinkedUniform by using int16_t > > There is a check of vector size when we link uniforms and the maximum > vector size is 4096 due to we clamp the maxUniformBlockSize to 64KB. In > reality, if we exceeds this number, program link will take really long > time and then hit failure. So there is no real need to keep all the > variables in 32 bit integer. This CL changes to 16 bit integer. Further, > sh::BlockMemberInfo and ActiveVariable data members are embeded into > LinkedUniform struct as well so that the unused variables can be removed > and data can be tightly packed. This also makes LinkedUniform easier to > maintain as a simple struct with basic data types. With this change, > LinkedUniform size is reduced from 108 bytes down to 60 bytes, 48 bytes > reduction. Given some apps has 200-ish uniforms, this CL reduces 48 > bytes x 200 = ~9K memory just for uniforms per program (which goes > through hash compute and decompression and file reads). > > Bug: b/275102061 > Change-Id: I7fae20f5b75f3239305e2094a992e3040b8c8e4c > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4754133 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Charlie Lao <cclao@google.com> Bug: b/275102061 Change-Id: I1cdec9407e930608d3239a104dcbf77c8d8e2113 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4791661 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao 1e1c9d9d 2023-08-11T15:16:26 Pack and reduce Program::mProgramInput size Right now mProgramInput is std::vector<sh::ShaderVariable>. It really only need a subset of ShaderVariable struct. This CL adds a ProgramInput struct so that we can add data members that actually required. This CL also makes bools into bitfield and some variables to uint16_t to further compact the size. This CL also groups the data memebers other than string to basicDataTypeStruct which only contains basic data types and the entire struct is memcpied during program binary load and save. This not just reduces number of memcpy calls, but also improves reliability so that when someone adds a new member into the struct, it will automatically load/save correctly. Bug: b/275102061 Change-Id: Ic055c986453ed46e56057a0122c9926245fef4d1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4776267 Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Vivian Pao 9f48f931 2023-08-16T06:38:15 Revert "Tightly pack LinkedUniform by using int16_t" This reverts commit 152cf62b38874238095a91307e4ea9bcdedf8f46. Reason for revert: Suspect cause of failure in for several Linux MSan Tests, e.g. https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20MSan%20Tests/42403/overview https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20MSAN/22174/overview https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20MSan%20Tests/42403/overview Original change's description: > Tightly pack LinkedUniform by using int16_t > > There is a check of vector size when we link uniforms and the maximum > vector size is 4096 due to we clamp the maxUniformBlockSize to 64KB. In > reality, if we exceeds this number, program link will take really long > time and then hit failure. So there is no real need to keep all the > variables in 32 bit integer. This CL changes to 16 bit integer. Further, > sh::BlockMemberInfo and ActiveVariable data members are embeded into > LinkedUniform struct as well so that the unused variables can be removed > and data can be tightly packed. This also makes LinkedUniform easier to > maintain as a simple struct with basic data types. With this change, > LinkedUniform size is reduced from 108 bytes down to 60 bytes, 48 bytes > reduction. Given some apps has 200-ish uniforms, this CL reduces 48 > bytes x 200 = ~9K memory just for uniforms per program (which goes > through hash compute and decompression and file reads). > > Bug: b/275102061 > Change-Id: I7fae20f5b75f3239305e2094a992e3040b8c8e4c > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4754133 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Charlie Lao <cclao@google.com> Bug: b/275102061 Change-Id: Id344e306307553731097f06edafc40bfeb73ff80 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4780494 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Charlie Lao 152cf62b 2023-08-15T13:43:12 Tightly pack LinkedUniform by using int16_t There is a check of vector size when we link uniforms and the maximum vector size is 4096 due to we clamp the maxUniformBlockSize to 64KB. In reality, if we exceeds this number, program link will take really long time and then hit failure. So there is no real need to keep all the variables in 32 bit integer. This CL changes to 16 bit integer. Further, sh::BlockMemberInfo and ActiveVariable data members are embeded into LinkedUniform struct as well so that the unused variables can be removed and data can be tightly packed. This also makes LinkedUniform easier to maintain as a simple struct with basic data types. With this change, LinkedUniform size is reduced from 108 bytes down to 60 bytes, 48 bytes reduction. Given some apps has 200-ish uniforms, this CL reduces 48 bytes x 200 = ~9K memory just for uniforms per program (which goes through hash compute and decompression and file reads). Bug: b/275102061 Change-Id: I7fae20f5b75f3239305e2094a992e3040b8c8e4c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4754133 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao eff12c1e 2023-08-03T12:10:05 Move name and mappedName out of LinkedUniform struct These are std::string objects. This CL moves these two data out of LinkedUniform and into ProgramExecutable class, side by side with mUniforms. With these two data moved out, LinkedUniform is now a simple struct with basic data types, and I can memcpy entire vector of uniforms. Bug: b/275102061 Change-Id: I9ae13e7daca85f8e5f3662a4718f190bebb5f5d2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4750442 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao ee019f58 2023-08-01T17:03:24 Group fixed sized data of LinkedUniform into a struct Most of gl::LinkedUniform struct is a basic types and can be simply initialized with memcpy. This CL groups these together and encapsulate them with get APIs. The load/save is now a single memcpy for the entire fixed size data structure of basic types. Bug: b/275102061 Change-Id: I49120c06ec941c783790ac0ecb0ee314a4234b26 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4740298 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao f24ea41e 2023-07-31T11:12:44 Embed sh::ShaderVariable data member into gl::LinkedUniform ProgramExecutable::load and save function is load/save each individual data members. Uniform can be quite large as shown in some app traces and this causes performance problem even when program memory has a cache hit. This CL flattens gl::LinkedUniform structure by embedding sh::ShaderVariable data members so that we can remove unrelated members and also prepare for further optimization in future CLs. Bug: b/275102061 Change-Id: I7c18cb73e359fba7cd6375b4b1635e9040ef140d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4735152 Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
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>
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 443ac5b4 2023-04-17T00:00:00 GL: Enable OES_shader_multisample_interpolation Drive-by: * Fixed validity of the related state queries * Added SampleMultisampleInterpolationTest * Removed unused OES_sample_variables code Bug: angleproject:8097 Bug: angleproject:8131 Change-Id: I816d2096759a96d8691acd0a8c5ecdedf880201b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4440826 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
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>
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>
Gert Wollny a52c0a6c 2023-02-06T16:01:27 Capture/Replay: Add and handle new resource type for EGLSync So far calls involving EGLSync were not tracking the actual sync objects, and this may lead to race conditions in multi-threaded and multi-context scenarios. This CL adds the type EGLSyncID and some specialized code handling of egl::Sync to distinguish EGLSync from the already existing GLSync objects in order to track them separately. Bug: angleproject:7911 Change-Id: I91b188a41069bc0620f51c55ee516d23b55bdd38 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4200095 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Sean Risser b96d1955 2023-01-20T16:06:34 Implement GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch allows fragment shaders to read gl_LastFragColorARM. The extension is similar to GL_EXT_shader_framebuffer_fetch, but is more limited in its capabilities. GL_ARM_shader_framebuffer_fetch was removed from HasFramebufferFetch() because it acts differently from GL_EXT_shader_framebuffer_fetch in significant enough ways that it should not be included in that single-use function. Tests: FramebufferFetchES31.*_ARM Bug: b/242419750 Bug: angleproject:7882 Change-Id: Id3a25c8ee50ca3e2a4c30a2261f507b0b53511ec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4083108 Commit-Queue: Sean Risser <srisser@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev ef0fe638 2023-01-16T00:00:00 Implement EXT_polygon_offset_clamp * Added polygonOffsetClamp to the RasterizerState * Adjusted State::setPolygonOffsetParams * Added PolygonOffsetClampTest end2end tests * Added StateChangeTestES3.PolygonOffsetClamp test * Suppressed the affected dEQP test as it has a bug Capture * Updated serialized rasterizer state * Updated CaptureMidExecutionSetup OpenGL * Rely on the EXT extension defined both for desktop and ES contexts * On desktops, might as well use the ARB extension or GL 4.6 once ANGLE supports them D3D11 * Requires FL10_0 or higher * Maps to D3D11_RASTERIZER_DESC.DepthBiasClamp * Drive-by cleanup of extensions init code Vulkan * Requires depthBiasClamp physical device feature * Maps to the depthBiasClamp parameter of the vkCmdSetDepthBias command Metal * Maps to the clamp parameter of the setDepthBias command Bug: angleproject:7957 Change-Id: If6b28df4084f0a81db29f75fb434e75d394c8730 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4169945 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Qin Jiajia e58e77f5 2022-11-10T12:49:03 Support timestamp behind flag enableTimestampQueries All timestamp queries happen in the same disjoint query in one Context11. The whole design is that we start a disjoint query in D3D11 at the first timestamp request and keep it continuously running in current context. Only end it and read it back when the user queries if there is a disjoint. We cache the frequency and assume it doesn't change. For the first timestamp, we create a temporary D3D disjoint query and end it so we have a frequency to convert the ticks to nanoseconds. This task is taken over from https://chromium-review.googlesource.com/c/angle/angle/+/3694732 Bug: angleproject:7367 Change-Id: I747c9b00e10ac58362df66332efd01a24aa395f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4021139 Commit-Queue: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev 8f1a7190 2022-12-23T00:00:00 Accept clip distance enums for simple queries State variables for which IsEnabled is listed as the query command can also be obtained using any of the simple queries. Bug: angleproject:4452 Change-Id: I075db600b772e5370c72c0f4de9b35e007259987 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4158331 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
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 44d8fef8 2022-11-01T00:00:00 Add ANGLE_provoking_vertex spec Renamed provoking vertex enums to use _ANGLE suffix. The newly defined enums alias those from the desktop OpenGL extensions. Updated tests to use the new enum names. Bug: angleproject:2829 Change-Id: I72b686773536d3d54a653114cee5292007510a55 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4013700 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Chris Dalton 9f693aa3 2022-10-22T14:45:59 Implement an allow list for PLS In order to guarantee no data is lost while using the EXT_shader_pixel_local_storage extension, we need to restrict applications to a small subset of commands while pixel local storage is active. This CL implements the allow list for GL entrypoints using wildcard matching inside the code generator, and adds custom validation for the more specific restrictions that go into effect when PLS is active. Bug: angleproject:7279 Change-Id: I5dd48bd93c10e8775f32be32a4fcf17855eb2f0e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3932552 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton b5514bb2 2022-09-21T20:47:00 Support pixel local storage on ES 3.0 Now that the application-facing API is implemented, we don't have to rely on ES 3.1 anymore. Expose and test the extension on ES 3.0. Bug: angleproject:7279 Change-Id: I5635620b9088201c20bafd283813092a329225d6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3915327 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Chris Dalton <chris@rive.app> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Shahbaz Youssefi ab255263 2022-09-20T22:37:00 GLES1: Fix material color update when COLOR_MATERIAL According to the spec, when COLOR_MATERIAL is enabled, the material ambient and diffuse colors are updated on every glClear* call. Additionally, setting these values individually is ineffective when COLOR_MATERIAL is enabled. Bug: angleproject:6201 Change-Id: I846513c983254a043ea83101c0f83025c12b4364 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3906392 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton 8b2aff28 2022-09-12T10:27:28 Implement the ANGLE_shader_pixel_local_storage API Implements the OpenGL ES API for ANGLE_shader_pixel_local_storage and adds thorough validation and testing as outlined in the spec. This feature is still implemented entirely in the frontend, but the extension now works end-to-end with a passing test suite, and can be used externally. Over time we can start gradually moving the implementation into backends as appropriate. Bug: angleproject:7279 Bug: angleproject:7647 Change-Id: I1c861a0fca96423be02e17bbe1fb7f57b99ea63f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3886462 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
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>
Alexey Knyazev 00411e2c 2022-08-25T00:00:00 Support provoking vertex state query When ANGLE_provoking_vertex is enabled, glGetIntegerv should accept GL_PROVOKING_VERTEX parameter name. Bug: angleproject:2829 Change-Id: I6316de2c6b4cdbf4365df3ffb88f75c4b095f99c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3858264 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Eddie Hatfield 2ebd5100 2022-08-11T10:43:32 Add gl::Context as a parameter to Shader::resolveCompile This prepares us to access the Context's shader cache in resolveCompile in the next commit. Bug: angleproject:7036 Change-Id: I7995c54b290a5a48f0c8985cb56ea0048598ab2f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3827642 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Lingfeng Yang be24acbd 2022-07-14T13:16:33 Vulkan: Support GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES This CL adds basic support for GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES to the Vulkan backend, and also allows the enum through validation. Bug: b/223456677 Change-Id: If0dcb467bb72bdfc9ced4862231a676eef471a6c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3764432 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Mohan Maiya d50b2276 2022-06-21T12:05:28 Reland "Vulkan: Support EGL_ANDROID_front_buffer_auto_refresh" This is a reland of commit ef60d38ecf12d6663e9ecccacbff9803b1fba7c6 There are no fixes as the revert itself was a speculative one Original change's description: > Vulkan: Support EGL_ANDROID_front_buffer_auto_refresh > > Cache value of EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID attribute > and set swapchain present mode accordingly when recreating > swapchain in single buffer mode. > > Bug: angleproject:7224 > Tests: EGLAndroidAutoRefreshTest.Basic* > Change-Id: I2dbb92ce5c3fa047e0b02ea9011725311f346027 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3707570 > Reviewed-by: Ian Elliott <ianelliott@google.com> > Commit-Queue: mohan maiya <m.maiya@samsung.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Bug: angleproject:7224 Bug: angleproject:7465 Change-Id: Ia876ea17169c0f1b3afdb7753570e0b1aca985f5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3733521 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuly Novikov 46ddcc44 2022-06-27T14:53:31 Revert "Vulkan: Support EGL_ANDROID_front_buffer_auto_refresh" This reverts commit ef60d38ecf12d6663e9ecccacbff9803b1fba7c6. Reason for revert: crashes in end2end tests on Win Intel Vulkan Original change's description: > Vulkan: Support EGL_ANDROID_front_buffer_auto_refresh > > Cache value of EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID attribute > and set swapchain present mode accordingly when recreating > swapchain in single buffer mode. > > Bug: angleproject:7224 > Tests: EGLAndroidAutoRefreshTest.Basic* > Change-Id: I2dbb92ce5c3fa047e0b02ea9011725311f346027 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3707570 > Reviewed-by: Ian Elliott <ianelliott@google.com> > Commit-Queue: mohan maiya <m.maiya@samsung.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Bug: angleproject:7224, angleproject:7465 Change-Id: Ia48a31124c8e0a3e4bcd4b7dc6f62b0782b42d97 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3726099 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Mohan Maiya ef60d38e 2022-06-21T12:05:28 Vulkan: Support EGL_ANDROID_front_buffer_auto_refresh Cache value of EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID attribute and set swapchain present mode accordingly when recreating swapchain in single buffer mode. Bug: angleproject:7224 Tests: EGLAndroidAutoRefreshTest.Basic* Change-Id: I2dbb92ce5c3fa047e0b02ea9011725311f346027 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3707570 Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@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>
Jamie Madill 2dd13ebb 2022-04-21T11:25:00 Track Surface color & depth/stencil init separately. This clears up some trace testing confusion due when robust resource init is enabled, and the app clears color but not depth on the default surface. Bug: angleproject:7221 Change-Id: Id97871aec32ad831b663aaa9116e04b582ab5a36 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3600375 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Constantine Shablya e74d0e81 2022-02-11T18:05:12 Vulkan: Implement EGL_KHR_partial_update This change provides a trivial implementation of partial update that does nothing, making apps that want this extension happy. A possible efficient Vulkan implementation would use the damage set to narrow down render area, but it appears to only be useful for only some TBDR hardware. Bug: angleproject:6960 Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com> Change-Id: Ic553ac9590c336093f1bf25a6521574622599bf6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3427640 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Auto-Submit: Constantine Shablya <constantine.shablya@collabora.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 6fd2588d 2022-02-08T14:39:58 Update GL_MAX_CLIP_DISTANCES_EXT validation GL_MAX_CLIP_DISTANCES_EXT is a valid enum to query only if either "GL_APPLE_clip_distance" or "GL_EXT_clip_cull_distance" is supported. Account for the possibility that "GL_EXT_clip_cull_distance" is supported while "GL_APPLE_clip_distance" is not. Bug: angleproject:5458 Change-Id: Ia2a089e0e9e2587449553ead6318b9b35fde0648 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3448688 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Brandon Schade 38fada35 2022-01-27T18:16:18 Vulkan: Add support for OES_primitive_bounding_box Add OES version of the primitive bound box extension Bug: angleproject:3576 Test: dEQP-GLES31.functional.primitive_bounding_box.* Change-Id: Ie44d952992a68dfffd5c124dda8dd11069f0c1e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3425086 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Brandon Schade <b.schade@samsung.com>
Mohan Maiya 29e25468 2022-01-07T07:02:53 Account for EGL 1.5 version when dealing with robustness EGL 1.5 spec allows for EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY and EGL_CONTEXT_OPENGL_ROBUST_ACCESS enums to be passed in to eglCreateContext. Update the validation layer and queries to account for the new enums. Bug: angleproject:6883 Tests: KHR-NoContext.es32.context_flags.*flag* Tests: KHR-NoContext.es32.robustness.*reset* Change-Id: I7088e0dca08cea2cfdcf1877b6d999c0e0336e5e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3373133 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Brandon Schade 2caa9d4f 2021-10-04T09:43:57 Vulkan: Add missing glGetProgramPipelineiv parameters handling The glGetProgramPipelineiv function call was missing the case handling for tessellation control and evaluation shaders. Bug: angleproject:5557 Tests: KHR-GLES32.core.tessellation_shader.tessellation_control_to_tessellation_evaluation.gl_MaxPatchVertices_Position_PointSize Change-Id: Id888d1a9ae94228a33cfabcc7f65d1f63d596425 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3208511 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Brandon Schade <b.schade@samsung.com>
Maksim Sisov beda2459 2021-12-09T14:24:08 Add support for GL_MESA_framebuffer_flip_y 2/* This is a second CL that adds actual implementation for GL_MESA_framebuffer_flip_y extension. Also, some tests are added to verify the functionality. Please note that bots do not support this extension yet, and the tests were verified by running them locally. Bug: chromium:1231934 Change-Id: Iea483aa13a298df6b5cf0b7b5ffb795a4666e3bd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3329603 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Maksim Sisov <msisov@igalia.com>
Jeff Vigil 1fc9b7c6 2021-12-08T14:10:36 EGL: Add queries for EGL_KHR_protected_content Add surface and context query for EGL_PROTECTED_CONTENT_EXT attribute. Bug: angleproject:6693 Change-Id: Iad3d8d7e0db89414c44a0101c26cda6e60308e71 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3324963 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Brandon Schade <b.schade@samsung.com>
Jeff Vigil 8b60855b 2021-09-15T15:16:10 EGL: implement EGL_KHR_mutable_render_buffer Pass render buffer mode change to WindowSurfaceVk. On mode change trigger OUT_OF_DATE. Then in CreateSwapchain, if new mode, set the Presentation mode and the Image count. OffscreenSurfaceVk ignores mode change. Add MUTABLE_RENDER_BUFFER_BIT to GenerateDefaultConfig. Test: dEQP-EGL.functional.mutable_render_buffer.* Bug: angleproject:3966 Change-Id: I7b59708514bcda10f8d45ce5f9528aa840fcccfa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3171822 Commit-Queue: Brandon Schade <b.schade@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jeff Vigil 5eb86d4a 2021-09-21T15:17:04 EGL: EGL_KHR_lock_surface3 frontend Add queries to get locked buffer attributes Add validation for LockSurface, QuerySurface Bug: angleproject:6062 Change-Id: I4919bef2a17d3505cccad08f7c4f8a3ca5d7e4e6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3174322 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 4a2446c6 2021-10-19T11:55:17 Vulkan: Implement robust shader outputs. In this CL we change ANGLE to pass the mask of missing shader outputs down to pipeline creation. We then use the color mask bits to block SwiftShader writing to unused outputs. This fixes the undefined behaviour present in Genshin Impact. Note that the other GLES implementations we tested don't seem to modify outputs even if they're unused. It was easier to mask out the color attachments in initialize rather than set up the pipeline desc to mask out the attachments. This was because we manipulate the color mask in a fairly complex way before we initialize the pipeline desc. Bug: angleproject:6566 Change-Id: Ie659fcd511cd286fa573fd25e3e6a0b9e123ebd6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3232435 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Geoff Lang ad8e4d99 2021-09-28T11:48:46 Remove EGL_ANGLE_flexible_surface_compatibility This extension has been superseded by EGL_KHR_no_config_context. Bug: chromium:1253930 Change-Id: Ie299c34baa84e9f47c73ddb5a0636536bf510d72 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3190612 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill e84b0154 2021-09-13T16:04:20 Update extension boolean names. This is in preparation for auto-gen, which uses a simple naming scheme. This fixes the bool names to be totally consistent with the extension names. Bug: angleproject:6379 Change-Id: Ia212449be04accb0e4f006b55b1813ab4481fa0b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3157417 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1ca1589f 2021-09-13T10:56:58 Give GLES extension bools a vendor suffix. This is in preparation for auto-generation which will give all of these bools suffixes. Bug: angleproject:6379 Change-Id: I7e3f6c9b644c41a2165e6bf7b62d661fd352a250 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3158503 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jeff Vigil 6136620b 2021-03-25T15:43:06 Reland "EGL: GLES: Implement GL_EXT_protected_textures" This is a reland of 6210a9b34a721df2c84cf69170ad9bf7ba40e4aa This removes changes in gl backend. Original change's description: > EGL: GLES: Implement GL_EXT_protected_textures > > Implement EGL_EXT_protected_content Images > Add protected member to Images and Textures > Add error when creating objects if not supported or > does't match native buffer > When creating siblings pass protected state > Add extension caps > Add Validation > Add GetTexParameter and SetTextparameter > Add protected to Texture and state > Expand tests for images and textures > > Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest > > Bug: angleproject:3965 > Change-Id: I35a89b4e80bba6d9b6831c68e71630eef304dacb > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802852 > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest Bug: angleproject:3965 Change-Id: Id36d697c53afc0f0dadf92bda4565f9157f4fc2a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3076825 Commit-Queue: Brandon Schade <b.schade@samsung.com> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Brandon Schade 217acac2 2021-07-21T12:42:56 Vulkan: Add support for EXT_primitive_bounding_box 1. Added support for EXT_primitive_bounding_box extension 2. Renamed shader variable gl_BoundingBoxEXT[] to ANGLEBoundingBox[] Bug: angleproject:3576 Test: dEQP-GLES31.functional.primitive_bounding_box.* Change-Id: I15fa9af50c6fd8e86d225670ddd8eb39f6e65d35 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3053618 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill c408926f 2021-07-22T12:00:59 Revert "EGL: GLES: Implement GL_EXT_protected_textures" This reverts commit 6210a9b34a721df2c84cf69170ad9bf7ba40e4aa. Reason for revert: Suspected for breaking ANGLE->Chrome roller. Bug: angleproject:6204 Original change's description: > EGL: GLES: Implement GL_EXT_protected_textures > > Implement EGL_EXT_protected_content Images > Add protected member to Images and Textures > Add error when creating objects if not supported or > does't match native buffer > When creating siblings pass protected state > Add extension caps > Add Validation > Add GetTexParameter and SetTextparameter > Add protected to Texture and state > Expand tests for images and textures > > Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest > > Bug: angleproject:3965 > Change-Id: I35a89b4e80bba6d9b6831c68e71630eef304dacb > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802852 > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:3965 Change-Id: Ia3ef260a17097b474189ccad5b235a9db99ee00b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3043889 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Jeff Vigil 6210a9b3 2021-03-25T15:43:06 EGL: GLES: Implement GL_EXT_protected_textures Implement EGL_EXT_protected_content Images Add protected member to Images and Textures Add error when creating objects if not supported or does't match native buffer When creating siblings pass protected state Add extension caps Add Validation Add GetTexParameter and SetTextparameter Add protected to Texture and state Expand tests for images and textures Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest Bug: angleproject:3965 Change-Id: I35a89b4e80bba6d9b6831c68e71630eef304dacb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802852 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 8c1cbc5a 2021-07-16T14:01:53 Implement EGL_KHR_mutable_render_buffer in the front-end. Note that we do not currently expose any mutable configs. Bug: b/192352791 Change-Id: Ib97f7889fedd91d09ef32dc7e7494ea4476cd7bd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035583 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Brandon Schade 69f2fb00 2021-03-08T10:49:31 Vulkan: Expose OES_geometry_shader extension Modify the symbol table generation script to accept a list of supported extensions. This allows for the EXT and OES versions of the geometry shader extension to be exposed. Test: angle_deqp_khr_gles31_tests --deqp-case=*geometry_shader* Bug: angleproject:3571 Change-Id: Ia7127a03dbd3fce78957f0505d3ce0c9bab6cb15 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2765011 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya dd312cc6 2021-05-21T08:49:48 Reland "Vulkan: Add support for EXT_texture_border_clamp" This is a reland of 4b92e089c01e94730fe26c4c743d76d6c935088d Initializes mPadding to 0 in SamplerDesc::update Original change's description: > Vulkan: Add support for EXT_texture_border_clamp > Add support for GL_EXT_texture_border_clamp. This is implemented by > using VK_EXT_custom_border_color. > > Bug: angleproject:3577 > Test: dEQP-GLES31.functional.texture.border_clamp* > Change-Id: Ie9fa1eb5dd03b997b5ae182787641a53080a9e51 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2830192 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Bug: angleproject:3577 Change-Id: I8684242c4bce6e1a006dbe926defaa495fcc2282 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2911571 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Yuly Novikov 44fabb7b 2021-05-21T00:51:06 Revert "Vulkan: Add support for EXT_texture_border_clamp" This reverts commit 4b92e089c01e94730fe26c4c743d76d6c935088d. Reason for revert: breaks "Linux MSan Tests" bot https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20MSan%20Tests/28489/overview Original change's description: > Vulkan: Add support for EXT_texture_border_clamp > > Add support for GL_EXT_texture_border_clamp. This is implemented by > using VK_EXT_custom_border_color. > > Bug: angleproject:3577 > Test: dEQP-GLES31.functional.texture.border_clamp* > Change-Id: Ie9fa1eb5dd03b997b5ae182787641a53080a9e51 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2830192 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Bug: angleproject:3577, angleproject:5996 Change-Id: I6b62f1a4a43fcfe2d0df2c73de24db83606ce430 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2911533 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Mohan Maiya 4b92e089 2021-05-12T09:20:24 Vulkan: Add support for EXT_texture_border_clamp Add support for GL_EXT_texture_border_clamp. This is implemented by using VK_EXT_custom_border_color. Bug: angleproject:3577 Test: dEQP-GLES31.functional.texture.border_clamp* Change-Id: Ie9fa1eb5dd03b997b5ae182787641a53080a9e51 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2830192 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Lubosz Sarnecki 01b05333 2021-05-04T18:12:25 queryutils: Handle AmbientAndDiffuse param count. Add AmbientAndDiffuse cases for determining light and material parameter count. Define default cases as UNREACHABLE for GetLightModelParameterCount, GetLightParameterCount and GetMaterialParameterCount. Bug: angleproject:5751 Change-Id: I58acb62e66cea71277654313800dafa57c42b17e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2871794 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Jeff Vigil 22fc9523 2021-02-03T15:32:48 EGL: implement EGL_EXT_buffer_age Add extension flag. Add Validation check to surface query. Enable extension for vulkan. Modify AcquireNextImage to ++frame count and tag images with frame number. Buffer age is the difference between current frame count and the tagged frame number on the buffer. getBuffeAge may need to trigger AcquireNextImage to be current. Pass through egl extension and query. Add EGLBufferAgeTest Test: angle_end2end_test --gtest_filter=EGLBufferAgeTest Test: angle_deqp_egl_tests --deqp-case=dEQP-EGL.functional.buffer_age.* Bug: angleproject:3529 Change-Id: I0cb94be1c3e85d6f33e82a6a1ccdc9731b6a7f23 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2684724 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Mohan Maiya 80a4223e 2021-01-28T17:51:31 Vulkan: Handle changes to viewport when clip origin is modified The expected view port is different from current viewport translation when the clip origin is the upper left. So now, it has four different view port translations based on clip origin and y-flip of framebuffer. - add query and state management for EXT_clip_control - add dirty bit for clip control - change viewport, scissor and cull face when clip origin changes Bug: angleproject:5471 Tests: dEQP-GLES2.functional.clip_control.* Change-Id: I78dc752c3287b09f25496034e0d0d2724138010c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2615863 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 351e6e8c 2021-01-26T17:08:59 Add 'UniformBlockIndex' struct Add the new structure 'UniformBlockIndex'. This is in preparation for capturing glUniformBlockBinding() calls, which requires the (new) corresponding ParamType::TUniformBlockIndex. Bug: angleproject:5564 Change-Id: I88613dd96d058659dd253e8088fab49670c32316 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2651287 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill b912eec5 2020-11-27T11:08:41 Vulkan: Support GL_EXT_tessellation_shader. Shader translator changes done in http://crrev.com/c/2633936 Adds a new DIRTY_BIT_PATCH_VERTICES state to Context. Supportes state query and transform feedback. 4 test suppressions remain as follow-up fixes. Adds a new varying packing mode for a simple Vulkan rule set. Based on work by Mohan Maiya (m.maiya@samsung.com). Test: dEQP-GLES31.functional.tessellation.* Bug: angleproject:3572 Change-Id: I4cad2cca30adb754fd12c83027673906541f566a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568234 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Mohan Maiya cea86910 2021-01-14T08:13:00 Vulkan: Support EXT_clip_cull_distance extension EXT_clip_cull_distance extension is supported except for some features related to EXT_tessellation_shader and EXT_geometry_shader. Also added a few compiler tests to validate the transformation from ESSL to GLSL for Vulkan backend. Bug: angleproject:5458 Tests: angle_end2end_tests --gtest_filter=Clip*DistanceTest* angle_unittests --gtest_filter=*Clip*Distance* Change-Id: Ie74e6b2b55112ad92ad111191d629b63506032ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2585987 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Jonah Ryan-Davis fb35201a 2020-12-22T13:14:41 GL: Expose NV_framebuffer_blit for ES2 contexts when available ANGLE_framebuffer_blit is already exposed but has restrictions on scaling/flipping and mismatched color buffer formats. When NV_framebuffer_blit, EXT_framebuffer_blit, or an ES3 context is available we can expose a less restrictive BlitFramebuffer. Bug: angleproject:5474 Bug: chromium:1157057 Change-Id: I916ee39c8d6120216f91461080eb3ee9ca777e29 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2601165 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 5dec9d19 2020-11-16T16:52:23 Use 0 as special value for glTexBuffer instead of UINT_MAX This is more in line with the rest of ANGLE which assumes a binding of 0 size means the size of gl::Buffer. This allows GetBoundBufferAvailableSize to be used in texture buffer related code. Bug: angleproject:3573 Change-Id: I305835f305d4bf4422759bb96e030cbbc136871a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2542863 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 5b419533 2020-11-03T13:33:44 GL: Implement EXT_YUV_target Add test coverage of YUV format sampling as RGB or directly as YUV and rendering as YUV using layout(yuv). Initializing YUV AHardwareBuffers requires Android API 29 so ANGLE must be compiled with: android32_ndk_api_level = 29 android64_ndk_api_level = 29 The following tests can still run with Android API 26 because they don't need to initialize the buffer: ImageTestES3.ClearYUVAHB ImageTestES3.YUVValidation Bug: angleproject:4852 Bug: b/172649538 Change-Id: I4fe9afb2a68fb827dc5a5732b213b5eb60d585ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2517562 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 620cb770 2020-11-11T14:45:14 Fix texture buffer unbind and size query - Fixes a crash with glTexBuffer given 0 as buffer. - Fixes query of TEXTURE_BUFFER_SIZE. If glTexBuffer is used to bind a buffer, and the buffer is modified, the result of this query must adapt to the new buffer size. The spec mentions that unlike Desktop GL, ES doesn't have immutable buffers, and so they had no choice but to allow mutable buffers. Bug: angleproject:3573 Test: KHR-GLES31.core.texture_buffer.texture_buffer_parameters Test: dEQP-GLES31.functional.texture.texture_buffer.state_query.texture_buffer_size_integer Change-Id: Iec77c14ccf0e9ee11a171dbe2c7386678304bcc8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2533494 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>