mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-06 20:58:37 +01:00
[d3d9] Handle DS texture uploads
This commit is contained in:
parent
2c53459f4c
commit
d0a10cc9f8
1 changed files with 21 additions and 6 deletions
|
@ -4611,18 +4611,33 @@ namespace dxvk {
|
||||||
slice.mapPtr, srcData, extentBlockCount, formatInfo->elementSize,
|
slice.mapPtr, srcData, extentBlockCount, formatInfo->elementSize,
|
||||||
pitch, pitch * srcTexLevelExtentBlockCount.height);
|
pitch, pitch * srcTexLevelExtentBlockCount.height);
|
||||||
|
|
||||||
|
|
||||||
|
VkFormat packedFormat = GetPackedDepthStencilFormat(pDestTexture->Desc()->Format);
|
||||||
|
|
||||||
EmitCs([
|
EmitCs([
|
||||||
cSrcSlice = slice.slice,
|
cSrcSlice = slice.slice,
|
||||||
cDstImage = image,
|
cDstImage = image,
|
||||||
cDstLayers = dstLayers,
|
cDstLayers = dstLayers,
|
||||||
cDstLevelExtent = alignedExtent,
|
cDstLevelExtent = alignedExtent,
|
||||||
cOffset = alignedDestOffset
|
cOffset = alignedDestOffset,
|
||||||
|
cPackedFormat = packedFormat
|
||||||
] (DxvkContext* ctx) {
|
] (DxvkContext* ctx) {
|
||||||
ctx->copyBufferToImage(
|
if (cDstLayers.aspectMask != (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) {
|
||||||
cDstImage, cDstLayers,
|
ctx->copyBufferToImage(
|
||||||
cOffset, cDstLevelExtent,
|
cDstImage, cDstLayers,
|
||||||
cSrcSlice.buffer(), cSrcSlice.offset(),
|
cOffset, cDstLevelExtent,
|
||||||
1, 1);
|
cSrcSlice.buffer(), cSrcSlice.offset(),
|
||||||
|
1, 1);
|
||||||
|
} else {
|
||||||
|
ctx->copyPackedBufferToDepthStencilImage(
|
||||||
|
cDstImage, cDstLayers,
|
||||||
|
VkOffset2D { cOffset.x, cOffset.y },
|
||||||
|
VkExtent2D { cDstLevelExtent.width, cDstLevelExtent.height },
|
||||||
|
cSrcSlice.buffer(), cSrcSlice.offset(),
|
||||||
|
VkOffset2D { 0, 0 },
|
||||||
|
VkExtent2D { cDstLevelExtent.width, cDstLevelExtent.height },
|
||||||
|
cPackedFormat);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
TrackTextureMappingBufferSequenceNumber(pSrcTexture, SrcSubresource);
|
TrackTextureMappingBufferSequenceNumber(pSrcTexture, SrcSubresource);
|
||||||
|
|
Loading…
Add table
Reference in a new issue