/Engine/Source/Runtime/RHI/Public/RHIResources.h
We care about flags that influence DS formats (which is the only thing the underlying API cares about). D3D12 shares the format choice function with the RT, so preserving all the flags used there out of abundance of caution.
static constexpr ETextureCreateFlags RelevantDepthStencilFlagMask = ETextureCreateFlags::SRGB | ETextureCreateFlags::Shared | ETextureCreateFlags::DepthStencilTargetable;