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:
parent
b5d068366d
commit
1b77d58a2a
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user