// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later

// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later

#version 450

layout(local_size_x = 1) in;

layout(std430, binding = 0) readonly buffer Query {
    uint data[];
};

layout(std430, binding = 1) writeonly buffer Result {
    uint result;
};

layout(push_constant) uniform PushConstants {
    uint compare_to_zero;
};

void main() {
    if (compare_to_zero != 0u) {
        result = (data[0] != 0u && data[1] != 0u) ? 1u : 0u;
    } else {
        result = (data[0] == data[4] && data[1] == data[5]) ? 1u : 0u;
    }
}
