Skip to content

Commit

Permalink
[d3d9] Hook up platform-specific clock
Browse files Browse the repository at this point in the history
See 89dfa2b

Closes #459 and #455
  • Loading branch information
misyltoad committed Nov 27, 2019
1 parent cdd77a2 commit 48eefb9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/d3d9/d3d9_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4522,7 +4522,7 @@ namespace dxvk {
uint32_t pending = m_dxvkDevice->pendingSubmissions();

if (StrongHint || pending <= MaxPendingSubmits) {
auto now = std::chrono::high_resolution_clock::now();
auto now = dxvk::high_resolution_clock::now();

uint32_t delay = MinFlushIntervalUs
+ IncFlushIntervalUs * pending;
Expand Down Expand Up @@ -4828,7 +4828,7 @@ namespace dxvk {
FlushCsChunk();

// Reset flush timer used for implicit flushes
m_lastFlush = std::chrono::high_resolution_clock::now();
m_lastFlush = dxvk::high_resolution_clock::now();
m_csIsBusy = false;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/d3d9/d3d9_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -863,8 +863,8 @@ namespace dxvk {

Rc<DxvkDataBuffer> m_updateBuffer;
DxvkCsChunkPool m_csChunkPool;
std::chrono::high_resolution_clock::time_point m_lastFlush
= std::chrono::high_resolution_clock::now();
dxvk::high_resolution_clock::time_point m_lastFlush
= dxvk::high_resolution_clock::now();
DxvkCsThread m_csThread;
bool m_csIsBusy = false;

Expand Down
2 changes: 1 addition & 1 deletion src/d3d9/d3d9_swapchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ namespace dxvk {
uint32_t scanLineCount = mode.Height + vBlankLineCount;

auto nowUs = std::chrono::time_point_cast<std::chrono::microseconds>(
std::chrono::high_resolution_clock::now())
dxvk::high_resolution_clock::now())
.time_since_epoch();

auto frametimeUs = std::chrono::microseconds(1000000u / mode.RefreshRate);
Expand Down

0 comments on commit 48eefb9

Please sign in to comment.