mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[d3d11] Report correct timer frequency for TIMESTAMP_DISJOINT queries
This commit is contained in:
parent
48e0b6d684
commit
c93f2b980e
@ -208,9 +208,8 @@ namespace dxvk {
|
||||
return S_OK;
|
||||
|
||||
case D3D11_QUERY_TIMESTAMP_DISJOINT: {
|
||||
// FIXME return correct frequency
|
||||
auto data = static_cast<D3D11_QUERY_DATA_TIMESTAMP_DISJOINT*>(pData);
|
||||
data->Frequency = 1000;
|
||||
data->Frequency = GetTimestampQueryFrequency();
|
||||
data->Disjoint = FALSE;
|
||||
} return S_OK;
|
||||
|
||||
@ -236,4 +235,13 @@ namespace dxvk {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UINT64 D3D11Query::GetTimestampQueryFrequency() const {
|
||||
Rc<DxvkDevice> device = m_device->GetDXVKDevice();
|
||||
Rc<DxvkAdapter> adapter = device->adapter();
|
||||
|
||||
VkPhysicalDeviceLimits limits = adapter->deviceProperties().limits;
|
||||
return uint64_t(1'000'000'000.0f / limits.timestampPeriod);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -53,6 +53,8 @@ namespace dxvk {
|
||||
|
||||
uint32_t m_revision = 0;
|
||||
|
||||
UINT64 GetTimestampQueryFrequency() const;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user