MCPcopy Create free account
hub / github.com/carbonengine/trinity / SetSrv

Method SetSrv

trinityal/src/Tr2ResourceSetAL.cpp:267–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265
266
267bool Tr2ResourceSetDescriptionAL::SetSrv( Tr2RenderContextEnum::ShaderType stage, uint32_t registerIndex, const Tr2BufferAL& buffer )
268{
269 if( m_registerMap.srvCount == 0 )
270 {
271 return false;
272 }
273 auto index = m_registerMap.srvs[stage][registerIndex];
274 if( index >= m_registerMap.srvCount )
275 {
276 return false;
277 }
278 auto& resource = m_srv[index];
279 if( resource.Is( buffer ) )
280 {
281 return false;
282 }
283 resource.type = Resource::BUFFER;
284 resource.buffer = buffer;
285 return true;
286}
287
288bool Tr2ResourceSetDescriptionAL::SetSrv( Tr2RenderContextEnum::ShaderType stage, uint32_t registerIndex, const Tr2TextureAL& texture, Tr2RenderContextEnum::ColorSpace colorSpace )
289{

Callers 13

CopyToResourceSetMethod · 0.80
IssueDrawCallMethod · 0.80
ReplayCaptureMethod · 0.80
CopyToResourceSetMethod · 0.80
CopyToResourceSetMethod · 0.80
CopyToResourceSetMethod · 0.80
CopyToResourceSetMethod · 0.80
CopyToResourceSetMethod · 0.80
DispatchMethod · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80
CreateMethod · 0.80

Calls 1

IsMethod · 0.80

Tested by 4

TEST_FFunction · 0.64
TEST_FFunction · 0.64
CreateMethod · 0.64
TEST_FFunction · 0.64