libobs-d3d11: Check for bad NV12 output on all devices

Just to be safe, check for bad output on all devices.
master
jp9000 2019-03-04 15:40:53 -08:00
parent b4c35fab75
commit 52eb536b04
2 changed files with 3 additions and 4 deletions

View File

@ -261,7 +261,7 @@ VertInOut main(VertInOut vert_in) \
#define NV12_CX 128
#define NV12_CY 128
bool gs_device::HasBadNV12Driver()
bool gs_device::HasBadNV12Output()
try {
vec3 points[4];
vec3_set(&points[0], -1.0f, -1.0f, 0.0f);
@ -406,8 +406,7 @@ void gs_device::InitDevice(uint32_t adapterIdx)
return;
}
bool is_nvidia = astrstri(adapterNameUTF8, "nvidia") != nullptr;
if (is_nvidia && HasBadNV12Driver()) {
if (HasBadNV12Output()) {
return;
}

View File

@ -861,7 +861,7 @@ struct gs_device {
void RebuildDevice();
bool HasBadNV12Driver();
bool HasBadNV12Output();
gs_device(uint32_t adapterIdx);
~gs_device();