1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[dxgi] Fix scaling when swap image extent mismatches window size

In Proton 3.16, the window size is not necessarily equal to the size
of the WSI swap chain and DXVK is responsible for doing the scaling,
so we should compare to the actual swap image size instead.
This commit is contained in:
Philip Rebohle 2018-10-15 18:35:00 +02:00
parent 254cd8bd06
commit 56e9bba279
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -130,13 +130,6 @@ namespace dxvk {
// to enforce the device's frame latency requirement.
SyncEvent->wait();
// Check whether the back buffer size is the same
// as the window size, in which case we should use
// VK_FILTER_NEAREST to avoid blurry output
const bool fitSize =
m_backBuffer->info().extent.width == m_options.preferredBufferSize.width
&& m_backBuffer->info().extent.height == m_options.preferredBufferSize.height;
for (uint32_t i = 0; i < SyncInterval || i < 1; i++) {
m_context->beginRecording(
m_device->createCommandList());
@ -159,6 +152,10 @@ namespace dxvk {
auto swapSemas = m_swapchain->getSemaphorePair();
auto swapImage = m_swapchain->getImageView(swapSemas.acquireSync);
// Use an appropriate texture filter depending on whether
// the back buffer size matches the swap image size
bool fitSize = m_backBuffer->info().extent == swapImage->imageInfo().extent;
m_context->bindShader(VK_SHADER_STAGE_VERTEX_BIT, m_vertShader);
m_context->bindShader(VK_SHADER_STAGE_FRAGMENT_BIT, m_fragShader);