summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-06-19 17:16:25 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-06-19 17:16:25 +0200
commit851c76233db1d6fab507b0ab3423284a79829ede (patch)
tree04c6cd99b7209987e86640d89f95603f00dd9314 /src/video_core
parentastc_decoder.comp: Remove unnecessary LUT SSBOs (diff)
downloadyuzu-851c76233db1d6fab507b0ab3423284a79829ede.tar
yuzu-851c76233db1d6fab507b0ab3423284a79829ede.tar.gz
yuzu-851c76233db1d6fab507b0ab3423284a79829ede.tar.bz2
yuzu-851c76233db1d6fab507b0ab3423284a79829ede.tar.lz
yuzu-851c76233db1d6fab507b0ab3423284a79829ede.tar.xz
yuzu-851c76233db1d6fab507b0ab3423284a79829ede.tar.zst
yuzu-851c76233db1d6fab507b0ab3423284a79829ede.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/util_shaders.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/util_shaders.cpp b/src/video_core/renderer_opengl/util_shaders.cpp
index 7e32f49ca..abaf1ee6a 100644
--- a/src/video_core/renderer_opengl/util_shaders.cpp
+++ b/src/video_core/renderer_opengl/util_shaders.cpp
@@ -118,7 +118,12 @@ void UtilShaders::ASTCDecode(Image& image, const ImageBufferMap& map,
glDispatchCompute(num_dispatches_x, num_dispatches_y, image.info.resources.layers);
}
- glMemoryBarrier(GL_ALL_BARRIER_BITS);
+ // Precautionary barrier to ensure the compute shader is done decoding prior to texture access.
+ // GL_TEXTURE_FETCH_BARRIER_BIT and GL_SHADER_IMAGE_ACCESS_BARRIER_BIT are used in a separate
+ // glMemoryBarrier call by the texture cache runtime
+ glMemoryBarrier(GL_UNIFORM_BARRIER_BIT | GL_COMMAND_BARRIER_BIT | GL_PIXEL_BUFFER_BARRIER_BIT |
+ GL_TEXTURE_UPDATE_BARRIER_BIT | GL_BUFFER_UPDATE_BARRIER_BIT |
+ GL_SHADER_STORAGE_BARRIER_BIT | GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT);
program_manager.RestoreGuestCompute();
}