mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[host] NvFBC/DXGI: make DXGI the default instead of the fallback
It has been detemined that a failure to init NvFBC causes a 20-30% performance penalty on non NvFBC supported hardware (GeForce) when using DXGI, as such reverse the order and default to using DXGI as our first option. If NvFBC is still desired, pr #500 added the option `app:capture` which can be used to force NvFBC.
This commit is contained in:
parent
1d7eb50608
commit
fcf6abc7c6
@ -17,14 +17,14 @@ if(NOT EXISTS "${nvfbc_sdk}/inc" OR NOT IS_DIRECTORY "${nvfbc_sdk}/inc")
|
||||
set(USE_NVFBC OFF)
|
||||
endif()
|
||||
|
||||
if(USE_NVFBC)
|
||||
add_capture("NVFBC")
|
||||
endif()
|
||||
|
||||
if(USE_DXGI)
|
||||
add_capture("DXGI")
|
||||
endif()
|
||||
|
||||
if(USE_NVFBC)
|
||||
add_capture("NVFBC")
|
||||
endif()
|
||||
|
||||
include("PostCapture")
|
||||
|
||||
add_library(capture STATIC ${CAPTURE_C})
|
||||
|
@ -165,6 +165,10 @@ static bool nvfbc_init(void)
|
||||
free(buffer);
|
||||
}
|
||||
|
||||
// NOTE: Calling this on hardware that doesn't support NvFBC such as GeForce
|
||||
// causes a substantial performance pentalty even if it fails! As such we only
|
||||
// attempt NvFBC as a last resort, or if configured via the app:capture
|
||||
// option.
|
||||
if (!NvFBCToSysCreate(privData, privDataLen, &this->nvfbc, &this->maxWidth, &this->maxHeight))
|
||||
{
|
||||
free(privData);
|
||||
|
Loading…
Reference in New Issue
Block a user