1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-15 07:29:17 +01:00

[d3d11] CreateRenderTargetView now uses proper format

This commit is contained in:
Philip Rebohle 2017-12-04 13:47:18 +01:00
parent cf33315c0c
commit 365f992a97
2 changed files with 18 additions and 10 deletions

View File

@ -19,6 +19,14 @@ namespace dxvk {
m_featureFlags (featureFlags), m_featureFlags (featureFlags),
m_dxvkDevice (m_dxgiDevice->GetDXVKDevice()), m_dxvkDevice (m_dxgiDevice->GetDXVKDevice()),
m_dxvkAdapter (m_dxvkDevice->adapter()) { m_dxvkAdapter (m_dxvkDevice->adapter()) {
Com<IDXGIAdapter> adapter;
if (FAILED(m_dxgiDevice->GetAdapter(&adapter))
|| FAILED(adapter->QueryInterface(__uuidof(IDXGIAdapterPrivate),
reinterpret_cast<void**>(&m_dxgiAdapter))))
throw DxvkError("D3D11Device: Failed to query adapter");
m_dxgiDevice->SetDeviceLayer(this); m_dxgiDevice->SetDeviceLayer(this);
m_presentDevice->SetDeviceLayer(this); m_presentDevice->SetDeviceLayer(this);
@ -179,8 +187,7 @@ namespace dxvk {
// Fill in Vulkan image view info // Fill in Vulkan image view info
DxvkImageViewCreateInfo viewInfo; DxvkImageViewCreateInfo viewInfo;
// FIXME look up Vulkan format for DXGI format viewInfo.format = m_dxgiAdapter->LookupFormat(desc.Format).actual;
viewInfo.format = image->info().format;
viewInfo.aspect = VK_IMAGE_ASPECT_COLOR_BIT; viewInfo.aspect = VK_IMAGE_ASPECT_COLOR_BIT;
switch (desc.ViewDimension) { switch (desc.ViewDimension) {

View File

@ -231,6 +231,7 @@ namespace dxvk {
private: private:
const Com<IDXGIDevicePrivate> m_dxgiDevice; const Com<IDXGIDevicePrivate> m_dxgiDevice;
Com<IDXGIAdapterPrivate> m_dxgiAdapter;
const Com<D3D11PresentDevice> m_presentDevice; const Com<D3D11PresentDevice> m_presentDevice;
const D3D_FEATURE_LEVEL m_featureLevel; const D3D_FEATURE_LEVEL m_featureLevel;