nvrhi icon indicating copy to clipboard operation
nvrhi copied to clipboard

clearBufferUInt does not work on raw UAV buffers under DX11

Open aleieng opened this issue 3 years ago • 0 comments

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;
        }

aleieng avatar Sep 24 '22 22:09 aleieng