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

[dxvk] Add support for implicit samplers

This commit is contained in:
Joshua Ashton 2019-07-06 18:43:38 +01:00 committed by Philip Rebohle
parent 3fa8691033
commit d5d6ae4fe1
2 changed files with 5 additions and 1 deletions

View File

@ -312,7 +312,9 @@ namespace dxvk {
* \returns The image view handle
*/
VkImageView handle(VkImageViewType viewType) const {
return m_views[viewType];
return viewType != VK_IMAGE_VIEW_TYPE_MAX_ENUM
? m_views[viewType]
: m_views[m_info.type];
}
/**

View File

@ -163,6 +163,8 @@ namespace dxvk {
switch (type) {
case VK_IMAGE_VIEW_TYPE_1D: return views->view1D.ptr();
case VK_IMAGE_VIEW_TYPE_1D_ARRAY: return views->view1DArr.ptr();
// When implicit samplers are unbound -- we assume 2D in the shader.
case VK_IMAGE_VIEW_TYPE_MAX_ENUM:
case VK_IMAGE_VIEW_TYPE_2D: return views->view2D.ptr();
case VK_IMAGE_VIEW_TYPE_2D_ARRAY: return views->view2DArr.ptr();
case VK_IMAGE_VIEW_TYPE_CUBE: return views->viewCube.ptr();