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:
parent
3762df6cb6
commit
24bceb86c2
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user