mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
VideoCommon: store the configuration used to create the AbstractPipeline on the pipeline itself, so that it's easy to duplicate pipelines with slightly altered configuration
This commit is contained in:
@ -28,13 +28,13 @@ static GLenum MapToGLPrimitive(PrimitiveType primitive_type)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
OGLPipeline::OGLPipeline(const GLVertexFormat* vertex_format,
|
||||
OGLPipeline::OGLPipeline(const AbstractPipelineConfig& config, const GLVertexFormat* vertex_format,
|
||||
const RasterizationState& rasterization_state,
|
||||
const DepthState& depth_state, const BlendingState& blending_state,
|
||||
PipelineProgram* program, GLuint gl_primitive)
|
||||
: m_vertex_format(vertex_format), m_rasterization_state(rasterization_state),
|
||||
m_depth_state(depth_state), m_blending_state(blending_state), m_program(program),
|
||||
m_gl_primitive(gl_primitive)
|
||||
: AbstractPipeline(config), m_vertex_format(vertex_format),
|
||||
m_rasterization_state(rasterization_state), m_depth_state(depth_state),
|
||||
m_blending_state(blending_state), m_program(program), m_gl_primitive(gl_primitive)
|
||||
{
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ std::unique_ptr<OGLPipeline> OGLPipeline::Create(const AbstractPipelineConfig& c
|
||||
|
||||
const GLVertexFormat* vertex_format = static_cast<const GLVertexFormat*>(config.vertex_format);
|
||||
GLenum gl_primitive = MapToGLPrimitive(config.rasterization_state.primitive);
|
||||
return std::make_unique<OGLPipeline>(vertex_format, config.rasterization_state,
|
||||
return std::make_unique<OGLPipeline>(config, vertex_format, config.rasterization_state,
|
||||
config.depth_state, config.blending_state, program,
|
||||
gl_primitive);
|
||||
}
|
||||
|
Reference in New Issue
Block a user