Closed thymoze closed 6 years ago
Thanks for helping out with this. Were you able to test this out?
Yes, this fixed the issue for me. But it would of course be better if @eugeniumegherea, @Moimemeici, @flautze and @schadEigentlich could test it to confirm if it works for them, too.
Here is the .exe build with this change, should just work as a drop-in replacement, I think.
I just tested the last build you mentioned @thymoze. It works with default settings. 0 CPU/GPU load whatsoever, that's amazing.
Is good for me
That you everyone for testing the build!
The only thing that I'm not sure about is if the UnmapSubresource method can throw an exception or not. There should not be any exceptions thrown from the finally block. If the method throws exceptions we can wrap it in a try-catch like line 230.
Well it does not throw any exceptions/crash when trying to unmap a resource that wasn't mapped, I tested that.
(Of course it does show the error Attempting to Unmap a resource that was not Mapped!
in the DirectX Debug log, but only if you explicitly enable that by creating the device with the debug flag _device = new SharpDX.Direct3D11.Device(_adapter, DeviceCreationFlags.Debug);
so I think this is fine)
Not sure about any other cases that would need to be checked..
Thanks again for helping me out with this!
@sabaatworld @thymoze works like a charm. Thanks !
Resolve #5 by unmapping the previously mapped
_stagingTexture
after use inToRGBArray()
.