浏览代码

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)
jpark37 6 年之前
父节点
当前提交
06e01a00ab
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      libobs-d3d11/d3d11-subsystem.cpp

+ 5 - 0
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<ID3D11Device1> d3d11_1(device);
 	if (!d3d11_1) {
 		return;