glsl: Add assert to check input to strcmp.
[mesa.git] / src / mesa / shader / program_parse_extra.c
index 0656c5eaa8e2122fb0ee7ceeb672979c97a5e0d3..ae98b782b70523cb237aea3b05ec85d62759f3bf 100644 (file)
@@ -216,6 +216,18 @@ _mesa_ARBfp_parse_option(struct asm_parser_state *state, const char *option)
            state->option.Shadow = 1;
            return 1;
         }
+      } else if (strncmp(option, "fragment_coord_", 15) == 0) {
+         option += 15;
+         if (state->ctx->Extensions.ARB_fragment_coord_conventions) {
+            if (strcmp(option, "origin_upper_left") == 0) {
+               state->option.OriginUpperLeft = 1;
+               return 1;
+            }
+            else if (strcmp(option, "pixel_center_integer") == 0) {
+               state->option.PixelCenterInteger = 1;
+               return 1;
+            }
+         }
       }
    } else if (strncmp(option, "NV_fragment_program", 19) == 0) {
       option += 19;