mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-14 22:29:15 +01:00
[d3d11] CreateRenderTargetView now uses proper format
This commit is contained in:
parent
cf33315c0c
commit
365f992a97
@ -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,9 +187,8 @@ 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) {
|
||||||
case D3D11_RTV_DIMENSION_TEXTURE2D:
|
case D3D11_RTV_DIMENSION_TEXTURE2D:
|
||||||
|
@ -230,16 +230,17 @@ namespace dxvk {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
const Com<IDXGIDevicePrivate> m_dxgiDevice;
|
const Com<IDXGIDevicePrivate> m_dxgiDevice;
|
||||||
const Com<D3D11PresentDevice> m_presentDevice;
|
Com<IDXGIAdapterPrivate> m_dxgiAdapter;
|
||||||
|
const Com<D3D11PresentDevice> m_presentDevice;
|
||||||
|
|
||||||
const D3D_FEATURE_LEVEL m_featureLevel;
|
const D3D_FEATURE_LEVEL m_featureLevel;
|
||||||
const UINT m_featureFlags;
|
const UINT m_featureFlags;
|
||||||
|
|
||||||
const Rc<DxvkDevice> m_dxvkDevice;
|
const Rc<DxvkDevice> m_dxvkDevice;
|
||||||
const Rc<DxvkAdapter> m_dxvkAdapter;
|
const Rc<DxvkAdapter> m_dxvkAdapter;
|
||||||
|
|
||||||
Com<ID3D11DeviceContext> m_context;
|
Com<ID3D11DeviceContext> m_context;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user