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

Method CopyToResourceSet

trinity/Shader/Parameter/TriTextureParameter.cpp:177–186  ·  view source on GitHub ↗

--------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

175
176// --------------------------------------------------------------------------------------
177bool TriTextureParameter::CopyToResourceSet(
178 Tr2ResourceSetDescriptionAL& resourceDesc,
179 Tr2RenderContextEnum::ShaderType stage,
180 uint32_t registerIndex,
181 ResourceFlags flags ) const
182{
183 bool isSrgb = ( flags & RESOURCE_FLAG_SRGB ) != 0;
184 auto colorSpace = isSrgb ? Tr2RenderContextEnum::COLOR_SPACE_SRGB : Tr2RenderContextEnum::COLOR_SPACE_LINEAR;
185 return resourceDesc.SetSrv( stage, registerIndex, m_cachedTexture, colorSpace );
186}
187
188// --------------------------------------------------------------------------------------
189bool TriTextureParameter::ApplyUav(

Callers 1

UpdateResourceSetDescMethod · 0.45

Calls 1

SetSrvMethod · 0.80

Tested by

no test coverage detected