Skip to content

Commit 5b20a8e

Browse files
committed
Bokeh DX11 fix for Map/Unmap mismatch
1 parent 25fdd14 commit 5b20a8e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2017-2020 Microsoft Corp
3+
Copyright (c) 2017-2021 Microsoft Corp
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this
66
software and associated documentation files (the "Software"), to deal in the Software

XDKSamples/Graphics/Bokeh/BokehEffect.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ namespace ATG
271271
D3D11_MAPPED_SUBRESOURCE mapping;
272272
context->Map(m_bokehCB.Get(), 0, D3D11_MAP::D3D11_MAP_WRITE_DISCARD, 0, &mapping);
273273
std::memcpy(mapping.pData, &cb, sizeof(cb));
274+
context->Unmap(m_bokehCB.Get(), 0);
274275

275276
context->VSSetConstantBuffers(0, 1, m_bokehCB.GetAddressOf());
276277
context->GSSetConstantBuffers(0, 1, m_bokehCB.GetAddressOf());

0 commit comments

Comments
 (0)