summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/host_shaders/CMakeLists.txt1
-rw-r--r--src/video_core/host_shaders/vulkan_blit_depth_stencil.frag16
2 files changed, 17 insertions, 0 deletions
diff --git a/src/video_core/host_shaders/CMakeLists.txt b/src/video_core/host_shaders/CMakeLists.txt
index 5b24f9866..7059c2d2a 100644
--- a/src/video_core/host_shaders/CMakeLists.txt
+++ b/src/video_core/host_shaders/CMakeLists.txt
@@ -9,6 +9,7 @@ set(SHADER_FILES
9 opengl_present.vert 9 opengl_present.vert
10 pitch_unswizzle.comp 10 pitch_unswizzle.comp
11 vulkan_blit_color_float.frag 11 vulkan_blit_color_float.frag
12 vulkan_blit_depth_stencil.frag
12 vulkan_present.frag 13 vulkan_present.frag
13 vulkan_present.vert 14 vulkan_present.vert
14) 15)
diff --git a/src/video_core/host_shaders/vulkan_blit_depth_stencil.frag b/src/video_core/host_shaders/vulkan_blit_depth_stencil.frag
new file mode 100644
index 000000000..19bb23a5a
--- /dev/null
+++ b/src/video_core/host_shaders/vulkan_blit_depth_stencil.frag
@@ -0,0 +1,16 @@
1// Copyright 2020 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#version 450
6#extension GL_ARB_shader_stencil_export : require
7
8layout(binding = 0) uniform sampler2D depth_tex;
9layout(binding = 1) uniform isampler2D stencil_tex;
10
11layout(location = 0) in vec2 texcoord;
12
13void main() {
14 gl_FragDepth = textureLod(depth_tex, texcoord, 0).r;
15 gl_FragStencilRefARB = textureLod(stencil_tex, texcoord, 0).r;
16}