I would like to understand why ROVs cannot be used in a DX11 environment.

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]

재현 방법[Attachment Removed]

Hi there,

The simple answer is that we do not have ROV support in D3D11 because the RHI is currently in maintenance mode, so we do not plan to add more functionality beyond what we already implemented in the engine. If you are ok with maintaining that code on your end, since it is quite a simple change, feel free to keep it. If you have any more questions about this topic, please feel free to let me know.

Cheers,

Tim

[Attachment Removed]

Yes, I believe you are correct. There is no actual historical context behind these changes. According to the developer team, if the feature works with your custom changes, that should be fine, but we will not be adding official support for this feature in D3D11.

[Attachment Removed]

You are welcome! I will go ahead and close out the ticket then

[Attachment Removed]

Thank you for your reply. I appreciate you taking the time to respond. I may not have fully explained my initial question, so I’d like to clarify it a bit more.

What I was wondering is the following:

  1. If Epic Games had implemented ROV support for D3D11, then naturally there would have been a corresponding feature check for it.
  2. If Epic Games had never implemented ROV support for D3D11, then adding only the feature check should not have caused ROV to work, since the underlying implementation wouldn’t exist.

With that in mind, I expected the situation to fall into either one of those two cases. However, in my testing, ROV still worked even though only the feature check had been added. This unexpected behavior is what led me to ask the question.

It gave me the impression that perhaps some work toward ROV support had been done at some point, and later—for some reason—the feature check was restricted on D3D11. That’s why I was curious about the historical background.

From your explanation, it seems that there may not be any particular history regarding this.

Would it be correct for me to understand it that way?

[Attachment Removed]

Ah, I understand what you explained. Thank you for your answer. Have a great day :slight_smile:

[Attachment Removed]