gallium: allow choosing which colorbuffers to clear
authorMarek Olšák <marek.olsak@amd.com>
Tue, 3 Dec 2013 23:56:24 +0000 (00:56 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 12 Dec 2013 17:48:04 +0000 (18:48 +0100)
commit164dc6216a8e4d46ef7db9f54bcecd58ff556b83
treeccea5726b9951f5012a53d1e905efd0da5b63ec6
parent0612005aa66f211753f44bb4ffdfdcc9316281ac
gallium: allow choosing which colorbuffers to clear

Required for glClearBuffer, which only clears one colorbuffer attachment.

Example:
   If the first colorbuffer is float and the second one is int:
      pipe->clear(pipe, PIPE_CLEAR_COLOR0, float_clear_color, ...);
      pipe->clear(pipe, PIPE_CLEAR_COLOR1, int_clear_color, ...);

This doesn't need any driver changes yet, because all drivers just use:
  if (flags & PIPE_CLEAR_COLOR) ..

The drivers which support GL 3.0 will have to implement it properly though.
src/gallium/auxiliary/postprocess/pp_mlaa.c
src/gallium/auxiliary/postprocess/pp_run.c
src/gallium/auxiliary/util/u_clear.h
src/gallium/drivers/r300/r300_blit.c
src/gallium/include/pipe/p_defines.h
src/gallium/state_trackers/vega/api_masks.c