40ca1c96f378cd691bdcda5177c33ae38ec9dd72
[mesa.git] / src / mesa / pipe / tgsi / deco / deco_caps.h
1 #if !defined DECO_CAPS_H
2 #define DECO_CAPS_H
3
4 #if defined __cplusplus
5 extern "C" {
6 #endif // defined __cplusplus
7
8 struct tgsi_deco_caps
9 {
10 /*
11 * Predicates (D3D9-specific).
12 *
13 * Constraints:
14 * 1. Token tgsi_dst_register_ext_predicate must not be used.
15 * 2. Token tgsi_instruction_ext_predicate must not be used.
16 */
17 unsigned Predicates : 1;
18
19 /*
20 * Destination register post-modulate.
21 *
22 * Constraints:
23 * 1. Field tgsi_dst_register_ext_modulate::Modulate
24 * must be set to TGSI_MODULATE_1X.
25 */
26 unsigned DstModulate : 1;
27
28 /*
29 * Condition codes (NVIDIA-specific).
30 *
31 * Constraints:
32 * 1. Token tgsi_dst_register_ext_concode must not be used.
33 * 2. Field tgsi_instruction_ext_nv::CondDstUpdate must be set to FALSE.
34 * 3. Field tgsi_instruction_ext_nv::CondFlowEnable must be set to FALSE.
35 */
36 unsigned ConCodes : 1;
37
38 /*
39 * Source register invert.
40 *
41 * Constraints:
42 * 1. Field tgsi_src_register_ext_mod::Complement must be set to FALSE.
43 */
44 unsigned SrcInvert : 1;
45
46 /*
47 * Source register bias.
48 *
49 * Constraints:
50 * 1. Field tgsi_src_register_ext_mod::Bias must be set to FALSE.
51 */
52 unsigned SrcBias : 1;
53
54 /*
55 * Source register scale by 2.
56 *
57 * Constraints:
58 * 1. Field tgsi_src_register_ext_mod::Scale2X must be set to FALSE.
59 */
60 unsigned SrcScale : 1;
61
62 /*
63 * Source register absolute.
64 *
65 * Constraints:
66 * 1. Field tgsi_src_register_ext_mod::Absolute must be set to FALSE.
67 */
68 unsigned SrcAbsolute : 1;
69
70 /*
71 * Source register force sign.
72 *
73 * Constraints:
74 * 1. Fields tgsi_src_register_ext_mod::Absolute and
75 * tgsi_src_register_ext_mod::Negate must not be both set to TRUE
76 * at the same time.
77 */
78 unsigned SrcForceSign : 1;
79
80 /*
81 * Source register divide.
82 *
83 * Constraints:
84 * 1. Field tgsi_src_register_ext_swz::ExtDivide
85 * must be set to TGSI_EXTSWIZZLE_ONE.
86 */
87 unsigned SrcDivide : 1;
88
89 /*
90 * Source register extended swizzle.
91 *
92 * Constraints:
93 * 1. Field tgsi_src_register_ext_swz::ExtSwizzleX/Y/Z/W
94 * must be set to TGSI_EXTSWIZZLE_X/Y/Z/W.
95 * 2. Fields tgsi_src_register_ext_swz::NegateX/Y/Z/W
96 * must all be set to the same value.
97 */
98 unsigned SrcExtSwizzle : 1;
99
100 unsigned Padding : 22;
101 };
102
103 void
104 tgsi_deco_caps_init(
105 struct tgsi_deco_caps *caps );
106
107 #if defined __cplusplus
108 } // extern "C"
109 #endif // defined __cplusplus
110
111 #endif // !defined DECO_CAPS_H
112