mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-30 22:24:15 +01:00
[d3d11] Fix optional write issue in GetData()
This commit is contained in:
parent
a473c914f4
commit
61ce7022e2
@ -164,6 +164,11 @@ namespace dxvk {
|
||||
void* pData,
|
||||
UINT DataSize,
|
||||
UINT GetDataFlags) {
|
||||
// Make sure that we can safely write to the memory
|
||||
// location pointed to by pData if it is specified.
|
||||
if (DataSize == 0)
|
||||
pData = nullptr;
|
||||
|
||||
if (pData != nullptr && pAsync->GetDataSize() != DataSize) {
|
||||
Logger::err(str::format("D3D11DeviceContext: GetData: Data size mismatch: ", pAsync->GetDataSize(), ",", DataSize));
|
||||
return E_INVALIDARG;
|
||||
|
Loading…
Reference in New Issue
Block a user