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

[dxgi] Fixed hardcoded swap chain format

This commit is contained in:
Philip Rebohle 2017-12-03 21:36:44 +01:00
parent b5d068366d
commit 1b77d58a2a
2 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ namespace dxvk {
// Create swap chain for the surface
DxvkSwapchainProperties swapchainProperties;
swapchainProperties.preferredSurfaceFormat.format = VK_FORMAT_B8G8R8A8_SNORM;
swapchainProperties.preferredSurfaceFormat.format = VK_FORMAT_B8G8R8A8_SRGB;
swapchainProperties.preferredSurfaceFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
swapchainProperties.preferredPresentMode = VK_PRESENT_MODE_FIFO_KHR;
swapchainProperties.preferredBufferSize.width = bufferWidth;

View File

@ -33,7 +33,7 @@ public:
swapDesc.BufferDesc.Width = 1024;
swapDesc.BufferDesc.Height = 600;
swapDesc.BufferDesc.RefreshRate = { 60, 1 };
swapDesc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
swapDesc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;
swapDesc.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED;
swapDesc.BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED;
swapDesc.SampleDesc.Count = 1;
@ -63,7 +63,7 @@ public:
void run() {
FLOAT color[4] = { 0.8f, 0.2f, 0.2f, 1.0f };
FLOAT color[4] = { 0.5f, 0.5f, 0.5f, 1.0f };
m_context->OMSetRenderTargets(1, &m_bufferView, nullptr);
m_context->ClearRenderTargetView(m_bufferView.ptr(), color);