mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 21:47:23 +00:00
[idd] consistency: change t
to st
This commit is contained in:
parent
80b9bda59d
commit
fd0cc6aa10
@ -196,10 +196,11 @@ void CSwapChainProcessor::FrameThread()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
StagingTexture & t = m_cpuTex[m_texRIndex];
|
StagingTexture & st = m_cpuTex[m_texRIndex];
|
||||||
|
|
||||||
LOCK_CONTEXT();
|
LOCK_CONTEXT();
|
||||||
HRESULT status = m_device->m_context->Map(t.tex.Get(), 0, D3D11_MAP_READ, D3D11_MAP_FLAG_DO_NOT_WAIT, &t.map);
|
HRESULT status = m_device->m_context->Map(st.tex.Get(), 0, D3D11_MAP_READ,
|
||||||
|
D3D11_MAP_FLAG_DO_NOT_WAIT, &st.map);
|
||||||
UNLOCK_CONTEXT();
|
UNLOCK_CONTEXT();
|
||||||
|
|
||||||
if (FAILED(status))
|
if (FAILED(status))
|
||||||
@ -216,22 +217,22 @@ void CSwapChainProcessor::FrameThread()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_devContext->SendFrame(t.width, t.height, t.map.RowPitch, t.format, t.map.pData);
|
m_devContext->SendFrame(st.width, st.height, st.map.RowPitch, st.format, st.map.pData);
|
||||||
InterlockedAdd(&m_copyCount, -1);
|
InterlockedAdd(&m_copyCount, -1);
|
||||||
if (++m_texRIndex == STAGING_TEXTURES)
|
if (++m_texRIndex == STAGING_TEXTURES)
|
||||||
m_texRIndex = 0;
|
m_texRIndex = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSwapChainProcessor::SetupStagingTexture(StagingTexture & t, int width, int height, DXGI_FORMAT format)
|
bool CSwapChainProcessor::SetupStagingTexture(StagingTexture & st, int width, int height, DXGI_FORMAT format)
|
||||||
{
|
{
|
||||||
if (t.width == width && t.height == height && t.format == format)
|
if (st.width == width && st.height == height && st.format == format)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
t.tex.Reset();
|
st.tex.Reset();
|
||||||
t.width = width;
|
st.width = width;
|
||||||
t.height = height;
|
st.height = height;
|
||||||
t.format = format;
|
st.format = format;
|
||||||
|
|
||||||
D3D11_TEXTURE2D_DESC desc = {};
|
D3D11_TEXTURE2D_DESC desc = {};
|
||||||
desc.Width = width;
|
desc.Width = width;
|
||||||
@ -246,7 +247,7 @@ bool CSwapChainProcessor::SetupStagingTexture(StagingTexture & t, int width, int
|
|||||||
desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
|
desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
|
||||||
desc.MiscFlags = 0;
|
desc.MiscFlags = 0;
|
||||||
|
|
||||||
if (FAILED(m_device->m_device->CreateTexture2D(&desc, nullptr, &t.tex)))
|
if (FAILED(m_device->m_device->CreateTexture2D(&desc, nullptr, &st.tex)))
|
||||||
{
|
{
|
||||||
DBGPRINT("Failed to create staging texture");
|
DBGPRINT("Failed to create staging texture");
|
||||||
return false;
|
return false;
|
||||||
|
@ -47,7 +47,7 @@ private:
|
|||||||
int m_texRIndex = 0;
|
int m_texRIndex = 0;
|
||||||
int m_texWIndex = 0;
|
int m_texWIndex = 0;
|
||||||
|
|
||||||
bool SetupStagingTexture(StagingTexture & t, int width, int height, DXGI_FORMAT format);
|
bool SetupStagingTexture(StagingTexture & st, int width, int height, DXGI_FORMAT format);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CSwapChainProcessor(CIndirectDeviceContext * devContext, IDDCX_SWAPCHAIN hSwapChain,
|
CSwapChainProcessor(CIndirectDeviceContext * devContext, IDDCX_SWAPCHAIN hSwapChain,
|
||||||
|
Loading…
Reference in New Issue
Block a user