1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-01 16:24:12 +01:00

[d3d11] Zero-initialize mapped buffers for images correctly

This commit is contained in:
Philip Rebohle 2021-06-22 08:04:46 +02:00
parent f50c5234dc
commit b384f5372e
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -203,6 +203,13 @@ namespace dxvk {
image, value, subresources);
}
}
if (pTexture->GetMapMode() != D3D11_COMMON_TEXTURE_MAP_MODE_NONE) {
for (uint32_t i = 0; i < pTexture->CountSubresources(); i++) {
auto buffer = pTexture->GetMappedBuffer(i);
std::memset(buffer->mapPtr(0), 0, buffer->info().size);
}
}
}
FlushImplicit();