Skip to content

Commit 098a7cd

Browse files
committed
Merge branch 'nsubtil/dlfg-fix-output-extents-again' into 'main'
dlfg: Check output extents on dispatch See merge request lightspeedrtx/dxvk-remix-nv!1672
2 parents 2319c9e + e4c2fb3 commit 098a7cd

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/dxvk/rtx_render/rtx_dlfg.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,6 @@ namespace dxvk {
146146
m_presentThread.threadHandle = dxvk::thread([this]() { runPresentThread(); });
147147
m_pacerThread.threadHandle = dxvk::thread([this]() { runPacerThread(); });
148148

149-
// note: this is the size of the window client area, which isn't necessarily the same as the D3D9 swapchain size
150-
device->getCommon()->metaDLFG().setDisplaySize(uint2(desc.imageExtent.width, desc.imageExtent.height));
151149
}
152150

153151
DxvkDLFGPresenter::~DxvkDLFGPresenter() {
@@ -1181,7 +1179,8 @@ namespace dxvk {
11811179
: CommonDeviceObject(device)
11821180
// xxxnsubtil: use swapchain frame count here
11831181
, m_dlfgEvalCommandLists(device, 1)
1184-
, m_dlfgFrameEndSemaphore(RtxSemaphore::createTimeline(device, "DLFG frame end")) {
1182+
, m_dlfgFrameEndSemaphore(RtxSemaphore::createTimeline(device, "DLFG frame end"))
1183+
, m_currentDisplaySize{0, 0} {
11851184

11861185
m_queryPoolDLFG = new DxvkDLFGTimestampQueryPool(m_device, kMaxFramesInFlight);
11871186

@@ -1230,6 +1229,15 @@ namespace dxvk {
12301229
m_contextDirty = true;
12311230
}
12321231

1232+
// check if the output extents have changed
1233+
VkExtent3D outputExtent = outputImage->imageInfo().extent;
1234+
if (outputExtent.width != m_currentDisplaySize[0] ||
1235+
outputExtent.height != m_currentDisplaySize[1]) {
1236+
// note: this is the size of the window client area, which isn't necessarily the same as the D3D9 swapchain size
1237+
setDisplaySize(uint2(outputExtent.width, outputExtent.height));
1238+
m_contextDirty = true;
1239+
}
1240+
12331241
if (m_contextDirty) {
12341242
assert(m_dlfgContext != nullptr);
12351243

0 commit comments

Comments
 (0)