Hello,
while reviewing Unreal Engine features, I came across a question and wanted to ask about it.
I received a report that OIT does not work in a DX11 environment, so I was tracing the cause.
Before long, I discovered that in a DX12 environment,
GRHISupportsRasterOrderViews is initialized using the logic below, whereas no such initialization exists in the DX11 environment.
D3D12_FEATURE_DATA_D3D12_OPTIONS Features{};
RootDevice->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS, &Features, sizeof(Features));
GRHISupportsRasterOrderViews = (Features.ROVsSupported != 0);
UE_LOG(LogD3D12RHI, Log, TEXT("Raster order views are %s"), GRHISupportsRasterOrderViews ? TEXT("supported") : TEXT("not supported"));
I then added similar logic to FD3D11DynamicRHI::SetupAfterDeviceCreation, and OIT appeared to work correctly.
D3D11_FEATURE_DATA_D3D11_OPTIONS2 Data;
if (const HRESULT Result = Direct3DDevice->CheckFeatureSupport(D3D11_FEATURE_D3D11_OPTIONS2, &Data, sizeof(Data)); SUCCEEDED(Result))
{
GRHISupportsRasterOrderViews = (Data.ROVsSupported != 0);
UE_LOG(LogD3D11RHI, Log, TEXT("Raster order views are %s"), GRHISupportsRasterOrderViews ? TEXT("supported") : TEXT("not supported"));
}
If ROV integration for DX11 had not been implemented at all, I assume that OIT would not have worked even after adding this initialization. It likely would have resulted in a crash.
However, since OIT worked correctly, this suggests that ROV integration for DX11 does exist, but the process of checking ROV support and initializing GRHISupportsRasterOrderViews is missing.My suspicion is that ROV integration was implemented for some reason, but due to certain issues, it was intentionally blocked from being used.
Is there any historical background explaining why the initialization of GRHISupportsRasterOrderViews does not exist in the DX11 environment?
The version of Unreal Engine in which I confirmed this issue is 5.5.4, and to my knowledge, there is no fix for it at least up to version 5.7.0.
[Attachment Removed]