nevayeshirazi
Topic Author
Posts: 7
Joined: 26 Apr 2024, 03:50

About Unreal Render Target Memory Size

05 May 2024, 18:40

Hello,

I noticed that "Render Target StandAlone Allocated" stat which can be seen with "Stat D3D12MemoryDetails" is around 5 GB for 50 widgets whether they are visible/collapsed or not. It goes up quickly as I add more widgets.

This is the XAML file for my widgets.
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:noesis="clr-namespace:NoesisGUIExtensions"
RenderTransformOrigin="0.5,1">
    <UserControl.RenderTransform>
        <ScaleTransform ScaleX="{Binding WidgetScale}" ScaleY="{Binding WidgetScale}" />
    </UserControl.RenderTransform>
    <Grid HorizontalAlignment="Center">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        
        <TextBlock x:Name="ActorName"
         Grid.Row="0" Text="{Binding ActorName}"
          Foreground="#ede8e2"
           FontSize="20" 
           HorizontalAlignment="Center" 
           FontWeight="Bold" 
           noesis:Text.Stroke="Gray" 
           noesis:Text.StrokeThickness="1" />
     
        <TextBlock x:Name="Title" Grid.Row="1" Text="Temp Description" HorizontalAlignment="Center" FontSize="18" FontWeight="Bold" />
    </Grid>
  
</UserControl>
I create my widgets on C++. I have UUserWidget derived from UNoesisInstance and it loads the XAML file and sets it on the NoesisInstance and registers itselfs as the data context.
UCLASS()
class EDGAMECLIENT_API UEDNoesisWidget : public UNoesisInstance
{
    GENERATED_BODY()

public:
    virtual UEDNoesisWidget* InitializeViewAndModel();

protected:
    FORCEINLINE virtual FString GetWidgetDesignFilePath() const { return TEXT(""); }
};

UEDNoesisWidget* UEDNoesisWidget::InitializeViewAndModel()
{
    UObject* XAML = UEDAssetManager::Get()->SyncLoad<UObject>(NoesisDesign, GetWidgetDesignFilePath());

    if (!XAML)
    {
        UE_LOG(LogTemp, Error, TEXT("The UI design XAML file could not be loaded.)"));
        return this;
    }

    BaseXaml = Cast<UNoesisXaml>(XAML);

    SetDataContext(this);
    
    AddToViewport();

    return this;
}

Is this memory usage expected?

Thanks.
 
User avatar
hcpizzi
Site Admin
Posts: 326
Joined: 09 Feb 2012, 12:40

Re: About Unreal Render Target Memory Size

06 May 2024, 23:56

Hi,

Could you please create a support ticket for this? I have a patch for you to try that can save some RT memory.

Thanks!
 
nevayeshirazi
Topic Author
Posts: 7
Joined: 26 Apr 2024, 03:50

Re: About Unreal Render Target Memory Size

07 May 2024, 02:58

Hello,

I have created an issue with number 0003302.

Thanks!

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], nevayeshirazi and 2 guests