mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-01 16:24:12 +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),
|
||||
cSrcSlice = srcBuffer.subSlice(srcOffset, regLength)
|
||||
] (DxvkContext* ctx) {
|
||||
ctx->copyBuffer(
|
||||
cDstSlice.buffer(),
|
||||
cDstSlice.offset(),
|
||||
cSrcSlice.buffer(),
|
||||
cSrcSlice.offset(),
|
||||
cSrcSlice.length());
|
||||
bool sameResource = cDstSlice.buffer() == cSrcSlice.buffer();
|
||||
|
||||
if (!sameResource) {
|
||||
ctx->copyBuffer(
|
||||
cDstSlice.buffer(),
|
||||
cDstSlice.offset(),
|
||||
cSrcSlice.buffer(),
|
||||
cSrcSlice.offset(),
|
||||
cSrcSlice.length());
|
||||
} else {
|
||||
ctx->copyBufferRegion(
|
||||
cDstSlice.buffer(),
|
||||
cDstSlice.offset(),
|
||||
cSrcSlice.offset(),
|
||||
cSrcSlice.length());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
const D3D11CommonTexture* dstTextureInfo = GetCommonTexture(pDstResource);
|
||||
@ -476,10 +486,20 @@ namespace dxvk {
|
||||
cSrcOffset = srcOffset,
|
||||
cExtent = regExtent
|
||||
] (DxvkContext* ctx) {
|
||||
ctx->copyImage(
|
||||
cDstImage, cDstLayers, cDstOffset,
|
||||
cSrcImage, cSrcLayers, cSrcOffset,
|
||||
cExtent);
|
||||
bool sameSubresource = cDstImage == cSrcImage
|
||||
&& cDstLayers == cSrcLayers;
|
||||
|
||||
if (!sameSubresource) {
|
||||
ctx->copyImage(
|
||||
cDstImage, cDstLayers, cDstOffset,
|
||||
cSrcImage, cSrcLayers, cSrcOffset,
|
||||
cExtent);
|
||||
} else {
|
||||
ctx->copyImageRegion(
|
||||
cDstImage, cDstLayers,
|
||||
cDstOffset, cSrcOffset,
|
||||
cExtent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1153,7 +1153,7 @@ namespace dxvk {
|
||||
info->DiscardAPIsSeenByDriver = TRUE;
|
||||
info->FlagsForUpdateAndCopySeenByDriver = TRUE;
|
||||
info->ClearView = TRUE;
|
||||
info->CopyWithOverlap = FALSE;
|
||||
info->CopyWithOverlap = TRUE;
|
||||
info->ConstantBufferPartialUpdate = TRUE;
|
||||
info->ConstantBufferOffsetting = TRUE;
|
||||
info->MapNoOverwriteOnDynamicConstantBuffer = TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user