From 52ebdd42c6ee2f7b22dc2c7a4f23d50a2940b4f5 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 5 Apr 2022 22:05:23 -0400 Subject: OpenGL: fix S8D24 to ABGR8 conversions --- src/video_core/host_shaders/opengl_convert_s8d24.comp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/video_core/host_shaders/opengl_convert_s8d24.comp (limited to 'src/video_core/host_shaders/opengl_convert_s8d24.comp') 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); +} -- cgit v1.2.3