Thanks for the log. As far as we’ve seen, it only happens with 8k textures or bigger, though we can’t explain why yet. Please let us know if it’s still happening after reducing to 4k. In the mean time I’ll try to use Metahuman to reproduce the issue, as the error message didn’t uncover a lot of detail, besides it being a regular GPU texture (not an upload buffer or anything like that).
BTW my code above has a mistake and prints the format as the flags, if anybody else wants to run with it please use this instead:
uint32 RefCount = UnderlyingResource->GetRefCount();
if (RefCount != 1)
{
FString UnderlyingResName = UnderlyingResource->GetName().ToString();
FString OwnerName = TEXT("UNKNOWN");
if (Owner && Owner->GetResource())
{
OwnerName = Owner->GetResource()->GetName().ToString();
}
const D3D12_RESOURCE_DESC& Desc = UnderlyingResource->GetDesc();
UE_LOG(LogD3D12RHI, Fatal, TEXT("Underlying resource has unexpected ref count %u, name: %s, owner name: %s, Heap Type: %u, Dimension: %u, Width: %llu, Height: %u, Format: %u, Flags: %u"),
RefCount, *UnderlyingResName, *OwnerName, UnderlyingResource->GetHeapType(), Desc.Dimension, Desc.Width, Desc.Height, Desc.Format, Desc.Flags
);
}
Writing code directly in a forum reply window is not great. ![]()