D3D12 memory issues
evilrat via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Dec 20 21:53:36 PST 2016
Hello guys,
I have DirectX 12 code that doesn't work in D (it works in C++),
as the subject says this can be related to D heap and/or thread
local storage.
code can be found here (build with dmd -m32mscoff)
https://github.com/evilrat666/directx-d/blob/master/examples/d3d12_hello/source/d3d12_hello.d#L153
specifically this line
device.CreateRenderTargetView(renderTargets[n], null, rtvHandle);
The problem is that D3D12 needs special heap object(most likely
reserves space for actual heap somewhere else) that is then bound
to actual heap memory in client side code(that usually should be
avaliable for at least 2-3 frames), however function above is
failing with the error that this heap object pointing to some
other memory, and to be honest i don't have an idea what's wrong
with it. I tried marking D3D heap stuff with __gshared, but
result was the same. So any suggestions on solving this are
welcome.
But i am not sure if this is just D quirks, D3D12 quirks, or me
being a noob in DirectX 12.
More information about the Digitalmars-d-learn
mailing list