Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2a77092 authored by Courtney Goeltzenleuchter's avatar Courtney Goeltzenleuchter
Browse files

vkinfo: Add debug command line option

Really handy for loader debug to switch between
waiting and not waiting for a debugger to attach.

Change-Id: I47fb1475d8aa62b8f4b2b7e6a156793f108a83ed
parent b1e7d59f
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -510,6 +510,7 @@ void PrintInfo(const VulkanInfo& info, const Options& options) {
// ----------------------------------------------------------------------------

int main(int argc, char const* argv[]) {
    static volatile bool startup_pause = false;
    Options options = {
        .layer_description = false, .layer_extensions = false,
    };
@@ -521,9 +522,15 @@ int main(int argc, char const* argv[]) {
            options.layer_description = true;
        } else if (strcmp(argv[argi], "-layer_extensions") == 0) {
            options.layer_extensions = true;
        } else if (strcmp(argv[argi], "-debug_pause") == 0) {
            startup_pause = true;
        }
    }

    while (startup_pause) {
        sleep(0);
    }

    VulkanInfo info;
    GatherInfo(&info);
    PrintInfo(info, options);