فهرست منبع

video_core: preallocate fewer IR blocks

Liam 3 سال پیش
والد
کامیت
2c01669046
2فایلهای تغییر یافته به همراه6 افزوده شده و 6 حذف شده
  1. 3 3
      src/video_core/renderer_opengl/gl_shader_context.h
  2. 3 3
      src/video_core/renderer_vulkan/vk_pipeline_cache.h

+ 3 - 3
src/video_core/renderer_opengl/gl_shader_context.h

@@ -16,9 +16,9 @@ struct ShaderPools {
         inst.ReleaseContents();
         inst.ReleaseContents();
     }
     }
 
 
-    Shader::ObjectPool<Shader::IR::Inst> inst;
-    Shader::ObjectPool<Shader::IR::Block> block;
-    Shader::ObjectPool<Shader::Maxwell::Flow::Block> flow_block;
+    Shader::ObjectPool<Shader::IR::Inst> inst{8192};
+    Shader::ObjectPool<Shader::IR::Block> block{32};
+    Shader::ObjectPool<Shader::Maxwell::Flow::Block> flow_block{32};
 };
 };
 
 
 struct Context {
 struct Context {

+ 3 - 3
src/video_core/renderer_vulkan/vk_pipeline_cache.h

@@ -92,9 +92,9 @@ struct ShaderPools {
         inst.ReleaseContents();
         inst.ReleaseContents();
     }
     }
 
 
-    Shader::ObjectPool<Shader::IR::Inst> inst;
-    Shader::ObjectPool<Shader::IR::Block> block;
-    Shader::ObjectPool<Shader::Maxwell::Flow::Block> flow_block;
+    Shader::ObjectPool<Shader::IR::Inst> inst{8192};
+    Shader::ObjectPool<Shader::IR::Block> block{32};
+    Shader::ObjectPool<Shader::Maxwell::Flow::Block> flow_block{32};
 };
 };
 
 
 class PipelineCache : public VideoCommon::ShaderCache {
 class PipelineCache : public VideoCommon::ShaderCache {