summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/OGLPipeline.cpp
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2023-01-27 18:28:52 -0600
committeriwubcode <iwubcode@users.noreply.github.com>2023-02-09 02:13:53 -0600
commitd0c6b6c9ed04ee1b54d69bc2731aa3f02de07ec1 (patch)
tree65a15c1e0a9fae96e82f9e6e120331695ffe4968 /Source/Core/VideoBackends/OGL/OGLPipeline.cpp
parentaaad0cd39fca1ad020864ad7a141052179e7feb4 (diff)
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
Diffstat (limited to 'Source/Core/VideoBackends/OGL/OGLPipeline.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/OGLPipeline.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/VideoBackends/OGL/OGLPipeline.cpp b/Source/Core/VideoBackends/OGL/OGLPipeline.cpp
index 3f9dea623f..b5837d409f 100644
--- a/Source/Core/VideoBackends/OGL/OGLPipeline.cpp
+++ b/Source/Core/VideoBackends/OGL/OGLPipeline.cpp
@@ -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);
}