From 024deff7f5b75c5c86e4e0b59d1b35758ab3d4fd Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sun, 21 Feb 2021 03:07:36 +0100 Subject: [PATCH] early-access version 1479 --- README.md | 2 +- .../host_shaders/opengl_copy_bgr16.comp | 20 +++++++------------ .../renderer_opengl/gl_shader_cache.cpp | 4 ++++ 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 2f7212089..e9c92cc74 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1478. +This is the source code for early-access 1479. ## Legal Notice diff --git a/src/video_core/host_shaders/opengl_copy_bgr16.comp b/src/video_core/host_shaders/opengl_copy_bgr16.comp index a0e9bf451..d2a723fcb 100755 --- a/src/video_core/host_shaders/opengl_copy_bgr16.comp +++ b/src/video_core/host_shaders/opengl_copy_bgr16.comp @@ -13,18 +13,12 @@ layout(binding = 0) buffer BgrImage { void main() { const uint index = gl_GlobalInvocationID.y * gl_NumWorkGroups.x + gl_GlobalInvocationID.x; const uint packed_bits = bgr_copy[index]; - uint swapped = 0; - // The buffer is packed 16-bit shorts, we need to swizzle two pixels per element - for (int i = 0; i < 2; i++) { - // R5 G6 B5 - // RRRRRGGG GGGBBBBB - const int offset = i * 16; - const uint blue = bitfieldExtract(packed_bits, offset, 5); - const uint green = bitfieldExtract(packed_bits, 5 + offset, 6); - const uint red = bitfieldExtract(packed_bits, 11 + offset, 5); - const uint temp = ((blue << 11) | (green << 5 ) | red) << offset; - swapped |= temp; - } - bgr_copy[index] = swapped; + // R5 G6 B5 + // RRRRRGGG GGGBBBBB + const uint blue = bitfieldExtract(packed_bits, 0, 5); + const uint green = bitfieldExtract(packed_bits, 5 + 0, 6); + const uint red = bitfieldExtract(packed_bits, 11 + 0, 5); + const uint swapped_bits = ((blue << 11) | (green << 5 ) | red); + bgr_copy[index] = swapped_bits; return; } diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 529570ff0..5cf7cd151 100755 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp @@ -335,6 +335,10 @@ void ShaderCacheOpenGL::LoadDiskCache(u64 title_id, const std::atomic_bool& stop const VideoCore::DiskResourceLoadCallback& callback) { disk_cache.BindTitleID(title_id); const std::optional transferable = disk_cache.LoadTransferable(); + + LOG_INFO(Render_OpenGL, "Total Shader Count: {}", + transferable.has_value() ? transferable->size() : 0); + if (!transferable) { return; }