mesa: Add support for OPTION ATI_draw_buffers to ARB_fp.
authorEric Anholt <eric@anholt.net>
Wed, 13 Apr 2011 19:07:31 +0000 (12:07 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 14 Apr 2011 01:07:01 +0000 (18:07 -0700)
Tested by piglit ati_draw_buffers-arbfp.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/program/program_parse_extra.c

index ae98b78..4d92848 100644 (file)
@@ -229,6 +229,16 @@ _mesa_ARBfp_parse_option(struct asm_parser_state *state, const char *option)
             }
          }
       }
+   } else if (strncmp(option, "ATI_", 4) == 0) {
+      option += 4;
+
+      if (strcmp(option, "draw_buffers") == 0) {
+        /* Don't need to check extension availability because all Mesa-based
+         * drivers support GL_ATI_draw_buffers.
+         */
+        state->option.DrawBuffers = 1;
+        return 1;
+      }
    } else if (strncmp(option, "NV_fragment_program", 19) == 0) {
       option += 19;