Is lighting ignored when color writes are disabled?

I’m trying to fill the depth/stencil buffers, and while I’m doing that I’ve disabled color buffer writes. Would it be faster if I disabled lighting while I was doing that, or does OpenGL automatically ignore lighting and texturing and whatnot when color writes are disabled?

Originally posted by dalangalma:
I’m trying to fill the depth/stencil buffers, and while I’m doing that I’ve disabled color buffer writes. Would it be faster if I disabled lighting while I was doing that, or does OpenGL automatically ignore lighting and texturing and whatnot when color writes are disabled?
A clever driver could disable lighting since it is of no use in what you’re doing though it is better to do it yourself so that you are sure the GL is not doing any unnecessary work.