| 308 | } |
| 309 | |
| 310 | bool Tr2ResourceSetDescriptionAL::SetUav( Tr2RenderContextEnum::ShaderType stage, uint32_t registerIndex, const Tr2BufferAL& buffer ) |
| 311 | { |
| 312 | if( m_registerMap.uavCount == 0 ) |
| 313 | { |
| 314 | return false; |
| 315 | } |
| 316 | auto index = m_registerMap.uavs[stage][registerIndex]; |
| 317 | if( index >= m_registerMap.uavCount ) |
| 318 | { |
| 319 | return false; |
| 320 | } |
| 321 | auto& resource = m_uav[index]; |
| 322 | if( resource.Is( buffer ) ) |
| 323 | { |
| 324 | return false; |
| 325 | } |
| 326 | resource.type = Resource::BUFFER; |
| 327 | resource.buffer = buffer; |
| 328 | return true; |
| 329 | } |
| 330 | |
| 331 | bool Tr2ResourceSetDescriptionAL::SetUav( Tr2RenderContextEnum::ShaderType stage, uint32_t registerIndex, const Tr2TextureAL& texture, uint32_t mip ) |
| 332 | { |