mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Remove unused API function
* Headless windows are used as immutable in tests so allowing resizing is unnecessary complication
This commit is contained in:
@@ -242,17 +242,6 @@ outputs.
|
||||
)");
|
||||
virtual void SetMeshDisplay(const MeshDisplay &config) = 0;
|
||||
|
||||
DOCUMENT(R"(Sets the dimensions of the output, useful only for headless outputs that don't have a
|
||||
backing window which don't have any implicit dimensions. This allows configuring a virtual viewport
|
||||
which is useful for operations like picking vertices that depends on the output dimensions.
|
||||
|
||||
.. note:: For outputs with backing windows, this will be ignored.
|
||||
|
||||
:param int width: The width to use.
|
||||
:param int height: The height to use.
|
||||
)");
|
||||
virtual void SetDimensions(int32_t width, int32_t height) = 0;
|
||||
|
||||
DOCUMENT(R"(Read the output texture back as byte data. Primarily useful for headless outputs where
|
||||
the output data is not displayed anywhere natively.
|
||||
|
||||
|
||||
@@ -111,10 +111,6 @@ public:
|
||||
}
|
||||
void DestroyOutputWindow(uint64_t id) { m_Proxy->DestroyOutputWindow(id); }
|
||||
bool CheckResizeOutputWindow(uint64_t id) { return m_Proxy->CheckResizeOutputWindow(id); }
|
||||
void SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h)
|
||||
{
|
||||
m_Proxy->SetOutputWindowDimensions(id, w, h);
|
||||
}
|
||||
void GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h)
|
||||
{
|
||||
m_Proxy->GetOutputWindowDimensions(id, w, h);
|
||||
|
||||
@@ -185,11 +185,6 @@ public:
|
||||
if(m_Proxy)
|
||||
return m_Proxy->GetOutputWindowDimensions(id, w, h);
|
||||
}
|
||||
void SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h)
|
||||
{
|
||||
if(m_Proxy)
|
||||
m_Proxy->SetOutputWindowDimensions(id, w, h);
|
||||
}
|
||||
void GetOutputWindowData(uint64_t id, bytebuf &retData)
|
||||
{
|
||||
if(m_Proxy)
|
||||
|
||||
@@ -276,27 +276,6 @@ void D3D11Replay::GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h)
|
||||
h = m_OutputWindows[id].height;
|
||||
}
|
||||
|
||||
void D3D11Replay::SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h)
|
||||
{
|
||||
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())
|
||||
return;
|
||||
|
||||
OutputWindow &outw = m_OutputWindows[id];
|
||||
|
||||
// can't resize an output with an actual window backing
|
||||
if(outw.wnd)
|
||||
return;
|
||||
|
||||
SAFE_RELEASE(outw.rtv);
|
||||
SAFE_RELEASE(outw.dsv);
|
||||
|
||||
outw.width = w;
|
||||
outw.height = h;
|
||||
|
||||
outw.MakeRTV();
|
||||
outw.MakeDSV();
|
||||
}
|
||||
|
||||
void D3D11Replay::GetOutputWindowData(uint64_t id, bytebuf &retData)
|
||||
{
|
||||
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())
|
||||
|
||||
@@ -212,7 +212,6 @@ public:
|
||||
void DestroyOutputWindow(uint64_t id);
|
||||
bool CheckResizeOutputWindow(uint64_t id);
|
||||
void GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h);
|
||||
void SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h);
|
||||
void GetOutputWindowData(uint64_t id, bytebuf &retData);
|
||||
void ClearOutputWindowColor(uint64_t id, FloatVector col);
|
||||
void ClearOutputWindowDepth(uint64_t id, float depth, uint8_t stencil);
|
||||
|
||||
@@ -377,30 +377,6 @@ void D3D12Replay::GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h)
|
||||
h = m_OutputWindows[id].height;
|
||||
}
|
||||
|
||||
void D3D12Replay::SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h)
|
||||
{
|
||||
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())
|
||||
return;
|
||||
|
||||
OutputWindow &outw = m_OutputWindows[id];
|
||||
|
||||
// can't resize an output with an actual window backing
|
||||
if(outw.wnd)
|
||||
return;
|
||||
|
||||
m_pDevice->ExecuteLists();
|
||||
m_pDevice->FlushLists(true);
|
||||
|
||||
outw.width = w;
|
||||
outw.height = h;
|
||||
|
||||
outw.MakeRTV(false);
|
||||
if(outw.depth)
|
||||
outw.MakeDSV();
|
||||
|
||||
outw.bbIdx = 0;
|
||||
}
|
||||
|
||||
void D3D12Replay::GetOutputWindowData(uint64_t id, bytebuf &retData)
|
||||
{
|
||||
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())
|
||||
|
||||
@@ -172,7 +172,6 @@ public:
|
||||
void DestroyOutputWindow(uint64_t id);
|
||||
bool CheckResizeOutputWindow(uint64_t id);
|
||||
void GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h);
|
||||
void SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h);
|
||||
void GetOutputWindowData(uint64_t id, bytebuf &retData);
|
||||
void ClearOutputWindowColor(uint64_t id, FloatVector col);
|
||||
void ClearOutputWindowDepth(uint64_t id, float depth, uint8_t stencil);
|
||||
|
||||
@@ -296,37 +296,6 @@ void GLReplay::GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h)
|
||||
m_pDriver->m_Platform.GetOutputWindowDimensions(outw, w, h);
|
||||
}
|
||||
|
||||
void GLReplay::SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h)
|
||||
{
|
||||
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())
|
||||
return;
|
||||
|
||||
OutputWindow &outw = m_OutputWindows[id];
|
||||
|
||||
// can't resize an output with an actual window backing
|
||||
if(outw.system != WindowingSystem::Headless)
|
||||
return;
|
||||
|
||||
outw.width = w;
|
||||
outw.height = h;
|
||||
|
||||
MakeCurrentReplayContext(m_DebugCtx);
|
||||
|
||||
WrappedOpenGL &drv = *m_pDriver;
|
||||
|
||||
bool haddepth = false;
|
||||
|
||||
drv.glDeleteTextures(1, &outw.BlitData.backbuffer);
|
||||
if(outw.BlitData.depthstencil)
|
||||
{
|
||||
haddepth = true;
|
||||
drv.glDeleteTextures(1, &outw.BlitData.depthstencil);
|
||||
}
|
||||
drv.glDeleteFramebuffers(1, &outw.BlitData.windowFBO);
|
||||
|
||||
CreateOutputWindowBackbuffer(outw, haddepth);
|
||||
}
|
||||
|
||||
void GLReplay::GetOutputWindowData(uint64_t id, bytebuf &retData)
|
||||
{
|
||||
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())
|
||||
|
||||
@@ -184,7 +184,6 @@ public:
|
||||
void DestroyOutputWindow(uint64_t id);
|
||||
bool CheckResizeOutputWindow(uint64_t id);
|
||||
void GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h);
|
||||
void SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h);
|
||||
void GetOutputWindowData(uint64_t id, bytebuf &retData);
|
||||
void ClearOutputWindowColor(uint64_t id, FloatVector col);
|
||||
void ClearOutputWindowDepth(uint64_t id, float depth, uint8_t stencil);
|
||||
|
||||
@@ -869,23 +869,6 @@ void VulkanReplay::GetOutputWindowData(uint64_t id, bytebuf &retData)
|
||||
vt->FreeMemory(Unwrap(device), readbackMem, NULL);
|
||||
}
|
||||
|
||||
void VulkanReplay::SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h)
|
||||
{
|
||||
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())
|
||||
return;
|
||||
|
||||
OutputWindow &outw = m_OutputWindows[id];
|
||||
|
||||
// can't resize an output with an actual window backing
|
||||
if(outw.m_WindowSystem != WindowingSystem::Headless)
|
||||
return;
|
||||
|
||||
outw.width = w;
|
||||
outw.height = h;
|
||||
|
||||
outw.Create(m_pDriver, m_pDriver->GetDev(), outw.hasDepth);
|
||||
}
|
||||
|
||||
bool VulkanReplay::CheckResizeOutputWindow(uint64_t id)
|
||||
{
|
||||
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())
|
||||
|
||||
@@ -369,7 +369,6 @@ public:
|
||||
void DestroyOutputWindow(uint64_t id);
|
||||
bool CheckResizeOutputWindow(uint64_t id);
|
||||
void GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h);
|
||||
void SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h);
|
||||
void GetOutputWindowData(uint64_t id, bytebuf &retData);
|
||||
void ClearOutputWindowColor(uint64_t id, FloatVector col);
|
||||
void ClearOutputWindowDepth(uint64_t id, float depth, uint8_t stencil);
|
||||
|
||||
@@ -423,10 +423,6 @@ bool DummyDriver::CheckResizeOutputWindow(uint64_t id)
|
||||
return false;
|
||||
}
|
||||
|
||||
void DummyDriver::SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h)
|
||||
{
|
||||
}
|
||||
|
||||
void DummyDriver::GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -145,7 +145,6 @@ public:
|
||||
uint64_t MakeOutputWindow(WindowingData window, bool depth);
|
||||
void DestroyOutputWindow(uint64_t id);
|
||||
bool CheckResizeOutputWindow(uint64_t id);
|
||||
void SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h);
|
||||
void GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h);
|
||||
void GetOutputWindowData(uint64_t id, bytebuf &retData);
|
||||
void ClearOutputWindowColor(uint64_t id, FloatVector col);
|
||||
|
||||
@@ -266,7 +266,6 @@ public:
|
||||
virtual uint64_t MakeOutputWindow(WindowingData window, bool depth) = 0;
|
||||
virtual void DestroyOutputWindow(uint64_t id) = 0;
|
||||
virtual bool CheckResizeOutputWindow(uint64_t id) = 0;
|
||||
virtual void SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h) = 0;
|
||||
virtual void GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h) = 0;
|
||||
virtual void GetOutputWindowData(uint64_t id, bytebuf &retData) = 0;
|
||||
virtual void ClearOutputWindowColor(uint64_t id, FloatVector col) = 0;
|
||||
|
||||
@@ -149,16 +149,6 @@ void ReplayOutput::Shutdown()
|
||||
m_pController->ShutdownOutput(this);
|
||||
}
|
||||
|
||||
void ReplayOutput::SetDimensions(int32_t width, int32_t height)
|
||||
{
|
||||
CHECK_REPLAY_THREAD();
|
||||
|
||||
m_pDevice->SetOutputWindowDimensions(m_MainOutput.outputID, width > 0 ? width : 1,
|
||||
height > 0 ? height : 1);
|
||||
m_pDevice->GetOutputWindowDimensions(m_MainOutput.outputID, m_Width, m_Height);
|
||||
m_pController->FatalErrorCheck();
|
||||
}
|
||||
|
||||
bytebuf ReplayOutput::ReadbackOutputTexture()
|
||||
{
|
||||
CHECK_REPLAY_THREAD();
|
||||
@@ -397,24 +387,21 @@ bytebuf ReplayOutput::DrawThumbnail(int32_t width, int32_t height, ResourceId te
|
||||
|
||||
if(idx < 0)
|
||||
{
|
||||
// resize oldest generator if we have hit the max
|
||||
// release oldest generator if we have hit the max
|
||||
if(m_ThumbnailGenerators.size() == MaxThumbnailGenerators)
|
||||
{
|
||||
outputID = m_ThumbnailGenerators.back().second;
|
||||
m_pDevice->SetOutputWindowDimensions(outputID, width, height);
|
||||
m_pDevice->DestroyOutputWindow(m_ThumbnailGenerators.back().second);
|
||||
m_ThumbnailGenerators.pop_back();
|
||||
}
|
||||
else
|
||||
{
|
||||
outputID = m_pDevice->MakeOutputWindow(CreateHeadlessWindowingData(width, height), false);
|
||||
}
|
||||
|
||||
outputID = m_pDevice->MakeOutputWindow(CreateHeadlessWindowingData(width, height), false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// remove the found one, so it can get inserted into the front
|
||||
m_ThumbnailGenerators.erase(idx);
|
||||
}
|
||||
// make this the most recent generator, so the oldest one will be kicked out
|
||||
// make this the most recent generator, so the oldest one will be kicked out if we have too many
|
||||
m_ThumbnailGenerators.insert(0, {key, outputID});
|
||||
|
||||
bool depthMode = false;
|
||||
|
||||
Reference in New Issue
Block a user