mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 10:54:16 +01:00
[d3d11] Devirtualize context method forwarding
This commit is contained in:
parent
d10df6353b
commit
ae9024492b
@ -144,7 +144,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
template<typename ContextType>
|
template<typename ContextType>
|
||||||
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::DiscardView(ID3D11View* pResourceView) {
|
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::DiscardView(ID3D11View* pResourceView) {
|
||||||
DiscardView1(pResourceView, nullptr, 0);
|
DiscardViewBase(pResourceView, nullptr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -153,6 +153,15 @@ namespace dxvk {
|
|||||||
ID3D11View* pResourceView,
|
ID3D11View* pResourceView,
|
||||||
const D3D11_RECT* pRects,
|
const D3D11_RECT* pRects,
|
||||||
UINT NumRects) {
|
UINT NumRects) {
|
||||||
|
DiscardViewBase(pResourceView, pRects, NumRects);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename ContextType>
|
||||||
|
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::DiscardViewBase(
|
||||||
|
ID3D11View* pResourceView,
|
||||||
|
const D3D11_RECT* pRects,
|
||||||
|
UINT NumRects) {
|
||||||
D3D10DeviceLock lock = LockContext();
|
D3D10DeviceLock lock = LockContext();
|
||||||
|
|
||||||
// We don't support discarding individual rectangles
|
// We don't support discarding individual rectangles
|
||||||
@ -207,7 +216,7 @@ namespace dxvk {
|
|||||||
ID3D11Resource* pSrcResource,
|
ID3D11Resource* pSrcResource,
|
||||||
UINT SrcSubresource,
|
UINT SrcSubresource,
|
||||||
const D3D11_BOX* pSrcBox) {
|
const D3D11_BOX* pSrcBox) {
|
||||||
CopySubresourceRegion1(
|
CopySubresourceRegionBase(
|
||||||
pDstResource, DstSubresource, DstX, DstY, DstZ,
|
pDstResource, DstSubresource, DstX, DstY, DstZ,
|
||||||
pSrcResource, SrcSubresource, pSrcBox, 0);
|
pSrcResource, SrcSubresource, pSrcBox, 0);
|
||||||
}
|
}
|
||||||
@ -224,6 +233,23 @@ namespace dxvk {
|
|||||||
UINT SrcSubresource,
|
UINT SrcSubresource,
|
||||||
const D3D11_BOX* pSrcBox,
|
const D3D11_BOX* pSrcBox,
|
||||||
UINT CopyFlags) {
|
UINT CopyFlags) {
|
||||||
|
CopySubresourceRegionBase(
|
||||||
|
pDstResource, DstSubresource, DstX, DstY, DstZ,
|
||||||
|
pSrcResource, SrcSubresource, pSrcBox, CopyFlags);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename ContextType>
|
||||||
|
void STDMETHODCALLTYPE D3D11CommonContext<ContextType>::CopySubresourceRegionBase(
|
||||||
|
ID3D11Resource* pDstResource,
|
||||||
|
UINT DstSubresource,
|
||||||
|
UINT DstX,
|
||||||
|
UINT DstY,
|
||||||
|
UINT DstZ,
|
||||||
|
ID3D11Resource* pSrcResource,
|
||||||
|
UINT SrcSubresource,
|
||||||
|
const D3D11_BOX* pSrcBox,
|
||||||
|
UINT CopyFlags) {
|
||||||
D3D10DeviceLock lock = LockContext();
|
D3D10DeviceLock lock = LockContext();
|
||||||
|
|
||||||
if (!pDstResource || !pSrcResource)
|
if (!pDstResource || !pSrcResource)
|
||||||
|
@ -104,6 +104,11 @@ namespace dxvk {
|
|||||||
const D3D11_RECT* pRects,
|
const D3D11_RECT* pRects,
|
||||||
UINT NumRects);
|
UINT NumRects);
|
||||||
|
|
||||||
|
void STDMETHODCALLTYPE DiscardViewBase(
|
||||||
|
ID3D11View* pResourceView,
|
||||||
|
const D3D11_RECT* pRects,
|
||||||
|
UINT NumRects);
|
||||||
|
|
||||||
void STDMETHODCALLTYPE CopySubresourceRegion(
|
void STDMETHODCALLTYPE CopySubresourceRegion(
|
||||||
ID3D11Resource* pDstResource,
|
ID3D11Resource* pDstResource,
|
||||||
UINT DstSubresource,
|
UINT DstSubresource,
|
||||||
@ -125,6 +130,17 @@ namespace dxvk {
|
|||||||
const D3D11_BOX* pSrcBox,
|
const D3D11_BOX* pSrcBox,
|
||||||
UINT CopyFlags);
|
UINT CopyFlags);
|
||||||
|
|
||||||
|
void STDMETHODCALLTYPE CopySubresourceRegionBase(
|
||||||
|
ID3D11Resource* pDstResource,
|
||||||
|
UINT DstSubresource,
|
||||||
|
UINT DstX,
|
||||||
|
UINT DstY,
|
||||||
|
UINT DstZ,
|
||||||
|
ID3D11Resource* pSrcResource,
|
||||||
|
UINT SrcSubresource,
|
||||||
|
const D3D11_BOX* pSrcBox,
|
||||||
|
UINT CopyFlags);
|
||||||
|
|
||||||
void STDMETHODCALLTYPE CopyResource(
|
void STDMETHODCALLTYPE CopyResource(
|
||||||
ID3D11Resource* pDstResource,
|
ID3D11Resource* pDstResource,
|
||||||
ID3D11Resource* pSrcResource);
|
ID3D11Resource* pSrcResource);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user