Explorar o código

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 %!s(int64=6) %!d(string=hai) anos
pai
achega
06e01a00ab
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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;