Skip to content

Commit 3c5ce8a

Browse files
committed
Remove unused API function
* Headless windows are used as immutable in tests so allowing resizing is unnecessary complication
1 parent f3f0617 commit 3c5ce8a

File tree

15 files changed

+5
-141
lines changed

15 files changed

+5
-141
lines changed

renderdoc/api/replay/renderdoc_replay.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -242,17 +242,6 @@ outputs.
242242
)");
243243
virtual void SetMeshDisplay(const MeshDisplay &config) = 0;
244244

245-
DOCUMENT(R"(Sets the dimensions of the output, useful only for headless outputs that don't have a
246-
backing window which don't have any implicit dimensions. This allows configuring a virtual viewport
247-
which is useful for operations like picking vertices that depends on the output dimensions.
248-
249-
.. note:: For outputs with backing windows, this will be ignored.
250-
251-
:param int width: The width to use.
252-
:param int height: The height to use.
253-
)");
254-
virtual void SetDimensions(int32_t width, int32_t height) = 0;
255-
256245
DOCUMENT(R"(Read the output texture back as byte data. Primarily useful for headless outputs where
257246
the output data is not displayed anywhere natively.
258247

renderdoc/core/image_viewer.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,6 @@ class ImageViewer : public IReplayDriver
111111
}
112112
void DestroyOutputWindow(uint64_t id) { m_Proxy->DestroyOutputWindow(id); }
113113
bool CheckResizeOutputWindow(uint64_t id) { return m_Proxy->CheckResizeOutputWindow(id); }
114-
void SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h)
115-
{
116-
m_Proxy->SetOutputWindowDimensions(id, w, h);
117-
}
118114
void GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h)
119115
{
120116
m_Proxy->GetOutputWindowDimensions(id, w, h);

renderdoc/core/replay_proxy.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,6 @@ class ReplayProxy : public IReplayDriver
185185
if(m_Proxy)
186186
return m_Proxy->GetOutputWindowDimensions(id, w, h);
187187
}
188-
void SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h)
189-
{
190-
if(m_Proxy)
191-
m_Proxy->SetOutputWindowDimensions(id, w, h);
192-
}
193188
void GetOutputWindowData(uint64_t id, bytebuf &retData)
194189
{
195190
if(m_Proxy)

renderdoc/driver/d3d11/d3d11_outputwindow.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -276,27 +276,6 @@ void D3D11Replay::GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h)
276276
h = m_OutputWindows[id].height;
277277
}
278278

279-
void D3D11Replay::SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h)
280-
{
281-
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())
282-
return;
283-
284-
OutputWindow &outw = m_OutputWindows[id];
285-
286-
// can't resize an output with an actual window backing
287-
if(outw.wnd)
288-
return;
289-
290-
SAFE_RELEASE(outw.rtv);
291-
SAFE_RELEASE(outw.dsv);
292-
293-
outw.width = w;
294-
outw.height = h;
295-
296-
outw.MakeRTV();
297-
outw.MakeDSV();
298-
}
299-
300279
void D3D11Replay::GetOutputWindowData(uint64_t id, bytebuf &retData)
301280
{
302281
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())

renderdoc/driver/d3d11/d3d11_replay.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ class D3D11Replay : public IReplayDriver
212212
void DestroyOutputWindow(uint64_t id);
213213
bool CheckResizeOutputWindow(uint64_t id);
214214
void GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h);
215-
void SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h);
216215
void GetOutputWindowData(uint64_t id, bytebuf &retData);
217216
void ClearOutputWindowColor(uint64_t id, FloatVector col);
218217
void ClearOutputWindowDepth(uint64_t id, float depth, uint8_t stencil);

renderdoc/driver/d3d12/d3d12_outputwindow.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -377,30 +377,6 @@ void D3D12Replay::GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h)
377377
h = m_OutputWindows[id].height;
378378
}
379379

380-
void D3D12Replay::SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h)
381-
{
382-
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())
383-
return;
384-
385-
OutputWindow &outw = m_OutputWindows[id];
386-
387-
// can't resize an output with an actual window backing
388-
if(outw.wnd)
389-
return;
390-
391-
m_pDevice->ExecuteLists();
392-
m_pDevice->FlushLists(true);
393-
394-
outw.width = w;
395-
outw.height = h;
396-
397-
outw.MakeRTV(false);
398-
if(outw.depth)
399-
outw.MakeDSV();
400-
401-
outw.bbIdx = 0;
402-
}
403-
404380
void D3D12Replay::GetOutputWindowData(uint64_t id, bytebuf &retData)
405381
{
406382
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())

renderdoc/driver/d3d12/d3d12_replay.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ class D3D12Replay : public IReplayDriver
172172
void DestroyOutputWindow(uint64_t id);
173173
bool CheckResizeOutputWindow(uint64_t id);
174174
void GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h);
175-
void SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h);
176175
void GetOutputWindowData(uint64_t id, bytebuf &retData);
177176
void ClearOutputWindowColor(uint64_t id, FloatVector col);
178177
void ClearOutputWindowDepth(uint64_t id, float depth, uint8_t stencil);

renderdoc/driver/gl/gl_outputwindow.cpp

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -296,37 +296,6 @@ void GLReplay::GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h)
296296
m_pDriver->m_Platform.GetOutputWindowDimensions(outw, w, h);
297297
}
298298

299-
void GLReplay::SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h)
300-
{
301-
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())
302-
return;
303-
304-
OutputWindow &outw = m_OutputWindows[id];
305-
306-
// can't resize an output with an actual window backing
307-
if(outw.system != WindowingSystem::Headless)
308-
return;
309-
310-
outw.width = w;
311-
outw.height = h;
312-
313-
MakeCurrentReplayContext(m_DebugCtx);
314-
315-
WrappedOpenGL &drv = *m_pDriver;
316-
317-
bool haddepth = false;
318-
319-
drv.glDeleteTextures(1, &outw.BlitData.backbuffer);
320-
if(outw.BlitData.depthstencil)
321-
{
322-
haddepth = true;
323-
drv.glDeleteTextures(1, &outw.BlitData.depthstencil);
324-
}
325-
drv.glDeleteFramebuffers(1, &outw.BlitData.windowFBO);
326-
327-
CreateOutputWindowBackbuffer(outw, haddepth);
328-
}
329-
330299
void GLReplay::GetOutputWindowData(uint64_t id, bytebuf &retData)
331300
{
332301
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())

renderdoc/driver/gl/gl_replay.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ class GLReplay : public IReplayDriver
184184
void DestroyOutputWindow(uint64_t id);
185185
bool CheckResizeOutputWindow(uint64_t id);
186186
void GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h);
187-
void SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h);
188187
void GetOutputWindowData(uint64_t id, bytebuf &retData);
189188
void ClearOutputWindowColor(uint64_t id, FloatVector col);
190189
void ClearOutputWindowDepth(uint64_t id, float depth, uint8_t stencil);

renderdoc/driver/vulkan/vk_outputwindow.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -869,23 +869,6 @@ void VulkanReplay::GetOutputWindowData(uint64_t id, bytebuf &retData)
869869
vt->FreeMemory(Unwrap(device), readbackMem, NULL);
870870
}
871871

872-
void VulkanReplay::SetOutputWindowDimensions(uint64_t id, int32_t w, int32_t h)
873-
{
874-
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())
875-
return;
876-
877-
OutputWindow &outw = m_OutputWindows[id];
878-
879-
// can't resize an output with an actual window backing
880-
if(outw.m_WindowSystem != WindowingSystem::Headless)
881-
return;
882-
883-
outw.width = w;
884-
outw.height = h;
885-
886-
outw.Create(m_pDriver, m_pDriver->GetDev(), outw.hasDepth);
887-
}
888-
889872
bool VulkanReplay::CheckResizeOutputWindow(uint64_t id)
890873
{
891874
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())

0 commit comments

Comments
 (0)