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

[dxvk] Improve DxvkImageView::handle()

Should fix a silly compiler warning and improves code gen, which
is important since this is *the* most frequently called function
in the backend.
This commit is contained in:
Philip Rebohle 2019-07-17 21:33:48 +02:00 committed by Philip Rebohle
parent d5d6ae4fe1
commit 3063d7fc7c

View File

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