12727702b1731a478de8806481416080d02af5862Michal Krol/**************************************************************************
22727702b1731a478de8806481416080d02af5862Michal Krol *
32727702b1731a478de8806481416080d02af5862Michal Krol * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
42727702b1731a478de8806481416080d02af5862Michal Krol * All Rights Reserved.
52727702b1731a478de8806481416080d02af5862Michal Krol *
62727702b1731a478de8806481416080d02af5862Michal Krol * Permission is hereby granted, free of charge, to any person obtaining a
72727702b1731a478de8806481416080d02af5862Michal Krol * copy of this software and associated documentation files (the
82727702b1731a478de8806481416080d02af5862Michal Krol * "Software"), to deal in the Software without restriction, including
92727702b1731a478de8806481416080d02af5862Michal Krol * without limitation the rights to use, copy, modify, merge, publish,
102727702b1731a478de8806481416080d02af5862Michal Krol * distribute, sub license, and/or sell copies of the Software, and to
112727702b1731a478de8806481416080d02af5862Michal Krol * permit persons to whom the Software is furnished to do so, subject to
122727702b1731a478de8806481416080d02af5862Michal Krol * the following conditions:
132727702b1731a478de8806481416080d02af5862Michal Krol *
142727702b1731a478de8806481416080d02af5862Michal Krol * The above copyright notice and this permission notice (including the
152727702b1731a478de8806481416080d02af5862Michal Krol * next paragraph) shall be included in all copies or substantial portions
162727702b1731a478de8806481416080d02af5862Michal Krol * of the Software.
172727702b1731a478de8806481416080d02af5862Michal Krol *
182727702b1731a478de8806481416080d02af5862Michal Krol * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
192727702b1731a478de8806481416080d02af5862Michal Krol * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
202727702b1731a478de8806481416080d02af5862Michal Krol * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
212727702b1731a478de8806481416080d02af5862Michal Krol * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
222727702b1731a478de8806481416080d02af5862Michal Krol * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
232727702b1731a478de8806481416080d02af5862Michal Krol * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
242727702b1731a478de8806481416080d02af5862Michal Krol * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
252727702b1731a478de8806481416080d02af5862Michal Krol *
262727702b1731a478de8806481416080d02af5862Michal Krol **************************************************************************/
272727702b1731a478de8806481416080d02af5862Michal Krol
282727702b1731a478de8806481416080d02af5862Michal Krol#ifndef TGSI_SANITY_H
292727702b1731a478de8806481416080d02af5862Michal Krol#define TGSI_SANITY_H
302727702b1731a478de8806481416080d02af5862Michal Krol
312727702b1731a478de8806481416080d02af5862Michal Krol#if defined __cplusplus
322727702b1731a478de8806481416080d02af5862Michal Krolextern "C" {
332727702b1731a478de8806481416080d02af5862Michal Krol#endif
342727702b1731a478de8806481416080d02af5862Michal Krol
3520a0f342833b61ebbfb0b8c622fd0c18fad59b7dVinson Lee#include "pipe/p_compiler.h"
3620a0f342833b61ebbfb0b8c622fd0c18fad59b7dVinson Lee
3720a0f342833b61ebbfb0b8c622fd0c18fad59b7dVinson Leestruct tgsi_token;
3820a0f342833b61ebbfb0b8c622fd0c18fad59b7dVinson Lee
392727702b1731a478de8806481416080d02af5862Michal Krol/* Check the given token stream for errors and common mistakes.
409f5c1194ff0ff69be5d7641d68169b152bc6cd0aJakob Bornecrantz * Diagnostic messages are printed out to the debug output, and is
417f5202be63c6dc639e57d11ef8253e79dd349f59Jakob Bornecrantz * controlled by the debug option TGSI_PRINT_SANITY (default false).
422727702b1731a478de8806481416080d02af5862Michal Krol * Returns TRUE if there are no errors, even though there could be some warnings.
432727702b1731a478de8806481416080d02af5862Michal Krol */
442727702b1731a478de8806481416080d02af5862Michal Krolboolean
452727702b1731a478de8806481416080d02af5862Michal Kroltgsi_sanity_check(
46983b261e6d85020ae19418428d25f2e70f43d7ddKeith Whitwell   const struct tgsi_token *tokens );
472727702b1731a478de8806481416080d02af5862Michal Krol
482727702b1731a478de8806481416080d02af5862Michal Krol#if defined __cplusplus
492727702b1731a478de8806481416080d02af5862Michal Krol}
502727702b1731a478de8806481416080d02af5862Michal Krol#endif
512727702b1731a478de8806481416080d02af5862Michal Krol
522727702b1731a478de8806481416080d02af5862Michal Krol#endif /* TGSI_SANITY_H */
53