| 566 | } |
| 567 | |
| 568 | void Tr2Material::ApplyMaterialDataForRtState( uint32_t techniqueIndex, const Tr2RtPipelineStateAL& rtPipelineState, Tr2RenderContext& renderContext ) const |
| 569 | { |
| 570 | if( !m_shader ) |
| 571 | { |
| 572 | return; |
| 573 | } |
| 574 | auto& pp = *m_parametersForPasses[techniqueIndex].libraries[0]; |
| 575 | |
| 576 | ApplyConstants( Tr2RenderContextEnum::COMPUTE_SHADER, pp.m_globalInput, !pp.m_reroutedParameters.empty(), renderContext ); |
| 577 | |
| 578 | bool descChanged = pp.m_globalResourceSetDirty; |
| 579 | descChanged |= UpdateResourceSetDesc( Tr2RenderContextEnum::COMPUTE_SHADER, pp.m_globalInput, pp.m_globalResourceSetDesc ); |
| 580 | |
| 581 | if( descChanged || !pp.m_globalResourceSet.IsValid() ) |
| 582 | { |
| 583 | USE_MAIN_THREAD_RENDER_CONTEXT(); |
| 584 | pp.m_globalResourceSet.Create( pp.m_globalResourceSetDesc, rtPipelineState, renderContext ); |
| 585 | pp.m_globalResourceSetDirty = false; |
| 586 | } |
| 587 | |
| 588 | renderContext.SetResourceSet( pp.m_globalResourceSet ); |
| 589 | } |
| 590 | |
| 591 | void Tr2Material::ApplyMaterialDataForRtMaterial( uint32_t techniqueIndex, Tr2RtLocalMaterialDescriptionAL& localMaterial, Tr2RenderContext& renderContext ) const |
| 592 | { |
no test coverage detected