1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 02:52:10 +01:00

[dxvk] Fixed 3D image upload

This commit is contained in:
Philip Rebohle 2017-12-24 15:29:10 +01:00
parent 3762df6cb6
commit 24bceb86c2
2 changed files with 6 additions and 6 deletions

View File

@ -1302,7 +1302,7 @@ namespace dxvk {
static_cast<D3D11Texture3D*>(pResource)->GetDesc(&resourceDesc);
pDesc->Format = resourceDesc.Format;
pDesc->ViewDimension = D3D11_SRV_DIMENSION_TEXTURE1D;
pDesc->ViewDimension = D3D11_SRV_DIMENSION_TEXTURE3D;
pDesc->Texture3D.MostDetailedMip = 0;
pDesc->Texture3D.MipLevels = resourceDesc.MipLevels;
} return S_OK;

View File

@ -518,14 +518,14 @@ namespace dxvk {
} else {
for (uint32_t i = 0; i < elementCount.depth; i++) {
for (uint32_t j = 0; j < elementCount.height; j++) {
std::memcpy(dstData, srcData, bytesPerRow);
dstData += bytesPerRow;
srcData += pitchPerRow;
std::memcpy(
dstData + j * bytesPerRow,
srcData + j * pitchPerRow,
bytesPerRow);
}
dstData += bytesPerLayer;
srcData += pitchPerLayer;
dstData += bytesPerLayer;
}
}