aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/host_shaders/resolve_conditional_render.comp
blob: 3bc92f94fa21731e5731d5a622c104a9f61b8749 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// 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;
    }
}