program_parser.h revision d0adebb8d5ef680590b0f281a20516318c0b8b62
1770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick/* 2770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Copyright © 2009 Intel Corporation 3770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * 4770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Permission is hereby granted, free of charge, to any person obtaining a 5770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * copy of this software and associated documentation files (the "Software"), 6770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * to deal in the Software without restriction, including without limitation 7770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * and/or sell copies of the Software, and to permit persons to whom the 9770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Software is furnished to do so, subject to the following conditions: 10770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * 11770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * The above copyright notice and this permission notice (including the next 12770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * paragraph) shall be included in all copies or substantial portions of the 13770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Software. 14770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * 15770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * DEALINGS IN THE SOFTWARE. 22770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 23770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick#pragma once 24770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 25770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick#include "main/config.h" 26770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 2744843c753301db0e8f8343745777479465f34cccIan Romanick#ifndef MTYPES_H 2844843c753301db0e8f8343745777479465f34cccIan Romanickstruct __GLcontextRec; 2944843c753301db0e8f8343745777479465f34cccIan Romanicktypedef struct __GLcontextRec GLcontext; 3044843c753301db0e8f8343745777479465f34cccIan Romanick#endif 3144843c753301db0e8f8343745777479465f34cccIan Romanick 32770cebbc29863ae944a31463ee4bdeb789105abaIan Romanickenum asm_type { 33770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick at_none, 34770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick at_address, 35770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick at_attrib, 36770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick at_param, 37770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick at_temp, 38770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick at_output, 39770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick}; 40770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 41770cebbc29863ae944a31463ee4bdeb789105abaIan Romanickstruct asm_symbol { 4294b45567047fd681666f261f1ad0164049f0491aIan Romanick struct asm_symbol *next; /**< List linkage for freeing. */ 43770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick const char *name; 44770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick enum asm_type type; 45770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned attrib_binding; 46770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned output_binding; /**< Output / result register number. */ 47770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 48770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /** 49770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * One of PROGRAM_STATE_VAR, PROGRAM_LOCAL_PARAM, or PROGRAM_ENV_PARAM. 50770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 51770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned param_binding_type; 52770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 53770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /** 54770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Offset into the program_parameter_list where the tokens representing our 55770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * bound state (or constants) start. 56770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 57770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned param_binding_begin; 58770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 59770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /* This is how many entries in the the program_parameter_list we take up 60770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * with our state tokens or constants. Note that this is _not_ the same as 61770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * the number of param registers we eventually use. 62770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 63770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned param_binding_length; 64770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 65770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /** 66770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Index of the temp register assigned to this variable. 67770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 68770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned temp_binding; 69770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 70770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /** 71770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Flag whether or not a PARAM is an array 72770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 73770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned param_is_array:1; 74770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 75770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 76770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /** 77770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Flag whether or not a PARAM array is accessed indirectly 78770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 79770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned param_accessed_indirectly:1; 80770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 81770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 82770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /** 83770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * \brief Is first pass of parameter layout done with this variable? 84770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * 85770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * The parameter layout routine operates in two passes. This flag tracks 86770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * whether or not the first pass has handled this variable. 87770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * 88770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * \sa _mesa_layout_parameters 89770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 90770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned pass1_done:1; 91770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick}; 92770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 93770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 94770cebbc29863ae944a31463ee4bdeb789105abaIan Romanickstruct asm_vector { 95770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned count; 96770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick float data[4]; 97770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick}; 98770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 99770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 100770cebbc29863ae944a31463ee4bdeb789105abaIan Romanickstruct asm_swizzle_mask { 101770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned swizzle:12; 102770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned mask:4; 103770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick}; 104770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 105770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 106770cebbc29863ae944a31463ee4bdeb789105abaIan Romanickstruct asm_src_register { 107770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick struct prog_src_register Base; 108770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 109770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /** 110770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Symbol associated with indirect access to parameter arrays. 111770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * 112770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * If \c Base::RelAddr is 1, this will point to the symbol for the parameter 113770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * that is being dereferenced. Further, \c Base::Index will be the offset 114770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * from the address register being used. 115770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 116770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick struct asm_symbol *Symbol; 117770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick}; 118770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 119770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 120770cebbc29863ae944a31463ee4bdeb789105abaIan Romanickstruct asm_instruction { 121770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick struct prog_instruction Base; 122770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick struct asm_instruction *next; 123770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick struct asm_src_register SrcReg[3]; 124770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick}; 125770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 126770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 127770cebbc29863ae944a31463ee4bdeb789105abaIan Romanickstruct asm_parser_state { 12844843c753301db0e8f8343745777479465f34cccIan Romanick GLcontext *ctx; 129770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick struct gl_program *prog; 130770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 131770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /** 132770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Per-program target limits 133770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 134770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick struct gl_program_constants *limits; 135770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 136770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick struct _mesa_symbol_table *st; 137770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 138770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /** 13994b45567047fd681666f261f1ad0164049f0491aIan Romanick * Linked list of symbols 14094b45567047fd681666f261f1ad0164049f0491aIan Romanick * 14194b45567047fd681666f261f1ad0164049f0491aIan Romanick * This list is \b only used when cleaning up compiler state and freeing 14294b45567047fd681666f261f1ad0164049f0491aIan Romanick * memory. 14394b45567047fd681666f261f1ad0164049f0491aIan Romanick */ 14494b45567047fd681666f261f1ad0164049f0491aIan Romanick struct asm_symbol *sym; 14594b45567047fd681666f261f1ad0164049f0491aIan Romanick 14694b45567047fd681666f261f1ad0164049f0491aIan Romanick /** 147770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * State for the lexer. 148770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 149770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick void *scanner; 150770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 151770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /** 152770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Linked list of instructions generated during parsing. 153770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 154770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /*@{*/ 155770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick struct asm_instruction *inst_head; 156770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick struct asm_instruction *inst_tail; 157770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /*@}*/ 158770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 159770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 160770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /** 161770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Selected limits copied from gl_constants 162770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * 163770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * These are limits from the GL context, but various bits in the program 164770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * must be validated against these values. 165770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 166770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /*@{*/ 167770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned MaxTextureCoordUnits; 168770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned MaxTextureImageUnits; 169770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned MaxTextureUnits; 170770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned MaxClipPlanes; 171770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned MaxLights; 172770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned MaxProgramMatrices; 173770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /*@}*/ 174770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 175770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /** 176770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Value to use in state vector accessors for environment and local 177770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * parameters 178770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 179770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned state_param_enum; 180770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 181770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 182770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick /** 183770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Input attributes bound to specific names 184770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * 185770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * This is only needed so that errors can be properly produced when 186770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * multiple ATTRIB statements bind illegal combinations of vertex 187770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * attributes. 188770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 189770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned InputsBound; 190770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 191770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick enum { 192770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick invalid_mode = 0, 193770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick ARB_vertex, 194770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick ARB_fragment 195770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick } mode; 196770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 197770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick struct { 198770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned PositionInvariant:1; 199770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned Fog:2; 200770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned PrecisionHint:2; 201770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned DrawBuffers:1; 202770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned Shadow:1; 20388018e2e073909ae807f16707f2701e068900926Ian Romanick unsigned TexRect:1; 204aafd5762593aa01f2d612f4d769d1af383422c1cIan Romanick unsigned TexArray:1; 205dc8ec05ace3d2a0284dbe47ec2d88168b1efb517Ian Romanick unsigned NV_fragment:1; 206770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick } option; 207770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 208770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick struct { 209770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick unsigned UsesKill:1; 210770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick } fragment; 211770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick}; 212770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 213770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick#define OPTION_NONE 0 214770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick#define OPTION_FOG_EXP 1 215770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick#define OPTION_FOG_EXP2 2 216770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick#define OPTION_FOG_LINEAR 3 217770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick#define OPTION_NICEST 1 218770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick#define OPTION_FASTEST 2 219770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 220770cebbc29863ae944a31463ee4bdeb789105abaIan Romanicktypedef struct YYLTYPE { 221770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick int first_line; 222770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick int first_column; 223770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick int last_line; 224770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick int last_column; 225770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick int position; 226770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick} YYLTYPE; 227770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 228770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick#define YYLTYPE_IS_DECLARED 1 229770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick#define YYLTYPE_IS_TRIVIAL 1 230770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 231770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 232770cebbc29863ae944a31463ee4bdeb789105abaIan Romanickextern GLboolean _mesa_parse_arb_program(GLcontext *ctx, GLenum target, 233770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick const GLubyte *str, GLsizei len, struct asm_parser_state *state); 234770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 235770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 236770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 237770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick/* From program_lexer.l. */ 238770cebbc29863ae944a31463ee4bdeb789105abaIan Romanickextern void _mesa_program_lexer_dtor(void *scanner); 239770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 240770cebbc29863ae944a31463ee4bdeb789105abaIan Romanickextern void _mesa_program_lexer_ctor(void **scanner, 241770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick struct asm_parser_state *state, const char *string, size_t len); 242770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 243770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 244770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick/** 245770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick *\name From program_parse_extra.c 246770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 247770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick/*@{*/ 248770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 249770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick/** 250770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Parses and processes an option string to an ARB vertex program 251770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * 252770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * \return 253770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Non-zero on success, zero on failure. 254770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 255770cebbc29863ae944a31463ee4bdeb789105abaIan Romanickextern int _mesa_ARBvp_parse_option(struct asm_parser_state *state, 256770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick const char *option); 257770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 258770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick/** 259770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Parses and processes an option string to an ARB fragment program 260770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * 261770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * \return 262770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick * Non-zero on success, zero on failure. 263770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick */ 264770cebbc29863ae944a31463ee4bdeb789105abaIan Romanickextern int _mesa_ARBfp_parse_option(struct asm_parser_state *state, 265770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick const char *option); 266770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick 267d0adebb8d5ef680590b0f281a20516318c0b8b62Ian Romanick/** 268d0adebb8d5ef680590b0f281a20516318c0b8b62Ian Romanick * Parses and processes instruction suffixes 269d0adebb8d5ef680590b0f281a20516318c0b8b62Ian Romanick * 270d0adebb8d5ef680590b0f281a20516318c0b8b62Ian Romanick * Instruction suffixes, such as \c _SAT, are processed. The relevant bits 271d0adebb8d5ef680590b0f281a20516318c0b8b62Ian Romanick * are set in \c inst. If suffixes are encountered that are either not known 272d0adebb8d5ef680590b0f281a20516318c0b8b62Ian Romanick * or not supported by the modes and options set in \c state, zero will be 273d0adebb8d5ef680590b0f281a20516318c0b8b62Ian Romanick * returned. 274d0adebb8d5ef680590b0f281a20516318c0b8b62Ian Romanick * 275d0adebb8d5ef680590b0f281a20516318c0b8b62Ian Romanick * \return 276d0adebb8d5ef680590b0f281a20516318c0b8b62Ian Romanick * Non-zero on success, zero on failure. 277d0adebb8d5ef680590b0f281a20516318c0b8b62Ian Romanick */ 278d0adebb8d5ef680590b0f281a20516318c0b8b62Ian Romanickextern int _mesa_parse_instruction_suffix(const struct asm_parser_state *state, 279d0adebb8d5ef680590b0f281a20516318c0b8b62Ian Romanick const char *suffix, struct prog_instruction *inst); 280d0adebb8d5ef680590b0f281a20516318c0b8b62Ian Romanick 281770cebbc29863ae944a31463ee4bdeb789105abaIan Romanick/*@}*/ 282