Yes, this is fatal and causes undefined behavior. Just make a copy and read from the copy.
The explanation is simple. Since the fragments are processed in parallel in an unspecified order, you can read from the texels already written or the original texels, and there is no way to know what you are reading. Creating a copy and reading from it ensures that you read the correct values.
source
share