From 3494fce86467878cd62a2faf54da2958b7495a17 Mon Sep 17 00:00:00 2001 From: Ameer J <52414509+ameerj@users.noreply.github.com> Date: Tue, 1 Aug 2023 19:43:22 -0400 Subject: gl --- src/video_core/renderer_opengl/util_shaders.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/video_core/renderer_opengl') diff --git a/src/video_core/renderer_opengl/util_shaders.cpp b/src/video_core/renderer_opengl/util_shaders.cpp index 544982d18..c437013e6 100644 --- a/src/video_core/renderer_opengl/util_shaders.cpp +++ b/src/video_core/renderer_opengl/util_shaders.cpp @@ -68,6 +68,7 @@ void UtilShaders::ASTCDecode(Image& image, const StagingBufferMap& map, std::span swizzles) { static constexpr GLuint BINDING_INPUT_BUFFER = 0; static constexpr GLuint BINDING_OUTPUT_IMAGE = 0; + program_manager.LocalMemoryWarmup(); const Extent2D tile_size{ .width = VideoCore::Surface::DefaultBlockWidth(image.info.format), -- cgit v1.2.3 From b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61 Mon Sep 17 00:00:00 2001 From: Ameer J <52414509+ameerj@users.noreply.github.com> Date: Sun, 6 Aug 2023 14:49:34 -0400 Subject: HACK: Avoid swizzling and reuploading ASTC image every frame --- src/video_core/renderer_opengl/gl_texture_cache.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/video_core/renderer_opengl') diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index 9cafd2983..9ca544ec9 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp @@ -554,7 +554,14 @@ void TextureCacheRuntime::Finish() { } StagingBufferMap TextureCacheRuntime::UploadStagingBuffer(size_t size) { - return staging_buffer_pool.RequestUploadBuffer(size); + static StagingBufferMap result; + static size_t last_size = 0; + if (size == last_size) { + return result; + } + last_size = size; + result = staging_buffer_pool.RequestUploadBuffer(size); + return result; } StagingBufferMap TextureCacheRuntime::DownloadStagingBuffer(size_t size) { -- cgit v1.2.3 From 9058486b9b9833d0554d3e3f11a582859657b21f Mon Sep 17 00:00:00 2001 From: Ameer J <52414509+ameerj@users.noreply.github.com> Date: Sun, 6 Aug 2023 14:55:05 -0400 Subject: Revert "HACK: Avoid swizzling and reuploading ASTC image every frame" This reverts commit b18c1fb1bbbcc235e9a1cbbb2704fed2e5895e61. --- src/video_core/renderer_opengl/gl_texture_cache.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/video_core/renderer_opengl') diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index 9ca544ec9..9cafd2983 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp @@ -554,14 +554,7 @@ void TextureCacheRuntime::Finish() { } StagingBufferMap TextureCacheRuntime::UploadStagingBuffer(size_t size) { - static StagingBufferMap result; - static size_t last_size = 0; - if (size == last_size) { - return result; - } - last_size = size; - result = staging_buffer_pool.RequestUploadBuffer(size); - return result; + return staging_buffer_pool.RequestUploadBuffer(size); } StagingBufferMap TextureCacheRuntime::DownloadStagingBuffer(size_t size) { -- cgit v1.2.3