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:
parent
3fa8691033
commit
d5d6ae4fe1
@ -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];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user