Path: blob/21.2-virgl/src/gallium/auxiliary/tgsi/tgsi_iterate.h
4565 views
/**************************************************************************1*2* Copyright 2008 VMware, Inc.3* All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sub license, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* The above copyright notice and this permission notice (including the14* next paragraph) shall be included in all copies or substantial portions15* of the Software.16*17* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS18* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF19* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.20* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR21* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,22* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE23* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.24*25**************************************************************************/2627#ifndef TGSI_ITERATE_H28#define TGSI_ITERATE_H2930#include "pipe/p_shader_tokens.h"31#include "tgsi/tgsi_parse.h"3233#if defined __cplusplus34extern "C" {35#endif3637struct tgsi_iterate_context38{39boolean40(* prolog)(41struct tgsi_iterate_context *ctx );4243boolean44(* iterate_instruction)(45struct tgsi_iterate_context *ctx,46struct tgsi_full_instruction *inst );4748boolean49(* iterate_declaration)(50struct tgsi_iterate_context *ctx,51struct tgsi_full_declaration *decl );5253boolean54(* iterate_immediate)(55struct tgsi_iterate_context *ctx,56struct tgsi_full_immediate *imm );5758boolean59(* iterate_property)(60struct tgsi_iterate_context *ctx,61struct tgsi_full_property *prop );6263boolean64(* epilog)(65struct tgsi_iterate_context *ctx );6667struct tgsi_processor processor;68};6970boolean71tgsi_iterate_shader(72const struct tgsi_token *tokens,73struct tgsi_iterate_context *ctx );7475#if defined __cplusplus76}77#endif7879#endif /* TGSI_ITERATE_H */808182