mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 01:24:11 +01:00
[d3d11] Implement and advertize support for CopyWithOverlap feature
This commit is contained in:
parent
e3c2815782
commit
d9009efd22
@ -342,12 +342,22 @@ namespace dxvk {
|
|||||||
cDstSlice = dstBuffer.subSlice(dstOffset, regLength),
|
cDstSlice = dstBuffer.subSlice(dstOffset, regLength),
|
||||||
cSrcSlice = srcBuffer.subSlice(srcOffset, regLength)
|
cSrcSlice = srcBuffer.subSlice(srcOffset, regLength)
|
||||||
] (DxvkContext* ctx) {
|
] (DxvkContext* ctx) {
|
||||||
|
bool sameResource = cDstSlice.buffer() == cSrcSlice.buffer();
|
||||||
|
|
||||||
|
if (!sameResource) {
|
||||||
ctx->copyBuffer(
|
ctx->copyBuffer(
|
||||||
cDstSlice.buffer(),
|
cDstSlice.buffer(),
|
||||||
cDstSlice.offset(),
|
cDstSlice.offset(),
|
||||||
cSrcSlice.buffer(),
|
cSrcSlice.buffer(),
|
||||||
cSrcSlice.offset(),
|
cSrcSlice.offset(),
|
||||||
cSrcSlice.length());
|
cSrcSlice.length());
|
||||||
|
} else {
|
||||||
|
ctx->copyBufferRegion(
|
||||||
|
cDstSlice.buffer(),
|
||||||
|
cDstSlice.offset(),
|
||||||
|
cSrcSlice.offset(),
|
||||||
|
cSrcSlice.length());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const D3D11CommonTexture* dstTextureInfo = GetCommonTexture(pDstResource);
|
const D3D11CommonTexture* dstTextureInfo = GetCommonTexture(pDstResource);
|
||||||
@ -476,10 +486,20 @@ namespace dxvk {
|
|||||||
cSrcOffset = srcOffset,
|
cSrcOffset = srcOffset,
|
||||||
cExtent = regExtent
|
cExtent = regExtent
|
||||||
] (DxvkContext* ctx) {
|
] (DxvkContext* ctx) {
|
||||||
|
bool sameSubresource = cDstImage == cSrcImage
|
||||||
|
&& cDstLayers == cSrcLayers;
|
||||||
|
|
||||||
|
if (!sameSubresource) {
|
||||||
ctx->copyImage(
|
ctx->copyImage(
|
||||||
cDstImage, cDstLayers, cDstOffset,
|
cDstImage, cDstLayers, cDstOffset,
|
||||||
cSrcImage, cSrcLayers, cSrcOffset,
|
cSrcImage, cSrcLayers, cSrcOffset,
|
||||||
cExtent);
|
cExtent);
|
||||||
|
} else {
|
||||||
|
ctx->copyImageRegion(
|
||||||
|
cDstImage, cDstLayers,
|
||||||
|
cDstOffset, cSrcOffset,
|
||||||
|
cExtent);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1153,7 +1153,7 @@ namespace dxvk {
|
|||||||
info->DiscardAPIsSeenByDriver = TRUE;
|
info->DiscardAPIsSeenByDriver = TRUE;
|
||||||
info->FlagsForUpdateAndCopySeenByDriver = TRUE;
|
info->FlagsForUpdateAndCopySeenByDriver = TRUE;
|
||||||
info->ClearView = TRUE;
|
info->ClearView = TRUE;
|
||||||
info->CopyWithOverlap = FALSE;
|
info->CopyWithOverlap = TRUE;
|
||||||
info->ConstantBufferPartialUpdate = TRUE;
|
info->ConstantBufferPartialUpdate = TRUE;
|
||||||
info->ConstantBufferOffsetting = TRUE;
|
info->ConstantBufferOffsetting = TRUE;
|
||||||
info->MapNoOverwriteOnDynamicConstantBuffer = TRUE;
|
info->MapNoOverwriteOnDynamicConstantBuffer = TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user