I knew what is barrier for in DX12, but I don't know what situation that resource hazard will occur.
For example, I have a command list that consists of two command.
- Write data to resource R
- Read data from resource R
If the GPU will execute the command list in sequence (1 before 2), why I need barrier between 1 and 2 ?