nvrhi
nvrhi copied to clipboard
clearBufferUInt does not work on raw UAV buffers under DX11
It fails on d3d11-buffer.cpp line 360 "assert(format != Format::UNKNOWN);", since in clearBufferUInt function, the viewType is incorrectly assigned as TypedBuffer_UAV. This function does not expect a raw UAV buffer.
I added the following lines to clearBufferUInt (d3d11-buffer.cpp) line 170 as a WAR to make it work.
if (bufferDesc.canHaveRawViews && bufferDesc.format == Format::UNKNOWN)
{
viewType = ResourceType::RawBuffer_UAV;
}