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 ae98b782b70523cb237aea3b05ec85d62759f3bf..4d928483e1602f7a430b4e798dfb0f8e142a3c37 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;