diff --git a/src/dawn/native/d3d12/AdapterD3D12.cpp b/src/dawn/native/d3d12/AdapterD3D12.cpp index e7808cbc78..0478b8ce50 100644 --- a/src/dawn/native/d3d12/AdapterD3D12.cpp +++ b/src/dawn/native/d3d12/AdapterD3D12.cpp @@ -554,10 +554,18 @@ void Adapter::SetupBackendDeviceToggles(TogglesState* deviceToggles) const { deviceToggles->ForceSet(Toggle::NoWorkaroundDstAlphaBlendDoesNotWork, true); } - // TODO(http://crbug.com/dawn/1216): Actually query D3D12_FEATURE_DATA_D3D12_OPTIONS13. - // This is blocked on updating the Windows SDK. - deviceToggles->ForceSet( - Toggle::D3D12UseTempBufferInTextureToTextureCopyBetweenDifferentDimensions, true); + D3D12_FEATURE_DATA_D3D12_OPTIONS13 featureData13; + if (FAILED(mD3d12Device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS13, &featureData13, + sizeof(featureData13)))) { + // If the platform doesn't support D3D12_FEATURE_D3D12_OPTIONS13, default initialize the + // struct to set all features to false. + featureData13 = {}; + } + + if (!featureData13.TextureCopyBetweenDimensionsSupported) { + deviceToggles->ForceSet( + Toggle::D3D12UseTempBufferInTextureToTextureCopyBetweenDifferentDimensions, true); + } } ResultOrError> Adapter::CreateDeviceImpl(const DeviceDescriptor* descriptor,