diff options
| author | 2023-08-04 03:32:30 +0200 | |
|---|---|---|
| committer | 2023-09-23 23:05:29 +0200 | |
| commit | f1a2e367113518b277f34ffbb04499882c3b6051 (patch) | |
| tree | 0920a98bd359b9207130d01f6df4ae5135ec805c /src/video_core/host_shaders | |
| parent | Query Cache: Setup Base rework (diff) | |
| download | yuzu-f1a2e367113518b277f34ffbb04499882c3b6051.tar.gz yuzu-f1a2e367113518b277f34ffbb04499882c3b6051.tar.xz yuzu-f1a2e367113518b277f34ffbb04499882c3b6051.zip | |
Query Cachge: Fully rework Vulkan's query cache
Diffstat (limited to 'src/video_core/host_shaders')
| -rw-r--r-- | src/video_core/host_shaders/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | src/video_core/host_shaders/resolve_conditional_render.comp | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/video_core/host_shaders/CMakeLists.txt b/src/video_core/host_shaders/CMakeLists.txt index c4d459077..fb24b6532 100644 --- a/src/video_core/host_shaders/CMakeLists.txt +++ b/src/video_core/host_shaders/CMakeLists.txt | |||
| @@ -41,6 +41,7 @@ set(SHADER_FILES | |||
| 41 | pitch_unswizzle.comp | 41 | pitch_unswizzle.comp |
| 42 | present_bicubic.frag | 42 | present_bicubic.frag |
| 43 | present_gaussian.frag | 43 | present_gaussian.frag |
| 44 | resolve_conditional_render.comp | ||
| 44 | smaa_edge_detection.vert | 45 | smaa_edge_detection.vert |
| 45 | smaa_edge_detection.frag | 46 | smaa_edge_detection.frag |
| 46 | smaa_blending_weight_calculation.vert | 47 | smaa_blending_weight_calculation.vert |
diff --git a/src/video_core/host_shaders/resolve_conditional_render.comp b/src/video_core/host_shaders/resolve_conditional_render.comp new file mode 100644 index 000000000..307e77d1a --- /dev/null +++ b/src/video_core/host_shaders/resolve_conditional_render.comp | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-3.0-or-later | ||
| 3 | |||
| 4 | #version 450 | ||
| 5 | |||
| 6 | layout(local_size_x = 1) in; | ||
| 7 | |||
| 8 | layout(std430, binding = 0) buffer Query { | ||
| 9 | uvec2 initial; | ||
| 10 | uvec2 unknown; | ||
| 11 | uvec2 current; | ||
| 12 | }; | ||
| 13 | |||
| 14 | layout(std430, binding = 1) buffer Result { | ||
| 15 | uint result; | ||
| 16 | }; | ||
| 17 | |||
| 18 | void main() { | ||
| 19 | result = all(equal(initial, current)) ? 1 : 0; | ||
| 20 | } | ||