mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 14:52:10 +01:00
[d3d11] Normalize render target and depth-stencil view types
Fixes a regression in Kingdom Come: Deliverance that was introduced in a55bee95548e0c0b2237bb54f6f98ed08f98c112.
This commit is contained in:
parent
5a639797d2
commit
f4a92a685f
@ -787,6 +787,13 @@ namespace dxvk {
|
|||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Normalize view type so that we won't accidentally
|
||||||
|
// bind 2D array views and 2D views at the same time
|
||||||
|
if (viewInfo.numLayers == 1) {
|
||||||
|
if (viewInfo.type == VK_IMAGE_VIEW_TYPE_1D_ARRAY) viewInfo.type = VK_IMAGE_VIEW_TYPE_1D;
|
||||||
|
if (viewInfo.type == VK_IMAGE_VIEW_TYPE_2D_ARRAY) viewInfo.type = VK_IMAGE_VIEW_TYPE_2D;
|
||||||
|
}
|
||||||
|
|
||||||
// Create the actual image view if requested
|
// Create the actual image view if requested
|
||||||
if (ppRTView == nullptr)
|
if (ppRTView == nullptr)
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
@ -905,6 +912,13 @@ namespace dxvk {
|
|||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Normalize view type so that we won't accidentally
|
||||||
|
// bind 2D array views and 2D views at the same time
|
||||||
|
if (viewInfo.numLayers == 1) {
|
||||||
|
if (viewInfo.type == VK_IMAGE_VIEW_TYPE_1D_ARRAY) viewInfo.type = VK_IMAGE_VIEW_TYPE_1D;
|
||||||
|
if (viewInfo.type == VK_IMAGE_VIEW_TYPE_2D_ARRAY) viewInfo.type = VK_IMAGE_VIEW_TYPE_2D;
|
||||||
|
}
|
||||||
|
|
||||||
// Create the actual image view if requested
|
// Create the actual image view if requested
|
||||||
if (ppDepthStencilView == nullptr)
|
if (ppDepthStencilView == nullptr)
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user