summaryrefslogtreecommitdiff
path: root/src/video_core/host_shaders
diff options
context:
space:
mode:
authorGravatar Liam2022-04-05 22:05:23 -0400
committerGravatar Liam2022-04-06 19:44:33 -0400
commit52ebdd42c6ee2f7b22dc2c7a4f23d50a2940b4f5 (patch)
tree32bc3c7182bb66d79ae2be212d2adacadf89bf52 /src/video_core/host_shaders
parentMerge pull request #8100 from Morph1984/registered-crash (diff)
downloadyuzu-52ebdd42c6ee2f7b22dc2c7a4f23d50a2940b4f5.tar.gz
yuzu-52ebdd42c6ee2f7b22dc2c7a4f23d50a2940b4f5.tar.xz
yuzu-52ebdd42c6ee2f7b22dc2c7a4f23d50a2940b4f5.zip
OpenGL: fix S8D24 to ABGR8 conversions
Diffstat (limited to 'src/video_core/host_shaders')
-rw-r--r--src/video_core/host_shaders/CMakeLists.txt1
-rw-r--r--src/video_core/host_shaders/opengl_convert_s8d24.comp18
2 files changed, 19 insertions, 0 deletions
diff --git a/src/video_core/host_shaders/CMakeLists.txt b/src/video_core/host_shaders/CMakeLists.txt
index af05d47d1..190fc6aea 100644
--- a/src/video_core/host_shaders/CMakeLists.txt
+++ b/src/video_core/host_shaders/CMakeLists.txt
@@ -18,6 +18,7 @@ set(SHADER_FILES
18 full_screen_triangle.vert 18 full_screen_triangle.vert
19 fxaa.frag 19 fxaa.frag
20 fxaa.vert 20 fxaa.vert
21 opengl_convert_s8d24.comp
21 opengl_copy_bc4.comp 22 opengl_copy_bc4.comp
22 opengl_present.frag 23 opengl_present.frag
23 opengl_present.vert 24 opengl_present.vert
diff --git a/src/video_core/host_shaders/opengl_convert_s8d24.comp b/src/video_core/host_shaders/opengl_convert_s8d24.comp
new file mode 100644
index 000000000..83e1ab176
--- /dev/null
+++ b/src/video_core/host_shaders/opengl_convert_s8d24.comp
@@ -0,0 +1,18 @@
1// Copyright 2022 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#version 430 core
6
7layout(local_size_x = 16, local_size_y = 8) in;
8
9layout(binding = 0, rgba8ui) restrict uniform uimage2D destination;
10layout(location = 0) uniform uvec3 size;
11
12void main() {
13 if (any(greaterThanEqual(gl_GlobalInvocationID, size))) {
14 return;
15 }
16 uvec4 components = imageLoad(destination, ivec2(gl_GlobalInvocationID.xy));
17 imageStore(destination, ivec2(gl_GlobalInvocationID.xy), components.wxyz);
18}