| 232 | } |
| 233 | |
| 234 | void ReadPipelineInputs( std::vector<Tr2ShaderPipelineInputAL>& pipelineInputs, EffectStream& stream, unsigned version ) |
| 235 | { |
| 236 | uint8_t inputCount = SanityCheck( stream.Read<uint8_t>(), 64 ); |
| 237 | pipelineInputs.resize( inputCount ); |
| 238 | for( int inputIx = 0; inputIx < inputCount; ++inputIx ) |
| 239 | { |
| 240 | auto& element = pipelineInputs[inputIx]; |
| 241 | element.usage = Tr2VertexDefinition::UsageCode( stream.Read<uint8_t>() ); |
| 242 | element.registerIndex = stream.Read<uint8_t>(); |
| 243 | element.usageIndex = stream.Read<uint8_t>(); |
| 244 | element.usedMask = stream.Read<uint8_t>(); |
| 245 | if( version > 10 ) |
| 246 | { |
| 247 | element.type = Tr2ShaderPipelineInputAL::Type( stream.Read<uint8_t>() ); |
| 248 | element.dimension = stream.Read<uint8_t>(); |
| 249 | } |
| 250 | else |
| 251 | { |
| 252 | element.type = element.usage == Tr2VertexDefinition::BLENDINDICES ? Tr2ShaderPipelineInputAL::UINT : Tr2ShaderPipelineInputAL::FLOAT; |
| 253 | element.dimension = 4; |
| 254 | } |
| 255 | } |
| 256 | } |
| 257 | // CHECK |
| 258 | void ReadRegisters( Tr2ShaderSignatureAL& signature, EffectStream& stream, unsigned version, uint32_t type ) |
| 259 | { |
no test coverage detected