| 430 | } |
| 431 | |
| 432 | bool Tr2RenderContextBase::TechniqueInBatch( const std::vector<Tr2RenderBatch>& batches, const BlueSharedString& techniqueName ) |
| 433 | { |
| 434 | Tr2Shader* prevShader = nullptr; |
| 435 | for( auto& batch : batches ) |
| 436 | { |
| 437 | if( batch.m_shader == prevShader ) |
| 438 | { |
| 439 | continue; |
| 440 | } |
| 441 | prevShader = batch.m_shader; |
| 442 | uint32_t technique; |
| 443 | if( !batch.m_shader->GetTechniqueIndex( techniqueName, technique ) ) |
| 444 | { |
| 445 | continue; |
| 446 | } |
| 447 | const uint32_t passCount = batch.m_shader->GetPassCount( technique ); |
| 448 | if( passCount == 0 ) |
| 449 | { |
| 450 | continue; |
| 451 | } |
| 452 | return true; |
| 453 | } |
| 454 | return false; |
| 455 | } |
| 456 | |
| 457 | void Tr2RenderContextBase::RenderBatchGroup( std::vector<Tr2RenderBatch>::const_iterator startBatch, const BlueSharedString& techniqueName, Tr2ConstantBufferAL** buffers, Tr2RenderContext& renderContext ) |
| 458 | { |
no test coverage detected