| 411 | } |
| 412 | |
| 413 | bool Tr2ResourceSetDescriptionAL::SetSampler( Tr2RenderContextEnum::ShaderType stage, uint32_t registerIndex, const Tr2SamplerStateAL& sampler ) |
| 414 | { |
| 415 | if( m_registerMap.samplerCount == 0 ) |
| 416 | { |
| 417 | return false; |
| 418 | } |
| 419 | auto index = m_registerMap.samplers[stage][registerIndex]; |
| 420 | if( index >= m_registerMap.samplerCount ) |
| 421 | { |
| 422 | return false; |
| 423 | } |
| 424 | auto& resource = m_samplers[index]; |
| 425 | if( resource.type == Sampler::SAMPLER && resource.sampler == sampler ) |
| 426 | { |
| 427 | return false; |
| 428 | } |
| 429 | resource.sampler = sampler; |
| 430 | resource.type = Sampler::SAMPLER; |
| 431 | return true; |
| 432 | } |
| 433 | |
| 434 | bool Tr2ResourceSetDescriptionAL::operator==( const Tr2ResourceSetDescriptionAL& other ) const |
| 435 | { |