Advertisement

ClearUnorderedAccessViewUint with StructuredBuffer

Started by November 13, 2019 03:41 AM
1 comment, last by SoldierOfLight 4 years, 10 months ago

I tried to clear a RWStructuredBuffer<bool> by a CommandList->ClearUnorderedAccessViewUint call.

I got an error like this:D3D12 ERROR: ID3D12CommandList::ClearUnorderedAccessViewUint: ClearUnorderedAccessView* methods are not compatible with Structured Buffers.

However, I've searched on the internet but got nothing, I saw someone done this before, Does anyone know how to solve this problem? Thanks in advance!

Write a compute shader to do the clear, or create a UINT UAV on the resource and clear it through that instead. You can't use fixed-function clears on structured UAVs.

This topic is closed to new replies.

Advertisement