diff options
Diffstat (limited to 'src/filters/renderer/VideoRenderers')
3 files changed, 23 insertions, 24 deletions
diff --git a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp index 8dbca9f5f..ff211fcbd 100644 --- a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp +++ b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp @@ -1120,7 +1120,7 @@ bool CDX9AllocatorPresenter::WaitForVBlankRange(int& _RasterStart, int _RasterSi if (!GetVBlank(ScanLine, InVBlank, _bMeasure)) {
break;
}
- int ScanLineDiff = long(ScanLine) - _RasterStart;
+ ScanLineDiff = long(ScanLine) - _RasterStart;
if (ScanLineDiff > m_ScreenSize.cy / 2) {
ScanLineDiff -= m_ScreenSize.cy;
} else if (ScanLineDiff < -m_ScreenSize.cy / 2) {
@@ -1182,7 +1182,7 @@ bool CDX9AllocatorPresenter::WaitForVBlankRange(int& _RasterStart, int _RasterSi if (!GetVBlank(ScanLine, InVBlank, _bMeasure)) {
break;
}
- int ScanLineDiff = long(ScanLine) - _RasterStart;
+ ScanLineDiff = long(ScanLine) - _RasterStart;
if (ScanLineDiff > m_ScreenSize.cy / 2) {
ScanLineDiff -= m_ScreenSize.cy;
} else if (ScanLineDiff < -m_ScreenSize.cy / 2) {
@@ -1196,7 +1196,7 @@ bool CDX9AllocatorPresenter::WaitForVBlankRange(int& _RasterStart, int _RasterSi bWaited = true;
- int ScanLineDiffLock = long(ScanLine) - D3DDevLockStart;
+ ScanLineDiffLock = long(ScanLine) - D3DDevLockStart;
if (ScanLineDiffLock > m_ScreenSize.cy / 2) {
ScanLineDiffLock -= m_ScreenSize.cy;
} else if (ScanLineDiffLock < -m_ScreenSize.cy / 2) {
@@ -1213,7 +1213,7 @@ bool CDX9AllocatorPresenter::WaitForVBlankRange(int& _RasterStart, int _RasterSi LastLineDiffLock = ScanLineDiffLock;
- int ScanLineDiffSleep = long(ScanLine) - NoSleepStart;
+ ScanLineDiffSleep = long(ScanLine) - NoSleepStart;
if (ScanLineDiffSleep > m_ScreenSize.cy / 2) {
ScanLineDiffSleep -= m_ScreenSize.cy;
} else if (ScanLineDiffSleep < -m_ScreenSize.cy / 2) {
@@ -1449,19 +1449,18 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool bAll) bool bDoVSyncInPresent = (!bCompositionEnabled && !m_bAlternativeVSync) || !r.m_AdvRendSets.bVMR9VSync;
- CComPtr<IDirect3DQuery9> pEventQuery;
-
- m_pD3DDev->CreateQuery(D3DQUERYTYPE_EVENT, &pEventQuery);
- if (pEventQuery) {
- pEventQuery->Issue(D3DISSUE_END);
+ CComPtr<IDirect3DQuery9> pEventQueryFlushBeforeVSync;
+ m_pD3DDev->CreateQuery(D3DQUERYTYPE_EVENT, &pEventQueryFlushBeforeVSync);
+ if (pEventQueryFlushBeforeVSync) {
+ pEventQueryFlushBeforeVSync->Issue(D3DISSUE_END);
}
- if (r.m_AdvRendSets.bVMRFlushGPUBeforeVSync && pEventQuery) {
+ if (r.m_AdvRendSets.bVMRFlushGPUBeforeVSync && pEventQueryFlushBeforeVSync) {
LONGLONG llPerf = rd->GetPerfCounter();
BOOL Data;
//Sleep(5);
LONGLONG FlushStartTime = rd->GetPerfCounter();
- while (S_FALSE == pEventQuery->GetData(&Data, sizeof(Data), D3DGETDATA_FLUSH)) {
+ while (S_FALSE == pEventQueryFlushBeforeVSync->GetData(&Data, sizeof(Data), D3DGETDATA_FLUSH)) {
if (!r.m_AdvRendSets.bVMRFlushGPUWait) {
break;
}
@@ -1504,8 +1503,8 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool bAll) // Create a query object
{
- CComPtr<IDirect3DQuery9> pEventQuery;
- m_pD3DDev->CreateQuery(D3DQUERYTYPE_EVENT, &pEventQuery);
+ CComPtr<IDirect3DQuery9> pEventQueryFlushAfterVSync;
+ m_pD3DDev->CreateQuery(D3DQUERYTYPE_EVENT, &pEventQueryFlushAfterVSync);
LONGLONG llPerf = rd->GetPerfCounter();
CRect presentationSrcRect(rDstPri), presentationDestRect(m_windowRect);
@@ -1526,15 +1525,15 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool bAll) }
}
// Issue an End event
- if (pEventQuery) {
- pEventQuery->Issue(D3DISSUE_END);
+ if (pEventQueryFlushAfterVSync) {
+ pEventQueryFlushAfterVSync->Issue(D3DISSUE_END);
}
BOOL Data;
- if (r.m_AdvRendSets.bVMRFlushGPUAfterPresent && pEventQuery) {
+ if (r.m_AdvRendSets.bVMRFlushGPUAfterPresent && pEventQueryFlushAfterVSync) {
LONGLONG FlushStartTime = rd->GetPerfCounter();
- while (S_FALSE == pEventQuery->GetData(&Data, sizeof(Data), D3DGETDATA_FLUSH)) {
+ while (S_FALSE == pEventQueryFlushAfterVSync->GetData(&Data, sizeof(Data), D3DGETDATA_FLUSH)) {
if (!r.m_AdvRendSets.bVMRFlushGPUWait) {
break;
}
diff --git a/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp index 923a2f8f8..174e1d314 100644 --- a/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp +++ b/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp @@ -2059,8 +2059,8 @@ void CEVRAllocatorPresenter::RenderThread() //if (WaitForMultipleObjects (_countof(hEvtsBuff), hEvtsBuff, FALSE, INFINITE) == WAIT_OBJECT_0+2)
{
CComPtr<IMFSample> pMFSample;
- LONGLONG llPerf = GetRenderersData()->GetPerfCounter();
- UNREFERENCED_PARAMETER(llPerf);
+ //LONGLONG llPerf2 = GetRenderersData()->GetPerfCounter();
+ //UNREFERENCED_PARAMETER(llPerf2);
int nSamplesLeft = 0;
if (SUCCEEDED(GetScheduledSample(&pMFSample, nSamplesLeft))) {
//UINT32 nSurface;
@@ -2648,7 +2648,7 @@ void CEVRAllocatorPresenter::AddToScheduledList(IMFSample* pSample, bool bSorted }
if (Diff < m_rtTimePerFrame * 8 && m_rtTimePerFrame && Diff2 < m_rtTimePerFrame * 8) { // Detect seeking
int iPos = (m_DetectedFrameTimePos++) % 60;
- LONGLONG Diff = Time - PrevTime;
+ Diff = Time - PrevTime;
if (PrevTime == -1) {
Diff = 0;
}
diff --git a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp index 93d8ca493..946d890f2 100644 --- a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp +++ b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp @@ -1706,7 +1706,7 @@ STDMETHODIMP_(bool) CBaseAP::Paint(bool bAll) hr = m_pD3DDev->SetPixelShaderConstantF(0, (float*)fConstData, _countof(fConstData));
- int src = 1, dst = 0;
+ int srcTexture = 1, dstTexture = 0;
POSITION pos = m_pPixelShadersScreenSpace.GetHeadPosition();
while (pos) {
@@ -1714,7 +1714,7 @@ STDMETHODIMP_(bool) CBaseAP::Paint(bool bAll) m_pD3DDev->SetRenderTarget(0, pBackBuffer);
} else {
CComPtr<IDirect3DSurface9> pRT;
- hr = m_pScreenSizeTemporaryTexture[dst]->GetSurfaceLevel(0, &pRT);
+ hr = m_pScreenSizeTemporaryTexture[dstTexture]->GetSurfaceLevel(0, &pRT);
m_pD3DDev->SetRenderTarget(0, pRT);
}
@@ -1723,9 +1723,9 @@ STDMETHODIMP_(bool) CBaseAP::Paint(bool bAll) Shader.Compile(m_pPSC);
}
hr = m_pD3DDev->SetPixelShader(Shader.m_pPixelShader);
- TextureCopy(m_pScreenSizeTemporaryTexture[src]);
+ TextureCopy(m_pScreenSizeTemporaryTexture[srcTexture]);
- std::swap(src, dst);
+ std::swap(srcTexture, dstTexture);
}
hr = m_pD3DDev->SetPixelShader(nullptr);
|