GPUOpen-LibrariesAndSDKs / RenderPipelineShaders

Render Pipeline Shaders SDK
MIT License
312 stars 24 forks source link

Error on D3D12RuntimeBackend::CreateHeaps for D3D12_RESOURCE_HEAP_TIER_1 GPUs #13

Closed ChemistAion closed 1 year ago

ChemistAion commented 1 year ago

There is a missing initialization for RPS_D3D12_HEAP_TYPE_INDEX_DEFAULT_TIER_1_BUFFER in: https://github.com/GPUOpen-LibrariesAndSDKs/RenderPipelineShaders/blob/3a693036b72fc657b9542b631e34dfaf03033741/src/runtime/d3d12/rps_d3d12_runtime_device.cpp#L75-L82

fyi: in "release" modes (VS env) this missing part of m_memoryTypeInfos is initialized with zeros and "works".

ChemistAion commented 1 year ago

...in VS debug-mode, we have 0xCDCDCDCDCDCDCDCD values in the missing part of m_memoryTypeInfos initialization

Since that IMHO these (below) could be a bit strengthened, in general - not only for this particular case.

...it wrongly triggers tier1_heap build-up parameters, here: https://github.com/GPUOpen-LibrariesAndSDKs/RenderPipelineShaders/blob/3a693036b72fc657b9542b631e34dfaf03033741/src/runtime/common/phases/rps_memory_schedule.hpp#L484-L487

...finally, goes under the radar as: "0x(...)CD(...)" value for heapDesc.Alignment/SizeInBytes taken by CreateHeap here: https://github.com/GPUOpen-LibrariesAndSDKs/RenderPipelineShaders/blob/3a693036b72fc657b9542b631e34dfaf03033741/src/runtime/d3d12/rps_d3d12_runtime_backend.cpp#L179-L202

FlorianHerickAMD commented 1 year ago

This missing initialization has been fixed in the just published update. Thank you for reporting it!