diff options
author | bunnei <bunneidev@gmail.com> | 2019-07-04 09:03:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-04 09:03:44 +0200 |
commit | cca663792f93b03382c62392655b01a21e8e388b (patch) | |
tree | 2b9d73edd3076c950b93f3b6eb24c526e7d24c5e | |
parent | Merge pull request #2658 from ogniK5377/QueryAudioDeviceOutputEvent (diff) | |
parent | gl_shader_cache: Make CachedShader constructor private (diff) | |
download | yuzu-cca663792f93b03382c62392655b01a21e8e388b.tar yuzu-cca663792f93b03382c62392655b01a21e8e388b.tar.gz yuzu-cca663792f93b03382c62392655b01a21e8e388b.tar.bz2 yuzu-cca663792f93b03382c62392655b01a21e8e388b.tar.lz yuzu-cca663792f93b03382c62392655b01a21e8e388b.tar.xz yuzu-cca663792f93b03382c62392655b01a21e8e388b.tar.zst yuzu-cca663792f93b03382c62392655b01a21e8e388b.zip |
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 4 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 2d78e2b60..8d3d7bfdc 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp @@ -245,13 +245,13 @@ Shader CachedShader::CreateStageFromMemory(const ShaderParameters& params, static_cast<u32>(code_size_b / sizeof(u64)), std::move(program_code), std::move(program_code_b))); - return std::make_shared<CachedShader>(params, program_type, std::move(result)); + return std::shared_ptr<CachedShader>(new CachedShader(params, program_type, std::move(result))); } Shader CachedShader::CreateStageFromCache(const ShaderParameters& params, Maxwell::ShaderProgram program_type, GLShader::ProgramResult result) { - return std::make_shared<CachedShader>(params, program_type, std::move(result)); + return std::shared_ptr<CachedShader>(new CachedShader(params, program_type, std::move(result))); } std::tuple<GLuint, BaseBindings> CachedShader::GetProgramHandle(GLenum primitive_mode, diff --git a/src/video_core/renderer_opengl/gl_shader_cache.h b/src/video_core/renderer_opengl/gl_shader_cache.h index 964f680bc..01af9b28a 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.h +++ b/src/video_core/renderer_opengl/gl_shader_cache.h @@ -52,9 +52,6 @@ struct ShaderParameters { class CachedShader final : public RasterizerCacheObject { public: - explicit CachedShader(const ShaderParameters& params, Maxwell::ShaderProgram program_type, - GLShader::ProgramResult result); - static Shader CreateStageFromMemory(const ShaderParameters& params, Maxwell::ShaderProgram program_type, ProgramCode&& program_code, ProgramCode&& program_code_b); @@ -81,6 +78,9 @@ public: BaseBindings base_bindings); private: + explicit CachedShader(const ShaderParameters& params, Maxwell::ShaderProgram program_type, + GLShader::ProgramResult result); + // Geometry programs. These are needed because GLSL needs an input topology but it's not // declared by the hardware. Workaround this issue by generating a different shader per input // topology class. |