Exception on slSetTag(), when cloning resource when 'D3D12_RESOURCE_DESC::Alignment == 4096' and 'D3D12_RESOURCE_DESC::Format == DXGI_FORMAT_R16G16_FLOAT' #27
Labels
bug
Something isn't working
Hello, I got exception on slSetTag(). After looking into source code, I see that it happens in
ResourcePool::allocate()
, when you callm_compute->getResourceState(res->state, initialState);
https://github.com/NVIDIAGameWorks/Streamline/blob/7ac42e47c7dd55b5b6dd6176c0228048636541b2/source/platforms/sl.chi/generic.cpp#L172C21-L172C21
The possible problem is that you don't test the return value of
m_compute->cloneResource(source, res, debugName, initialState);
which might not initializesl::chi::Resource res
variable, which is pointer to sl::Resource, therefore inres->state
you access with nullptr.Also I enabled d3d12 debug layer validation to investigate why
m_compute->cloneResource(source, res, debugName, initialState);
don't initializeres
and got this d3d12 errorLooks like you add
D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET
flag, without changingD3D12_RESOURCE_DESC::Alignment
. I guess you did not expected the alignment to be 4096.https://github.com/NVIDIAGameWorks/Streamline/blob/7ac42e47c7dd55b5b6dd6176c0228048636541b2/source/platforms/sl.chi/d3d12.cpp#L2159C39-L2159C39
Thanks for your work and hope these issues will be fixed soon.
The text was updated successfully, but these errors were encountered: