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

Method SetUiAndAlphaResource

trinityal/dx12/Tr2StreamlineALDx12.cpp:855–875  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

853}
854
855void Tr2DlssPlugin::SetUiAndAlphaResource( Tr2TextureAL* uiAlpha, Tr2RenderContextAL& renderContext )
856{
857 if( !m_framegeneration )
858 return;
859
860 auto uiAndAlphaResource = StreamlineUtils::GenerateTextureResource( uiAlpha );
861
862 sl::Extent displayExtent = {};
863 displayExtent.height = uiAlpha->GetHeight();
864 displayExtent.width = uiAlpha->GetWidth();
865
866 sl::ResourceTag uiAndAlphaResourceTag = sl::ResourceTag{ &uiAndAlphaResource, sl::kBufferTypeHUDLessColor, sl::ResourceLifecycle::eValidUntilPresent, &displayExtent };
867
868 sl::ResourceTag inputs[] = { uiAndAlphaResourceTag };
869
870 DECLARE_STATIC_SL_FUNC( slSetTag );
871 if( SL_FAILED( res, s_slSetTag( m_view, inputs, _countof( inputs ), StreamlineUtils::GetCommandBuffer( renderContext ) ) ) )
872 {
873 CCP_LOGERR( "DLSS-G Failed to tag ui and alpha resource (%d)", res );
874 }
875}
876
877void Tr2DlssPlugin::Dispatch( Tr2RenderContextAL& renderContext )
878{

Callers

nothing calls this directly

Calls 4

GenerateTextureResourceFunction · 0.70
GetCommandBufferFunction · 0.70
GetHeightMethod · 0.45
GetWidthMethod · 0.45

Tested by

no test coverage detected