fix: fallback to UPLOAD heapType for devices without GPU_UPLOAD support#92
fix: fallback to UPLOAD heapType for devices without GPU_UPLOAD support#92dreamsyntax wants to merge 2 commits intorenderbag:mainfrom
Conversation
|
It makes sense to me but I think it needs to be changed how the fix is implemented. In particular, I'd change this instead ( Lines 468 to 482 in 519e325 gpuUploadHeapFallback and return the regular upload heap type if the boolean is true on the case of GPU UPLOAD.
|
|
The other bit that seems odd to me is the check for Were you running into the upload pool being empty? |
This was an oversight on my part from testing early on, removed.
D3D12MA::ALLOCATION_DESC allocationDesc = {};
allocationDesc.Flags = desc.committed ? D3D12MA::ALLOCATION_FLAG_COMMITTED : D3D12MA::ALLOCATION_FLAG_NONE;
allocationDesc.HeapType = toD3D12(desc.heapType, device->gpuUploadHeapFallback);
allocationDesc.CustomPool = (pool != nullptr) ? pool->d3d : nullptr;I wasn't sure how to get gpuUploadHeapFallback for line 2763, so used the member pointer. I did a test forcing to false, where it breaks, but using this works, so presumably it is being set elsewhere? If it should be done a different way let me know. |
Fixes Intel iGPU (UMA architecture) bug (or any GPU without D3D12_HEAP_TYPE_GPU_UPLOAD) Previously even when gpuUploadHeapFallback = true it was still returning the heap with GPU_UPLOAD instead of UPLOAD.
29a3e81 to
44ae897
Compare
|
This is not right. GPU_UPLOAD supports both read/write operations whereas UPLOAD is readonly. This is why a fallback custom pool with UPLOAD properties is created in the first place. Sounds like you are trying to use GPU upload heaps without checking for whether they are actually supported first, which is not intended: https://github.com/renderbag/plume/blob/main/plume_render_interface_types.h#L1807 |
|
Looks like I misunderstood the DEFAULT heap https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ne-d3d12-d3d12_heap_type, there's no redirection with GPU_UPLOAD involved, so not clear why DEFAULT would have the same issue VS UPLOAD. |
|
As a sanity check, also tested on Intel drivers 31.0.101.5187 - the behavior is the same.
Line 3767 in 519e325 Projects using plume will have to deal with this if they care, with the proposal here that fixes it for UnleashedRecomp - return g_capabilities.gpuUploadHeap ? RenderHeapType::GPU_UPLOAD : RenderHeapType::DEFAULT;
+ return g_capabilities.gpuUploadHeap && !g_capabilities.uma ? RenderHeapType::GPU_UPLOAD : RenderHeapType::UPLOAD;Closing. |



I was running into this issue for a project when running D3D12 on an Intel iGPU (13th gen i9, UHD Graphics, Driver 32.0.101.7084 - on Win 11 23H2 ENT/BUS), where upon parsing a vertex declaration I would get
CreateResource failed with error code 0x80004001., specifically breaking onLine 773 of plume_d3d12.cpp
With the proposed change I am able to use D3D12 for both my Nvidia dGPU and Intel iGPU