summaryrefslogtreecommitdiffstats
path: root/src/video_core/host_shaders
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-03-04 20:14:19 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2021-03-04 20:14:19 +0100
commit0639244d856f403cc9bdec5ca927df7a61edd1d8 (patch)
treea87c6e3142665bfb632001507cf04c973a88e1a6 /src/video_core/host_shaders
parentMerge pull request #6004 from german77/udprandom (diff)
downloadyuzu-0639244d856f403cc9bdec5ca927df7a61edd1d8.tar
yuzu-0639244d856f403cc9bdec5ca927df7a61edd1d8.tar.gz
yuzu-0639244d856f403cc9bdec5ca927df7a61edd1d8.tar.bz2
yuzu-0639244d856f403cc9bdec5ca927df7a61edd1d8.tar.lz
yuzu-0639244d856f403cc9bdec5ca927df7a61edd1d8.tar.xz
yuzu-0639244d856f403cc9bdec5ca927df7a61edd1d8.tar.zst
yuzu-0639244d856f403cc9bdec5ca927df7a61edd1d8.zip
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_copy_bgra.comp15
2 files changed, 16 insertions, 0 deletions
diff --git a/src/video_core/host_shaders/CMakeLists.txt b/src/video_core/host_shaders/CMakeLists.txt
index 970120acc..3494318ca 100644
--- a/src/video_core/host_shaders/CMakeLists.txt
+++ b/src/video_core/host_shaders/CMakeLists.txt
@@ -5,6 +5,7 @@ set(SHADER_FILES
convert_float_to_depth.frag
full_screen_triangle.vert
opengl_copy_bc4.comp
+ opengl_copy_bgra.comp
opengl_present.frag
opengl_present.vert
pitch_unswizzle.comp
diff --git a/src/video_core/host_shaders/opengl_copy_bgra.comp b/src/video_core/host_shaders/opengl_copy_bgra.comp
new file mode 100644
index 000000000..2571a4abf
--- /dev/null
+++ b/src/video_core/host_shaders/opengl_copy_bgra.comp
@@ -0,0 +1,15 @@
+// Copyright 2021 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#version 430 core
+
+layout (local_size_x = 4, local_size_y = 4) in;
+
+layout(binding = 0, rgba8) readonly uniform image2DArray bgr_input;
+layout(binding = 1, rgba8) writeonly uniform image2DArray bgr_output;
+
+void main() {
+ vec4 color = imageLoad(bgr_input, ivec3(gl_GlobalInvocationID));
+ imageStore(bgr_output, ivec3(gl_GlobalInvocationID), color.bgra);
+}