mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
D3D9: Fixed GPU timing on Win10.
This commit is contained in:
parent
ac3c4a59b6
commit
ef6c0ac855
1 changed files with 5 additions and 5 deletions
|
@ -3314,8 +3314,8 @@ namespace bgfx { namespace d3d9
|
||||||
{
|
{
|
||||||
Frame& frame = m_frame[m_control.m_current];
|
Frame& frame = m_frame[m_control.m_current];
|
||||||
frame.m_disjoint->Issue(D3DISSUE_END);
|
frame.m_disjoint->Issue(D3DISSUE_END);
|
||||||
frame.m_end->Issue(D3DISSUE_END);
|
|
||||||
frame.m_freq->Issue(D3DISSUE_END);
|
frame.m_freq->Issue(D3DISSUE_END);
|
||||||
|
frame.m_end->Issue(D3DISSUE_END);
|
||||||
m_control.commit(1);
|
m_control.commit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3325,8 +3325,8 @@ namespace bgfx { namespace d3d9
|
||||||
{
|
{
|
||||||
Frame& frame = m_frame[m_control.m_read];
|
Frame& frame = m_frame[m_control.m_read];
|
||||||
|
|
||||||
uint64_t freq;
|
uint64_t timeEnd;
|
||||||
HRESULT hr = frame.m_freq->GetData(&freq, sizeof(freq), 0);
|
HRESULT hr = frame.m_end->GetData(&timeEnd, sizeof(timeEnd), 0);
|
||||||
if (S_OK == hr)
|
if (S_OK == hr)
|
||||||
{
|
{
|
||||||
m_control.consume(1);
|
m_control.consume(1);
|
||||||
|
@ -3334,8 +3334,8 @@ namespace bgfx { namespace d3d9
|
||||||
uint64_t timeStart;
|
uint64_t timeStart;
|
||||||
DX_CHECK(frame.m_start->GetData(&timeStart, sizeof(timeStart), 0) );
|
DX_CHECK(frame.m_start->GetData(&timeStart, sizeof(timeStart), 0) );
|
||||||
|
|
||||||
uint64_t timeEnd;
|
uint64_t freq;
|
||||||
DX_CHECK(frame.m_end->GetData(&timeEnd, sizeof(timeEnd), 0) );
|
DX_CHECK(frame.m_freq->GetData(&freq, sizeof(freq), 0) );
|
||||||
|
|
||||||
m_frequency = freq;
|
m_frequency = freq;
|
||||||
m_elapsed = timeEnd - timeStart;
|
m_elapsed = timeEnd - timeStart;
|
||||||
|
|
Loading…
Reference in a new issue