I need D2D functionality in my D3D12 app, so I'v created, D3D11On12CreateDevice and all the surroundings, and want to share my D3D12 created texture (2D rendertarget) to D3D11 to create ID2D1Bitmap1 and go with text drawing.
Texture on D3D12 side is created with flags: D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS | D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET, heap is D3D12_HEAP_TYPE_DEFAULT, heap flag is D3D12_HEAP_FLAG_SHARED.
Then, D3D11_RESOURCE_FLAGS are D3D11_BIND_RENDER_TARGET and misc flags are D3D11_RESOURCE_MISC_SHARED.
Then I call ID3D11On12Device::CreateWrappedResource it returns me ID3D11Resource, and HRESULT is S_OK, drawing using D2D works as expected, BUT the moment it's called
D3D12 ERROR: ID3D12CompatibilityDevice::ReflectSharedProperties: Resource provided was not shared by D3D11, or with a D3D11 desc. [ MISCELLANEOUS ERROR #916: REFLECTSHAREDPROPERTIES_INVALIDOBJECT]
popups into log, why is that ? - what I'm missing ? I'm a little surprised, couse microsoft example does not popup this kind of message, but they do it on swap-chain RT, not on 'ordinary' RT, and I need this on ordinary RT. (When in my app I do it on swap-chan RT, error message does not pop-up)