Using allow_uav_condition loop attribute in HLSL
Reference URL
Memo
- When I tried to set the loop termination condition based on UAV, the following HLSL shader error occured.
HLSL Error message: Loop termination conditions in varying flow control cannot depend on data read from a UAV
- If you want to determine the loop termination condition based on UAV read, you have to set [allow_uav_condition] as a loop attribute.
- But I cannot use flow control with UAV at my notebook PC with NVidia driver. So, I used some workaround based on this article. ( "Counting Quads @ Self Shadow" )