mesa: Add some comments about FRAG_RESULT_COLOR vs FRAG_RESULT_DATAn.
authorEric Anholt <eric@anholt.net>
Thu, 21 Apr 2011 00:55:54 +0000 (17:55 -0700)
committerEric Anholt <eric@anholt.net>
Sat, 23 Apr 2011 20:21:58 +0000 (13:21 -0700)
This came from reading what swrast does, and 965 now behaves the same
and gallium appears to as well.

src/mesa/main/mtypes.h

index 160ae9d..e90941d 100644 (file)
@@ -376,7 +376,15 @@ typedef enum
 {
    FRAG_RESULT_DEPTH = 0,
    FRAG_RESULT_STENCIL = 1,
+   /* If a single color should be written to all render targets, this
+    * register is written.  No FRAG_RESULT_DATAn will be written.
+    */
    FRAG_RESULT_COLOR = 2,
+
+   /* FRAG_RESULT_DATAn are the per-render-target (GLSL gl_FragData[n]
+    * or ARB_fragment_program fragment.color[n]) color results.  If
+    * any are written, FRAG_RESULT_COLOR will not be written.
+    */
    FRAG_RESULT_DATA0 = 3,
    FRAG_RESULT_MAX = (FRAG_RESULT_DATA0 + MAX_DRAW_BUFFERS)
 } gl_frag_result;