head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC4:1.1.1.1
	netbsd-11-0-RC3:1.1.1.1
	netbsd-11-0-RC2:1.1.1.1
	netbsd-11-0-RC1:1.1.1.1
	netbsd-11:1.1.1.1.0.6
	netbsd-11-base:1.1.1.1
	netbsd-10-1-RELEASE:1.1.1.1
	netbsd-9-4-RELEASE:1.1.1.1
	netbsd-10-0-RELEASE:1.1.1.1
	netbsd-10-0-RC6:1.1.1.1
	netbsd-10-0-RC5:1.1.1.1
	netbsd-10-0-RC4:1.1.1.1
	netbsd-10-0-RC3:1.1.1.1
	netbsd-10-0-RC2:1.1.1.1
	netbsd-10-0-RC1:1.1.1.1
	netbsd-10:1.1.1.1.0.4
	netbsd-10-base:1.1.1.1
	netbsd-9-3-RELEASE:1.1.1.1
	mesa-21-3-7:1.1.1.1
	netbsd-9-2-RELEASE:1.1.1.1
	netbsd-9-1-RELEASE:1.1.1.1
	netbsd-9-0-RELEASE:1.1.1.1
	netbsd-9-0-RC2:1.1.1.1
	netbsd-9-0-RC1:1.1.1.1
	mesalib-19-1-7:1.1.1.1
	netbsd-9:1.1.1.1.0.2
	netbsd-9-base:1.1.1.1
	mesa-18-3-6:1.1.1.1
	mesa-18-3-4:1.1.1.1
	xorg:1.1.1;
locks; strict;
comment	@// @;


1.1
date	2019.03.10.03.42.47;	author mrg;	state Exp;
branches
	1.1.1.1;
next	;
commitid	r12jo1Nf3ebQKLeB;

1.1.1.1
date	2019.03.10.03.42.47;	author mrg;	state Exp;
branches;
next	;
commitid	r12jo1Nf3ebQKLeB;


desc
@@


1.1
log
@Initial revision
@
text
@/*
 * Copyright © 2011 Intel Corporation
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */

/**
 * \file test.cpp
 *
 * Standalone tests for the GLSL compiler.
 *
 * This file provides a standalone executable which can be used to
 * test components of the GLSL.
 *
 * Each test is a function with the same signature as main().  The
 * main function interprets its first argument as the name of the test
 * to run, strips out that argument, and then calls the test function.
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "test_optpass.h"

/**
 * Print proper usage and exit with failure.
 */
static void
usage_fail(const char *name)
{
   printf("*** usage: %s <command> <options>\n", name);
   printf("\n");
   printf("Possible commands are:\n");
   printf("  optpass: test an optimization pass in isolation\n");
   exit(EXIT_FAILURE);
}

static const char *extract_command_from_argv(int *argc, char **argv)
{
   if (*argc < 2) {
      usage_fail(argv[0]);
   }
   const char *command = argv[1];
   --*argc;
   memmove(&argv[1], &argv[2], (*argc) * sizeof(argv[1]));
   return command;
}

int main(int argc, char **argv)
{
   const char *command = extract_command_from_argv(&argc, argv);
   if (strcmp(command, "optpass") == 0) {
      return test_optpass(argc, argv);
   } else {
      usage_fail(argv[0]);
   }

   /* Execution should never reach here. */
   return EXIT_FAILURE;
}
@


1.1.1.1
log
@from maya:

Import mesa 18.3.4.

Mesa 18.3.4 implements the OpenGL 4.5 API.
Some drivers don't support all the features required in OpenGL 4.5.
@
text
@@
