From 06e01a00ab0e723d5a39fa23a659df9e8691fe6b Mon Sep 17 00:00:00 2001 From: jpark37 Date: Thu, 15 Aug 2019 22:55:48 -0700 Subject: [PATCH] libobs-d3d11: Disable NV12 usage for Intel NV12 GPU copies to staging textures for CPU read take a ridiculously long time on my integrated Intel GPU. Using R8/R8G8 instead seems to be a huge speed-up. Intel HD Graphics 530, D3D11 query timings, SetStablePowerState NV12: ~3268 us (minimum of wild timings) R8/R8G8: ~781 us (most frequently occurring timing) --- libobs-d3d11/d3d11-subsystem.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libobs-d3d11/d3d11-subsystem.cpp b/libobs-d3d11/d3d11-subsystem.cpp index 8f1d4248b..b01f047be 100644 --- a/libobs-d3d11/d3d11-subsystem.cpp +++ b/libobs-d3d11/d3d11-subsystem.cpp @@ -390,6 +390,11 @@ void gs_device::InitDevice(uint32_t adapterIdx) nv12Supported = false; + /* Intel CopyResource is very slow with NV12 */ + if (desc.VendorId == 0x8086) { + return; + } + ComQIPtr d3d11_1(device); if (!d3d11_1) { return;