mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 22:29:21 +00:00
AbstractPipeline: Allow setting pipeline to null
This commit is contained in:
parent
5e5dfe686a
commit
bfb4709c80
2 changed files with 5 additions and 0 deletions
|
@ -299,6 +299,8 @@ void Renderer::UpdateUtilityVertexBuffer(const void* vertices, u32 vertex_stride
|
||||||
void Renderer::SetPipeline(const AbstractPipeline* pipeline)
|
void Renderer::SetPipeline(const AbstractPipeline* pipeline)
|
||||||
{
|
{
|
||||||
const DXPipeline* dx_pipeline = static_cast<const DXPipeline*>(pipeline);
|
const DXPipeline* dx_pipeline = static_cast<const DXPipeline*>(pipeline);
|
||||||
|
if (!dx_pipeline)
|
||||||
|
return;
|
||||||
|
|
||||||
D3D::stateman->SetRasterizerState(dx_pipeline->GetRasterizerState());
|
D3D::stateman->SetRasterizerState(dx_pipeline->GetRasterizerState());
|
||||||
D3D::stateman->SetDepthState(dx_pipeline->GetDepthState());
|
D3D::stateman->SetDepthState(dx_pipeline->GetDepthState());
|
||||||
|
|
|
@ -1622,6 +1622,9 @@ void Renderer::SetPipeline(const AbstractPipeline* pipeline)
|
||||||
// Not all shader changes currently go through SetPipeline, so we can't
|
// Not all shader changes currently go through SetPipeline, so we can't
|
||||||
// test if the pipeline hasn't changed and skip these applications. Yet.
|
// test if the pipeline hasn't changed and skip these applications. Yet.
|
||||||
m_graphics_pipeline = static_cast<const OGLPipeline*>(pipeline);
|
m_graphics_pipeline = static_cast<const OGLPipeline*>(pipeline);
|
||||||
|
if (!m_graphics_pipeline)
|
||||||
|
return;
|
||||||
|
|
||||||
ApplyRasterizationState(m_graphics_pipeline->GetRasterizationState());
|
ApplyRasterizationState(m_graphics_pipeline->GetRasterizationState());
|
||||||
ApplyDepthState(m_graphics_pipeline->GetDepthState());
|
ApplyDepthState(m_graphics_pipeline->GetDepthState());
|
||||||
ApplyBlendingState(m_graphics_pipeline->GetBlendingState());
|
ApplyBlendingState(m_graphics_pipeline->GetBlendingState());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue