obs-studio/plugins
jp9000 c4036b18bb win-capture/graphics-hook: Fix D3D10/D3D11 detection
When hooking DXGI-based graphics programs in the hook, the first hook
point is IDXGISwapChain::Present.  To be able to initiate a capture, a
pointer to the device context that created the swap chain is required,
which can be retrieved via IDXGISwapChain::GetDevice.  Determining
whether the device context was D3D10 or D3D11 has always been somewhat
of an issue due to D3D10 and D3D11 being nearly identical, as well as
their interoperability/interchangeability.  The GetDevice function would
first be called with the UUID of ID3D10Device, then if that failed,
the UUID of ID3D11Device.

However, with certain specific D3D11 games, GetDevice would for some
unknown reason succeed with the UUID of ID3D10Device, which would cause
capture to fail.  (Conversely, attempting to call GetDevice with the
UUID of ID3D11Device on a device that's actually ID3D10Device would
always succeed, so reversing the order of the test was not an option).
There were originally three known D3D11 games that would erroneously
succeed when querying a D3D10 device interface:  Call of Duty: Ghosts,
Just Cause 3, and theHunter: Call of the Wild.  All other known D3D11
games would work correctly.  Because it was only these three games, a
hack was originally implemented in the form of an executable exception
list that would force them to capture D3D11.

Unfortunately, Oculus games are now failing under the same circumstance
as well, so a simple hack will no longer work.  To fix this, a more
reliable method of detecting which context it is had to be discovered:
simply check the feature level using ID3D11Device::GetFeatureLevel.  If
the feature level is D3D_FEATURE_LEVEL_11_0 or D3D_FEATURE_LEVEL_11_1,
the device is definitely a D3D11 device.  Otherwise, continue the tests
as they were before.  Successfully tested with many D3D10 games, many
D3D11 games, and especially those three D3D11 games that previously were
detected as D3D10 erroneously.
2017-06-15 03:48:43 -07:00
..
coreaudio-encoder Update translations from Crowdin 2017-05-20 10:18:41 +02:00
decklink Update translations from Crowdin 2017-05-20 10:18:41 +02:00
enc-amf@2a785b021f enc-amf: Version 2.1.5 2017-05-21 02:57:00 +02:00
image-source Update translations from Crowdin 2017-05-20 10:18:41 +02:00
linux-alsa Update translations from Crowdin 2017-05-20 10:18:41 +02:00
linux-capture Update translations from Crowdin 2017-05-20 10:18:41 +02:00
linux-jack Update translations from Crowdin 2017-05-20 10:18:41 +02:00
linux-pulseaudio Update translations from Crowdin 2017-05-20 10:18:41 +02:00
linux-v4l2 Update translations from Crowdin 2017-05-20 10:18:41 +02:00
mac-avcapture Update translations from Crowdin 2017-05-20 10:18:41 +02:00
mac-capture Update translations from Crowdin 2017-05-20 10:18:41 +02:00
mac-syphon Update translations from Crowdin 2017-05-20 10:18:41 +02:00
mac-vth264 Update translations from Crowdin 2017-05-20 10:18:41 +02:00
obs-browser@0e4c9e824b CI: OSX - Update to CEF 2987 2017-03-01 00:34:03 -06:00
obs-ffmpeg obs-ffmpeg: Don't preload media frames if set to pause on end 2017-06-14 08:30:44 -07:00
obs-filters Update translations from Crowdin 2017-05-20 10:18:41 +02:00
obs-libfdk Update translations from Crowdin 2017-05-20 10:18:41 +02:00
obs-outputs libobs/plugins/UI: Suppress -Wimplicit-fallthrough introduced by GCC 7 2017-05-29 21:05:18 -03:00
obs-qsv11 Update translations from Crowdin 2017-05-20 10:18:41 +02:00
obs-text Update translations from Crowdin 2017-05-20 10:18:41 +02:00
obs-transitions Update translations from Crowdin 2017-05-20 10:18:41 +02:00
obs-vst@581ce677c3 VST: bump vst submodule ref 2017-05-19 19:21:44 -05:00
obs-x264 Update translations from Crowdin 2017-05-20 10:18:41 +02:00
rtmp-services rtmp-services: Add new twitch.tv ingests 2017-06-09 04:17:41 +02:00
text-freetype2 Update translations from Crowdin 2017-05-20 10:18:41 +02:00
vlc-video Update translations from Crowdin 2017-05-20 10:18:41 +02:00
win-capture win-capture/graphics-hook: Fix D3D10/D3D11 detection 2017-06-15 03:48:43 -07:00
win-dshow Update translations from Crowdin 2017-05-20 10:18:41 +02:00
win-ivcam win-ivcam: Fix potential null pointer dereference 2017-05-01 19:29:41 +02:00
win-mf Update translations from Crowdin 2017-05-20 10:18:41 +02:00
win-wasapi win-wasapi: Fix potential null pointer deref in enumeration 2017-05-28 15:35:34 -07:00
CMakeLists.txt Add VST Plugin 2017-01-30 16:05:25 -08:00