Can I use a depth buffer both for computing depth (read it bound as texture) and also for testing Z when writing light fragments in a deferred renderer? Both at the same time. Of course, with depth writes disabled.
I read the spec and couldn’t find anything about it. It only says that having it bound to a texture and using it at the same time for writing depth is undefined because you’ll be reading/writing at the same time. But in this case it’s just depth test and depth read… not depth writes.