src


Log

Author Commit Date CI Message
Rafay Khurram c5242b6f 2024-06-03T00:40:05 CL/Vulkan: Add extent, offset, and layers handling for arrays * Sets the array layer count to appropriate value * For 1D/2D array, base layer is equivalent to the y/z origin * For 1D/2D array, offsets and extents should be set to 0/1 for unused dimensions Tests-Passing: OCLCTS.test_cl_copy_images 1Darray, OCLCTS.test_cl_copy_images 2Darray, OCLCTS.test_cl_copy_images 2Darrayto2D, OCLCTS.test_cl_copy_images 2Darrayto3D, OCLCTS.test_cl_copy_images 2Dto2Darray, OCLCTS.test_cl_copy_images 3Dto2Darray, OCLCTS.test_cl_copy_images max_images 1Darray, OCLCTS.test_cl_copy_images max_images 2Darray, OCLCTS.test_cl_copy_images max_images 2Darrayto2D, OCLCTS.test_cl_copy_images max_images 2Darrayto3D, OCLCTS.test_cl_copy_images max_images 2Dto2Darray, OCLCTS.test_cl_copy_images max_images 3Dto2Darray, OCLCTS.test_cl_copy_images small_images 1Darray, OCLCTS.test_cl_copy_images small_images 2Darray, OCLCTS.test_cl_copy_images small_images 2Darrayto2D, OCLCTS.test_cl_copy_images small_images 2Darrayto3D, OCLCTS.test_cl_copy_images small_images 2Dto2Darray, OCLCTS.test_cl_copy_images small_images 3Dto2Darray, OCLCTS.test_cl_read_write_images 1Darray, OCLCTS.test_cl_read_write_images 2Darray, OCLCTS.test_cl_read_write_images max_images 2Darray Bug: angleproject:42266936 Change-Id: I5ffb792c640c536045450ad6583d8d3bc0358d64 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5987532 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Rafay Khurram <r.khurram@samsung.com> Commit-Queue: Rafay Khurram <r.khurram@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kimmo Kinnunen 7ba69645 2024-11-14T10:07:31 Fix unnamed outs w/ initializeUninitializedLocals Fix translator initializeUninitializedLocals pass for anonymous out parameters. The parameters should be initialized to zero, similar to named but unassigned parameters. Initialization would be skipped on GLSL output, assert on Metal. Functions need to be replaced if their parameter names change. In case the function had a prototype declaration, that has to be replaced too. All calls to old functions must be replaced with calls to new function. Bug: angleproject:378584780 Change-Id: I9a990fa3840f6e26cd30f35bf6c99d9a8816f272 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6020245 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Rafay Khurram 52831fc0 2024-05-30T02:28:11 CL/Vulkan: Add handling for image push constants Tests-Passing: OCLCTS.test_kernel_image_methods 1D, OCLCTS.test_kernel_image_methods 2D, OCLCTS.test_kernel_image_methods 3D, Bug: angleproject:42266936 Change-Id: Ie0c488ec02047a4a3da387c32178d05397c9d174 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5987700 Commit-Queue: Rafay Khurram <r.khurram@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kimmo Kinnunen 03c75d35 2024-11-14T14:24:44 Remove SeparateStructFromFunctionDeclarations Move SeparateStructFromFunctionDeclarations to SeparateDeclarations It is logical part of the separate declarations step. Bug: angleproject:378966971 Change-Id: Ie102a1d936f7b444f5f9f2ac2fe8dc6c10027782 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6022857 Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Rafay Khurram e557b60e 2024-05-28T17:40:49 CL/Vulkan: Add destruction of staging buffer for CLImageVk * Staging buffer wasn't being destroyed leading to a memory leak. Tests-Passing: OCLCTS.test_cl_fill_images 3D, OCLCTS.test_cl_fill_images max_images 3D, OCLCTS.test_cl_copy_images 3D, OCLCTS.test_cl_copy_images max_images 3D, OCLCTS.test_cl_copy_images small_images 3D, OCLCTS.test_cl_copy_images 2Dto3D, OCLCTS.test_cl_copy_images max_images 2Dto3D, OCLCTS.test_cl_copy_images small_images 2Dto3D, OCLCTS.test_cl_copy_images 3Dto2D, OCLCTS.test_cl_copy_images max_images 3Dto2D, OCLCTS.test_cl_copy_images small_images 3Dto2D Bug: angleproject:42266936 Change-Id: I2526eb994563f20b8e8f352d303957e768a3bde0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5987531 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Rafay Khurram <r.khurram@samsung.com>
Rafay Khurram 485f6c34 2024-05-24T03:06:31 CL/Vulkan: Implement clEnqueueFillImage * Packs fillColor values, copies image to staging buffer, fills the relevant pixels in mapped staging buffer, and then copies back to image Tests-Passing: OCLCTS.test_cl_fill_images 1D, OCLCTS.test_cl_fill_images max_images 1D Bug: angleproject:42266936 Change-Id: I2ceb98830f49318edb71a1be14cecfdb4476d7ff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5961949 Commit-Queue: Rafay Khurram <r.khurram@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Igor Nazarov bf07bcb7 2024-11-11T17:23:43 Vulkan: Remove dead code since mSwapchainImages always valid All elements of the `mSwapchainImages` always contain valid images. This fact makes code calling `acquireNextSwapchainImage()` in the `WindowSurfaceVk::lockSurface()` a dead code. Probably, instead of `acquireNextSwapchainImage()` it should call `doDeferredAcquireNextImage()` if `needsAcquireImageOrProcessResult()` is true, but this is another issue. This CL simply removes a dead code. Bug: angleproject:42264593 Bug: angleproject:42262606 Change-Id: Ic7bda330d74e1ccad149ffab723954f45dab700b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6018092 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Kimmo Kinnunen df61fc7f 2024-11-14T13:31:24 Avoid reordering structs when separating from func Avoid reordering structs when separating struct declarations and function declarations. Consider: struct S1 { ... }; struct S2 { S1 a; } f(); SeparateStructFromFunctionDeclarations would insert the S2 to the beginning of the containg block, so before S1 definition. Fix by not inserting the structs to the parent block. Instead, return the nodes from multi-replacement, so that the struct definition is inserted at the site of the replaced function. Bug: angleproject:378966971 Change-Id: I47582660610c1fcb28a9b5bd592ac020b5c48e34 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6022856 Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Roman Lavrov 54e8e665 2024-11-12T12:53:54 Trace tests: generate and use trace list according to gn args Generates out/<config>/gen/trace_list.json which contains the list of traces included in the build according to the angle_restricted_traces gn arg (or all traces if not set). Test runner uses that file instead of the full restricted_traces.json. Android runner pushes that file to the device to the usual location (e.g. /sdcard/chroimum_tests_root/gen/trace_list.json) This also fixes the issue where `angle_trace_tests --list-tests` lists all traces, not just those that were selected with the gn arg. Similarly, running all traces without a filter would be limited to the same list. This transitively applies to trace bundles. Bug: b/376923930 Change-Id: I63506a074d766a51b860472f7211842f8a080ecd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6011956 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Kimmo Kinnunen a402f9cb 2024-11-11T15:08:41 Metal: Do not use number digit separator in .mm The review system turns ' to strings for Obj-C syntax highlighting. Bug: angleproject:378421872 Change-Id: I201f6561def7c4b945f37e3e02ec0b8915954e8e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6011209 Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Rafay Khurram 924ee1ba 2024-08-28T02:16:55 CL: Enable CTS over GTest interface * Enables all CTS test suites excluding test_subgroups * Creates one gtest-based executable per OpenCL CTS executable Bug: angleproject:372722560 Change-Id: Iae96c2f12716b3c21d5035fbf6c9d838cb812025 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5938948 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop 817b7d20 2024-11-13T10:41:49 Trace Tests: Skip solar_smash on Intel Windows Non-deterministic on Intel Windows. Bug: b/378900717 Change-Id: I393bf4fbeb6764ecb3cba61e012036f8f69605c2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6017397 Reviewed-by: Solti Ho <solti@google.com> Commit-Queue: Solti Ho <solti@google.com> Auto-Submit: Cody Northrop <cnorthrop@google.com>
Cody Northrop b09008fd 2024-11-13T10:28:36 FrameCapture: Warn when shaders are not attached yet Instead of assert, print a warning when we don't have attached shaders on an unlinked program. There's work involved to support it, but also scenarios where it isn't a blocker to capturing a trace. For instance, if the program isn't used, we don't care if it doesn't have attached shaders. Test: SimCity BuildIt Bug: b/334030316 Change-Id: Ied85af433e769ec8f1e436de82e911ff691ea9c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6017396 Reviewed-by: Mark Łobodziński <mark@lunarg.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 14e4435b 2024-11-12T23:08:55 FrameCapture: Start active queries last in MEC Before this CL, we cycle through all queries, Begin and End them, unless they are active, and we skip End. That can give us a sequence like this: glGenQueries(1, (GLuint *)gReadBuffer); UpdateQueryID(1, 0); glBeginQuery(GL_TIME_ELAPSED_EXT, gQueryMap[1]); glEndQuery(GL_TIME_ELAPSED_EXT); glGenQueries(1, (GLuint *)gReadBuffer); UpdateQueryID(2, 0); glBeginQuery(GL_TIME_ELAPSED_EXT, gQueryMap[2]); glGenQueries(1, (GLuint *)gReadBuffer); UpdateQueryID(3, 0); glBeginQuery(GL_TIME_ELAPSED_EXT, gQueryMap[3]); glEndQuery(GL_TIME_ELAPSED_EXT); Note that gQueryMap[2] is not Ended because it is active. That results in a GL error when we try to Begin gQueryMap[3]: INFO: glBeginQuery: GL error: HIGH: Other query is active. To fix this, we need to start active queries last. That results in the following sequence: glGenQueries(1, (GLuint *)gReadBuffer); UpdateQueryID(1, 0); glBeginQuery(GL_TIME_ELAPSED_EXT, gQueryMap[1]); glEndQuery(GL_TIME_ELAPSED_EXT); glGenQueries(1, (GLuint *)gReadBuffer); UpdateQueryID(2, 0); glGenQueries(1, (GLuint *)gReadBuffer); UpdateQueryID(3, 0); glBeginQuery(GL_TIME_ELAPSED_EXT, gQueryMap[3]); glEndQuery(GL_TIME_ELAPSED_EXT); glBeginQuery(GL_TIME_ELAPSED_EXT, gQueryMap[2]); Test: Filament mosquito trace Bug: b/322364529 Change-Id: I4de9401e49bf93b0cfe02ba5ad536f3ab3079b81 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6017473 Reviewed-by: Mark Łobodziński <mark@lunarg.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Kimmo Kinnunen eb614d7e 2024-11-11T13:24:35 Metal: Avoid leaking library and binary sources Reland: Fix build with metal_internal_shader_compilation_supported = false Fix leak of dispatch_data during binary load. The dispatch object was not released. Dispatch objects are Obj-C objects, so hold with AutoObjCPtr. Fix leak of MTLLibrary objects when creating the objects. The method newLibraryWithData returns +1 due to being "new" type method. This ref must be adopted. Avoid using autoreleased objects, use AutoObjCPtr. Some leaks regressed in commit c5ab1cebccaab0f8de466e5f797faa3d5a84bea5. Bug: angleproject:351165323 Change-Id: I08bc6bcb787cdc3f71e9487d80a44e24b01b6b4c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6017845 Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Solti Ho b2d84a66 2024-11-12T20:14:48 Revert "Metal: Avoid leaking library and binary sources" This reverts commit 6359ec111595c57e6be04b0468ca866f91593f2f. Reason for revert: https://chromium-review.googlesource.com/c/angle/angle/+/6011208/comments/c1453ef2_2c6a5e49 Original change's description: > Metal: Avoid leaking library and binary sources > > Fix leak of dispatch_data during binary load. The dispatch object > was not released. Dispatch objects are Obj-C objects, so hold with > AutoObjCPtr. > > Fix leak of MTLLibrary objects when creating the objects. > The method newLibraryWithData returns +1 due to being "new" type > method. This ref must be adopted. > > Avoid using autoreleased objects, use AutoObjCPtr. > > Some leaks regressed in c5ab1cebccaab0f8de466e5f797faa3d5a84bea5. > > Bug: angleproject:351165323 > Change-Id: If23859fbddd21693d923f66f6fb015eed494f06e > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6011208 > Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> > Commit-Queue: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Note: the revert merges the changes of https://crrev.com/c/6011902 Bug: angleproject:351165323 Change-Id: Iec1a14c8043e0883190723edf7302127c27f2de4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6013090 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mark Lobodzinski c7a43ec8 2024-10-28T12:26:05 Capture/Replay: Track framebuffers by context Some game titles treat framebuffer objects as shared. Framebuffer objects are now tracked per-context to avoid conflicts. Test: angle_trace_tests --gtest_filter=TraceTest.limbo --offscreen Bug: b/371985732 Change-Id: I34ae5b54d569eec75ad86b7b363f7a84d56d955c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5973639 Commit-Queue: Mark Łobodziński <mark@lunarg.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Matthew Denton 4a835cf2 2024-11-01T13:31:00 WebGPU: send uniforms to GPU for use in shader Basic uniforms should now be accessible in the shader during a draw call, rather than just via glGetUniform*(). This is unoptimized and creates a new GPU-side copy of all the uniforms, every time any uniform changes. This sets up the bind group layout for a pipeline and sets the bind groups in the renderer pass. Right now these bind groups only contain the default uniform blocks, but in the future will need to contain textures, samplers, and non-default uniform blocks (UBOs). Bug: angleproject:376553328 Change-Id: I50891b81ab2ee374d674213257f76319c0222120 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5980972 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Liza Burakova <liza@chromium.org> Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Amirali Abdolrashidi 4707e5bb 2024-11-05T10:59:46 Unskip mini_world for other QCOM devices Currently, mini_world is being skipped for all QCOM devices. However, it seems to be working on more recent devices. Therefore, the skip could be limited to P4/P4XL due to image diffs and errors respectively. * In the case of P4XL, it is not confirmed if the original error still persists. Bug: b/331271522 Change-Id: I7ee00a74131ea47463a513121b15e445bddb9289 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5994385 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Gowtham Tammana 267a3daf 2024-11-05T19:51:58 CL/Vulkan: Use enums for cmd exec status instead of bools Setup the `createEvent()` interface to take the initial state of the event using an enum, instead of boolean for better readability. Bug: angleproject:377997556 Change-Id: Ib5a23cf2034e61e90b345bb432af59d96338b707 Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6004063 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Gowtham Tammana 05b58737 2024-11-04T13:52:09 CL: Add CL command execution status to the enum list Adding the CL command execution status enums to the auto enum generation list - packed_cl_enums.json. The execution status are defined as cl_int in the CL api, and as such they are not packed at the entry points - entry_points_cl_autogen.{h,cpp}, and are left to be used at the implementation layer. The following files are autogeneration through `run_code_generation.py` script. - scripts/code_generation_hashes/packed_enum.json - src/common/PackedCLEnums_autogen.cpp - src/common/PackedCLEnums_autogen.h Bug: angleproject:37997556 Change-Id: Ia00fc12ef02e3882d47a1ad18cd6c11ce6bf63dc Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6004062 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kimmo Kinnunen f5b9e0ed 2024-11-11T16:06:30 Metal: Query MSL print env var with bool getter Use angle::GetBoolEnvironmentVar. Bug: angleproject:378404988 Change-Id: I45778690e215325e9e4eb67c6feefa9b17941f49 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6011902 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Kimmo Kinnunen c46e6bac 2024-11-12T13:55:01 Make intermediate output symbol names consistent Make intermediate output symbol names consistent across uses in parameter names, struct names, variable names: - built-in without quotes - '' empty - #satb ANGLE internal - 'a' user-defined Previously empty parameters would output the symbol id-generated name ("sabb"), which was surprising when this is used only when the symbol is in AngleInternal namespace, and not in Empty namespace. Bug: angleproject:378584780 Change-Id: I87b13cf964a1ae3ee54b8f4ef7a00eddcd474760 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6011018 Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kimmo Kinnunen b8b962d2 2024-11-08T14:53:00 Parse function parameters into TPublicType Parse function parameters into TPublicType instead of TType. TType holds the type info, TPublicType holds the type specification info. This helps in moving the TType::isStructSpecifier into the AST nodes, away from the type system which it is not part of. Removes duplicated code where unnamed unsized arrays would cause different error message than named unsized arrays. Bug: angleproject:377330017 Change-Id: I102b9e87823a545f7e64f971aafbdcd313a542fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6000009 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Kimmo Kinnunen 4f4062ae 2024-11-08T10:18:02 Add support for running the parser generation on Mac For cloud storage, uses new bucket angle-flex-bison-mac for clarity, the names Linux and Mac clash. The lexer diffs seem to be due to formatter changes after the last generation of tjhe lexer. The diffs repro on Linux too. Lexer produces too hard to format source or diffs, and one hunk is left unformatted the first time. Add a workaround. Bug: angleproject:377941128 Change-Id: Id9d8f9a5c4a169955ccd8cd9cb3d632fbb339d28 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6000005 Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kimmo Kinnunen 0d02f857 2024-11-07T09:32:28 Test SeparateDeclarations This makes it easier to fix issues with SeparateDeclarations Bug: angleproject:377330017 Change-Id: I53b9ca06971e0272563b6b3c752e0438c5802193 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6000533 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Yuxin Hu e5619a5c 2024-10-15T18:27:00 Use EGL sync global lock for all EGL*sync entrypoint calls To free EGL sync operations from waiting for other EGL calls to finish, we use a separate global lock for EGL*sync entrypoints. Below angle::SimpleMutex are added to protect resources that may have race condition due to being accessed by EGL*sync calls and non EGL*sync calls at the same time: 1. Display::mContextMapMutex that protects Display::mState.contextMap 2. static angle::base::NoDestructor<angle::SimpleMutex> anglePlatformDisplayMapMutex that protects static angle::base::NoDestructor<ANGLEPlatformDisplayMap> displays 3. static angle::base::NoDestructor<angle::SimpleMutex> devicePlatformDisplayMapMutex that protects static angle::base::NoDestructor<DevicePlatformDisplayMap> displays EGL_Terminate() entry point takes both global lock and global egl sync lock. This is to protect Display::mSyncMap, Display::mSyncPools, and Display::mSyncHandleAllocator being get cleared by thread 1 calling eglTerminate, while they are still accessed by thread 2 through a call such as eglCreateSync. So that we won't have thread 2 finish validating the sync object with syncID exists in Display::mSyncMap, but then find the mSyncMap.find(syncID) returns a nullptr due to the mSyncMap is cleared by thread 1. Same applies to EGL_LabelObjectKHR(), EGL_ReleaseThread(), ThreadCleanupCallback(). EGL_Initialize() writes to Display::mInitialized. This is read by EGL Sync API validation functions. EGL_Initialize() also takes both global lock and global sync lock to prevent race conditions between EGL_Initialize() and EGL Sync APIs. When ANGLE_CAPTURE_ENABLED is enabled, fall back to global lock, as the CaptureEGLCallToFrameCapture() touches many resources (e.g. mMaxAccessedResourceIDs, mFrameCalls) that could lead to race conditions without a global lock. Bug: b/362604439 Change-Id: Ic0d54a4cd66743bcd0f48f41f247dd223cff2f5e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5933570 Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Igor Nazarov <i.nazarov@samsung.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Austin Annestrand f198e807 2024-10-16T17:47:17 CL/VK: Serialize cmds when queue profiling enabled When queue profiling is enabled by user (opt-in) we should serialize/finish each cmd. Bug: angleproject:377942756 Change-Id: I7809df073c0a6de0e4d5338bec2fa2032ebc1577 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6003807 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Austin Annestrand <a.annestrand@samsung.com>
Austin Annestrand ac41a84a 2024-10-10T17:35:20 CL/VK: Fix reflection parsing out-of-order cases Some clspv generated binaries cause the SPIR-V Tools parser to parse reflection instructions out-of-order (with respect to what we see in disassembler dump). This fix addresses kernel and kernel args so that order does not matter anymore. Bug: angleproject:377941117 Change-Id: I75da428b6f0a9f155f3faf5db7a0408485d4ebdc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6003806 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Austin Annestrand <a.annestrand@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Austin Annestrand a4172290 2024-10-08T13:20:40 CL/VK: Initial impl for migrateMemObjects Defer migration handling in multi-device setups. Allow API to return error-free on 1 device cases (nop) for now. Bug: angleproject:377942759 Change-Id: I9bcc238ad4d2965e1281a99ec2782e8cfe6c05a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6003805 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Austin Annestrand <a.annestrand@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Austin Annestrand 1071079a 2024-10-23T17:32:37 CL/VK: Fix frontend cl_mem_flags default access Additionally, if neither of these flags are specified: - CL_MEM_READ_WRITE - CL_MEM_READ_ONLY - CL_MEM_WRITE_WRITE Then we need to bitwise OR the default kernel access flag (according to spec): CL_MEM_READ_WRITE Bug: angleproject:377942757 Change-Id: I5decd05096a834469fdb6bca941284a400b2c69c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6003804 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Austin Annestrand <a.annestrand@samsung.com>
Austin Annestrand 152f8035 2024-10-29T14:14:03 CL/VK: Fix missing default device on contextFromType Bug: angleproject:377941119 Change-Id: Ia75184233a5b0b422425626cbce46a2105b08249 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6003463 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Austin Annestrand <a.annestrand@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Austin Annestrand de287909 2024-08-30T18:38:40 CL/VK: Generalize host transfer sync utility Rework host transfer sync utility to handle multiple non-blocking enqueue transfer ops for buffer/image reads. Bug: angleproject:377545840 Change-Id: Ic382162ded15cb15c900baf724e02592bfd846c9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6001611 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Austin Annestrand <a.annestrand@samsung.com>
Kimmo Kinnunen efcb94ab 2024-11-06T15:55:02 Output the type of constant union Output the type of the constant union node in OutputTree output. This makes it easier to understand typing bugs related to the constant union. Adds a node nesting level for constant unions. This makes it easier to understand consecutive constant unions. Bug: angleproject:377330017 Change-Id: Ia83072b78c4d1713f839fd136692b254f6d2c517 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6000532 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Shahbaz Youssefi e3011d96 2024-11-08T16:17:07 Translator: Optimize size calculation for variable arrays Bug: angleproject:373924024 Change-Id: Id3a8b844b8274c19c0c2c833842fb8b501f50174 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6004338 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Kimmo Kinnunen 6359ec11 2024-11-11T13:24:35 Metal: Avoid leaking library and binary sources Fix leak of dispatch_data during binary load. The dispatch object was not released. Dispatch objects are Obj-C objects, so hold with AutoObjCPtr. Fix leak of MTLLibrary objects when creating the objects. The method newLibraryWithData returns +1 due to being "new" type method. This ref must be adopted. Avoid using autoreleased objects, use AutoObjCPtr. Some leaks regressed in c5ab1cebccaab0f8de466e5f797faa3d5a84bea5. Bug: angleproject:351165323 Change-Id: If23859fbddd21693d923f66f6fb015eed494f06e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6011208 Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Amirali Abdolrashidi 7fea539c 2024-10-23T11:40:51 Vulkan: Remove extra non-conformant flag checks It may be possible to remove the flag check and simply rely on the checks performed in CanSupportGLES32() to determine support for ES 3.2. The non-conformant flag can remain utilized for certain features until the relevant issues are resolved and this flag is no longer needed. * Removed the checks from getMaxConformantESVersion(). * Removed the flag check in Renderer::getMaxSupportedESVersion(). * Added exception to the blend extension when using the non-conformant flag for Win/Intel. * Skipped the related tests on this platform that now fail. * Added a new feature flag to force-enable ES 3.2 on certain platforms for testing. * exposeES32ForTesting * If the bots are updated to support ES 3.2, it can be removed from using this flag. * Skipped some VVL errors when the flag is enabled. * Skipped end2end ES 3.2 tests on SwS. * Skipped some dEQP tests on P4 and SwS that would use ES 3.2 features that are not available on those platforms. Bug: b/374841339 Bug: b/376899587 Change-Id: Ifd405457ab8bf2076eb8fb5c92c5316f4d520595 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5958147 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Ho Cheung d30d81d0 2024-11-06T16:08:28 [code health] Remove underscores from test names in ANGLE (1/N) In the GoogleTest framework, underscores are not allowed. [1] ANGLE has underscores in many test names, and those should be changed. At the same time, add a comment to a test case according to the requirements of the Presubmit check. ```` *************** ANGLE requires a comment describing what a test does. *************** ```` [1] https://github.com/google/googletest/blob/main/docs/faq.md#why-should-test-suite-names-and-test-names-not-contain-underscore Bug: angleproject:377543127 Change-Id: I90e634bd985ca518eca43e2c919a3a8bca91a55b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5997835 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Auto-Submit: Ho Cheung <hocheung@chromium.org>
Igor Nazarov 11d73f1d 2024-11-04T20:31:57 Revert "spirv::Print without ANGLE_ENABLE_ASSERTS -> compile error" This reverts commit be9e63ad090dc4b86eae08ad8f9f4c9f1a18a6a4. Reason for revert is to fix build error in "CLProgramVk.cpp" if build with `dcheck_always_on = false`. Since https://crrev.com/c/5898609, `spirv::Print()` is now always defined, so no liker error if `ANGLE_ENABLE_ASSERTS` is not defined. Bug: angleproject:370557215 Change-Id: I983b57987eb63f601a75e90646c24b9cd16170a7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6003012 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Yuxin Hu 094a0b11 2024-11-07T17:45:50 Skip KHR-GLES31.core.tessellation_shader.single.primitive* on win Bug: angleproject:377993076 Change-Id: I7d7d99b87b51911bbb3046b4e7353afb18060d5d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6003811 Commit-Queue: Roman Lavrov <romanl@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Yuxin Hu <yuxinhu@google.com>
Cody Northrop 2c7e9830 2024-11-04T10:05:25 restricted_trace_perf: Setup and wrapper support This CL adds support for installing and setting up traces. Also allows running via the wrapper in http://crrev/c/5985570 With this change, if you run without using the wrapper, you must provide the --build-dir flag. It allows running the script from any directory: --build-dir ../../../out/Android Bug: b/376300037 Change-Id: I2259ee120b2af5e1917a2a57a27fa3dcfca761e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5983806 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Roman Lavrov bdebee8c 2024-10-29T17:08:11 Tests: add repro for running out of outside RP serials Bug: b/375661776 Change-Id: I2cd82710bdf5b00a6165ddad6ef21f30150aa5bc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5977123 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxin Hu 750d9a24 2024-11-06T17:28:19 Skip SourceAHBTarget2DGenerateMipmap* tests on S22 There is a vulkan driver bug on S22 device: https://chromium-review.googlesource.com/c/angle/angle/+/5966623/comments/44b72fb9_3ba112c5, causing ImageTestES3.SourceAHBTarget2DGenerateMipmap* to fail. Skip these tests on S22 until the vulkan driver of the device is updated. Bug: angleproject:40644776 Change-Id: Id5e68aa4ad8f2172c5cdda9adb26af60da87b905 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6001577 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Roman Lavrov d01f5101 2024-11-01T18:45:55 Tests: add wrappers for restricted_trace scripts Example use: out/Android/restricted_trace_gold_tests \ --bypass-skia-gold-functionality \ --filter=dota_underlords:dragon_raja out/Android/restricted_trace_perf --flags Bug: b/376300037 Change-Id: Ic3e8cb241af25a770f5d1888538d13482f877b6b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5985570 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Roman Lavrov 6cda99d8 2024-11-07T09:53:01 Tests: fix run_angle_android_test.py and trace bundle The output_directory arg is provided when invoked by the wrapper, but not when running with run_angle_android_test.py, in which case cwd has been historically used such as: cd out/AndroidPerformance; ../../src/tests/run_angle_android_test.py ... Move the import added in https://crrev.com/c/5985232, as 1) it now imports protobufs which is not included with python3 and requires an additional package 2) build/ is excluded from trace bundles where running traces with the Chromium runner isn't supported. Bug: b/377875190 Change-Id: Ie092dc6382e74ac7413a42acffaf507c05b73514 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6002496 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Shahbaz Youssefi f44427b5 2024-11-05T15:18:59 Vulkan: Fix MSAA glReadPixels into PBOs The temporary image used to resolve the MSAA framebuffer during glReadPixels did not have the SAMPLED usage bit. Additionally, the image was supposed to be garbage collected afterwards but ImageHelper's release() function was accidentally immediately destroy()ing it. This was not an issue with blocking glReadPixels paths, because the command buffer was immediately flushed and the GPU work was waited on before the image was destroyed in RendererScoped's destructor. Bug: b/377437834 Change-Id: I1dca47172d6f363277059a848fe9446ac2a872d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5995530 Commit-Queue: Charlie Lao <cclao@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Roman Lavrov cc2edfd1 2024-11-05T15:37:21 Fix getPerfMonitorCounterData maxResults, skip AsyncCommandQueue test Skips TextureDataInLoopManyTimes on SwS AsyncCommandQueue. Add more debug info to the test although without the AsyncCommandQueue variant we likely won't be see flakes. Bug: angleproject:377503738 Change-Id: I372531451c280b04ffed84b020463657440fca08 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5995531 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Roman Lavrov <romanl@google.com>
Gowtham Tammana 644b91f7 2024-02-29T16:37:37 CL/Vulkan: Implement buffer map/unmap Implement the buffer map, for now mapping is performed at the call site. Bug: angleproject:42267077 Change-Id: I16929920be8a49863de514b541ff0a57b6ac4453 Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5971713 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Lichen Liu d4420489 2024-10-25T08:53:17 Add check for iOS simulator when initializing caps in metal On Intel-arch MacBook, the system API [supportsFamily:MTLGPUFamilyApple3] returns false on the iOS simulator, causing maxVertexOutputComponents to be set to 60, which is below than the required value of 64, resulting in WebGL2 initialization failure on chromium iOS. Add a TARGET_OS_SIMULATOR check to ensure the values of caps can be set correctly in the siumulator environment. Bug: angleproject:375244081 Change-Id: Iafc44a2aa62130b09127bbec7ea6940506a4165c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5961039 Reviewed-by: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Austin Annestrand 6df20e5f 2024-08-21T13:29:36 CL/VK: Add missing HostPtr-BufferVk sync on unmap Missing extra copy/sync for enqueueUnmapMemObject routine for USE_HOST_PTR scenario. Bug: angleproject:377366930 Change-Id: Ifcb0ed58beabf5870e00ed47b36cfd08767eba70 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5990104 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Austin Annestrand <a.annestrand@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 2a569b2b 2024-11-04T11:41:29 Vulkan: Document that hex can be viewed with spirv-dis Since https://github.com/KhronosGroup/SPIRV-Tools/pull/5870, spirv-dis is able to disassemble SPIR-V given a hex stream. This change indicates this when retrieving shader debug info (a WebGL extension). Bug: angleproject:42266948 Change-Id: Ifab4668d6608093700d3e03ddd7ea675fd2bcf42 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5988173 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 17a01469 2024-10-26T06:07:31 Vulkan: Bugfix TextureVk::generateMipmap Add support for generating mipmaps of textures that are EGLImage texture targets with colorspace overrides Bug: angleproject:40644776 Tests: ImageTestES3.SourceAHBTarget2DGenerateMipmap* Change-Id: I9b4ff802f4118a42d54dc8d80ab30e2f9958bfee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5966623 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Mohan Maiya e2cd9082 2024-11-05T04:07:17 Vulkan: Bugfix in setCurrentImageLayout Make sure to update mLastNonShaderReadOnlyLayout and mCurrentShaderReadStageMask when updating the current layout. Bug: angleproject:40644776 Change-Id: Ie8652099a0d4caca9f9aea5bac38256a513b08e7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5992020 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Gowtham Tammana 84a24a1e 2024-07-02T11:56:25 CL: Implement clone for kernel object clCloneKernel() can be used to make a shallow copy of a kernel object. The returned object is an exact copy of the source kernel, with latest calls to arguments sets applied to the kernel. Implement a clone version at the front-end with replicating the `clSetKernelArg` called on the source kernel. The `clSetKernelArgsSVMPointer` and `clSetKernelExecInfo` are ignored as they are currently unsupported. Bug: angleproject:376023087 Change-Id: I2e21931d9ff799e35b153cffe91fd4a2adbbf88d Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5971715 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Gowtham Tammana 8dae26c6 2024-06-26T11:35:24 CL: Add missing validation checks -1- Check on device enqueue support Add a check for the device enqueue support before proceeding with the device enqueue info queries. -2- Validate the non uniform work groups The spec requires reporting CL_INVALID_WORK_GROUP_SIZE when non-uniform workgroups are not supported and supplied work sizes dont evenly distribute the work items. Adding a check in the validation. -3- Check for alignment on sub-buffer creation The spec requires the sub-buffer origin to be aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value. Check for this in validation layer. Bug: angleproject:42267011 Change-Id: I9dc086fea16b200cc05c0fca29e3608403099a2c Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5975419 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Roman Lavrov 1daf17b5 2024-11-04T11:05:46 Tests: restore angle_end2end_tests --help on Android https://crrev.com/c/5985232 added support for choosing the test runner, but that inadvertently changed behavior with --help (or with certain flags). This CL restores that behavior. parse_known_args() exits the process by default, so add manual --help handling. Bug: b/344849382 Change-Id: I87f197f90a161ec141a6e1f46ba81cfbf01a2fec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5987387 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Roman Lavrov 47fafdb9 2024-11-04T10:05:12 Disable tracegz (trace interpreter) by default, remove from CI Trace interpreter is incomplete and we've been punting on it. Can be re-enabled with angle_enable_tracegz=true in gn args. This avoids accidentally pulling trace sources into builds. Bug: b/376300037 Change-Id: Ib755fa9f57885216b02a481fd670a1bb0266f0db Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5987382 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov e43d3591 2024-11-01T16:23:27 Tests: allow choosing Chromium/our test runner + screen checks Chromium test runner (build/android/test_runner.py) is currently the default runner for most suites. One exception is angle_trace_tests where we're always using our scripts instead (android_helper.py etc). We do that by setting android_test_runner_script to our runner for that angle_test instance. This CL supports setting android_test_runner_script to our script but then choose whether to run with the Chromium runner or android_helper depending on the command-line arg (--angle-test-runner) This CL also adds a check for the screen state which will be performed regardless of the runner. This is to have a fast and clean failure when the device wasn't properly initialized by the infra (see bug). The check is based on the output of `dumpsys deviceidle | grep mScreen` (this is the most generic check I found, I previously used nfc but that depends on nfc and turns out the output is device-dependent) This CL enables this mode for angle_end2end_tests. Bots will continue to run with Chromium runner as before (but with the added screen checks). Locally, we will now be able to switch to our scripts directly: out/Android/angle_end2end_tests \ --gtest_filter='*ClearTextureEXT2DMSStencil*' \ --angle-test-runner Now when running end2end tests locally (regardless of the runner) with a locked device screen, we'll see the following error right away instead of sporadic failures or stuckness during execution: Exception: Unexpected device screen state: ['mScreenOn=false', 'mScreenLocked=true']; expected: ['mScreenOn=true', 'mScreenLocked=false'] The plan is to enable this mode for all suites, after which the current local script run_angle_android_test.py will no longer be needed. Bug: b/344849382 Change-Id: I77e7733804ab37e2f3d26bf3574a52a9553e4274 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5985232 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Kimmo Kinnunen eccfec93 2024-11-01T11:49:11 Metal: gl_ClipDistance fails validation Failure is "Found child with two parents". Result from reusing gl_ClipDistance in: float gl_ClipDistance[8]; ClipDistance_0 = gl_ClipDistance[0]; ... Fix by creating new node for each symbol access. Bug: angleproject:376718272 Change-Id: I7a866a10e389cc25d0cff4e6f18ae9c70ab376e0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5979781 Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Gowtham Tammana 7483897c 2024-10-01T17:23:37 CL/Vulkan: Add numeric versioning for extensions With extended versioning support, the version number of extensions need to be reported as well. Using the numeric versioning mode for adding supported extensions. Also, fix the version number for cl_khr_icd and cl_khr_extended_versioning extensions. Bug: angleproject:372085147 Change-Id: I7bf3157227f9579c69c351a63a88b92be7f07d71 Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5916159 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Gowtham Tammana 9ce9e678 2024-04-16T10:07:02 CL/Vulkan: Set storage buffer usage for cl buffers clspv is setting all the buffer objects as storage buffers, so removing the distinction on the CL MEM flags for now. Bug: angleproject:365694588 Change-Id: I3bd65457d53a6a2fb5fd5c8f2a0b8c25094ed563 Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5916158 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Gowtham Tammana 2f8ad9c1 2024-09-26T20:34:34 CL/Vulkan: Add support for sub-buffer creation Sub-buffer is setup to point to offset location of the parent buffer. The copy buffer interface is updated to account for copies from the same sub-buffer. Bug: angleproject:372157566 Change-Id: I668c7182a8c4c12e265115f1c28d9bfbfe562bb0 Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5916156 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Rafay Khurram 3c1e98a3 2024-05-22T01:46:52 CL/Vulkan: Fix clEnqueueMapImage/clEnqueueUnmapMemObject * Updates slice_pitch and row_pitch parameters with relevant values according to the spec. * For mapping, image is copied to staging buffer, then copied to dynamically allocated array * For unmapping, the reverse is done with the array being freed Tests-Passing: OCLCTS.test_cl_copy_images 2D, test_cl_copy_images small_images 2D, test_cl_copy_images max_images 2D, test_cl_copy_images 3D, test_cl_copy_images small_images 3D, test_cl_copy_images max_images 3D, Bug: angleproject:42266936 Change-Id: I0cd778244832ce66e72a58a228ed889a9002171e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5961948 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Rafay Khurram <r.khurram@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi bd9d0285 2024-10-26T01:12:23 Remove feature description / condition enums Since ANGLE no longer produces anything for these strings, Chromium no longer queries them and they can be removed. Bug: chromium:371512561 Change-Id: I921cbd91a3328df99b15262d31d52986d4a7b806 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5966697 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 2b8d6bbe 2024-11-01T11:23:35 Vulkan: Use UpdateFullTexturesDescriptorSet when cache missed DescriptorSetDescBuilder::updateDescriptorSet() relies on the cache key to build descriptorSet. UpdateFullTexturesDescriptorSet() builds descriptorSet directly from state, it does not use cache key. Test shows UpdateFullTexturesDescriptorSet is much faster than updateActiveTexturesForCacheMiss and updateDescriptorSet pair. This CL removes updateActiveTexturesForCacheMiss() function and uses UpdateFullTexturesDescriptorSet for cache miss case. The timing code is added around the cache miss functions to measure the time. Old: asphalt_9 average 7,554 nanosec gl_driver2_off: 20,354 nanosec batman_telltale: 12,992 nanosec New: asphalt_9 average 916 nanosec gl_driver2_off: 1,839 nanosec batman_telltale: 3,437 nanosec Bug: angleproject:372268711 Change-Id: I176d67ed732c3fe3a18a079df7c4973aa926087a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5984893 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao fbe34df7 2024-10-29T16:19:29 Vulkan: More texture descriptorSet code cleanup Removed unused argument `pipelineType` from updateActiveTexturesForCacheMiss(). Removed unused argument `context` from getReadImageView() Rename getBufferViewAndRecordUse() to getBufferView() since there is no "record use" happening. Moved UpdateFullActiveTexturesDescriptorSet() function from vk_cache_utils.cpp to ProgramExecutableVk.cpp anonymous name space, since it is only used in this file. Bug: angleproject:372268711 Change-Id: Ib7240c1063f727fb52588234e79fba349f9aff9e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5977481 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Gowtham Tammana 79b6c7ab 2023-10-09T13:29:07 CL/Vulkan: Add fillWithPattern interface In CL, the buffer can be requested to filled with a pattern. Adding a pattern fill helper routine that fills up the buffer from CPU side. Bug: angleproject:42267074 Change-Id: I144e9b7c6f4d1263f21cabc2491c46e8951e604f Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5916157 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Charlie Lao 1a3fadbf 2024-11-01T13:19:43 Vulkan: Enable imagelessFB for recent QualComm drivers Qualcomm recent drivers has the fix for imageless framebuffer bug. Re-enable supportsImagelessFramebuffer for drivers 512.802.0 or newer. Bug: b/369693310 Change-Id: I33a69b8abfefed572880636ff7af2c788cee5688 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5984959 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Rafay Khurram c0a28403 2024-05-06T12:42:28 CL/Vulkan: Enable clEnqueueNDRangeKernel for Images and Samplers * Performs clspv reflection for ArgumentSampler, ArgumentStorageImage, and ArgumentSampledImage * Creates descriptor sets for performing enqueue Tests-Passing: OCLCTS.test_basic readimage, readimage_fp32, readimage_int16, writeimage, writeimage_fp32, writeimage_int16, mri_one, mri_multiple, imagenpot Bug: angleproject:42266936 Change-Id: I2b6c631e76556870c4342d2046c267ff5cf5105d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5955597 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Rafay Khurram 0baeb12e 2024-10-22T19:24:09 CL/Vulkan: Fix ImageDescriptor constructor * Constructor should set the depth to 1 for 2D images rather than 3D Tests-Passing: OCLCTS.test_basic imagecopy3d, imagearraycopy3d Bug: angleproject:42266936 Change-Id: Id6fe927260a808732c29b3b051562274ee9bf50d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5955542 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Rafay Khurram c3ff2bbe 2024-05-16T11:31:54 CL/Vulkan: Enable clGetSupportedImageFormats * Returns formats that are supported by physical device from the minimum list of image formats Tests-Passing: OCLCTS.test_api min_image_formats, OCLCTS.test_basic imagearraycopy, arrayimagecopy, OCLCTS.test_computeinfo computeinfo Bug: angleproject:42266936 Change-Id: I2bdb9a793b45f21c12c7c7d6a42e7a63295c2708 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5800266 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Rafay Khurram 9db2e88b 2024-05-14T11:44:01 CL/Vulkan: Add support for required image formats * Included adding cases for CL_DEPTH, CL_DEPTH_STENCIL, CL_sRGBA, and CL_BGRA Bug: angleproject:42266936 Change-Id: Ie7bd3ee6c6413d8fa89357c81d19f4c807883f36 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5800265 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Rafay Khurram a21b7ad0 2024-04-24T02:11:42 CL/Vulkan: Add skeleton for CLSamplerVk * It is setup to be a wrapper for the SamplerHelper interface Bug: angleproject:42266936 Change-Id: Iac7e80c4d5262687d98a8188a60a24a9be190dc2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5801184 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Kimmo Kinnunen b03f0148 2024-11-01T10:26:04 Metal: interpolateAtOffset fails validation Fix validation error Found function prototype with an invalid qualifier. The offset parameter was created with "global" qualifier. Bug: angleproject:376718268 Change-Id: I6f314a42fe1d35d54bb673cfa7d58eba526c9ea5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5979778 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Gowtham Tammana 57ce489f 2024-07-02T10:25:35 CL: Check that arguments are set at enqueue call On clEnqueueNDRangeKernel, all of the kernel arguments have to be set by appropriate clSetKernelArg or clSetKernelArgsSVMPointer or setKernelExecInfo calls. Add a validation check for the same. For now, only clSetKernelArg are checked as the others are not supported yet. Bug: angleproject:42267011 Change-Id: I15be8efab80f475ae6093ab7e1798e7a04182ac0 Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5971714 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 5c26ffea 2024-10-29T11:11:38 Vulkan: Optmize descriptorSet cache disable code path Right now the way it works is that it first computes the cache key and then use the cache key to look in the cache. If cache misses, then it builds descriptorSet out of the cache Key. This might make sense if cache is enabled. If cache is disabled then no need to go through the middle man. This CL skip all the cache key build up entirely and directly build descriptorSet out of context state. In this CL, updateFullActiveTextures() and updateDescriptorSet() are merged into one function UpdateFullActiveTexturesDescriptorSet() which updates VkWriteDescriptorSet directly. Bug: angleproject:372268711 Change-Id: I7ba0c60a23b967d1ac903020d04022405c29e354 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5972508 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Kimmo Kinnunen bf29a047 2024-10-28T11:07:57 Metal: Remove uniform struct decl separation code Remove uniform specific struct declaration separation and anonymous struct naming code. This is already done by SeparateDeclarations. Removes code for NameEmbeddedUniformStructsMetal. Does not remove SeparateStructFromUniformDeclarations code as it is used for SPIRV. Bug: angleproject:375937551 Change-Id: I943d96897d97b23fd0f54155dc215a4490f63937 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5972994 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Kimmo Kinnunen 2156cd6e 2024-10-31T14:22:31 Metal: Fix rewritten array variables clashes It was possible to generate MSL name clashes by declaring arrays, such as in: mat3 a[1] mat2 a_0; Complex GLSL outputs need to be linearized into primitive MSL types. This would happen for struct outputs, arrays and matrices. For these new MSL variables, the translator needs to invent new names that match, generated from both VS and FS. The clashes were due to the encoding scheme: For arrays, the MSL vertex output variable was named with _0 suffix for the array and _0 for the matrix row 0. In the example above, this would create a clash since also non-array mat would be linearized row-wise. For structs, field `a.b` would be encoded as `a_b`. By selecting different a and b, clashes could be generated trivially. It is redundant to encode named semantics in the out variable names. The only needed element is the discriminator which associates VS variables to FS variables. Currently this is done by using the user-provided root field name. Fix by encoding only the root variable name to the MSL variable name. The rest of the field discriminators are just a running number. Each GLSL name `a` is unique. MSL names get fixed suffix form `a_X`, and thus all of them are unique too. This is a continuation of following fixes that turned out to be incomplete: 6fe8a399dd Metal: Fix rewritten out variables with underscores 27423bffff Metal: Generate names for rewritten inputs Bug: angleproject:376417347 Change-Id: I407db373d201b3e321c6d8414bafdbecfd82cf19 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5979774 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Rafay Khurram 7c99c225 2024-04-03T01:48:57 CL/Vulkan: Implement clEnqueue APIs involving images Review enables the functionality of: - clEnqueueReadImage - clEnqueueWriteImage - clEnqueueCopyImage - clEnqueueMapImage - clEnqueueCopyImageToBuffer - clEnqueueCopyBufferToImage Tests-Passing: OCLCTS.test_basic imagecopy, imagerandomcopy, OCLCTS.test_profiling copy_array_to_image Bug: angleproject:42266936 Change-Id: Ifd4ccd0a9e16bac11dbff74d4634d9ca4c5b4284 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5796530 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Rafay Khurram <r.khurram@samsung.com>
Kimmo Kinnunen 0624b4fb 2024-10-31T20:59:20 Metal: Make ToposortStructs compile on c++17 Use .find() != .end() instead of .contains() for std::unordered_map. Bug: angleproject:375352601 Change-Id: I2e550354e1df3b390b74fdea29427fd3a0326fe8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5979775 Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 6b9d3762 2024-08-22T15:29:00 Vulkan: Optimize full texture clears Currently, a full texture clear (glClearTexImageEXT()) is treated as a special case of a partial clear (glClearTexSubImageEXT() with image dims as the input). However, it can be further optimized by treating it as a clear update. * For full clears from EXT_clear_texture, the clear update path is taken. * It leads to a more optimized path, including the usage of the following APIs: * vkCmdClearColorImage() * vkCmdClearDepthStencilImage() * It uses the following enum: ClearTextureMode * If a partial clear uses the extents for the entire image, it is treated as a full clear. * Updated the method to determine if a texture is renderable in clearSubImageImpl(). * Added perf counter: fullImageClears * Added new unit tests * Single 3D texture full clear (Clear3DSingleFull) * 2D RGB SNORM clear (Clear2DRGB8Snorm) * Added Vulkan perf counter test for 2D and 3D color image clear. * Updated the related skipped tests on Pineapple. Bug: angleproject:42266869 Bug: angleproject:375425839 Change-Id: I12ef3002dee190d7f8f43204f7d3f76e05d0b54f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5806207 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Cody Northrop 91ea8aef 2024-10-31T12:33:35 scripts: Add restricted_trace_perf as data dep This gets it in to angle_trace_bundle.py. Bug: b/376300037 Change-Id: Iebffb105d24bd45c346d6d7085051c432039e2ef Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5980801 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Amirali Abdolrashidi 66701c98 2024-10-31T11:37:44 Vulkan: Remove extra non-conformant flag check In Vulkan, getMaxConformantESVersion() calls another function which already checks which ES version to use (getMaxSupportedESVersion()). It also uses the non-conformance flag to check if it should bypass the ES 3.2 check if the flag is enabled. However, the former uses the flag to cap the version to ES 3.1 if the flag is disabled. This check seems unnecessary, and can cap the version for a device that does have the ability to use ES 3.2. * Removed the non-conformant flag check from getMaxConformant*(). Bug: b/374841339 Change-Id: I377e6ba2fe174aae7e2e1b19407b2acd89749157 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5979643 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Solti 02f88b31 2024-10-30T21:49:19 Improve CanSupportAEP Error Reporting This change improves the error reporting for the `CanSupportAEP` function. Previously, if the function returned false, it was difficult to determine which requirement was not met. This change adds logging that will list all unmet requirements, making it easier to debug AEP support issues. For Chromium logs, this logging is too much. Therefore, a switch is used and by default the logging is off. ref: https://crrev.com/c/5979208?tab=comments Test: the default presubmit Bug: b/268108262 Change-Id: I7f633cdb63f9cfeb501cd5f134b0ea7874465aed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5979292 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Kimmo Kinnunen 8d12b278 2024-03-15T15:39:39 Make separated anonymous in/out structs work better Fixes failing case for other backends than GLSL output: VS: out struct { .. } a, b; FS: in struct { .. } a, b Make the ANGLE VS-FS interface matching work by using the anonymous name as the variable structOrBlock name. Bug: angleproject:42267047 Change-Id: If8107387c02b5520134857fb210a27a8f92a2db0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5372727 Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Kimmo Kinnunen b8d546b2 2024-10-30T15:40:58 Fix immutable string concats with ints `BuildConcatenatedImmutableString("a", 10, "b")` would construct "a\nb" because the implementation lacked int overloads and ints would be promoted to chars implicitly. Fix by implementing simpler way to calculate digits for numbers and then add useful overloads. Remove ImmutableStringBuilder::appendDecimal() since the code is already expecting << for all other types, and the bug was due to this expectation. Bug: angleproject:376417347 Change-Id: Iea5e14a6e2fede068b704754b9203db794dd5bf0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5972641 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Shahbaz Youssefi d4a9fa51 2024-10-31T09:37:28 Vulkan: Re-enable dynamic rendering on newer ARM drivers Bug: b/356051947 Change-Id: I03fbed2dbdb8f454ee1c429db4669d13e719b9bd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5980610 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Cody Northrop 7bb1e0f6 2024-10-29T13:18:49 restricted_trace_perf: Allow use of system ANGLE libs This change allows the perf script to use built in ANGLE libs, including from the system partition, instead of requiring a separate package. By default, the script will now use the ANGLE libs packaged in the test APK (com.android.angle.test). OpenGL/EGL calls will still go though the platform EGL loader, but you no longer need to install a separate ANGLE APK containing libs. To use the system libs, add the following flag: --angle-package system You can use it to point to *any* package that is queryable and contains ANGLE libraries. To get the previous behavior, you'd use: --angle-package org.chromium.angle Also two small unrelated fixes: * Fix typo when clearing shader cache * Broaden the 'MODEL' skip in thermal throttling Bug: b/376300037 Change-Id: I762cfd7516026e903a6a5de2949d50e96e766d48 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5976899 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Neil Zhang 236e0f48 2024-10-22T18:33:23 Add fix for create multi-window surfaces cause crash This patch fix crash when created multiple window surfaces, and not call corresponding eglDestroySurface, also added related test. Bug: angleproject:374797737 Change-Id: I58941660130e84e213cf9d78806027d56d6efc8c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5981430 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 2df8d32b 2024-10-25T13:49:40 Vulkan: Tag DescriptorSets properly with every command buffer When descriptorSetCache is disabled, there is a bug that the current descriptorSet is not properly tagged with current ResourceUse. Right now when we get a descriptorSet (from cache or reused or allocated new), we retain to the current command buffer. But if we submit command buffer and get a new command buffer, and draw with the same program/buffer/textures, we will be reusing the current bound descriptorSets, but it is not retained with new command buffer. In theory, we have the same bug for pool eviction as well when cache is enabled. It's just very hard to hit due to pool eviction occur very rare. But with cache disabled, this is very easy to hit with multiple tests. In this CL, the retainResource call is moved from ProgramExecutableVk::getOrAllocateDescriptorSet() call to ProgramExecutableVk::bindDescriptorSets() call. Since bindDescriptorSets is always get called when we get a new descriptorSet, and is always get called when a new command buffer is allocated, this covers all usage case. And even better, with this change we are able to remove commandBufferHelper from arguments of quite a few functions. Bug: angleproject:372268711 Change-Id: I1f21a3e7e9ea34e2842e54025b5eb930dbf6c593 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4743599 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Amirali Abdolrashidi 913251aa 2024-09-25T17:42:59 Add clear tests related to layered image * Added tests to bind a layered framebuffer to a 3D image and clear it. Bug: angleproject:42266869 Change-Id: I488a26883d3e05daf0cc746ccf4b409ba470cb4a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5889409 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 63f5a328 2024-10-30T14:40:40 Revert "Improve CanSupportAEP Error Reporting" This reverts commit fb655e43f4a86fbdf35bf0cb5d2978d728b949d9. Reason for revert: Causes excessive logging and leads to flakiness in Chromium Original change's description: > Improve CanSupportAEP Error Reporting > > This change improves the error reporting for the `CanSupportAEP` > function. Previously, if the function returned false, it was difficult > to determine which requirement was not met. This change adds logging > that will list all unmet requirements, making it easier to debug AEP > support issues. > > Test: the default presubmit > Bug: b/268108262 > Change-Id: I48eb6b26358ca4991d760523f44568d97e8c35a6 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5972497 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Solti Ho <solti@google.com> > Reviewed-by: Yuxin Hu <yuxinhu@google.com> Bug: b/268108262 Bug: chromium:376380430 Bug: chromium:40266306 Change-Id: Ic5b1bbce16fe5c98af10ca0554d1035206d5c592 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5979208 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 1652f8ed 2024-10-17T13:35:39 Vulkan: end2end tests when descriptorSetCache is disabled Some end2end tests are testing specific descriptorSet cache behavior. When cache is disabled, these tests failed. In this CL these perfCounter based tests haven been modified to check total allocation to ensure the descriptorSets are properly reused instead of cache hit/miss. Bug: angleproject:372268711 Change-Id: I1d2f4cfcf622b05cdcb3317c8804416a80e72c48 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3735732 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 0a372f29 2024-10-28T22:59:53 Vulkan: Remove docs about OpenGL line rasterization emulation The code that emulated OpenGL line rasterization has been removed. Bug: angleproject:42265836 Change-Id: Ib1c1d8745b1790e0291a691a6a1c8e9438c34351 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5973239 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Solti fb655e43 2024-10-28T21:45:41 Improve CanSupportAEP Error Reporting This change improves the error reporting for the `CanSupportAEP` function. Previously, if the function returned false, it was difficult to determine which requirement was not met. This change adds logging that will list all unmet requirements, making it easier to debug AEP support issues. Test: the default presubmit Bug: b/268108262 Change-Id: I48eb6b26358ca4991d760523f44568d97e8c35a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5972497 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Solti Ho <solti@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Charlie Lao d0a0fd1a 2024-10-17T14:50:51 Vulkan: Skip pool eviction when cache is disabled When cache is disabled, every time a new descriptorSet is allocated and bind to program, the previous descriptorSet will be added to the tail of garbage list, and the new descriptorSet is retrieved from the head of the garbage list, if its GPU usage has been completed. This means there will never have a situation that significant amount of descriptorSets are needed, therefore no need for pool eviction. One possible situation is that at one point you need a lot of descriptorSets and then after a while you only need small amount of descriptorSets. In that case we could delete the excessive unused descriptorSets. But since they are all allocated from a pool, as long as there is still one descriptorSet in the pool is used, you still can't destroy the pool. This means eviction is really not much useful when cache is disabled. Bug: angleproject:372268711 Change-Id: Id77b181b64e122f576ee43d11c39dc75bd681dcf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5941126 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao af73a7eb 2024-10-18T17:19:29 Vulkan: Add WeakPtr to mirror std::weak_ptr This is a follow up from previous CL crrev.com/c/5938947. Because of pool eviction is based on reference count, there is need to have a weak pointer to the reference counted pool that does not add an extra reference count. This CL adds WeakPtr that works similarly to std::weak_ptr, and replaced direct RefCountedDescriptorPool pointer with WeakPtr wrapper. This is safer than RefCountedDescriptorPool in a way that it does not allow modification of underline reference count. Also the use of WeakPtr has been reduced to minimum in this CL. Bug: angleproject:372268711 Change-Id: Idd6fa77432a9351269c968c961785a7cf5fab50c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5944061 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Roman Lavrov a7ef6444 2024-10-29T09:39:24 Tests: skip D3D11 dEQP-GLES2.functional.polygon_offset Got re-enabled in https://chromium.googlesource.com/external/github.com/KhronosGroup/VK-GL-CTS.git/+/0d2b73e3a4b70d3117abca393e2b86ccf99f4c31 The GLES3 version is already skipped for this config Bug: angleproject:42260109 Change-Id: Ief290695dd97d7ecf84f2e06f352d9135e0748b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5974494 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Kimmo Kinnunen 4397ff2f 2024-10-25T16:55:30 Metal: SeparateCompoundStructDeclarations fails validation Consider GLSL: struct S { int i; } s; s=s; SeparateCompoundStructDeclarations would rewrite this to: struct S { int i; }; S s'; s=s; The interm rewrite would rewrite the specification and declaration of s, but not the use sites. The use sites would use the old type, and thus something that was not in the tree anymore. This would fail the validation. This kind of bug was previously fixed for SeparateDeclarations in commit 18fa02bebf901dd8501de3176f6052ae4ce984be. Fix by adding the logic to SeparateDeclarations, as it is already doing almost the exact task, separating `struct S { ..} a, b`. The separation is tested in GLSLTests.StructInShader and various other draw tests. These pass with MSL, but these would also fail validation if that was enabled. Bug: angleproject:375523825 Change-Id: I1697103d0ba47616dbd3159f36f9e71cb2831c4b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5964899 Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>