| 32 | } |
| 33 | |
| 34 | void GraphicRendererPipelineContext::Execute() { |
| 35 | while (m_running_stages) { |
| 36 | |
| 37 | IGraphicRendererPipelineStage* stage = reinterpret_cast<IGraphicRendererPipelineStage*>(m_stage.get()); |
| 38 | stage->Run(m_pipeline_data); |
| 39 | |
| 40 | const auto& stage_info = stage->GetInformation(); |
| 41 | if (stage_info.IsSuccess && m_stage->HasNext()) { |
| 42 | m_stage->Next(); |
| 43 | } else { |
| 44 | m_running_stages = false; |
| 45 | } |
| 46 | } |
| 47 | m_is_completed = true; |
| 48 | Reset(); |
| 49 | } |
| 50 | |
| 51 | bool GraphicRendererPipelineContext::IsCompleted() const { |
| 52 | return m_is_completed; |