5da71f8e136eb25d4ff5d3879e9e73121fc030a5
[profile/ivi/mesa.git] / src / gallium / auxiliary / vl / vl_shader_build.h
1 /**************************************************************************
2  * 
3  * Copyright 2009 Younes Manton.
4  * All Rights Reserved.
5  * 
6  * Permission is hereby granted, free of charge, to any person obtaining a
7  * copy of this software and associated documentation files (the
8  * "Software"), to deal in the Software without restriction, including
9  * without limitation the rights to use, copy, modify, merge, publish,
10  * distribute, sub license, and/or sell copies of the Software, and to
11  * permit persons to whom the Software is furnished to do so, subject to
12  * the following conditions:
13  * 
14  * The above copyright notice and this permission notice (including the
15  * next paragraph) shall be included in all copies or substantial portions
16  * of the Software.
17  * 
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21  * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
22  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25  * 
26  **************************************************************************/
27
28 #ifndef vl_shader_build_h
29 #define vl_shader_build_h
30
31 #include <pipe/p_shader_tokens.h>
32
33 struct tgsi_full_declaration vl_decl_input(unsigned int name, unsigned int index, unsigned int first, unsigned int last);
34 struct tgsi_full_declaration vl_decl_interpolated_input
35 (
36    unsigned int name,
37    unsigned int index,
38    unsigned int first,
39    unsigned int last,
40    int interpolation
41 );
42 struct tgsi_full_declaration vl_decl_constants(unsigned int name, unsigned int index, unsigned int first, unsigned int last);
43 struct tgsi_full_declaration vl_decl_output(unsigned int name, unsigned int index, unsigned int first, unsigned int last);
44 struct tgsi_full_declaration vl_decl_temps(unsigned int first, unsigned int last);
45 struct tgsi_full_declaration vl_decl_samplers(unsigned int first, unsigned int last);
46 struct tgsi_full_instruction vl_inst2
47 (
48    int opcode,
49    enum tgsi_file_type dst_file,
50    unsigned int dst_index,
51    enum tgsi_file_type src_file,
52    unsigned int src_index
53 );
54 struct tgsi_full_instruction vl_inst3
55 (
56    int opcode,
57    enum tgsi_file_type dst_file,
58    unsigned int dst_index,
59    enum tgsi_file_type src1_file,
60    unsigned int src1_index,
61    enum tgsi_file_type src2_file,
62    unsigned int src2_index
63 );
64 struct tgsi_full_instruction vl_tex
65 (
66    int tex,
67    enum tgsi_file_type dst_file,
68    unsigned int dst_index,
69    enum tgsi_file_type src1_file,
70    unsigned int src1_index,
71    enum tgsi_file_type src2_file,
72    unsigned int src2_index
73 );
74 struct tgsi_full_instruction vl_inst4
75 (
76    int opcode,
77    enum tgsi_file_type dst_file,
78    unsigned int dst_index,
79    enum tgsi_file_type src1_file,
80    unsigned int src1_index,
81    enum tgsi_file_type src2_file,
82    unsigned int src2_index,
83    enum tgsi_file_type src3_file,
84    unsigned int src3_index
85 );
86 struct tgsi_full_instruction vl_end(void);
87
88 #endif