mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-06 20:58:37 +01:00
[dxvk] Remove dxvk.lowLatencyAllowCpuFramesOverlap config variable
This commit is contained in:
parent
a13b821f95
commit
c802bdf42e
5 changed files with 2 additions and 35 deletions
|
@ -20,8 +20,6 @@ namespace dxvk {
|
||||||
allowFse = config.getOption<bool> ("dxvk.allowFse", false);
|
allowFse = config.getOption<bool> ("dxvk.allowFse", false);
|
||||||
framePace = config.getOption<std::string>("dxvk.framePace", "");
|
framePace = config.getOption<std::string>("dxvk.framePace", "");
|
||||||
lowLatencyOffset = config.getOption<int32_t> ("dxvk.lowLatencyOffset", 0);
|
lowLatencyOffset = config.getOption<int32_t> ("dxvk.lowLatencyOffset", 0);
|
||||||
lowLatencyAllowCpuFramesOverlap
|
|
||||||
= config.getOption<bool> ("dxvk.lowLatencyAllowCpuFramesOverlap", true);
|
|
||||||
deviceFilter = config.getOption<std::string>("dxvk.deviceFilter", "");
|
deviceFilter = config.getOption<std::string>("dxvk.deviceFilter", "");
|
||||||
tilerMode = config.getOption<Tristate>("dxvk.tilerMode", Tristate::Auto);
|
tilerMode = config.getOption<Tristate>("dxvk.tilerMode", Tristate::Auto);
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,6 @@ namespace dxvk {
|
||||||
auto now = high_resolution_clock::now();
|
auto now = high_resolution_clock::now();
|
||||||
LatencyMarkers* m = m_latencyMarkersStorage.getMarkers(frameId);
|
LatencyMarkers* m = m_latencyMarkersStorage.getMarkers(frameId);
|
||||||
m->csFinished = std::chrono::duration_cast<microseconds>(now - m->start).count();
|
m->csFinished = std::chrono::duration_cast<microseconds>(now - m->start).count();
|
||||||
m_mode->signalCsFinished( frameId );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void notifySubmit() override {
|
void notifySubmit() override {
|
||||||
|
|
|
@ -44,9 +44,6 @@ namespace dxvk {
|
||||||
void signalGpuStart( uint64_t frameId ) {
|
void signalGpuStart( uint64_t frameId ) {
|
||||||
if (m_mode) m_fenceGpuStart.signal(frameId); }
|
if (m_mode) m_fenceGpuStart.signal(frameId); }
|
||||||
|
|
||||||
void signalCsFinished( uint64_t frameId ) {
|
|
||||||
if (m_mode) m_fenceCsFinished.signal(frameId); }
|
|
||||||
|
|
||||||
void setTargetFrameRate( double frameRate ) {
|
void setTargetFrameRate( double frameRate ) {
|
||||||
if (!m_fpsLimitEnvOverride && frameRate > 1.0)
|
if (!m_fpsLimitEnvOverride && frameRate > 1.0)
|
||||||
m_fpsLimitFrametime.store( 1'000'000/frameRate );
|
m_fpsLimitFrametime.store( 1'000'000/frameRate );
|
||||||
|
@ -68,7 +65,6 @@ namespace dxvk {
|
||||||
|
|
||||||
sync::Fence m_fenceGpuStart = { sync::Fence(DXGI_MAX_SWAP_CHAIN_BUFFERS) };
|
sync::Fence m_fenceGpuStart = { sync::Fence(DXGI_MAX_SWAP_CHAIN_BUFFERS) };
|
||||||
sync::Fence m_fenceGpuFinished = { sync::Fence(DXGI_MAX_SWAP_CHAIN_BUFFERS) };
|
sync::Fence m_fenceGpuFinished = { sync::Fence(DXGI_MAX_SWAP_CHAIN_BUFFERS) };
|
||||||
sync::Fence m_fenceCsFinished = { sync::Fence(DXGI_MAX_SWAP_CHAIN_BUFFERS+50) };
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -10,15 +10,6 @@ namespace dxvk {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool getLowLatencyAllowCpuFramesOverlapFromEnv( bool& allowOverlap ) {
|
|
||||||
int32_t o;
|
|
||||||
if (!FramePacerMode::getIntFromEnv("DXVK_LOW_LATENCY_ALLOW_CPU_FRAMES_OVERLAP", &o))
|
|
||||||
return false;
|
|
||||||
allowOverlap = (bool) o;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int32_t LowLatencyMode::getLowLatencyOffset( const DxvkOptions& options ) {
|
int32_t LowLatencyMode::getLowLatencyOffset( const DxvkOptions& options ) {
|
||||||
int32_t offset = options.lowLatencyOffset;
|
int32_t offset = options.lowLatencyOffset;
|
||||||
int32_t o;
|
int32_t o;
|
||||||
|
@ -30,14 +21,4 @@ namespace dxvk {
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool LowLatencyMode::getLowLatencyAllowCpuFramesOverlap( const DxvkOptions& options ) {
|
|
||||||
bool allowOverlap = options.lowLatencyAllowCpuFramesOverlap;
|
|
||||||
bool o;
|
|
||||||
if (getLowLatencyAllowCpuFramesOverlapFromEnv(o))
|
|
||||||
allowOverlap = o;
|
|
||||||
return allowOverlap;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,20 +44,16 @@ namespace dxvk {
|
||||||
|
|
||||||
LowLatencyMode(Mode mode, LatencyMarkersStorage* storage, const DxvkOptions& options)
|
LowLatencyMode(Mode mode, LatencyMarkersStorage* storage, const DxvkOptions& options)
|
||||||
: FramePacerMode(mode, storage),
|
: FramePacerMode(mode, storage),
|
||||||
m_lowLatencyOffset(getLowLatencyOffset(options)),
|
m_lowLatencyOffset(getLowLatencyOffset(options)) {
|
||||||
m_allowCpuFramesOverlap(getLowLatencyAllowCpuFramesOverlap(options)) {
|
|
||||||
Logger::info( str::format("Using lowLatencyOffset: ", m_lowLatencyOffset) );
|
Logger::info( str::format("Using lowLatencyOffset: ", m_lowLatencyOffset) );
|
||||||
Logger::info( str::format("Using lowLatencyAllowCpuFramesOverlap: ", m_allowCpuFramesOverlap) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
~LowLatencyMode() {}
|
~LowLatencyMode() {}
|
||||||
|
|
||||||
|
|
||||||
void startFrame( uint64_t frameId ) override {
|
void startFrame( uint64_t frameId ) override {
|
||||||
using std::chrono::duration_cast;
|
|
||||||
|
|
||||||
if (!m_allowCpuFramesOverlap)
|
using std::chrono::duration_cast;
|
||||||
m_fenceCsFinished.wait( frameId-1 );
|
|
||||||
|
|
||||||
m_fenceGpuStart.wait( frameId-1 );
|
m_fenceGpuStart.wait( frameId-1 );
|
||||||
|
|
||||||
|
@ -249,10 +245,7 @@ namespace dxvk {
|
||||||
|
|
||||||
|
|
||||||
int32_t getLowLatencyOffset( const DxvkOptions& options );
|
int32_t getLowLatencyOffset( const DxvkOptions& options );
|
||||||
bool getLowLatencyAllowCpuFramesOverlap( const DxvkOptions& options );
|
|
||||||
|
|
||||||
const int32_t m_lowLatencyOffset;
|
const int32_t m_lowLatencyOffset;
|
||||||
const bool m_allowCpuFramesOverlap;
|
|
||||||
|
|
||||||
Sleep::TimePoint m_lastStart = { high_resolution_clock::now() };
|
Sleep::TimePoint m_lastStart = { high_resolution_clock::now() };
|
||||||
std::array<SyncProps, 16> m_props;
|
std::array<SyncProps, 16> m_props;
|
||||||
|
|
Loading…
Add table
Reference in a new issue