Skip to content

Commit

Permalink
Fix the calls of pipeline interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
StarsX committed Apr 17, 2024
1 parent c2b1049 commit d157114
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions XUSG-EZ/XUSG-EZ_DX12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ void EZ::CommandList_DX12::SetGraphicsPipelineState(const Pipeline& pipelineStat
if (pipelineState && pipeline != pipelineState)
{
pipeline = pipelineState;
m_graphicsPipelineLib->SetPipeline(pState->GetKey(), pipeline);
m_graphicsPipelineLib->SetPipeline(pState, pipeline);
}
}
else pipeline = pipelineState;
Expand All @@ -373,7 +373,7 @@ void EZ::CommandList_DX12::SetComputePipelineState(const Pipeline& pipelineState
if (pipelineState && pipeline != pipelineState)
{
pipeline = pipelineState;
m_computePipelineLib->SetPipeline(pState->GetKey(), pipeline);
m_computePipelineLib->SetPipeline(pState, pipeline);
}
}
else pipeline = pipelineState;
Expand Down
6 changes: 3 additions & 3 deletions XUSG-EZ/XUSGUltimate-EZ.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ namespace XUSG
virtual void RSSetShadingRateImage(Resource* pShadingRateImage) = 0;

virtual void MSSetPipelineState(const Pipeline& pipelineState, const State* pState = nullptr) = 0;
virtual void MSSetBlendState(BlendPreset preset, uint8_t numColorRTs = 1, uint32_t sampleMask = UINT_MAX) = 0;
virtual void MSSetBlendState(Graphics::BlendPreset preset, uint8_t numColorRTs = 1, uint32_t sampleMask = UINT_MAX) = 0;
virtual void MSSetSample(uint8_t count, uint8_t quality = 0) = 0;
virtual void MSSetRasterizerState(RasterizerPreset preset) = 0;
virtual void MSSetDepthStencilState(DepthStencilPreset preset) = 0;
virtual void MSSetRasterizerState(Graphics::RasterizerPreset preset) = 0;
virtual void MSSetDepthStencilState(Graphics::DepthStencilPreset preset) = 0;
virtual void MSSetShader(Shader::Stage stage, const Blob& shader) = 0;
virtual void MSSetNodeMask(uint32_t nodeMask) = 0;
virtual void DispatchMesh(uint32_t ThreadGroupCountX, uint32_t ThreadGroupCountY, uint32_t ThreadGroupCountZ) = 0;
Expand Down
8 changes: 4 additions & 4 deletions XUSG-EZ/XUSGUltimate-EZ_DX12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void EZ::CommandList_DX12::MSSetPipelineState(const Pipeline& pipelineState, con
if (pipelineState && pipeline != pipelineState)
{
pipeline = pipelineState;
m_meshShaderPipelineLib->SetPipeline(pState->GetKey(), pipeline);
m_meshShaderPipelineLib->SetPipeline(pState, pipeline);
}
}
else pipeline = pipelineState;
Expand All @@ -154,7 +154,7 @@ void EZ::CommandList_DX12::MSSetPipelineState(const Pipeline& pipelineState, con
}
}

void EZ::CommandList_DX12::MSSetBlendState(BlendPreset preset, uint8_t numColorRTs, uint32_t sampleMask)
void EZ::CommandList_DX12::MSSetBlendState(Graphics::BlendPreset preset, uint8_t numColorRTs, uint32_t sampleMask)
{
assert(m_meshShaderState);
m_meshShaderState->OMSetBlendState(preset, m_meshShaderPipelineLib.get(), numColorRTs, sampleMask);
Expand All @@ -168,14 +168,14 @@ void EZ::CommandList_DX12::MSSetSample(uint8_t count, uint8_t quality)
m_isMSStateDirty = true;
}

void EZ::CommandList_DX12::MSSetRasterizerState(RasterizerPreset preset)
void EZ::CommandList_DX12::MSSetRasterizerState(Graphics::RasterizerPreset preset)
{
assert(m_meshShaderState);
m_meshShaderState->RSSetState(preset, m_meshShaderPipelineLib.get());
m_isMSStateDirty = true;
}

void EZ::CommandList_DX12::MSSetDepthStencilState(DepthStencilPreset preset)
void EZ::CommandList_DX12::MSSetDepthStencilState(Graphics::DepthStencilPreset preset)
{
assert(m_meshShaderState);
m_meshShaderState->DSSetState(preset, m_meshShaderPipelineLib.get());
Expand Down
6 changes: 3 additions & 3 deletions XUSG-EZ/XUSGUltimate-EZ_DX12.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ namespace XUSG
void RSSetShadingRateImage(Resource* pShadingRateImage);

void MSSetPipelineState(const Pipeline& pipelineState, const State* pState = nullptr);
void MSSetBlendState(BlendPreset preset, uint8_t numColorRTs = 1, uint32_t sampleMask = UINT_MAX);
void MSSetBlendState(Graphics::BlendPreset preset, uint8_t numColorRTs = 1, uint32_t sampleMask = UINT_MAX);
void MSSetSample(uint8_t count, uint8_t quality = 0);
void MSSetRasterizerState(RasterizerPreset preset);
void MSSetDepthStencilState(DepthStencilPreset preset);
void MSSetRasterizerState(Graphics::RasterizerPreset preset);
void MSSetDepthStencilState(Graphics::DepthStencilPreset preset);
void MSSetShader(Shader::Stage stage, const Blob& shader);
void MSSetNodeMask(uint32_t nodeMask);
void DispatchMesh(uint32_t ThreadGroupCountX, uint32_t ThreadGroupCountY, uint32_t ThreadGroupCountZ);
Expand Down
2 changes: 1 addition & 1 deletion XUSGRayTracing-EZ/XUSGRayTracing-EZ_DX12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ void EZ::CommandList_DXR::RTSetPipelineState(const Pipeline& pipelineState, RayT
if (pipelineState && pipeline != pipelineState)
{
pipeline = pipelineState;
m_rayTracingPipelineLib->SetPipeline(pState->GetKey(), pipeline);
m_rayTracingPipelineLib->SetPipeline(pState, pipeline);
}
}
else pipeline = pipelineState;
Expand Down

0 comments on commit d157114

Please sign in to comment.