| 630 | { |
| 631 | template <typename T> |
| 632 | void Save( T& stream ) |
| 633 | { |
| 634 | stream.Save( uint8_t( registerInputs.size() ) ); |
| 635 | for( auto it = registerInputs.begin(); it != registerInputs.end(); ++it ) |
| 636 | { |
| 637 | it->Save( stream ); |
| 638 | } |
| 639 | |
| 640 | stream.Save( uint8_t( staticSamplers.size() ) ); |
| 641 | for( auto& it : staticSamplers ) |
| 642 | { |
| 643 | it.Save( stream ); |
| 644 | } |
| 645 | |
| 646 | stream.Save( uint32_t( constants.size() ) ); |
| 647 | for( auto it = constants.begin(); it != constants.end(); ++it ) |
| 648 | { |
| 649 | it->Save( stream ); |
| 650 | } |
| 651 | |
| 652 | stream.Save( uint32_t( defaultValues.size() ) ); |
| 653 | stream.Save( defaultValuesStr ); |
| 654 | |
| 655 | stream.Save( uint8_t( textures.size() ) ); |
| 656 | for( auto it = textures.begin(); it != textures.end(); ++it ) |
| 657 | { |
| 658 | stream.Save( it->first ); |
| 659 | it->second.Save( stream ); |
| 660 | } |
| 661 | |
| 662 | stream.Save( uint8_t( samplers.size() ) ); |
| 663 | for( auto it = samplers.begin(); it != samplers.end(); ++it ) |
| 664 | { |
| 665 | stream.Save( it->first ); |
| 666 | it->second.Save( stream ); |
| 667 | } |
| 668 | |
| 669 | stream.Save( uint8_t( uavs.size() ) ); |
| 670 | for( auto it = uavs.begin(); it != uavs.end(); ++it ) |
| 671 | { |
| 672 | stream.Save( it->first ); |
| 673 | it->second.Save( stream ); |
| 674 | } |
| 675 | annotations.Save( stream ); |
| 676 | } |
| 677 | |
| 678 | std::vector<RegisterInputDescription> registerInputs; |
| 679 | std::vector<StaticSampler> staticSamplers; |