From c8c781c88bfd7d86e8ef19fc95063a079124f0c5 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 29 Aug 2019 18:30:28 +0200 Subject: [PATCH] [d3d11] Add check whether a viewed resource has a given bind flag --- src/d3d11/d3d11_view_rtv.h | 4 ++++ src/d3d11/d3d11_view_uav.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/d3d11/d3d11_view_rtv.h b/src/d3d11/d3d11_view_rtv.h index dd589993e..031f2c69e 100644 --- a/src/d3d11/d3d11_view_rtv.h +++ b/src/d3d11/d3d11_view_rtv.h @@ -37,6 +37,10 @@ namespace dxvk { return m_info; } + BOOL HasBindFlag(UINT Flags) const { + return m_info.BindFlags & Flags; + } + D3D11_RESOURCE_DIMENSION GetResourceType() const { D3D11_RESOURCE_DIMENSION type; m_resource->GetType(&type); diff --git a/src/d3d11/d3d11_view_uav.h b/src/d3d11/d3d11_view_uav.h index 5c7967f73..5876f8e1f 100644 --- a/src/d3d11/d3d11_view_uav.h +++ b/src/d3d11/d3d11_view_uav.h @@ -39,6 +39,10 @@ namespace dxvk { return m_info; } + BOOL HasBindFlag(UINT Flags) const { + return m_info.BindFlags & Flags; + } + D3D11_RESOURCE_DIMENSION GetResourceType() const { D3D11_RESOURCE_DIMENSION type; m_resource->GetType(&type);