src/gpu_info_util/SystemInfo_android.cpp


Log

Author Commit Date CI Message
Jamie Madill a683628b 2019-03-20T11:23:12 Use common SystemInfo in tests. We were using a static SystemInfo in two places. Consolidate the SystemInfo collection to a single location. Also renames Nvidia to NVIDIA to be consistent with the company naming. And adds a few helpers to SystemInfo for GPU detection. Will lead to test changes to reduce flakiness on Intel Windows. Bug: angleproject:3261 Change-Id: I4e0addf19d6fe26b4d31a1289efce72092a0a1dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1531533 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jonah Ryan-Davis 4bcba62a 2019-03-18T14:31:12 Add Android device name, version, manufacturer to gpu_info_util The model name, model version, and model manufacturer are easy to expose for Android via <sys/system_properties.h>. This should be exposed and added to the angle test framework for easy management of test expectations on different devices. Bug: angleproject:3274 Change-Id: I8ee6b8fa66ff7f4d6ee4688b335f2e6ef03baed6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1529207 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi a390ebd9 2018-10-18T13:04:40 Add compiler printf attribute to relevant functions Relands 27a472c60 with reinterpret_cast changed to C-style cast to support types that are pointers on some platforms and integers on others. This commit includes fixes to undefined behavior caught by this attribute. The following changes have been made: - 0x%0.8p is changed to %016 PRIxPTR. Both 0 and . have undefined behavior with p. Additionally, %p already prints 0x with both gcc and clang. This results in a small output change: void *x = (void *)0x1234; void *y = (void *)0x1234567890abcdef; printf("|%0.8p|\n", x); printf("|%0.8p|\n", y); printf("|%016" PRIxPTR "|\n", (uintptr_t)x); printf("|%016" PRIxPTR "|\n", (uintptr_t)y); prints: |0x00001234| |0x1234567890abcdef| |0x0000000000001234| |0x1234567890abcdef| - %d used for GLintptr, GLsizeiptr, EGLTime and EGLnsecsANDROID is changed to %llu and the relevant argument is cast to unsigned long long. This is due to these types being typedefs to unknown types (on Linux for example, these are unsigned long, and my guess would be unsigned long long on Windows where long is 32 bits). - %llu is used for GLuint64, which could be unsigned long (as is on Linux). Those arguments are cast to unsigned long long. - %p is used for some EGLNative types, but those types may not be a pointer. Those arguments are cast to uintptr_t and printed as above. Bug: angleproject:2928 Change-Id: Idf9f705c3d00f69e41e7603453016276a2e13a64 Reviewed-on: https://chromium-review.googlesource.com/c/1300913 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill e9503ae9 2018-10-25T17:55:04 Revert "Add compiler printf attribute to relevant functions" This reverts commit 27a472c601aa542f48ca5944fb769e2971a0594f. Reason for revert: Causing failures on 32-bit Linux configs: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8931673733828416640/+/steps/compile/0/stdout ../../third_party/angle/src/libGLESv2/entry_points_egl.cpp:257:11: error: reinterpret_cast from 'EGLNativeWindowType' (aka 'unsigned long') to 'uintptr_t' (aka 'unsigned int') is not allowed reinterpret_cast<uintptr_t>(win), reinterpret_cast<uintptr_t>(attrib_list)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../third_party/angle/src/common/debug.h:230:112: note: expanded from macro 'EVENT' #define EVENT(message, ...) gl::ScopedPerfEventHelper scopedPerfEventHelper("%s" message "\n", __FUNCTION__, ##__VA_ARGS__); ^~~~~~~~~~~ ../../third_party/angle/src/libGLESv2/entry_points_egl.cpp:314:11: error: reinterpret_cast from 'EGLNativePixmapType' (aka 'unsigned long') to 'uintptr_t' (aka 'unsigned int') is not allowed reinterpret_cast<uintptr_t>(pixmap), reinterpret_cast<uintptr_t>(attrib_list)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original change's description: > Add compiler printf attribute to relevant functions > > This commit includes fixes to undefined behavior caught by this > attribute. The following changes have been made: > > - 0x%0.8p is changed to %016 PRIxPTR. Both 0 and . have undefined behavior with > p. Additionally, %p already prints 0x with both gcc and clang. This > results in a small output change: > > void *x = (void *)0x1234; > void *y = (void *)0x1234567890abcdef; > > printf("|%0.8p|\n", x); > printf("|%0.8p|\n", y); > > printf("|%016" PRIxPTR "|\n", reinterpret_cast<uintptr_t>(x)); > printf("|%016" PRIxPTR "|\n", reinterpret_cast<uintptr_t>(y)); > > prints: > > |0x00001234| > |0x1234567890abcdef| > |0x0000000000001234| > |0x1234567890abcdef| > > - %d used for GLintptr, GLsizeiptr, EGLTime and EGLnsecsANDROID is > changed to %llu and the relevant argument is cast to unsigned long > long. This is due to these types being typedefs to unknown types (on > Linux for example, these are unsigned long, and my guess would be > unsigned long long on Windows where long is 32 bits). > - %llu is used for GLuint64, which could be unsigned long (as is on > Linux). Those arguments are cast to unsigned long long. > - %p is used for some EGLNative types, but those types may not be a > pointer. Those arguments are cast to uintptr_t and printed as above. > > Bug: angleproject:2928 > Change-Id: I63e9e998c72701ce8582f1ebf25d6374be9090e4 > Reviewed-on: https://chromium-review.googlesource.com/c/1289232 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Yuly Novikov <ynovikov@chromium.org> TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org Change-Id: I4f3cea64977bee9f889db6c995371bd2bbc6d81b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2928 Reviewed-on: https://chromium-review.googlesource.com/c/1299480 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 27a472c6 2018-10-18T13:04:40 Add compiler printf attribute to relevant functions This commit includes fixes to undefined behavior caught by this attribute. The following changes have been made: - 0x%0.8p is changed to %016 PRIxPTR. Both 0 and . have undefined behavior with p. Additionally, %p already prints 0x with both gcc and clang. This results in a small output change: void *x = (void *)0x1234; void *y = (void *)0x1234567890abcdef; printf("|%0.8p|\n", x); printf("|%0.8p|\n", y); printf("|%016" PRIxPTR "|\n", reinterpret_cast<uintptr_t>(x)); printf("|%016" PRIxPTR "|\n", reinterpret_cast<uintptr_t>(y)); prints: |0x00001234| |0x1234567890abcdef| |0x0000000000001234| |0x1234567890abcdef| - %d used for GLintptr, GLsizeiptr, EGLTime and EGLnsecsANDROID is changed to %llu and the relevant argument is cast to unsigned long long. This is due to these types being typedefs to unknown types (on Linux for example, these are unsigned long, and my guess would be unsigned long long on Windows where long is 32 bits). - %llu is used for GLuint64, which could be unsigned long (as is on Linux). Those arguments are cast to unsigned long long. - %p is used for some EGLNative types, but those types may not be a pointer. Those arguments are cast to uintptr_t and printed as above. Bug: angleproject:2928 Change-Id: I63e9e998c72701ce8582f1ebf25d6374be9090e4 Reviewed-on: https://chromium-review.googlesource.com/c/1289232 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Ian Elliott ae6c2b88 2018-08-29T13:05:23 Fixes found while turning on A4A opt-in/out code. Bug: angleproject:2789 Change-Id: If9d83dd94d392103ed5200ba471d47dc907cf3ca Reviewed-on: https://chromium-review.googlesource.com/1194612 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Ian Elliott 97f45b7b 2018-07-27T21:03:10 Add Android-specific version struct to GetSystemInfo results. Bug: angleproject:2749 Change-Id: Ie8fdb67918ea1c1054527fe1e0c1be4054fe9cb3 Reviewed-on: https://chromium-review.googlesource.com/1154189 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Ian Elliott d07c52e2 2018-06-22T15:42:09 Initial Android implementation of GetSystemInfo Change-Id: Ia44413aa94906b89d4981063600cd3de0edacee8 Reviewed-on: https://chromium-review.googlesource.com/1108454 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>