diff options
author | Liam <byteslice@airmail.cc> | 2022-04-06 04:05:23 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-04-07 01:44:33 +0200 |
commit | 52ebdd42c6ee2f7b22dc2c7a4f23d50a2940b4f5 (patch) | |
tree | 32bc3c7182bb66d79ae2be212d2adacadf89bf52 /src/video_core/host_shaders | |
parent | Merge pull request #8100 from Morph1984/registered-crash (diff) | |
download | yuzu-52ebdd42c6ee2f7b22dc2c7a4f23d50a2940b4f5.tar yuzu-52ebdd42c6ee2f7b22dc2c7a4f23d50a2940b4f5.tar.gz yuzu-52ebdd42c6ee2f7b22dc2c7a4f23d50a2940b4f5.tar.bz2 yuzu-52ebdd42c6ee2f7b22dc2c7a4f23d50a2940b4f5.tar.lz yuzu-52ebdd42c6ee2f7b22dc2c7a4f23d50a2940b4f5.tar.xz yuzu-52ebdd42c6ee2f7b22dc2c7a4f23d50a2940b4f5.tar.zst yuzu-52ebdd42c6ee2f7b22dc2c7a4f23d50a2940b4f5.zip |
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/opengl_convert_s8d24.comp | 18 |
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 full_screen_triangle.vert fxaa.frag fxaa.vert + opengl_convert_s8d24.comp opengl_copy_bc4.comp opengl_present.frag 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 @@ +// Copyright 2022 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#version 430 core + +layout(local_size_x = 16, local_size_y = 8) in; + +layout(binding = 0, rgba8ui) restrict uniform uimage2D destination; +layout(location = 0) uniform uvec3 size; + +void main() { + if (any(greaterThanEqual(gl_GlobalInvocationID, size))) { + return; + } + uvec4 components = imageLoad(destination, ivec2(gl_GlobalInvocationID.xy)); + imageStore(destination, ivec2(gl_GlobalInvocationID.xy), components.wxyz); +} |