mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-09-15 00:55:33 +00:00
gl_shader_cache: Make CachedShader constructor private
Fixes missing review comments introduced.
This commit is contained in:
parent
beb3d77a79
commit
ad50cd7df9
@ -245,13 +245,13 @@ Shader CachedShader::CreateStageFromMemory(const ShaderParameters& params,
|
|||||||
static_cast<u32>(code_size_b / sizeof(u64)), std::move(program_code),
|
static_cast<u32>(code_size_b / sizeof(u64)), std::move(program_code),
|
||||||
std::move(program_code_b)));
|
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,
|
Shader CachedShader::CreateStageFromCache(const ShaderParameters& params,
|
||||||
Maxwell::ShaderProgram program_type,
|
Maxwell::ShaderProgram program_type,
|
||||||
GLShader::ProgramResult result) {
|
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,
|
std::tuple<GLuint, BaseBindings> CachedShader::GetProgramHandle(GLenum primitive_mode,
|
||||||
|
@ -52,9 +52,6 @@ struct ShaderParameters {
|
|||||||
|
|
||||||
class CachedShader final : public RasterizerCacheObject {
|
class CachedShader final : public RasterizerCacheObject {
|
||||||
public:
|
public:
|
||||||
explicit CachedShader(const ShaderParameters& params, Maxwell::ShaderProgram program_type,
|
|
||||||
GLShader::ProgramResult result);
|
|
||||||
|
|
||||||
static Shader CreateStageFromMemory(const ShaderParameters& params,
|
static Shader CreateStageFromMemory(const ShaderParameters& params,
|
||||||
Maxwell::ShaderProgram program_type,
|
Maxwell::ShaderProgram program_type,
|
||||||
ProgramCode&& program_code, ProgramCode&& program_code_b);
|
ProgramCode&& program_code, ProgramCode&& program_code_b);
|
||||||
@ -81,6 +78,9 @@ public:
|
|||||||
BaseBindings base_bindings);
|
BaseBindings base_bindings);
|
||||||
|
|
||||||
private:
|
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
|
// 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
|
// declared by the hardware. Workaround this issue by generating a different shader per input
|
||||||
// topology class.
|
// topology class.
|
||||||
|
Loading…
Reference in New Issue
Block a user