| 66 | } |
| 67 | |
| 68 | void Tr2IndirectDrawBufferWriter::SetMaterialConstants( Tr2RenderContextEnum::ShaderType stage, const Tr2ConstantBufferAL& buffer ) |
| 69 | { |
| 70 | if( !HasMaterialConstants( stage ) ) |
| 71 | { |
| 72 | return; |
| 73 | } |
| 74 | #if TRINITY_PLATFORM == TRINITY_DIRECTX12 |
| 75 | auto addr = m_renderContext.UploadConstants( buffer ); |
| 76 | *reinterpret_cast<uint64_t*>( m_buffer + m_layout.m_materialOffsets[stage] ) = addr; |
| 77 | #elif TRINITY_PLATFORM == TRINITY_METAL |
| 78 | auto addr = m_renderContext.UploadConstants( buffer ); |
| 79 | m_buffer->material[stage] = addr; |
| 80 | #endif |
| 81 | } |
| 82 | |
| 83 | void Tr2IndirectDrawBufferWriter::SetPerObjectData( Tr2RenderContextEnum::ShaderType stage, const Tr2ConstantBufferAL& buffer ) |
| 84 | { |
no test coverage detected