Fix depth testing, write enable bug
Fix depth testing, write enable bug

This fixes a bug in _cogl_pipeline_flush_color_blend_alpha_depth_state
whereby we were only calling flush_depth_state if we knew that at least
depth testing was enabled. This didn't take into account that enabling
and disabling depth writing is a useful change to make even if depth
testing is disabled. It also seemed a bit messy to flush the
depth-testing enable separately from the other depth state.

_cogl_pipeline_flush_color_blend_alpha_depth_state now simply calls
flush_depth_state() if there is a _DEPTH_STATE difference and
flush_depth_state() also handles flushing the depth-testing enable
in along with all the other depth state.

Reviewed-by: Neil Roberts <822ec91a7ef82248fd36162ca8ac3283eba70848@linux.intel.com>

djdeath/cogl-android,djdeath/cogl,gcampax/cogl,djdeath/cogl,gcampax/cogl,djdeath/cogl-android,gcampax/cogl,gcampax/cogl,djdeath/cogl-android,djdeath/cogl