ReactOS 0.4.17-dev-966-gf06eace
shader.c
Go to the documentation of this file.
1/*
2 * Copyright 2008 Luis Busquets
3 * Copyright 2011 Travis Athougies
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20#define COBJMACROS
21#include <stdbool.h>
22#include <stdint.h>
23#include "wine/test.h"
24#include "d3dx9.h"
25
26#define FCC_TEXT MAKEFOURCC('T','E','X','T')
27#define FCC_CTAB MAKEFOURCC('C','T','A','B')
28
29static const DWORD shader_zero[] = {0x0};
30
31static const DWORD shader_invalid[] = {0xeeee0100};
32
33static const DWORD shader_empty[] = {0xfffe0200, 0x0000ffff};
34
35static const DWORD simple_fx[] = {0x46580000, 0x0002fffe, FCC_TEXT, 0x00000000, 0x0000ffff};
36
37static const DWORD simple_tx[] = {0x54580000, 0x0002fffe, FCC_TEXT, 0x00000000, 0x0000ffff};
38
39static const DWORD simple_7ffe[] = {0x7ffe0000, 0x0002fffe, FCC_TEXT, 0x00000000, 0x0000ffff};
40
41static const DWORD simple_7fff[] = {0x7fff0000, 0x0002fffe, FCC_TEXT, 0x00000000, 0x0000ffff};
42
43static const DWORD simple_vs[] = {
44 0xfffe0101, /* vs_1_1 */
45 0x0000001f, 0x80000000, 0x900f0000, /* dcl_position0 v0 */
46 0x00000009, 0xc0010000, 0x90e40000, 0xa0e40000, /* dp4 oPos.x, v0, c0 */
47 0x00000009, 0xc0020000, 0x90e40000, 0xa0e40001, /* dp4 oPos.y, v0, c1 */
48 0x00000009, 0xc0040000, 0x90e40000, 0xa0e40002, /* dp4 oPos.z, v0, c2 */
49 0x00000009, 0xc0080000, 0x90e40000, 0xa0e40003, /* dp4 oPos.w, v0, c3 */
50 0x0000ffff}; /* END */
51
52static const DWORD simple_ps[] = {
53 0xffff0101, /* ps_1_1 */
54 0x00000051, 0xa00f0001, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, /* def c1 = 1.0, 0.0, 0.0, 0.0 */
55 0x00000042, 0xb00f0000, /* tex t0 */
56 0x00000008, 0x800f0000, 0xa0e40001, 0xa0e40000, /* dp3 r0, c1, c0 */
57 0x00000005, 0x800f0000, 0x90e40000, 0x80e40000, /* mul r0, v0, r0 */
58 0x00000005, 0x800f0000, 0xb0e40000, 0x80e40000, /* mul r0, t0, r0 */
59 0x0000ffff}; /* END */
60
61static const DWORD shader_with_ctab[] = {
62 0xfffe0300, /* vs_3_0 */
63 0x0002fffe, FCC_TEXT, 0x00000000, /* TEXT comment */
64 0x0008fffe, FCC_CTAB, 0x0000001c, 0x00000010, 0xfffe0300, 0x00000000, /* CTAB comment */
65 0x00000000, 0x00000000, 0x00000000,
66 0x0004fffe, FCC_TEXT, 0x00000000, 0x00000000, 0x00000000, /* TEXT comment */
67 0x0000ffff}; /* END */
68
70 0xfffe0300, /* vs_3_0 */
71 0x0005fffe, FCC_CTAB, /* CTAB comment */
72 0x0000001c, 0x000000a9, 0xfffe0300,
73 0x00000000, 0x00000000,
74 0x0000ffff}; /* END */
75
77 0xfffe0300, /* vs_3_0 */
78 0x002efffe, FCC_CTAB, /* CTAB comment */
79 0x0000001c, 0x000000a4, 0xfffe0300, 0x00000003, 0x0000001c, 0x20008100, /* Header */
80 0x0000009c,
81 0x00000058, 0x00070002, 0x00000001, 0x00000064, 0x00000000, /* Constant 1 desc */
82 0x00000074, 0x00000002, 0x00000004, 0x00000080, 0x00000000, /* Constant 2 desc */
83 0x00000090, 0x00040002, 0x00000003, 0x00000080, 0x00000000, /* Constant 3 desc */
84 0x736e6f43, 0x746e6174, 0xabab0031, /* Constant 1 name string */
85 0x00030001, 0x00040001, 0x00000001, 0x00000000, /* Constant 1 type desc */
86 0x736e6f43, 0x746e6174, 0xabab0032, /* Constant 2 name string */
87 0x00030003, 0x00040004, 0x00000001, 0x00000000, /* Constant 2 & 3 type desc */
88 0x736e6f43, 0x746e6174, 0xabab0033, /* Constant 3 name string */
89 0x335f7376, 0xab00305f, /* Target name string */
90 0x656e6957, 0x6f727020, 0x7463656a, 0xababab00, /* Creator name string */
91 0x0000ffff}; /* END */
92
93static const DWORD ctab_basic[] = {
94 0xfffe0300, /* vs_3_0 */
95 0x0040fffe, FCC_CTAB, /* CTAB comment */
96 0x0000001c, 0x000000ec, 0xfffe0300, 0x00000005, 0x0000001c, 0x20008100, /* Header */
97 0x000000e4,
98 0x00000080, 0x00060002, 0x00000001, 0x00000084, 0x00000000, /* Constant 1 desc (f) */
99 0x00000094, 0x00070002, 0x00000001, 0x00000098, 0x00000000, /* Constant 2 desc (f4) */
100 0x000000A8, 0x00040002, 0x00000001, 0x000000AC, 0x00000000, /* Constant 3 desc (i) */
101 0x000000BC, 0x00050002, 0x00000001, 0x000000C0, 0x00000000, /* Constant 4 desc (i4) */
102 0x000000D0, 0x00000002, 0x00000004, 0x000000D4, 0x00000000, /* Constant 5 desc (mvp) */
103 0xabab0066, 0x00030000, 0x00010001, 0x00000001, 0x00000000, /* Constant 1 name/type desc */
104 0xab003466, 0x00030001, 0x00040001, 0x00000001, 0x00000000, /* Constant 2 name/type desc */
105 0xabab0069, 0x00020000, 0x00010001, 0x00000001, 0x00000000, /* Constant 3 name/type desc */
106 0xab003469, 0x00020001, 0x00040001, 0x00000001, 0x00000000, /* Constant 4 name/type desc */
107 0x0070766d, 0x00030003, 0x00040004, 0x00000001, 0x00000000, /* Constant 5 name/type desc */
108 0x335f7376, 0xab00305f, /* Target name string */
109 0x656e6957, 0x6f727020, 0x7463656a, 0xababab00, /* Creator name string */
110 0x0000ffff}; /* END */
111
113 {"mvp", D3DXRS_FLOAT4, 0, 4, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 4, 4, 1, 0, 64, NULL},
114 {"i", D3DXRS_FLOAT4, 4, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL},
115 {"i4", D3DXRS_FLOAT4, 5, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 4, 1, 0, 16, NULL},
116 {"f", D3DXRS_FLOAT4, 6, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL},
117 {"f4", D3DXRS_FLOAT4, 7, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 4, 1, 0, 16, NULL}};
118
119static const DWORD ctab_matrices[] = {
120 0xfffe0300, /* vs_3_0 */
121 0x0032fffe, FCC_CTAB, /* CTAB comment */
122 0x0000001c, 0x000000b4, 0xfffe0300, 0x00000003, 0x0000001c, 0x20008100, /* Header */
123 0x000000ac,
124 0x00000058, 0x00070002, 0x00000001, 0x00000064, 0x00000000, /* Constant 1 desc (fmatrix3x1) */
125 0x00000074, 0x00000002, 0x00000004, 0x00000080, 0x00000000, /* Constant 2 desc (fmatrix4x4) */
126 0x00000090, 0x00040002, 0x00000002, 0x0000009c, 0x00000000, /* Constant 3 desc (imatrix2x3) */
127 0x74616D66, 0x33786972, 0xab003178, /* Constant 1 name */
128 0x00030003, 0x00010003, 0x00000001, 0x00000000, /* Constant 1 type desc */
129 0x74616D66, 0x34786972, 0xab003478, /* Constant 2 name */
130 0x00030003, 0x00040004, 0x00000001, 0x00000000, /* Constant 2 type desc */
131 0x74616D69, 0x32786972, 0xab003378, /* Constant 3 name */
132 0x00020002, 0x00030002, 0x00000001, 0x00000000, /* Constant 3 type desc */
133 0x335f7376, 0xab00305f, /* Target name string */
134 0x656e6957, 0x6f727020, 0x7463656a, 0xababab00, /* Creator name string */
135 0x0000ffff}; /* END */
136
138 {"fmatrix4x4", D3DXRS_FLOAT4, 0, 4, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 4, 4, 1, 0, 64, NULL},
139 {"imatrix2x3", D3DXRS_FLOAT4, 4, 2, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 2, 3, 1, 0, 24, NULL},
140 {"fmatrix3x1", D3DXRS_FLOAT4, 7, 1, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 1, 1, 0, 12, NULL},
141};
142
143static const DWORD ctab_matrices2[] = {
144 0xfffe0200, /* vs_2_0 */
145 0x0058fffe, FCC_CTAB, /* CTAB comment */
146 0x0000001c, 0x0000012b, 0xfffe0200, 0x00000006, 0x0000001c, 0x00000100, /* Header */
147 0x00000124,
148 0x00000094, 0x00070002, 0x00000003, 0x0000009c, 0x00000000, /* Constant 1 desc (c2x3) */
149 0x000000ac, 0x000d0002, 0x00000002, 0x000000b4, 0x00000000, /* Constant 2 desc (c3x2) */
150 0x000000c4, 0x000a0002, 0x00000003, 0x000000cc, 0x00000000, /* Constant 3 desc (c3x3) */
151 0x000000dc, 0x000f0002, 0x00000002, 0x000000e4, 0x00000000, /* Constant 4 desc (r2x3) */
152 0x000000f4, 0x00040002, 0x00000003, 0x000000fc, 0x00000000, /* Constant 5 desc (r3x2) */
153 0x0000010c, 0x00000002, 0x00000004, 0x00000114, 0x00000000, /* Constant 6 desc (r4x4) */
154 0x33783263, 0xababab00, /* Constant 1 name */
155 0x00030003, 0x00030002, 0x00000001, 0x00000000, /* Constant 1 type desc */
156 0x32783363, 0xababab00, /* Constant 2 name */
157 0x00030003, 0x00020003, 0x00000001, 0x00000000, /* Constant 2 type desc */
158 0x33783363, 0xababab00, /* Constant 3 name */
159 0x00030003, 0x00030003, 0x00000001, 0x00000000, /* Constant 3 type desc */
160 0x33783272, 0xababab00, /* Constant 4 name */
161 0x00030002, 0x00030002, 0x00000001, 0x00000000, /* Constant 4 type desc */
162 0x32783372, 0xababab00, /* Constant 5 name */
163 0x00030002, 0x00020003, 0x00000001, 0x00000000, /* Constant 5 type desc */
164 0x34783472, 0xababab00, /* Constant 6 name */
165 0x00030002, 0x00040004, 0x00000001, 0x00000000, /* Constant 6 type desc */
166 0x325f7376, 0x4100305f, 0x41414141, 0x00414141, /* Target and Creator name */
167 0x0000ffff}; /* END */
168
170 {"c2x3", D3DXRS_FLOAT4, 7, 3, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 2, 3, 1, 0, 24, NULL},
171 {"c3x2", D3DXRS_FLOAT4, 13, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL},
172 {"c3x3", D3DXRS_FLOAT4, 10, 3, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 3, 1, 0, 36, NULL},
173 {"r2x3", D3DXRS_FLOAT4, 15, 2, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 2, 3, 1, 0, 24, NULL},
174 {"r3x2", D3DXRS_FLOAT4, 4, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL},
175 {"r4x4", D3DXRS_FLOAT4, 0, 4, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 4, 4, 1, 0, 64, NULL}};
176
177static const DWORD ctab_arrays[] = {
178 0xfffe0300, /* vs_3_0 */
179 0x0052fffe, FCC_CTAB, /* CTAB comment */
180 0x0000001c, 0x0000013c, 0xfffe0300, 0x00000006, 0x0000001c, 0x20008100, /* Header */
181 0x00000134,
182 0x00000094, 0x000E0002, 0x00000002, 0x0000009c, 0x00000000, /* Constant 1 desc (barray) */
183 0x000000ac, 0x00100002, 0x00000002, 0x000000b8, 0x00000000, /* Constant 2 desc (bvecarray) */
184 0x000000c8, 0x00080002, 0x00000004, 0x000000d0, 0x00000000, /* Constant 3 desc (farray) */
185 0x000000e0, 0x00000002, 0x00000008, 0x000000ec, 0x00000000, /* Constant 4 desc (fmtxarray) */
186 0x000000fc, 0x000C0002, 0x00000002, 0x00000108, 0x00000000, /* Constant 5 desc (fvecarray) */
187 0x00000118, 0x00120002, 0x00000001, 0x00000124, 0x00000000, /* Constant 6 desc (ivecarray) */
188 0x72726162, 0xab007961, /* Constant 1 name */
189 0x00010000, 0x00010001, 0x00000002, 0x00000000, /* Constant 1 type desc */
190 0x63657662, 0x61727261, 0xabab0079, /* Constant 2 name */
191 0x00010001, 0x00030001, 0x00000003, 0x00000000, /* Constant 2 type desc */
192 0x72726166, 0xab007961, /* Constant 3 name */
193 0x00030000, 0x00010001, 0x00000004, 0x00000000, /* constant 3 type desc */
194 0x78746d66, 0x61727261, 0xabab0079, /* Constant 4 name */
195 0x00030002, 0x00040004, 0x00000002, 0x00000000, /* Constant 4 type desc */
196 0x63657666, 0x61727261, 0xabab0079, /* Constant 5 name */
197 0x00030001, 0x00040001, 0x00000002, 0x00000000, /* Constant 5 type desc */
198 0x63657669, 0x61727261, 0xabab0079, /* Constant 6 name */
199 0x00020001, 0x00040001, 0x00000001, 0x00000000, /* Constant 6 type desc */
200 0x335f7376, 0xab00305f, /* Target name string */
201 0x656e6957, 0x6f727020, 0x7463656a, 0xababab00, /* Creator name string */
202 0x0000ffff}; /* END */
203
205 {"fmtxarray", D3DXRS_FLOAT4, 0, 8, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 4, 4, 2, 0, 128, NULL},
206 {"farray", D3DXRS_FLOAT4, 8, 4, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 4, 0, 16, NULL},
207 {"fvecarray", D3DXRS_FLOAT4, 12, 2, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 4, 2, 0, 32, NULL},
208 {"barray", D3DXRS_FLOAT4, 14, 2, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 2, 0, 8, NULL},
209 {"bvecarray", D3DXRS_FLOAT4, 16, 2, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 3, 0, 36, NULL},
210 {"ivecarray", D3DXRS_FLOAT4, 18, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 4, 1, 0, 16, NULL}};
211
213 0xfffe0200, /* vs_2_0 */
214 0x007bfffe, FCC_CTAB, /* CTAB comment */
215 0x0000001c, 0x000001b7, 0xfffe0200, 0x00000005, 0x0000001c, /* header */
216 0x00000100, 0x000001b0,
217 0x00000080, 0x00080002, 0x00000003, 0x00000084, 0x00000094, /* constant 1 desc (arr) */
218 0x000000c4, 0x000c0002, 0x00000001, 0x000000c8, 0x000000d8, /* constant 2 desc (flt) */
219 0x000000e8, 0x00040002, 0x00000004, 0x000000f0, 0x00000100, /* constant 3 desc (mat3) */
220 0x00000140, 0x00000002, 0x00000004, 0x000000f0, 0x00000148, /* constant 4 desc (mat4) */
221 0x00000188, 0x000b0002, 0x00000001, 0x00000190, 0x000001a0, /* constant 5 desc (vec4) */
222 0x00727261, /* constant 1 name */
223 0x00030000, 0x00010001, 0x00000003, 0x00000000, /* constant 1 type desc */
224 0x42c80000, 0x00000000, 0x00000000, 0x00000000, /* constant 1 default value */
225 0x43480000, 0x00000000, 0x00000000, 0x00000000,
226 0x43960000, 0x00000000, 0x00000000, 0x00000000,
227 0x00746c66, /* constant 2 name */
228 0x00030000, 0x00010001, 0x00000001, 0x00000000, /* constant 2 type desc */
229 0x411fd70a, 0x00000000, 0x00000000, 0x00000000, /* constant 2 default value */
230 0x3374616d, /* constant 3 name */
231 0xababab00,
232 0x00030003, 0x00040004, 0x00000001, 0x00000000, /* constant 3 & 4 type desc */
233 0x41300000, 0x425c0000, 0x42c60000, 0x44a42000, /* constat 3 default value */
234 0x41b00000, 0x42840000, 0x447c8000, 0x44b0c000,
235 0x42040000, 0x429a0000, 0x448ae000, 0x44bd6000,
236 0x42300000, 0x42b00000, 0x44978000, 0x44ca0000,
237 0x3474616d, /* constant 4 name */
238 0xababab00,
239 0x3f800000, 0x40a00000, 0x41100000, 0x41500000, /* constant 4 default value */
240 0x40000000, 0x40c00000, 0x41200000, 0x41600000,
241 0x40400000, 0x40e00000, 0x41300000, 0x41700000,
242 0x40800000, 0x41000000, 0x41400000, 0x41800000,
243 0x34636576, /* constant 5 name */
244 0xababab00,
245 0x00030001, 0x00040001, 0x00000001, 0x00000000, /* constant 5 type desc */
246 0x41200000, 0x41a00000, 0x41f00000, 0x42200000, /* constant 5 default value */
247 0x325f7376, 0x4d004141, 0x41414141, 0x00000000, /* target & creator string */
248 0x0000ffff}; /* END */
249
250static const float mat4_default_value[] = {1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15, 4, 8, 12, 16};
251static const float mat3_default_value[] = {11, 55, 99, 1313, 22, 66, 1010, 1414, 33, 77, 1111, 1515, 44, 88, 1212, 1616};
252static const float arr_default_value[] = {100, 0, 0, 0, 200, 0, 0, 0, 300, 0, 0, 0};
253static const float vec4_default_value[] = {10, 20, 30, 40};
254static const float flt_default_value[] = {9.99, 0, 0, 0};
255
257 {"mat4", D3DXRS_FLOAT4, 0, 4, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 4, 4, 1, 0, 64, mat4_default_value},
258 {"mat3", D3DXRS_FLOAT4, 4, 4, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 4, 4, 1, 0, 64, mat3_default_value},
259 {"arr", D3DXRS_FLOAT4, 8, 3, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 3, 0, 12, arr_default_value},
260 {"vec4", D3DXRS_FLOAT4, 11, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 4, 1, 0, 16, vec4_default_value},
261 {"flt", D3DXRS_FLOAT4, 12, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, flt_default_value}};
262
263static const DWORD ctab_samplers[] = {
264 0xfffe0300, /* vs_3_0 */
265 0x0032fffe, FCC_CTAB, /* CTAB comment */
266 0x0000001c, 0x000000b4, 0xfffe0300, 0x00000003, 0x0000001c, 0x20008100, /* Header */
267 0x000000ac,
268 0x00000058, 0x00020002, 0x00000001, 0x00000064, 0x00000000, /* Constant 1 desc (notsampler) */
269 0x00000074, 0x00000003, 0x00000001, 0x00000080, 0x00000000, /* Constant 2 desc (sampler1) */
270 0x00000090, 0x00030003, 0x00000001, 0x0000009c, 0x00000000, /* Constant 3 desc (sampler2) */
271 0x73746f6e, 0x6c706d61, 0xab007265, /* Constant 1 name */
272 0x00030001, 0x00040001, 0x00000001, 0x00000000, /* Constant 1 type desc */
273 0x706d6173, 0x3172656c, 0xababab00, /* Constant 2 name */
274 0x000c0004, 0x00010001, 0x00000001, 0x00000000, /* Constant 2 type desc */
275 0x706d6173, 0x3272656c, 0xababab00, /* Constant 3 name */
276 0x000d0004, 0x00010001, 0x00000001, 0x00000000, /* Constant 3 type desc */
277 0x335f7376, 0xab00305f, /* Target name string */
278 0x656e6957, 0x6f727020, 0x7463656a, 0xababab00, /* Creator name string */
279 0x0000ffff}; /* END */
280
282 {"sampler1", D3DXRS_SAMPLER, 0, 1, D3DXPC_OBJECT, D3DXPT_SAMPLER2D, 1, 1, 1, 0, 4, NULL},
283 {"sampler2", D3DXRS_SAMPLER, 3, 1, D3DXPC_OBJECT, D3DXPT_SAMPLER3D, 1, 1, 1, 0, 4, NULL},
284 {"notsampler", D3DXRS_FLOAT4, 2, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 4, 1, 0, 16, NULL}};
285
287{
288 0x46580200, /* FX20 */
289 0x002efffe, FCC_CTAB, /* CTAB comment */
290 0x0000001c, 0x000000a4, 0xfffe0300, 0x00000003, 0x0000001c, 0x20008100, /* Header */
291 0x0000009c,
292 0x00000058, 0x00070002, 0x00000001, 0x00000064, 0x00000000, /* Constant 1 desc */
293 0x00000074, 0x00000002, 0x00000004, 0x00000080, 0x00000000, /* Constant 2 desc */
294 0x00000090, 0x00040002, 0x00000003, 0x00000080, 0x00000000, /* Constant 3 desc */
295 0x736e6f43, 0x746e6174, 0xabab0031, /* Constant 1 name string */
296 0x00030001, 0x00040001, 0x00000001, 0x00000000, /* Constant 1 type desc */
297 0x736e6f43, 0x746e6174, 0xabab0032, /* Constant 2 name string */
298 0x00030003, 0x00040004, 0x00000001, 0x00000000, /* Constant 2 & 3 type desc */
299 0x736e6f43, 0x746e6174, 0xabab0033, /* Constant 3 name string */
300 0x335f7376, 0xab00305f, /* Target name string */
301 0x656e6957, 0x6f727020, 0x7463656a, 0xababab00, /* Creator name string */
302 0x0000ffff /* END */
303};
304
306{
308 IDirect3D9 *d3d;
311};
312
313static HWND create_window(void)
314{
315 HWND hwnd;
316 RECT rect;
317
318 SetRect(&rect, 0, 0, 640, 480);
320 hwnd = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
321 0, 0, rect.right - rect.left, rect.bottom - rect.top, 0, 0, 0, 0);
322 return hwnd;
323}
324
325static IDirect3DDevice9 *create_device(IDirect3D9 *d3d, HWND device_window, HWND focus_window, BOOL windowed)
326{
327 D3DPRESENT_PARAMETERS present_parameters = {0};
329
330 present_parameters.Windowed = windowed;
331 present_parameters.hDeviceWindow = device_window;
332 present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
333 present_parameters.BackBufferWidth = 640;
334 present_parameters.BackBufferHeight = 480;
335 present_parameters.BackBufferFormat = D3DFMT_A8R8G8B8;
336 present_parameters.EnableAutoDepthStencil = TRUE;
337 present_parameters.AutoDepthStencilFormat = D3DFMT_D24S8;
338
340 D3DCREATE_HARDWARE_VERTEXPROCESSING, &present_parameters, &device)))
341 return device;
342
343 return NULL;
344}
345
347{
348 HRESULT hr;
349
350 memset(context, 0, sizeof(*context));
351
352 context->window = create_window();
354 ok(!!context->d3d, "Failed to create a D3D object.\n");
355 if (!(context->device = create_device(context->d3d, context->window, context->window, TRUE)))
356 {
357 skip("Failed to create a D3D device.\n");
359 DestroyWindow(context->window);
360 return false;
361 }
362
363 hr = IDirect3DDevice9_GetRenderTarget(context->device, 0, &context->backbuffer);
364 ok(hr == S_OK, "Failed to get backbuffer, hr %#lx.\n", hr);
365
366 return true;
367}
368
369#define release_test_context(a) release_test_context_(__LINE__, a)
370static void release_test_context_(unsigned int line, struct d3d9_test_context *context)
371{
372 ULONG refcount;
373
375 refcount = IDirect3DDevice9_Release(context->device);
376 ok(!refcount, "Device has %lu references left.\n", refcount);
377 refcount = IDirect3D9_Release(context->d3d);
378 ok(!refcount, "D3D object has %lu references left.\n", refcount);
379 DestroyWindow(context->window);
380}
381
382struct vec3
383{
384 float x, y, z;
385};
386
388{
390 HRESULT hr;
391
392 static const struct
393 {
394 struct vec3 position;
395 }
396 quad[] =
397 {
398 {{-1.0f, -1.0f, 0.0f}},
399 {{-1.0f, 1.0f, 0.0f}},
400 {{ 1.0f, -1.0f, 0.0f}},
401 {{ 1.0f, 1.0f, 0.0f}},
402 };
403
405 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
407 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
409 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
411 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
413 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
414}
415
417{
420};
421
423{
424 return rb->locked_rect.pBits
425 ? ((uint32_t *)rb->locked_rect.pBits)[y * rb->locked_rect.Pitch / sizeof(uint32_t) + x] : 0xdeadbeef;
426}
427
429{
430 HRESULT hr;
431
432 if (!rb->surface)
433 return;
435 trace("Can't unlock the readback surface, hr %#lx.\n", hr);
437}
438
440{
442 HRESULT hr;
443
444 hr = IDirect3DSurface9_GetDesc(surface, &desc);
445 if (FAILED(hr))
446 {
447 trace("Failed to get surface description, hr %#lx.\n", hr);
448 goto exit;
449 }
450
452 &rb->surface, NULL);
453 if (FAILED(hr))
454 {
455 trace("Can't create the readback surface, hr %#lx.\n", hr);
456 goto exit;
457 }
458
460 if (FAILED(hr))
461 {
462 trace("Can't load the readback surface, hr %#lx.\n", hr);
463 goto exit;
464 }
465
467 if (FAILED(hr))
468 trace("Can't lock the readback surface, hr %#lx.\n", hr);
469
470exit:
471 if (FAILED(hr))
472 {
473 if (rb->surface)
475 rb->surface = NULL;
476 }
477}
478
479static bool compare_uint(unsigned int x, unsigned int y, unsigned int max_diff)
480{
481 unsigned int diff = x > y ? x - y : y - x;
482
483 return diff <= max_diff;
484}
485
486static bool color_match(uint32_t c1, uint32_t c2, unsigned int max_diff)
487{
488 return compare_uint(c1 & 0xff, c2 & 0xff, max_diff)
489 && compare_uint((c1 >> 8) & 0xff, (c2 >> 8) & 0xff, max_diff)
490 && compare_uint((c1 >> 16) & 0xff, (c2 >> 16) & 0xff, max_diff)
491 && compare_uint((c1 >> 24) & 0xff, (c2 >> 24) & 0xff, max_diff);
492}
493
494static void test_get_shader_size(void)
495{
496 UINT shader_size, expected;
497
498 shader_size = D3DXGetShaderSize(simple_vs);
499 expected = sizeof(simple_vs);
500 ok(shader_size == expected, "Got shader size %u, expected %u\n", shader_size, expected);
501
502 shader_size = D3DXGetShaderSize(simple_ps);
503 expected = sizeof(simple_ps);
504 ok(shader_size == expected, "Got shader size %u, expected %u\n", shader_size, expected);
505
506 shader_size = D3DXGetShaderSize(NULL);
507 ok(shader_size == 0, "Got shader size %u, expected 0\n", shader_size);
508}
509
510static void test_get_shader_version(void)
511{
512 DWORD shader_version;
513
514 shader_version = D3DXGetShaderVersion(simple_vs);
515 ok(shader_version == D3DVS_VERSION(1, 1), "Got shader version 0x%08lx, expected 0x%08x\n",
516 shader_version, D3DVS_VERSION(1, 1));
517
518 shader_version = D3DXGetShaderVersion(simple_ps);
519 ok(shader_version == D3DPS_VERSION(1, 1), "Got shader version 0x%08lx, expected 0x%08x\n",
520 shader_version, D3DPS_VERSION(1, 1));
521
522 shader_version = D3DXGetShaderVersion(NULL);
523 ok(shader_version == 0, "Got shader version 0x%08lx, expected 0\n", shader_version);
524}
525
527{
528 const void *data = (void *)0xdeadbeef;
529 HRESULT hr;
530 UINT size = 100;
531
532 hr = D3DXFindShaderComment(NULL, MAKEFOURCC('C','T','A','B'), &data, &size);
533 ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
534 ok(!data, "Got %p, expected NULL\n", data);
535 ok(!size, "Got %u, expected 0\n", size);
536
538 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
539 ok(size == 28, "Got %u, expected 28\n", size);
540
542 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
543 ok(data == shader_with_ctab + 6, "Got result %p, expected %p\n", data, shader_with_ctab + 6);
544
546 ok(hr == S_FALSE, "Got result %lx, expected 1 (S_FALSE)\n", hr);
547 ok(!data, "Got %p, expected NULL\n", data);
548 ok(!size, "Got %u, expected 0\n", size);
549
551 ok(hr == S_FALSE, "Got result %lx, expected 1 (S_FALSE)\n", hr);
552 ok(!data, "Got %p, expected NULL\n", data);
553 ok(!size, "Got %u, expected 0\n", size);
554
556 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
557 ok(data == shader_with_ctab + 6, "Got result %p, expected %p\n", data, shader_with_ctab + 6);
558 ok(size == 28, "Got result %u, expected 28\n", size);
559
560 hr = D3DXFindShaderComment(shader_zero, MAKEFOURCC('C','T','A','B'), &data, &size);
561 ok(hr == D3DXERR_INVALIDDATA, "Got result %lx, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA);
562 ok(!data, "Got %p, expected NULL\n", data);
563 ok(!size, "Got %u, expected 0\n", size);
564
566 ok(hr == D3DXERR_INVALIDDATA, "Got result %lx, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA);
567 ok(!data, "Got %p, expected NULL\n", data);
568 ok(!size, "Got %u, expected 0\n", size);
569
570 hr = D3DXFindShaderComment(shader_empty, MAKEFOURCC('C','T','A','B'), &data, &size);
571 ok(hr == S_FALSE, "Got result %lx, expected %lx (S_FALSE)\n", hr, S_FALSE);
572 ok(!data, "Got %p, expected NULL\n", data);
573 ok(!size, "Got %u, expected 0\n", size);
574
576 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
577 ok(data == simple_fx + 3, "Got result %p, expected %p\n", data, simple_fx + 3);
578 ok(size == 4, "Got result %u, expected 4\n", size);
579
581 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
582 ok(data == simple_tx + 3, "Got result %p, expected %p\n", data, simple_tx + 3);
583 ok(size == 4, "Got result %u, expected 4\n", size);
584
586 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
587 ok(data == simple_7ffe + 3, "Got result %p, expected %p\n", data, simple_7ffe + 3);
588 ok(size == 4, "Got result %u, expected 4\n", size);
589
591 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
592 ok(data == simple_7fff + 3, "Got result %p, expected %p\n", data, simple_7fff + 3);
593 ok(size == 4, "Got result %u, expected 4\n", size);
594}
595
597{
598 D3DXCONSTANT_DESC constant_desc_save;
599 ID3DXConstantTable *constant_table;
600 D3DXCONSTANT_DESC constant_desc;
603 HRESULT hr;
604 void *data;
605 DWORD size;
606 UINT nb;
607
608 constant_table = (ID3DXConstantTable *)0xdeadbeef;
610 ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
611 ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
612
613 constant_table = (ID3DXConstantTable *)0xdeadbeef;
615 ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK);
616 ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
617
618 constant_table = (ID3DXConstantTable *)0xdeadbeef;
620 ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK);
621 ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
622
623 constant_table = (ID3DXConstantTable *)0xdeadbeef;
625 ok(hr == D3DXERR_INVALIDDATA, "Got result %lx, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA);
626 ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
627
628 /* No CTAB data */
629 constant_table = (ID3DXConstantTable *)0xdeadbeef;
631 ok(hr == D3DXERR_INVALIDDATA, "Got result %lx, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA);
632 ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
633
634 /* With invalid CTAB data */
636 ok(hr == D3DXERR_INVALIDDATA || broken(hr == D3D_OK), /* winxp 64-bit, w2k3 64-bit */
637 "Got result %lx, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA);
639
641 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
642 ok(!constant_table, "D3DXGetShaderConstantTableEx() returned a non-NULL constant table.\n");
643
645 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
646 ok(!constant_table, "D3DXGetShaderConstantTableEx() returned a non-NULL constant table.\n");
647
649 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
650 ok(constant_table != NULL, "D3DXGetShaderConstantTableEx() failed, got NULL\n");
651
653 ok(size == 28, "Unexpected size %lu.\n", size);
654
656 ok(!memcmp(data, shader_with_ctab + 6, size), "Retrieved wrong CTAB data\n");
657
659 ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
660
662 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
663 ok(desc.Creator == (const char *)data + 0x10, "Got result %p, expected %p\n",
664 desc.Creator, (const char *)data + 0x10);
665 ok(desc.Version == D3DVS_VERSION(3, 0), "Got result %lx, expected %x\n", desc.Version, D3DVS_VERSION(3, 0));
666 ok(desc.Constants == 0, "Unexpected Constants %u.\n", desc.Constants);
667
669
671 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
672 ok(constant_table != NULL, "D3DXGetShaderConstantTableEx() failed, got NULL\n");
673
674 /* Test GetDesc */
676 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
677 ok(!strcmp(desc.Creator, "Wine project"), "Got result '%s', expected 'Wine project'\n", desc.Creator);
678 ok(desc.Version == D3DVS_VERSION(3, 0), "Got result %lx, expected %x\n", desc.Version, D3DVS_VERSION(3, 0));
679 ok(desc.Constants == 3, "Got result %x, expected 3\n", desc.Constants);
680
681 /* Test GetConstant */
683 ok(constant != NULL, "No constant found\n");
685 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
686 ok(!strcmp(constant_desc.Name, "Constant1"), "Got result '%s', expected 'Constant1'\n",
687 constant_desc.Name);
688 ok(constant_desc.Class == D3DXPC_VECTOR, "Got result %x, expected %u (D3DXPC_VECTOR)\n",
689 constant_desc.Class, D3DXPC_VECTOR);
690 ok(constant_desc.Type == D3DXPT_FLOAT, "Got result %x, expected %u (D3DXPT_FLOAT)\n",
691 constant_desc.Type, D3DXPT_FLOAT);
692 ok(constant_desc.Rows == 1, "Got result %x, expected 1\n", constant_desc.Rows);
693 ok(constant_desc.Columns == 4, "Got result %x, expected 4\n", constant_desc.Columns);
694
696 ok(constant != NULL, "No constant found\n");
698 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
699 ok(!strcmp(constant_desc.Name, "Constant2"), "Got result '%s', expected 'Constant2'\n",
700 constant_desc.Name);
701 ok(constant_desc.Class == D3DXPC_MATRIX_COLUMNS, "Got result %x, expected %u (D3DXPC_MATRIX_COLUMNS)\n",
702 constant_desc.Class, D3DXPC_MATRIX_COLUMNS);
703 ok(constant_desc.Type == D3DXPT_FLOAT, "Got result %x, expected %u (D3DXPT_FLOAT)\n",
704 constant_desc.Type, D3DXPT_FLOAT);
705 ok(constant_desc.Rows == 4, "Got result %x, expected 1\n", constant_desc.Rows);
706 ok(constant_desc.Columns == 4, "Got result %x, expected 4\n", constant_desc.Columns);
707
709 ok(constant != NULL, "No constant found\n");
711 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
712 ok(!strcmp(constant_desc.Name, "Constant3"), "Got result '%s', expected 'Constant3'\n",
713 constant_desc.Name);
714 ok(constant_desc.Class == D3DXPC_MATRIX_COLUMNS, "Got result %x, expected %u (D3DXPC_MATRIX_COLUMNS)\n",
715 constant_desc.Class, D3DXPC_MATRIX_COLUMNS);
716 ok(constant_desc.Type == D3DXPT_FLOAT, "Got result %x, expected %u (D3DXPT_FLOAT)\n",
717 constant_desc.Type, D3DXPT_FLOAT);
718 ok(constant_desc.Rows == 4, "Got result %x, expected 1\n", constant_desc.Rows);
719 ok(constant_desc.Columns == 4, "Got result %x, expected 4\n", constant_desc.Columns);
720 constant_desc_save = constant_desc; /* For GetConstantDesc test */
721
723 ok(constant == NULL, "Got result %p, expected NULL\n", constant);
724
725 /* Test GetConstantByName */
727 ok(constant == NULL, "Got result %p, expected NULL\n", constant);
729 ok(constant != NULL, "No constant found\n");
731 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
732 ok(!memcmp(&constant_desc, &constant_desc_save, sizeof(D3DXCONSTANT_DESC)), "Got different constant data\n");
733
734 /* Test GetConstantDesc */
736 ok(constant != NULL, "No constant found\n");
738 ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
740 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
742 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
743 hr = ID3DXConstantTable_GetConstantDesc(constant_table, "Constant unknown", &constant_desc, &nb);
744 ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
745 hr = ID3DXConstantTable_GetConstantDesc(constant_table, "Constant3", &constant_desc, &nb);
746 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
747 ok(!memcmp(&constant_desc, &constant_desc_save, sizeof(D3DXCONSTANT_DESC)), "Got different constant data\n");
748
750
752 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
753 ok(!!constant_table, "Unexpected constant table %p.\n", constant_table);
754
756 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
757 ok(!strcmp(desc.Creator, "Wine project"), "Unexpected Creator %s.\n", debugstr_a(desc.Creator));
758 ok(desc.Version == D3DVS_VERSION(3, 0), "Unexpected Version %#lx.\n", desc.Version);
759 ok(desc.Constants == 3, "Unexpected Constants %u.\n", desc.Constants);
760
762 ok(!!constant, "No constant found.\n");
764 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
765 ok(!strcmp(constant_desc.Name, "Constant1"), "Unexpected Name %s.\n", debugstr_a(constant_desc.Name));
766 ok(constant_desc.Class == D3DXPC_VECTOR, "Unexpected Class %u.\n", constant_desc.Class);
767 ok(constant_desc.Type == D3DXPT_FLOAT, "Unexpected Type %u.\n", constant_desc.Type);
768 ok(constant_desc.Rows == 1, "Unexpected Rows %u.\n", constant_desc.Rows);
769 ok(constant_desc.Columns == 4, "Unexpected Columns %u.\n", constant_desc.Columns);
770
771 if (0)
772 {
773 /* Native d3dx crashes with this. */
774 hr = ID3DXConstantTable_GetConstantDesc(constant_table, "Constant3", &constant_desc, &nb);
775 }
776
778
780 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
781 ok(!constant_table, "D3DXGetShaderConstantTableEx() returned a non-NULL constant table.\n");
782}
783
784static void test_constant_table(const char *test_name, const DWORD *ctable_fn,
785 const D3DXCONSTANT_DESC *expecteds, UINT count)
786{
787 UINT i;
788 ID3DXConstantTable *ctable;
789
790 HRESULT res;
791
792 /* Get the constant table from the shader itself */
794 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed on %s: got %08lx\n", test_name, res);
795
796 for (i = 0; i < count; i++)
797 {
798 const D3DXCONSTANT_DESC *expected = &expecteds[i];
799 D3DXHANDLE const_handle;
800 D3DXCONSTANT_DESC actual;
801 UINT pCount = 1;
802
804
805 res = ID3DXConstantTable_GetConstantDesc(ctable, const_handle, &actual, &pCount);
806 ok(SUCCEEDED(res), "%s in %s: ID3DXConstantTable_GetConstantDesc returned %08lx\n", expected->Name,
807 test_name, res);
808 ok(pCount == 1, "%s in %s: Got more or less descriptions: %d\n", expected->Name, test_name, pCount);
809
810 ok(strcmp(actual.Name, expected->Name) == 0,
811 "%s in %s: Got different names: Got %s, expected %s\n", expected->Name,
812 test_name, actual.Name, expected->Name);
813 ok(actual.RegisterSet == expected->RegisterSet,
814 "%s in %s: Got different register sets: Got %d, expected %d\n",
815 expected->Name, test_name, actual.RegisterSet, expected->RegisterSet);
816 ok(actual.RegisterIndex == expected->RegisterIndex,
817 "%s in %s: Got different register indices: Got %d, expected %d\n",
818 expected->Name, test_name, actual.RegisterIndex, expected->RegisterIndex);
819 ok(actual.RegisterCount == expected->RegisterCount,
820 "%s in %s: Got different register counts: Got %d, expected %d\n",
821 expected->Name, test_name, actual.RegisterCount, expected->RegisterCount);
822 ok(actual.Class == expected->Class,
823 "%s in %s: Got different classes: Got %d, expected %d\n", expected->Name,
824 test_name, actual.Class, expected->Class);
825 ok(actual.Type == expected->Type,
826 "%s in %s: Got different types: Got %d, expected %d\n", expected->Name,
827 test_name, actual.Type, expected->Type);
828 ok(actual.Rows == expected->Rows && actual.Columns == expected->Columns,
829 "%s in %s: Got different dimensions: Got (%d, %d), expected (%d, %d)\n",
830 expected->Name, test_name, actual.Rows, actual.Columns, expected->Rows,
831 expected->Columns);
832 ok(actual.Elements == expected->Elements,
833 "%s in %s: Got different element count: Got %d, expected %d\n",
834 expected->Name, test_name, actual.Elements, expected->Elements);
835 ok(actual.StructMembers == expected->StructMembers,
836 "%s in %s: Got different struct member count: Got %d, expected %d\n",
837 expected->Name, test_name, actual.StructMembers, expected->StructMembers);
838 ok(actual.Bytes == expected->Bytes,
839 "%s in %s: Got different byte count: Got %d, expected %d\n",
840 expected->Name, test_name, actual.Bytes, expected->Bytes);
841
842 if (!expected->DefaultValue)
843 {
844 ok(actual.DefaultValue == NULL,
845 "%s in %s: Got different default value: expected NULL\n",
846 expected->Name, test_name);
847 }
848 else
849 {
850 ok(actual.DefaultValue != NULL,
851 "%s in %s: Got different default value: expected non-NULL\n",
852 expected->Name, test_name);
853 ok(memcmp(actual.DefaultValue, expected->DefaultValue, expected->Bytes) == 0,
854 "%s in %s: Got different default value\n", expected->Name, test_name);
855 }
856 }
857
858 /* Finally, release the constant table */
860}
861
862static void test_constant_tables(void)
863{
876}
877
879{
880 static const D3DXMATRIX mvp = {{{
881 0.514f, 0.626f, 0.804f, 0.786f,
882 0.238f, 0.956f, 0.374f, 0.483f,
883 0.109f, 0.586f, 0.900f, 0.255f,
884 0.898f, 0.411f, 0.932f, 0.275f}}};
885 static const D3DXVECTOR4 f4 = {0.350f, 0.526f, 0.925f, 0.021f};
886 static const float f = 0.12543f;
887 static const int i = 321;
888 static const D3DXMATRIX *matrix_pointer[] = {&mvp};
889
890 ID3DXConstantTable *ctable;
891
892 HRESULT res;
893 float out[16];
894 ULONG refcnt;
895
896 /* Get the constant table from the shader itself */
898 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got 0x%08lx\n", res);
899
900 /* Set constants */
902 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable mvp: got 0x%08lx\n", res);
903
905 ok(res == D3D_OK, "ID3DXConstantTable_SetInt failed on variable i: got 0x%08lx\n", res);
906
907 /* Check that setting i again will overwrite the previous value */
909 ok(res == D3D_OK, "ID3DXConstantTable_SetInt failed on variable i: got 0x%08lx\n", res);
910
912 ok(res == D3D_OK, "ID3DXConstantTable_SetFloat failed on variable f: got 0x%08lx\n", res);
913
915 ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed on variable f4: got 0x%08lx\n", res);
916
917 /* Get constants back and validate */
919 ok(out[0] == mvp._11 && out[4] == mvp._12 && out[8] == mvp._13 && out[12] == mvp._14,
920 "The first row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
921 out[0], out[4], out[8], out[12], mvp._11, mvp._12, mvp._13, mvp._14);
922 ok(out[1] == mvp._21 && out[5] == mvp._22 && out[9] == mvp._23 && out[13] == mvp._24,
923 "The second row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
924 out[1], out[5], out[9], out[13], mvp._21, mvp._22, mvp._23, mvp._24);
925 ok(out[2] == mvp._31 && out[6] == mvp._32 && out[10] == mvp._33 && out[14] == mvp._34,
926 "The third row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
927 out[2], out[6], out[10], out[14], mvp._31, mvp._32, mvp._33, mvp._34);
928 ok(out[3] == mvp._41 && out[7] == mvp._42 && out[11] == mvp._43 && out[15] == mvp._44,
929 "The fourth row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
930 out[3], out[7], out[11], out[15], mvp._41, mvp._42, mvp._43, mvp._44);
931
933 ok(out[0] == (float)i && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
934 "The variable i was not set correctly, out={%f, %f, %f, %f}, should be {%d, 0.0, 0.0, 0.0}\n",
935 out[0], out[1], out[2], out[3], i);
936
938 ok(out[0] == f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
939 "The variable f was not set correctly, out={%f, %f, %f, %f}, should be {%f, 0.0, 0.0, 0.0}\n",
940 out[0], out[1], out[2], out[3], f);
941
943 ok(memcmp(out, &f4, sizeof(f4)) == 0,
944 "The variable f4 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
945 out[0], out[1], out[2], out[3], f4.x, f4.y, f4.z, f4.w);
946
947 /* Finally test using a set* function for one type to set a variable of another type (should succeed) */
949 ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed on variable f: 0x%08lx\n", res);
950
952 ok(out[0] == f4.x && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
953 "The variable f was not set correctly by ID3DXConstantTable_SetVector, got %f, should be %f\n",
954 out[0], f4.x);
955
956 memset(out, 0, sizeof(out));
959 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable f: 0x%08lx\n", res);
960
962 ok(out[0] == mvp._11 && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
963 "The variable f was not set correctly by ID3DXConstantTable_SetMatrix, got %f, should be %f\n",
964 out[0], mvp._11);
965
966 /* Clear registers */
967 memset(out, 0, sizeof(out));
971
972 /* SetVector shouldn't change the value of a matrix constant */
974 ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed on variable f: 0x%08lx\n", res);
975
977 ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f
978 && out[4] == 0.0f && out[5] == 0.0f && out[6] == 0.0f && out[7] == 0.0f
979 && out[8] == 0.0f && out[9] == 0.0f && out[10] == 0.0f && out[11] == 0.0f
980 && out[12] == 0.0f && out[13] == 0.0f && out[14] == 0.0f && out[15] == 0.0f,
981 "The variable mvp was not set correctly by ID3DXConstantTable_SetVector, "
982 "got {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f %f; %f, %f, %f, %f}, "
983 "should be all 0.0f\n",
984 out[0], out[1], out[2], out[3],
985 out[4], out[5], out[6], out[7],
986 out[8], out[9], out[10], out[11],
987 out[12], out[13], out[14], out[15]);
988
990 ok(res == D3D_OK, "ID3DXConstantTable_SetFloat failed on variable mvp: 0x%08lx\n", res);
991
993 ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f
994 && out[4] == 0.0f && out[5] == 0.0f && out[6] == 0.0f && out[7] == 0.0f
995 && out[8] == 0.0f && out[9] == 0.0f && out[10] == 0.0f && out[11] == 0.0f
996 && out[12] == 0.0f && out[13] == 0.0f && out[14] == 0.0f && out[15] == 0.0f,
997 "The variable mvp was not set correctly by ID3DXConstantTable_SetFloat, "
998 "got {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f %f; %f, %f, %f, %f}, "
999 "should be all 0.0f\n",
1000 out[0], out[1], out[2], out[3],
1001 out[4], out[5], out[6], out[7],
1002 out[8], out[9], out[10], out[11],
1003 out[12], out[13], out[14], out[15]);
1004
1006 ok(res == D3D_OK, "ID3DXConstantTable_SetFloat failed on variable f4: 0x%08lx\n", res);
1007
1009 ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
1010 "The variable f4 was not set correctly by ID3DXConstantTable_SetFloat, "
1011 "got {%f, %f, %f, %f}, should be all 0.0f\n",
1012 out[0], out[1], out[2], out[3]);
1013
1015 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable f: 0x%08lx\n", res);
1016
1018 ok(out[0] == mvp._11 && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
1019 "The variable f was not set correctly by ID3DXConstantTable_SetMatrixTranspose, got %f, should be %f\n",
1020 out[0], mvp._11);
1021
1023 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable f4: 0x%08lx\n", res);
1024
1026 ok(out[0] == mvp._11 && out[1] == mvp._21 && out[2] == mvp._31 && out[3] == mvp._41,
1027 "The variable f4 was not set correctly by ID3DXConstantTable_SetMatrixTranspose, "
1028 "got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1029 out[0], out[1], out[2], out[3],
1030 mvp._11, mvp._21, mvp._31, mvp._41);
1031
1032 memset(out, 0, sizeof(out));
1034 res = ID3DXConstantTable_SetMatrixPointerArray(ctable, device, "f", matrix_pointer, 1);
1035 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable f: got %#lx\n", res);
1036
1038 ok(out[0] == mvp._11 && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
1039 "The variable f was not set correctly by ID3DXConstantTable_SetMatrixPointerArray, "
1040 "got %f, should be %f\n",
1041 out[0], mvp._11);
1042
1043 res = ID3DXConstantTable_SetMatrixPointerArray(ctable, device, "f4", matrix_pointer, 1);
1044 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable f4: got %#lx\n", res);
1045
1047 ok(out[0] == mvp._11 && out[1] == mvp._12 && out[2] == mvp._13 && out[3] == mvp._14,
1048 "The variable f4 was not set correctly by ID3DXConstantTable_SetMatrixPointerArray, "
1049 "got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1050 out[0], out[1], out[2], out[3],
1051 mvp._11, mvp._12, mvp._13, mvp._14);
1052
1053 memset(out, 0, sizeof(out));
1056 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable f: got %#lx\n", res);
1057
1059 ok(out[0] == mvp._11 && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
1060 "The variable f was not set correctly by ID3DXConstantTable_SetMatrixTransposePointerArray, "
1061 "got %f, should be %f\n",
1062 out[0], mvp._11);
1063
1065 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable f4: got %#lx\n", res);
1066
1068 ok(out[0] == mvp._11 && out[1] == mvp._21 && out[2] == mvp._31 && out[3] == mvp._41,
1069 "The variable f4 was not set correctly by ID3DXConstantTable_SetMatrixTransposePointerArray, "
1070 "got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1071 out[0], out[1], out[2], out[3],
1072 mvp._11, mvp._21, mvp._31, mvp._41);
1073
1075 ok(refcnt == 0, "The constant table reference count was %lu, should be 0\n", refcnt);
1076}
1077
1079{
1080 static const D3DXMATRIX fmatrix =
1081 {{{2.001f, 1.502f, 9.003f, 1.004f,
1082 5.005f, 3.006f, 3.007f, 6.008f,
1083 9.009f, 5.010f, 7.011f, 1.012f,
1084 5.013f, 5.014f, 5.015f, 9.016f}}};
1085 static const D3DXMATRIX *matrix_pointer[] = {&fmatrix};
1086
1087 ID3DXConstantTable *ctable;
1088
1089 HRESULT res;
1090 float out[32];
1091
1093 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %#lx\n", res);
1094
1095 res = ID3DXConstantTable_SetMatrix(ctable, device, "imatrix2x3", &fmatrix);
1096 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable imatrix2x3: got %#lx\n", res);
1097
1098 res = ID3DXConstantTable_SetMatrix(ctable, device, "fmatrix3x1", &fmatrix);
1099 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable fmatrix3x1: got %#lx\n", res);
1100
1102 ok(out[0] == (int)fmatrix._11 && out[1] == (int)fmatrix._12 && out[2] == (int)fmatrix._13
1103 && out[3] == 0
1104 && out[4] == (int)fmatrix._21 && out[5] == (int)fmatrix._22 && out[6] == (int)fmatrix._23
1105 && out[7] == 0,
1106 "The variable imatrix2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
1107 "should be {%d, %d, %d, %d; %d, %d, %d, %d}\n",
1108 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1109 (int)fmatrix._11, (int)fmatrix._12, (int)fmatrix._13, 0,
1110 (int)fmatrix._21, (int)fmatrix._22, (int)fmatrix._23, 0);
1111
1113 ok(out[0] == fmatrix._11 && out[1] == fmatrix._21 && out[2] == fmatrix._31 && out[3] == 0.0f,
1114 "The variable fmatrix3x1 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1115 out[0], out[1], out[2], out[3],
1116 fmatrix._11, fmatrix._21, fmatrix._31, 0.0f);
1117
1119
1121 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %#lx\n", res);
1122
1123 /* SetMatrix */
1124 res = ID3DXConstantTable_SetMatrix(ctable, device, "c2x3", &fmatrix);
1125 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable c2x3: got %#lx\n", res);
1126
1127 res = ID3DXConstantTable_SetMatrix(ctable, device, "r2x3", &fmatrix);
1128 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable r2x3: got %#lx\n", res);
1129
1130 res = ID3DXConstantTable_SetMatrix(ctable, device, "c3x2", &fmatrix);
1131 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable c3x2: got %#lx\n", res);
1132
1133 res = ID3DXConstantTable_SetMatrix(ctable, device, "r3x2", &fmatrix);
1134 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable r3x2: got %#lx\n", res);
1135
1136 res = ID3DXConstantTable_SetMatrix(ctable, device, "c3x3", &fmatrix);
1137 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable c3x3: got %#lx\n", res);
1138
1140 ok(out[0] == fmatrix._11 && out[1] == fmatrix._21 && out[2] == 0.0f && out[3] == 0.0f
1141 && out[4] == fmatrix._12 && out[5] == fmatrix._22 && out[6] == 0.0f && out[7] == 0.0f
1142 && out[8] == fmatrix._13 && out[9] == fmatrix._23 && out[10] == 0.0f && out[11] == 0.0f,
1143 "The variable c2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1144 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1145 out[0], out[1], out[2], out[3],
1146 out[4], out[5], out[6], out[7],
1147 out[8], out[9], out[10], out[11],
1148 fmatrix._11, fmatrix._21, 0.0f, 0.0f,
1149 fmatrix._12, fmatrix._22, 0.0f, 0.0f,
1150 fmatrix._13, fmatrix._23, 0.0f, 0.0f);
1151
1152 res = ID3DXConstantTable_SetMatrix(ctable, device, "r4x4", &fmatrix);
1153 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable r4x4: got %#lx\n", res);
1154
1156 ok(out[0] == fmatrix._11 && out[1] == fmatrix._12 && out[2] == fmatrix._13 && out[3] == 0.0f
1157 && out[4] == fmatrix._21 && out[5] == fmatrix._22 && out[6] == fmatrix._23 && out[7] == 0.0f,
1158 "The variable r2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
1159 "should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
1160 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1161 fmatrix._11, fmatrix._12, fmatrix._13, 0.0f,
1162 fmatrix._21, fmatrix._22, fmatrix._23, 0.0f);
1163
1165 ok(out[0] == fmatrix._11 && out[1] == fmatrix._21 && out[2] == fmatrix._31 && out[3] == 0.0f
1166 && out[4] == fmatrix._12 && out[5] == fmatrix._22 && out[6] == fmatrix._32 && out[7] == 0.0f,
1167 "The variable c3x2 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
1168 "should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
1169 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1170 fmatrix._11, fmatrix._21, fmatrix._31, 0.0f,
1171 fmatrix._12, fmatrix._22, fmatrix._32, 0.0f);
1172
1174 ok(out[0] == fmatrix._11 && out[1] == fmatrix._12 && out[2] == 0.0f && out[3] == 0.0f
1175 && out[4] == fmatrix._21 && out[5] == fmatrix._22 && out[6] == 0.0f && out[7] == 0.0f
1176 && out[8] == fmatrix._31 && out[9] == fmatrix._32 && out[10] == 0.0f && out[11] == 0.0f,
1177 "The variable r3x2 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1178 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1179 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7], out[8], out[9], out[10], out[11],
1180 fmatrix._11, fmatrix._12, 0.0f, 0.0f,
1181 fmatrix._21, fmatrix._22, 0.0f, 0.0f,
1182 fmatrix._31, fmatrix._32, 0.0f, 0.0f);
1183
1185 ok(out[0] == fmatrix._11 && out[1] == fmatrix._21 && out[2] == fmatrix._31 && out[3] == 0.0f
1186 && out[4] == fmatrix._12 && out[5] == fmatrix._22 && out[6] == fmatrix._32 && out[7] == 0.0f
1187 && out[8] == fmatrix._13 && out[9] == fmatrix._23 && out[10] == fmatrix._33 && out[11] == 0.0f,
1188 "The variable c3x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1189 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1190 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7], out[8], out[9], out[10], out[11],
1191 fmatrix._11, fmatrix._21, fmatrix._31, 0.0f,
1192 fmatrix._12, fmatrix._22, fmatrix._32, 0.0f,
1193 fmatrix._13, fmatrix._23, fmatrix._33, 0.0f);
1194
1196 ok(out[0] == fmatrix._11 && out[1] == fmatrix._12 && out[2] == fmatrix._13 && out[3] == fmatrix._14
1197 && out[4] == fmatrix._21 && out[5] == fmatrix._22 && out[6] == fmatrix._23 && out[7] == fmatrix._24
1198 && out[8] == fmatrix._31 && out[9] == fmatrix._32 && out[10] == fmatrix._33 && out[11] == fmatrix._34
1199 && out[12] == fmatrix._41 && out[13] == fmatrix._42 && out[14] == fmatrix._43 && out[15] == fmatrix._44,
1200 "The variable r4x4 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1201 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1202 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1203 out[8], out[9], out[10], out[11], out[12], out[13], out[14], out[15],
1204 fmatrix._11, fmatrix._12, fmatrix._13, fmatrix._14,
1205 fmatrix._21, fmatrix._22, fmatrix._23, fmatrix._24,
1206 fmatrix._31, fmatrix._32, fmatrix._33, fmatrix._34,
1207 fmatrix._41, fmatrix._42, fmatrix._43, fmatrix._44);
1208
1209 /* SetMatrixTranspose */
1211 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable c2x3: got %#lx\n", res);
1212
1214 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable r2x3: got %#lx\n", res);
1215
1217 ok(out[0] == fmatrix._11 && out[1] == fmatrix._12 && out[2] == 0.0f && out[3] == 0.0f
1218 && out[4] == fmatrix._21 && out[5] == fmatrix._22 && out[6] == 0.0f && out[7] == 0.0f
1219 && out[8] == fmatrix._31 && out[9] == fmatrix._32 && out[10] == 0.0f && out[11] == 0.0f,
1220 "The variable c2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1221 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1222 out[0], out[1], out[2], out[3],
1223 out[4], out[5], out[6], out[7],
1224 out[8], out[9], out[10], out[11],
1225 fmatrix._11, fmatrix._12, 0.0f, 0.0f,
1226 fmatrix._21, fmatrix._22, 0.0f, 0.0f,
1227 fmatrix._31, fmatrix._32, 0.0f, 0.0f);
1228
1230 ok(out[0] == fmatrix._11 && out[1] == fmatrix._21 && out[2] == fmatrix._31 && out[3] == 0.0f
1231 && out[4] == fmatrix._12 && out[5] == fmatrix._22 && out[6] == fmatrix._32 && out[7] == 0.0f,
1232 "The variable r2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
1233 "should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
1234 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1235 fmatrix._11, fmatrix._21, fmatrix._31, 0.0f,
1236 fmatrix._12, fmatrix._22, fmatrix._32, 0.0f);
1237
1238 /* SetMatrixPointerArray */
1239 res = ID3DXConstantTable_SetMatrixPointerArray(ctable, device, "c2x3", matrix_pointer, 1);
1240 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable c2x3: got %#lx\n", res);
1241
1242 res = ID3DXConstantTable_SetMatrixPointerArray(ctable, device, "r2x3", matrix_pointer, 1);
1243 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable r2x3: got %#lx\n", res);
1244
1246 ok(out[0] == fmatrix._11 && out[1] == fmatrix._21 && out[2] == 0.0f && out[3] == 0.0f
1247 && out[4] == fmatrix._12 && out[5] == fmatrix._22 && out[6] == 0.0f && out[7] == 0.0f
1248 && out[8] == fmatrix._13 && out[9] == fmatrix._23 && out[10] == 0.0f && out[11] == 0.0f,
1249 "The variable c2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1250 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1251 out[0], out[1], out[2], out[3],
1252 out[4], out[5], out[6], out[7],
1253 out[8], out[9], out[10], out[11],
1254 fmatrix._11, fmatrix._21, 0.0f, 0.0f,
1255 fmatrix._12, fmatrix._22, 0.0f, 0.0f,
1256 fmatrix._13, fmatrix._23, 0.0f, 0.0f);
1257
1259 ok(out[0] == fmatrix._11 && out[1] == fmatrix._12 && out[2] == fmatrix._13 && out[3] == 0.0f
1260 && out[4] == fmatrix._21 && out[5] == fmatrix._22 && out[6] == fmatrix._23 && out[7] == 0.0f,
1261 "The variable r2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
1262 "should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
1263 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1264 fmatrix._11, fmatrix._12, fmatrix._13, 0.0f,
1265 fmatrix._21, fmatrix._22, fmatrix._23, 0.0f);
1266
1267 /* SetMatrixTransposePointerArray */
1269 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable c2x3: got %#lx\n", res);
1270
1272 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable r2x3: got %#lx\n", res);
1273
1275 ok(out[0] == fmatrix._11 && out[1] == fmatrix._12 && out[2] == 0.0f && out[3] == 0.0f
1276 && out[4] == fmatrix._21 && out[5] == fmatrix._22 && out[6] == 0.0f && out[7] == 0.0f
1277 && out[8] == fmatrix._31 && out[9] == fmatrix._32 && out[10] == 0.0f && out[11] == 0.0f,
1278 "The variable c2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1279 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1280 out[0], out[1], out[2], out[3],
1281 out[4], out[5], out[6], out[7],
1282 out[8], out[9], out[10], out[11],
1283 fmatrix._11, fmatrix._12, 0.0f, 0.0f,
1284 fmatrix._21, fmatrix._22, 0.0f, 0.0f,
1285 fmatrix._31, fmatrix._32, 0.0f, 0.0f);
1286
1288 ok(out[0] == fmatrix._11 && out[1] == fmatrix._21 && out[2] == fmatrix._31 && out[3] == 0.0f
1289 && out[4] == fmatrix._12 && out[5] == fmatrix._22 && out[6] == fmatrix._32 && out[7] == 0.0f,
1290 "The variable r2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
1291 "should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
1292 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1293 fmatrix._11, fmatrix._21, fmatrix._31, 0.0f,
1294 fmatrix._12, fmatrix._22, fmatrix._32, 0.0f);
1295
1297}
1298
1300{
1301 static const float farray[8] = {
1302 0.005f, 0.745f, 0.973f, 0.264f,
1303 0.010f, 0.020f, 0.030f, 0.040f};
1304 static const D3DXMATRIX fmtxarray[2] = {
1305 {{{0.001f, 0.002f, 0.003f, 0.004f,
1306 0.005f, 0.006f, 0.007f, 0.008f,
1307 0.009f, 0.010f, 0.011f, 0.012f,
1308 0.013f, 0.014f, 0.015f, 0.016f}}},
1309 {{{0.010f, 0.020f, 0.030f, 0.040f,
1310 0.050f, 0.060f, 0.070f, 0.080f,
1311 0.090f, 0.100f, 0.110f, 0.120f,
1312 0.130f, 0.140f, 0.150f, 0.160f}}}};
1313 static const int iarray[4] = {1, 2, 3, 4};
1314 static const D3DXVECTOR4 fvecarray[2] = {
1315 {0.745f, 0.997f, 0.353f, 0.237f},
1316 {0.060f, 0.455f, 0.333f, 0.983f}};
1317 static BOOL barray[4] = {FALSE, 100, TRUE, TRUE};
1318
1319 ID3DXConstantTable *ctable;
1320
1321 HRESULT res;
1322 float out[32];
1323 ULONG refcnt;
1324
1325 /* Clear registers */
1326 memset(out, 0, sizeof(out));
1329
1330 /* Get the constant table from the shader */
1332 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got 0x%08lx\n", res);
1333
1334 /* Set constants */
1335
1336 /* Make sure that we cannot set registers that do not belong to this constant */
1337 res = ID3DXConstantTable_SetFloatArray(ctable, device, "farray", farray, 8);
1338 ok(res == D3D_OK, "ID3DXConstantTable_SetFloatArray failed: got 0x%08lx\n", res);
1339
1341 ok(out[0] == farray[0] && out[4] == farray[1] && out[8] == farray[2] && out[12] == farray[3],
1342 "The in-bounds elements of the array were not set, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1343 out[0], out[4], out[8], out[12], farray[0], farray[1], farray[2], farray[3]);
1344 ok(out[16] == 0.0f && out[20] == 0.0f && out[24] == 0.0f && out[28] == 0.0f,
1345 "The excess elements of the array were set, out={%f, %f, %f, %f}, should be all 0.0f\n",
1346 out[16], out[20], out[24], out[28]);
1347
1348 /* ivecarray takes up only 1 register, but a matrix takes up 4, so no elements should be set */
1349 res = ID3DXConstantTable_SetMatrix(ctable, device, "ivecarray", &fmtxarray[0]);
1350 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed: got 0x%08lx\n", res);
1351
1353 ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
1354 "The array was set, out={%f, %f, %f, %f}, should be all 0.0f\n", out[0], out[1], out[2], out[3]);
1355
1356 /* Try setting an integer array to an array declared as a float array */
1357 res = ID3DXConstantTable_SetIntArray(ctable, device, "farray", iarray, 4);
1358 ok(res == D3D_OK, "ID3DXConstantTable_SetIntArray failed: got 0x%08lx\n", res);
1359
1361 ok(out[0] == iarray[0] && out[4] == iarray[1] && out[8] == iarray[2] && out[12] == iarray[3],
1362 "SetIntArray did not properly set a float array: out={%f, %f, %f, %f}, should be {%d, %d, %d, %d}\n",
1363 out[0], out[4], out[8], out[12], iarray[0], iarray[1], iarray[2], iarray[3]);
1364
1365 res = ID3DXConstantTable_SetFloatArray(ctable, device, "farray", farray, 4);
1366 ok(res == D3D_OK, "ID3DXConstantTable_SetFloatArray failed: got x0%08lx\n", res);
1367
1368 res = ID3DXConstantTable_SetVectorArray(ctable, device, "fvecarray", fvecarray, 2);
1369 ok(res == D3D_OK, "ID3DXConstantTable_SetVectorArray failed: got 0x%08lx\n", res);
1370
1371 res = ID3DXConstantTable_SetMatrixArray(ctable, device, "fmtxarray", fmtxarray, 2);
1372 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixArray failed: got 0x%08lx\n", res);
1373
1374 res = ID3DXConstantTable_SetBoolArray(ctable, device, "barray", barray, 2);
1375 ok(res == D3D_OK, "ID3DXConstantTable_SetBoolArray failed: got 0x%08lx\n", res);
1376
1377 /* Read back constants */
1379 ok(out[0] == farray[0] && out[4] == farray[1] && out[8] == farray[2] && out[12] == farray[3],
1380 "The variable farray was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1381 out[0], out[4], out[8], out[12], farray[0], farray[1], farray[2], farray[3]);
1382
1384 ok(out[0] == fvecarray[0].x && out[1] == fvecarray[0].y && out[2] == fvecarray[0].z && out[3] == fvecarray[0].w &&
1385 out[4] == fvecarray[1].x && out[5] == fvecarray[1].y && out[6] == fvecarray[1].z && out[7] == fvecarray[1].w,
1386 "The variable fvecarray was not set correctly, out={{%f, %f, %f, %f}, {%f, %f, %f, %f}}, should be "
1387 "{{%f, %f, %f, %f}, {%f, %f, %f, %f}}\n", out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1388 fvecarray[0].x, fvecarray[0].y, fvecarray[0].z, fvecarray[0].w, fvecarray[1].x, fvecarray[1].y,
1389 fvecarray[1].z, fvecarray[1].w);
1390
1392 ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f
1393 && out[4] == 1.0f && out[5] == 0.0f && out[6] == 0.0f && out[7] == 0.0f,
1394 "The variable barray was not set correctly, out={%f, %f %f, %f; %f, %f, %f, %f}, should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
1395 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1396 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f);
1397
1399 /* Just check a few elements in each matrix to make sure fmtxarray was set row-major */
1400 ok(out[0] == fmtxarray[0]._11 && out[1] == fmtxarray[0]._12 && out[2] == fmtxarray[0]._13 && out[3] == fmtxarray[0]._14,
1401 "The variable fmtxarray was not set row-major, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1402 out[0], out[1], out[2], out[3], fmtxarray[0]._11, fmtxarray[0]._12, fmtxarray[0]._13, fmtxarray[0]._14);
1403 ok(out[16] == fmtxarray[1]._11 && out[17] == fmtxarray[1]._12 && out[18] == fmtxarray[1]._13 && out[19] == fmtxarray[1]._14,
1404 "The variable fmtxarray was not set row-major, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1405 out[16], out[17], out[18], out[19], fmtxarray[1]._11, fmtxarray[1]._12, fmtxarray[1]._13, fmtxarray[1]._14);
1406
1408 ok(refcnt == 0, "The constant table reference count was %lu, should be 0\n", refcnt);
1409}
1410
1412{
1413 static const D3DXMATRIX mvp = {{{
1414 0.51f, 0.62f, 0.80f, 0.78f,
1415 0.23f, 0.95f, 0.37f, 0.48f,
1416 0.10f, 0.58f, 0.90f, 0.25f,
1417 0.89f, 0.41f, 0.93f, 0.27f}}};
1418 static const D3DXVECTOR4 f4 = {0.2f, 0.4f, 0.8f, 1.2f};
1419
1420 float out[16];
1421
1422 HRESULT res;
1423 ID3DXConstantTable *ctable;
1424
1426 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
1427
1429 ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed: got %08lx\n", res);
1430
1432 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed: got %08lx\n", res);
1433
1435 ok(res == D3D_OK, "ID3dXConstantTable_SetDefaults failed: got %08lx\n", res);
1436
1437 /* SetDefaults doesn't change constants without default values */
1439 ok(out[0] == mvp._11 && out[4] == mvp._12 && out[8] == mvp._13 && out[12] == mvp._14,
1440 "The first row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1441 out[0], out[4], out[8], out[12], mvp._11, mvp._12, mvp._13, mvp._14);
1442 ok(out[1] == mvp._21 && out[5] == mvp._22 && out[9] == mvp._23 && out[13] == mvp._24,
1443 "The second row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1444 out[1], out[5], out[9], out[13], mvp._21, mvp._22, mvp._23, mvp._24);
1445 ok(out[2] == mvp._31 && out[6] == mvp._32 && out[10] == mvp._33 && out[14] == mvp._34,
1446 "The third row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1447 out[2], out[6], out[10], out[14], mvp._31, mvp._32, mvp._33, mvp._34);
1448 ok(out[3] == mvp._41 && out[7] == mvp._42 && out[11] == mvp._43 && out[15] == mvp._44,
1449 "The fourth row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1450 out[3], out[7], out[11], out[15], mvp._41, mvp._42, mvp._43, mvp._44);
1451
1453 ok(memcmp(out, &f4, sizeof(f4)) == 0,
1454 "The variable f4 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1455 out[0], out[1], out[2], out[3], f4.x, f4.y, f4.z, f4.w);
1456
1458
1460 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
1461
1463 ok(res == D3D_OK, "ID3DXConstantTable_SetDefaults failed: got %08lx\n", res);
1464
1467 "The variable mat4 was not set correctly to default value\n");
1468
1471 "The variable mat3 was not set correctly to default value\n");
1472
1475 "The variable array was not set correctly to default value\n");
1476
1479 "The variable vec4 was not set correctly to default value\n");
1480
1483 "The variable flt was not set correctly to default value\n");
1484
1486}
1487
1489{
1490 static const D3DXMATRIX mvp = {{{
1491 0.51f, 0.62f, 0.80f, 0.78f,
1492 0.23f, 0.95f, 0.37f, 0.48f,
1493 0.10f, 0.58f, 0.90f, 0.25f,
1494 0.89f, 0.41f, 0.93f, 0.27f}}};
1495 static const D3DXVECTOR4 f4 = {0.2f, 0.4f, 0.8f, 1.2f};
1496 static const FLOAT arr[] = {0.33f, 0.55f, 0.96f, 1.00f,
1497 1.00f, 1.00f, 1.00f, 1.00f,
1498 1.00f, 1.00f, 1.00f, 1.00f};
1499 static int imatrix[] = {1, 2, 3, 4, 5, 6};
1500 static float fmatrix[] = {1.1f, 2.2f, 3.3f, 4.4f};
1501 static BOOL barray[] = {TRUE, FALSE};
1502 static float fvecarray[] = {9.1f, 9.2f, 9.3f, 9.4f, 9.5f, 9.6f, 9.7f, 9.8f};
1503 static float farray[] = {2.2f, 3.3f};
1504
1505 static const float def[16] = {5.5f, 5.5f, 5.5f, 5.5f,
1506 5.5f, 5.5f, 5.5f, 5.5f,
1507 5.5f, 5.5f, 5.5f, 5.5f,
1508 5.5f, 5.5f, 5.5f, 5.5f};
1509 float out[16];
1510
1511 HRESULT res;
1512 ID3DXConstantTable *ctable;
1513
1515 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
1516
1518
1519 /* SetValue called with 0 bytes size doesn't change value */
1521 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1522
1524 ok(memcmp(out, def, sizeof(f4)) == 0,
1525 "The variable f4 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1526 out[0], out[1], out[2], out[3], def[0], def[1], def[2], def[3]);
1527
1528 res = ID3DXConstantTable_SetValue(ctable, device, "f4", &f4, sizeof(f4));
1529 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1530
1532 ok(memcmp(out, &f4, sizeof(f4)) == 0,
1533 "The variable f4 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1534 out[0], out[1], out[2], out[3], f4.x, f4.y, f4.z, f4.w);
1535
1537
1538 /* SetValue called with size smaller than constant size doesn't change value */
1539 res = ID3DXConstantTable_SetValue(ctable, device, "mvp", &mvp, sizeof(mvp) / 2);
1540 ok(res == D3D_OK, "ID3DXConstantTable_SetValue returned %08lx\n", res);
1541
1543 ok(memcmp(out, def, sizeof(def)) == 0,
1544 "The variable mvp was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1545 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1546 out[0], out[4], out[ 8], out[12],
1547 out[1], out[5], out[ 9], out[13],
1548 out[2], out[6], out[10], out[14],
1549 out[3], out[7], out[11], out[15],
1550 def[0], def[4], def[ 8], def[12],
1551 def[1], def[5], def[ 9], def[13],
1552 def[2], def[6], def[10], def[14],
1553 def[3], def[7], def[11], def[15]);
1554
1555 res = ID3DXConstantTable_SetValue(ctable, device, "mvp", &mvp, sizeof(mvp));
1556 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1557
1559 ok(out[0] == mvp._11 && out[4] == mvp._12 && out[8] == mvp._13 && out[12] == mvp._14,
1560 "The first row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1561 out[0], out[4], out[8], out[12], mvp._11, mvp._12, mvp._13, mvp._14);
1562 ok(out[1] == mvp._21 && out[5] == mvp._22 && out[9] == mvp._23 && out[13] == mvp._24,
1563 "The second row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1564 out[1], out[5], out[9], out[13], mvp._21, mvp._22, mvp._23, mvp._24);
1565 ok(out[2] == mvp._31 && out[6] == mvp._32 && out[10] == mvp._33 && out[14] == mvp._34,
1566 "The third row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1567 out[2], out[6], out[10], out[14], mvp._31, mvp._32, mvp._33, mvp._34);
1568 ok(out[3] == mvp._41 && out[7] == mvp._42 && out[11] == mvp._43 && out[15] == mvp._44,
1569 "The fourth row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1570 out[3], out[7], out[11], out[15], mvp._41, mvp._42, mvp._43, mvp._44);
1571
1573
1575 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
1576
1577 res = ID3DXConstantTable_SetValue(ctable, device, "arr", arr, sizeof(arr));
1578 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1579
1581 ok(out[0] == arr[0] && out[4] == arr[1] && out[8] == arr[2]
1582 && out[1] == 0 && out[2] == 0 && out[3] == 0 && out[5] == 0 && out[6] == 0 && out[7] == 0
1583 && out[9] == 0 && out[10] == 0 && out[11] == 0,
1584 "The variable arr was not set correctly, out={%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f}, "
1585 "should be {0.33, 0, 0, 0, 0.55, 0, 0, 0, 0.96, 0, 0, 0}\n",
1586 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7], out[8], out[9], out[10], out[11]);
1587
1589
1591 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
1592
1593 res = ID3DXConstantTable_SetValue(ctable, device, "fmatrix3x1", fmatrix, sizeof(fmatrix));
1594 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1595
1596 res = ID3DXConstantTable_SetValue(ctable, device, "imatrix2x3", imatrix, sizeof(imatrix));
1597 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1598
1600 ok(out[0] == imatrix[0] && out[1] == imatrix[1] && out[2] == imatrix[2] && out[3] == 0.0f
1601 && out[4] == imatrix[3] && out[5] == imatrix[4] && out[6] == imatrix[5] && out[7] == 0.0f,
1602 "The variable imatrix2x3 was not set correctly, out={%f, %f, %f, %f, %f, %f, %f, %f}, "
1603 "should be {%d, %d, %d, 0, %d, %d, %d, 0}\n",
1604 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1605 imatrix[0], imatrix[1], imatrix[2], imatrix[3], imatrix[4], imatrix[5]);
1606
1608 ok(out[0] == fmatrix[0] && out[1] == fmatrix[1] && out[2] == fmatrix[2] && out[3] == 0.0f,
1609 "The variable fmatrix3x1 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1610 out[0], out[1] ,out[2], out[4],
1611 fmatrix[0], fmatrix[1], fmatrix[2], 0.0f);
1612
1614
1616 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
1617
1618 res = ID3DXConstantTable_SetValue(ctable, device, "barray", barray, sizeof(barray));
1619 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1620
1621 res = ID3DXConstantTable_SetValue(ctable, device, "fvecarray", fvecarray, sizeof(fvecarray));
1622 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1623
1625 res = ID3DXConstantTable_SetValue(ctable, device, "farray", farray, sizeof(farray));
1626 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1627
1628 /* 2 elements of farray were set */
1630 ok(out[0] == farray[0] && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f
1631 && out[4] == farray[1] && out[5] == 0.0f && out[6] == 0.0f && out[7] == 0.0f
1632 && out[8] == def[8] && out[9] == def[9] && out[10] == def[10] && out[11] == def[11]
1633 && out[12] == def[12] && out[13] == def[13] && out[14] == def[14] && out[15] == def[15],
1634 "The variable farray was not set correctly, should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1635 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1636 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1637 out[8], out[9], out[10], out[11], out[12], out[13], out[14], out[15],
1638 farray[0], 0.0f, 0.0f, 0.0f,
1639 farray[1], 0.0f, 0.0f, 0.0f,
1640 def[8], def[9], def[10], def[11],
1641 def[12], def[13], def[14], def[15]);
1642
1644 ok(out[0] == fvecarray[0] && out[1] == fvecarray[1] && out[2] == fvecarray[2] && out[3] == fvecarray[3]
1645 && out[4] == fvecarray[4] && out[5] == fvecarray[5] && out[6] == fvecarray[6] && out[7] == fvecarray[7],
1646 "The variable fvecarray was not set correctly, out ={%f, %f, %f, %f, %f, %f, %f, %f}, "
1647 "should be {%f, %f, %f, %f, %f, %f, %f, %f}\n",
1648 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1649 fvecarray[0], fvecarray[1], fvecarray[2], fvecarray[3], fvecarray[4], fvecarray[5], fvecarray[6], fvecarray[7]);
1650
1652 ok(out[0] == 1.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f
1653 && out[4] == 0.0f && out[5] == 0.0f && out[6] == 0.0f && out[7] == 0.0f,
1654 "The variable barray was not set correctly, out={%f, %f, %f, %f, %f, %f, %f, %f}, "
1655 "should be {%f, %f, %f, %f, %f, %f, %f, %f}\n",
1656 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1657 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
1658
1660}
1661
1662static void test_setting_constants(void)
1663{
1664 HWND wnd;
1665 IDirect3D9 *d3d;
1668 HRESULT hr;
1669 ULONG refcnt;
1670
1671 if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0,
1672 640, 480, NULL, NULL, NULL, NULL)))
1673 {
1674 skip("Couldn't create application window\n");
1675 return;
1676 }
1677 if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
1678 {
1679 skip("Couldn't create IDirect3D9 object\n");
1680 DestroyWindow(wnd);
1681 return;
1682 }
1683
1684 ZeroMemory(&d3dpp, sizeof(d3dpp));
1685 d3dpp.Windowed = TRUE;
1688 if (FAILED(hr))
1689 {
1690 skip("Failed to create IDirect3DDevice9 object %#lx\n", hr);
1691 IDirect3D9_Release(d3d);
1692 DestroyWindow(wnd);
1693 return;
1694 }
1695
1701
1702 /* Release resources */
1704 ok(refcnt == 0, "The Direct3D device reference count was %lu, should be 0\n", refcnt);
1705
1706 refcnt = IDirect3D9_Release(d3d);
1707 ok(refcnt == 0, "The Direct3D object reference count was %lu, should be 0\n", refcnt);
1708
1709 if (wnd) DestroyWindow(wnd);
1710}
1711
1712static void test_get_sampler_index(void)
1713{
1714 ID3DXConstantTable *ctable;
1715
1716 HRESULT res;
1717 UINT index;
1718
1719 ULONG refcnt;
1720
1722 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed on ctab_samplers: got %08lx\n", res);
1723
1725 ok(index == 0, "ID3DXConstantTable_GetSamplerIndex returned wrong index: Got %d, expected 0\n", index);
1726
1728 ok(index == 3, "ID3DXConstantTable_GetSamplerIndex returned wrong index: Got %d, expected 3\n", index);
1729
1731 ok(index == -1, "ID3DXConstantTable_GetSamplerIndex found nonexistent sampler: Got %d\n",
1732 index);
1733
1735 ok(index == -1, "ID3DXConstantTable_GetSamplerIndex succeeded on non-sampler constant: Got %d\n",
1736 index);
1737
1739 ok(refcnt == 0, "The ID3DXConstantTable reference count was %lu, should be 0\n", refcnt);
1740}
1741
1742/*
1743 * fxc.exe /Tps_3_0
1744 */
1745#if 0
1746sampler s;
1747sampler1D s1D;
1748sampler2D s2D;
1749sampler3D s3D;
1750samplerCUBE scube;
1751float4 init;
1752float4 main(float3 tex : TEXCOORD0) : COLOR
1753{
1754 float4 tmp = init;
1755 tmp = tmp + tex1D(s1D, tex.x);
1756 tmp = tmp + tex1D(s1D, tex.y);
1757 tmp = tmp + tex3D(s3D, tex.xyz);
1758 tmp = tmp + tex1D(s, tex.x);
1759 tmp = tmp + tex2D(s2D, tex.xy);
1760 tmp = tmp + texCUBE(scube, tex.xyz);
1761 return tmp;
1762}
1763#endif
1765{
1766 0xffff0300, /* ps_3_0 */
1767 0x0054fffe, FCC_CTAB, /* CTAB comment */
1768 0x0000001c, 0x0000011b, 0xffff0300, 0x00000006, 0x0000001c, 0x00000100, /* Header */
1769 0x00000114,
1770 0x00000094, 0x00000002, 0x00000001, 0x0000009c, 0x00000000, /* Constant 1 desc (init) */
1771 0x000000ac, 0x00040003, 0x00000001, 0x000000b0, 0x00000000, /* Constant 2 desc (s) */
1772 0x000000c0, 0x00000003, 0x00000001, 0x000000c4, 0x00000000, /* Constant 3 desc (s1D) */
1773 0x000000d4, 0x00010003, 0x00000001, 0x000000d8, 0x00000000, /* Constant 4 desc (s2D) */
1774 0x000000e8, 0x00030003, 0x00000001, 0x000000ec, 0x00000000, /* Constant 5 desc (s3D) */
1775 0x000000fc, 0x00020003, 0x00000001, 0x00000104, 0x00000000, /* Constant 6 desc (scube) */
1776 0x74696e69, 0xababab00, /* Constant 1 name */
1777 0x00030001, 0x00040001, 0x00000001, 0x00000000, /* Constant 1 type desc */
1778 0xabab0073, /* Constant 2 name */
1779 0x000c0004, 0x00010001, 0x00000001, 0x00000000, /* Constant 2 type desc */
1780 0x00443173, /* Constant 3 name */
1781 0x000b0004, 0x00010001, 0x00000001, 0x00000000, /* Constant 3 type desc */
1782 0x00443273, /* Constant 4 name */
1783 0x000c0004, 0x00010001, 0x00000001, 0x00000000, /* Constant 4 type desc */
1784 0x00443373, /* Constant 5 name */
1785 0x000d0004, 0x00010001, 0x00000001, 0x00000000, /* Constant 5 type desc */
1786 0x62756373, 0xabab0065, /* Constant 6 name */
1787 0x000e0004, 0x00010001, 0x00000001, 0x00000000, /* Constant 6 type desc */
1788 0x335f7370, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, /* Target/Creator name string */
1789 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932,
1790 0x332e3235, 0x00313131,
1791 0x0200001f, 0x80000005, 0x90070000, 0x0200001f, 0x90000000, 0xa00f0800, /* shader */
1792 0x0200001f, 0x90000000, 0xa00f0801, 0x0200001f, 0x98000000, 0xa00f0802,
1793 0x0200001f, 0xa0000000, 0xa00f0803, 0x0200001f, 0x90000000, 0xa00f0804,
1794 0x03000042, 0x800f0000, 0x90e40000, 0xa0e40800, 0x03000002, 0x800f0000,
1795 0x80e40000, 0xa0e40000, 0x03000042, 0x800f0001, 0x90550000, 0xa0e40800,
1796 0x03000002, 0x800f0000, 0x80e40000, 0x80e40001, 0x03000042, 0x800f0001,
1797 0x90e40000, 0xa0e40803, 0x03000002, 0x800f0000, 0x80e40000, 0x80e40001,
1798 0x03000042, 0x800f0001, 0x90e40000, 0xa0e40804, 0x03000002, 0x800f0000,
1799 0x80e40000, 0x80e40001, 0x03000042, 0x800f0001, 0x90e40000, 0xa0e40801,
1800 0x03000002, 0x800f0000, 0x80e40000, 0x80e40001, 0x03000042, 0x800f0001,
1801 0x90e40000, 0xa0e40802, 0x03000002, 0x800f0800, 0x80e40000, 0x80e40001,
1802 0x0000ffff, /* END */
1803};
1804
1806{
1807 const char *samplers[16] = {NULL}; /* maximum number of sampler registers v/ps 3.0 = 16 */
1808 const char *sampler_orig;
1809 UINT count = 2;
1810 HRESULT hr;
1811
1812if (0)
1813{
1814 /* crashes if bytecode is NULL */
1816 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK);
1817}
1818
1820 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK);
1821
1822 samplers[5] = "dummy";
1823
1825 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK);
1826
1827 /* check that sampler points to shader blob */
1828 sampler_orig = (const char *)&get_shader_samplers_blob[0x2e];
1829 ok(sampler_orig == samplers[0], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[0], sampler_orig);
1830
1831 sampler_orig = (const char *)&get_shader_samplers_blob[0x33];
1832 ok(sampler_orig == samplers[1], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[1], sampler_orig);
1833
1834 sampler_orig = (const char *)&get_shader_samplers_blob[0x38];
1835 ok(sampler_orig == samplers[2], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[2], sampler_orig);
1836
1837 sampler_orig = (const char *)&get_shader_samplers_blob[0x3d];
1838 ok(sampler_orig == samplers[3], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[3], sampler_orig);
1839
1840 sampler_orig = (const char *)&get_shader_samplers_blob[0x42];
1841 ok(sampler_orig == samplers[4], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[4], sampler_orig);
1842
1843 ok(!strcmp(samplers[5], "dummy"), "D3DXGetShaderSamplers failed, got \"%s\", expected \"%s\"\n", samplers[5], "dummy");
1844
1845 /* reset samplers */
1846 memset(samplers, 0, sizeof(samplers));
1847 samplers[5] = "dummy";
1848
1850 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK);
1851 ok(count == 5, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 5);
1852
1854 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK);
1855 ok(count == 5, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 5);
1856
1857 /* check that sampler points to shader blob */
1858 sampler_orig = (const char *)&get_shader_samplers_blob[0x2e];
1859 ok(sampler_orig == samplers[0], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[0], sampler_orig);
1860
1861 sampler_orig = (const char *)&get_shader_samplers_blob[0x33];
1862 ok(sampler_orig == samplers[1], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[1], sampler_orig);
1863
1864 sampler_orig = (const char *)&get_shader_samplers_blob[0x38];
1865 ok(sampler_orig == samplers[2], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[2], sampler_orig);
1866
1867 sampler_orig = (const char *)&get_shader_samplers_blob[0x3d];
1868 ok(sampler_orig == samplers[3], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[3], sampler_orig);
1869
1870 sampler_orig = (const char *)&get_shader_samplers_blob[0x42];
1871 ok(sampler_orig == samplers[4], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[4], sampler_orig);
1872
1873 ok(!strcmp(samplers[5], "dummy"), "D3DXGetShaderSamplers failed, got \"%s\", expected \"%s\"\n", samplers[5], "dummy");
1874
1875 /* check without ctab */
1877 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK);
1878 ok(count == 0, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 0);
1879
1880 /* check invalid ctab */
1882 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK);
1883 ok(count == 0, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 0);
1884}
1885
1886/*
1887 * fxc.exe /Tvs_3_0
1888 */
1889#if 0
1890float f = {1.1f}, f_2[2] = {2.1f, 2.2f};
1891struct {float f; int i;} s = {3.1f, 31},
1892s_2[2] = {{4.1f, 41}, {4.2f, 42}},
1893s_3[3] = {{5.1f, 51}, {5.2f, 52}, {5.3f, 53}};
1894struct {int i1; int i2; float2 f_2; row_major float3x1 r[2];}
1895p[2] = {{11, 12, {13.1, 14.1}, {{3.11, 3.21, 3.31}, {3.41, 3.51, 3.61}}},
1896 {15, 16, {17.1, 18.1}, {{4.11, 4.21, 4.31}, {4.41, 4.51, 4.61}}}};
1897int i[1] = {6};
1898float2x3 f23[2] = {{0.11, 0.21, 0.31, 0.41, 0.51, 0.61}, {0.12, 0.22, 0.32, 0.42, 0.52, 0.62}};
1899float3x2 f32[2] = {{1.11, 1.21, 1.31, 1.41, 1.51, 1.61}, {1.12, 1.22, 1.32, 1.42, 1.52, 1.62}};
1900float3 v[2] = {{2.11, 2.21, 2.31}, {2.41, 2.51, 2.61}};
1901row_major float3x1 r31[2] = {{3.11, 3.21, 3.31}, {3.41, 3.51, 3.61}};
1902row_major float1x3 r13[2] = {{4.11, 4.21, 4.31}, {4.41, 4.51, 4.61}};
1903float4 main(float4 pos : POSITION) : POSITION
1904{
1905 float4 tmp = 0.0f;
1906 tmp.zyw = v[1] + r13[1] + r31[1] + p[1].r[1];
1907 tmp.x += f * f_2[1] * pos.x * p[1].f_2.y;
1908 tmp.y += s.f * pos.y * s_2[0].i;
1909 tmp.z += s_3[0].f * pos.z * s_3[2].f * i[0] * f23[1]._11 * f32[1]._32;
1910 return tmp;
1911}
1912#endif
1914{
19150xfffe0300, 0x0185fffe, 0x42415443, 0x0000001c, 0x000005df, 0xfffe0300, 0x0000000c, 0x0000001c,
19160x00000100, 0x000005d8, 0x0000010c, 0x002d0002, 0x00000001, 0x00000110, 0x00000120, 0x00000130,
19170x001d0002, 0x00000004, 0x00000134, 0x00000144, 0x000001a4, 0x00210002, 0x00000004, 0x000001a8,
19180x000001b8, 0x000001f8, 0x00250002, 0x00000002, 0x000001fc, 0x0000020c, 0x0000022c, 0x002f0002,
19190x00000001, 0x00000230, 0x00000240, 0x00000250, 0x00000002, 0x00000012, 0x000002b0, 0x000002c0,
19200x000003e0, 0x002b0002, 0x00000002, 0x000003e4, 0x000003f4, 0x00000414, 0x00120002, 0x00000006,
19210x00000418, 0x00000428, 0x00000488, 0x002e0002, 0x00000001, 0x000004ac, 0x000004bc, 0x000004dc,
19220x00270002, 0x00000002, 0x000004e0, 0x000004f0, 0x00000530, 0x00180002, 0x00000005, 0x00000534,
19230x00000544, 0x000005a4, 0x00290002, 0x00000002, 0x000005a8, 0x000005b8, 0xabab0066, 0x00030000,
19240x00010001, 0x00000001, 0x00000000, 0x3f8ccccd, 0x00000000, 0x00000000, 0x00000000, 0x00333266,
19250x00030003, 0x00030002, 0x00000002, 0x00000000, 0x3de147ae, 0x3ed1eb85, 0x00000000, 0x00000000,
19260x3e570a3d, 0x3f028f5c, 0x00000000, 0x00000000, 0x3e9eb852, 0x3f1c28f6, 0x00000000, 0x00000000,
19270x3df5c28f, 0x3ed70a3d, 0x00000000, 0x00000000, 0x3e6147ae, 0x3f051eb8, 0x00000000, 0x00000000,
19280x3ea3d70a, 0x3f1eb852, 0x00000000, 0x00000000, 0x00323366, 0x00030003, 0x00020003, 0x00000002,
19290x00000000, 0x3f8e147b, 0x3fa7ae14, 0x3fc147ae, 0x00000000, 0x3f9ae148, 0x3fb47ae1, 0x3fce147b,
19300x00000000, 0x3f8f5c29, 0x3fa8f5c3, 0x3fc28f5c, 0x00000000, 0x3f9c28f6, 0x3fb5c28f, 0x3fcf5c29,
19310x00000000, 0x00325f66, 0x00030000, 0x00010001, 0x00000002, 0x00000000, 0x40066666, 0x00000000,
19320x00000000, 0x00000000, 0x400ccccd, 0x00000000, 0x00000000, 0x00000000, 0xabab0069, 0x00020000,
19330x00010001, 0x00000001, 0x00000000, 0x40c00000, 0x00000000, 0x00000000, 0x00000000, 0x31690070,
19340xababab00, 0x00020000, 0x00010001, 0x00000001, 0x00000000, 0xab003269, 0x00030001, 0x00020001,
19350x00000001, 0x00000000, 0xabab0072, 0x00030002, 0x00010003, 0x00000002, 0x00000000, 0x00000252,
19360x00000258, 0x00000268, 0x00000258, 0x000001f8, 0x0000026c, 0x0000027c, 0x00000280, 0x00000005,
19370x000a0001, 0x00040002, 0x00000290, 0x41300000, 0x00000000, 0x00000000, 0x00000000, 0x41400000,
19380x00000000, 0x00000000, 0x00000000, 0x4151999a, 0x4161999a, 0x00000000, 0x00000000, 0x40470a3d,
19390x00000000, 0x00000000, 0x00000000, 0x404d70a4, 0x00000000, 0x00000000, 0x00000000, 0x4053d70a,
19400x00000000, 0x00000000, 0x00000000, 0x405a3d71, 0x00000000, 0x00000000, 0x00000000, 0x4060a3d7,
19410x00000000, 0x00000000, 0x00000000, 0x40670a3d, 0x00000000, 0x00000000, 0x00000000, 0x41700000,
19420x00000000, 0x00000000, 0x00000000, 0x41800000, 0x00000000, 0x00000000, 0x00000000, 0x4188cccd,
19430x4190cccd, 0x00000000, 0x00000000, 0x4083851f, 0x00000000, 0x00000000, 0x00000000, 0x4086b852,
19440x00000000, 0x00000000, 0x00000000, 0x4089eb85, 0x00000000, 0x00000000, 0x00000000, 0x408d1eb8,
19450x00000000, 0x00000000, 0x00000000, 0x409051ec, 0x00000000, 0x00000000, 0x00000000, 0x4093851f,
19460x00000000, 0x00000000, 0x00000000, 0x00333172, 0x00030002, 0x00030001, 0x00000002, 0x00000000,
19470x4083851f, 0x4086b852, 0x4089eb85, 0x00000000, 0x408d1eb8, 0x409051ec, 0x4093851f, 0x00000000,
19480x00313372, 0x00030002, 0x00010003, 0x00000002, 0x00000000, 0x40470a3d, 0x00000000, 0x00000000,
19490x00000000, 0x404d70a4, 0x00000000, 0x00000000, 0x00000000, 0x4053d70a, 0x00000000, 0x00000000,
19500x00000000, 0x405a3d71, 0x00000000, 0x00000000, 0x00000000, 0x4060a3d7, 0x00000000, 0x00000000,
19510x00000000, 0x40670a3d, 0x00000000, 0x00000000, 0x00000000, 0xabab0073, 0x00030000, 0x00010001,
19520x00000001, 0x00000000, 0x0000010c, 0x0000048c, 0x0000022c, 0x00000258, 0x00000005, 0x00020001,
19530x00020001, 0x0000049c, 0x40466666, 0x00000000, 0x00000000, 0x00000000, 0x41f80000, 0x00000000,
19540x00000000, 0x00000000, 0x00325f73, 0x00000005, 0x00020001, 0x00020002, 0x0000049c, 0x40833333,
19550x00000000, 0x00000000, 0x00000000, 0x42240000, 0x00000000, 0x00000000, 0x00000000, 0x40866666,
19560x00000000, 0x00000000, 0x00000000, 0x42280000, 0x00000000, 0x00000000, 0x00000000, 0x00335f73,
19570x00000005, 0x00020001, 0x00020003, 0x0000049c, 0x40a33333, 0x00000000, 0x00000000, 0x00000000,
19580x424c0000, 0x00000000, 0x00000000, 0x00000000, 0x40a66666, 0x00000000, 0x00000000, 0x00000000,
19590x42500000, 0x00000000, 0x00000000, 0x00000000, 0x40a9999a, 0x00000000, 0x00000000, 0x00000000,
19600x42540000, 0x00000000, 0x00000000, 0x00000000, 0xabab0076, 0x00030001, 0x00030001, 0x00000002,
19610x00000000, 0x40070a3d, 0x400d70a4, 0x4013d70a, 0x00000000, 0x401a3d71, 0x4020a3d7, 0x40270a3d,
19620x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c,
19630x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x0200001f,
19640x80000000, 0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x02000001, 0x80070000, 0xa0e4002a,
19650x03000002, 0x80070000, 0x80e40000, 0xa0e4002c, 0x03000002, 0x80040000, 0x80aa0000, 0xa0000017,
19660x03000002, 0xe0080000, 0x80aa0000, 0xa0000011, 0x02000001, 0x80010001, 0xa000002d, 0x03000005,
19670x80040000, 0x80000001, 0xa0000026, 0x03000005, 0x80040000, 0x80aa0000, 0x90000000, 0x03000005,
19680xe0010000, 0x80aa0000, 0xa055000b, 0x03000002, 0x80020000, 0x80550000, 0xa0000016, 0x03000002,
19690x80010000, 0x80000000, 0xa0000015, 0x03000002, 0x80010000, 0x80000000, 0xa000000f, 0x03000002,
19700x80020000, 0x80550000, 0xa0000010, 0x03000005, 0x80040000, 0xa000002e, 0x90550000, 0x04000004,
19710xe0020000, 0x80aa0000, 0xa0000028, 0x80550000, 0x03000005, 0x80020000, 0xa0000018, 0x90aa0000,
19720x03000005, 0x80020000, 0x80550000, 0xa000001c, 0x03000005, 0x80020000, 0x80550000, 0xa000002f,
19730x03000005, 0x80020000, 0x80550000, 0xa0000020, 0x04000004, 0xe0040000, 0x80550000, 0xa0aa0024,
19740x80000000, 0x0000ffff,
1975};
1976
1977const struct
1978{
1979 const char *fullname;
1982}
1984{
1985 {"f", {"f", D3DXRS_FLOAT4, 45, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 72},
1986 {"f23", {"f23", D3DXRS_FLOAT4, 29, 4, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 2, 3, 2, 0, 48, NULL}, 81},
1987 {"f23[0]", {"f23", D3DXRS_FLOAT4, 29, 3, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 2, 3, 1, 0, 24, NULL}, 81},
1988 {"f23[1]", {"f23", D3DXRS_FLOAT4, 32, 1, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 2, 3, 1, 0, 24, NULL}, 93},
1989 {"f32", {"f32", D3DXRS_FLOAT4, 33, 4, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 2, 2, 0, 48, NULL}, 110},
1990 {"f32[0]", {"f32", D3DXRS_FLOAT4, 33, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL}, 110},
1991 {"f32[1]", {"f32", D3DXRS_FLOAT4, 35, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL}, 118},
1992 {"f_2", {"f_2", D3DXRS_FLOAT4, 37, 2, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 2, 0, 8, NULL}, 131},
1993 {"f_2[0]", {"f_2", D3DXRS_FLOAT4, 37, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 131},
1994 {"f_2[1]", {"f_2", D3DXRS_FLOAT4, 38, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 135},
1995 {"i", {"i", D3DXRS_FLOAT4, 47, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 144},
1996 {"i[0]", {"i", D3DXRS_FLOAT4, 47, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 144},
1997 {"p", {"p", D3DXRS_FLOAT4, 0, 18, D3DXPC_STRUCT, D3DXPT_VOID, 1, 10, 2, 4, 80, NULL}, 176},
1998 {"p[0]", {"p", D3DXRS_FLOAT4, 0, 9, D3DXPC_STRUCT, D3DXPT_VOID, 1, 10, 1, 4, 40, NULL}, 176},
1999 {"p[0].i1", {"i1", D3DXRS_FLOAT4, 0, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 176},
2000 {"p[0].i2", {"i2", D3DXRS_FLOAT4, 1, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 180},
2001 {"p[0].f_2", {"f_2", D3DXRS_FLOAT4, 2, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 2, 1, 0, 8, NULL}, 184},
2002 {"p[0].r", {"r", D3DXRS_FLOAT4, 3, 6, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 1, 2, 0, 24, NULL}, 188},
2003 {"p[0].r[0]", {"r", D3DXRS_FLOAT4, 3, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 1, 1, 0, 12, NULL}, 188},
2004 {"p[0].r[1]", {"r", D3DXRS_FLOAT4, 6, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 1, 1, 0, 12, NULL}, 200},
2005 {"p[1]", {"p", D3DXRS_FLOAT4, 9, 9, D3DXPC_STRUCT, D3DXPT_VOID, 1, 10, 1, 4, 40, NULL}, 212},
2006 {"p[1].i1", {"i1", D3DXRS_FLOAT4, 9, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 212},
2007 {"p[1].i2", {"i2", D3DXRS_FLOAT4, 10, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 216},
2008 {"p[1].f_2", {"f_2", D3DXRS_FLOAT4, 11, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 2, 1, 0, 8, NULL}, 220},
2009 {"p[1].r", {"r", D3DXRS_FLOAT4, 12, 6, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 1, 2, 0, 24, NULL}, 224},
2010 {"p[1].r[0]", {"r", D3DXRS_FLOAT4, 12, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 1, 1, 0, 12, NULL}, 224},
2011 {"p[1].r[1]", {"r", D3DXRS_FLOAT4, 15, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 1, 1, 0, 12, NULL}, 236},
2012 {"r13", {"r13", D3DXRS_FLOAT4, 43, 2, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 1, 3, 2, 0, 24, NULL}, 253},
2013 {"r13[0]", {"r13", D3DXRS_FLOAT4, 43, 1, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 253},
2014 {"r13[1]", {"r13", D3DXRS_FLOAT4, 44, 1, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 257},
2015 {"r31", {"r31", D3DXRS_FLOAT4, 18, 6, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 1, 2, 0, 24, NULL}, 266},
2016 {"r31[0]", {"r31", D3DXRS_FLOAT4, 18, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 1, 1, 0, 12, NULL}, 266},
2017 {"r31[1]", {"r31", D3DXRS_FLOAT4, 21, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 1, 1, 0, 12, NULL}, 278},
2018 {"s", {"s", D3DXRS_FLOAT4, 46, 1, D3DXPC_STRUCT, D3DXPT_VOID, 1, 2, 1, 2, 8, NULL}, 303},
2019 {"s.f", {"f", D3DXRS_FLOAT4, 46, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 303},
2020 {"s.i", {"i", D3DXRS_FLOAT4, 47, 0, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 307},
2021 {"s_2", {"s_2", D3DXRS_FLOAT4, 39, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 2, 2, 2, 16, NULL}, 316},
2022 {"s_2[0]", {"s_2", D3DXRS_FLOAT4, 39, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 2, 1, 2, 8, NULL}, 316},
2023 {"s_2[0].f", {"f", D3DXRS_FLOAT4, 39, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 316},
2024 {"s_2[0].i", {"i", D3DXRS_FLOAT4, 40, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 320},
2025 {"s_2[1]", {"s_2", D3DXRS_FLOAT4, 41, 0, D3DXPC_STRUCT, D3DXPT_VOID, 1, 2, 1, 2, 8, NULL}, 324},
2026 {"s_2[1].f", {"f", D3DXRS_FLOAT4, 41, 0, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 324},
2027 {"s_2[1].i", {"i", D3DXRS_FLOAT4, 41, 0, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 328},
2028 {"s_3", {"s_3", D3DXRS_FLOAT4, 24, 5, D3DXPC_STRUCT, D3DXPT_VOID, 1, 2, 3, 2, 24, NULL}, 337},
2029 {"s_3[0]", {"s_3", D3DXRS_FLOAT4, 24, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 2, 1, 2, 8, NULL}, 337},
2030 {"s_3[0].f", {"f", D3DXRS_FLOAT4, 24, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 337},
2031 {"s_3[0].i", {"i", D3DXRS_FLOAT4, 25, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 341},
2032 {"s_3[1]", {"s_3", D3DXRS_FLOAT4, 26, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 2, 1, 2, 8, NULL}, 345},
2033 {"s_3[1].f", {"f", D3DXRS_FLOAT4, 26, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 345},
2034 {"s_3[1].i", {"i", D3DXRS_FLOAT4, 27, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 349},
2035 {"s_3[2]", {"s_3", D3DXRS_FLOAT4, 28, 1, D3DXPC_STRUCT, D3DXPT_VOID, 1, 2, 1, 2, 8, NULL}, 353},
2036 {"s_3[2].f", {"f", D3DXRS_FLOAT4, 28, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 353},
2037 {"s_3[2].i", {"i", D3DXRS_FLOAT4, 29, 0, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 357},
2038 {"v", {"v", D3DXRS_FLOAT4, 41, 2, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 2, 0, 24, NULL}, 366},
2039 {"v[0]", {"v", D3DXRS_FLOAT4, 41, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 366},
2040 {"v[1]", {"v", D3DXRS_FLOAT4, 42, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 370},
2042
2044{
2045 ID3DXConstantTable *ctable;
2046 HRESULT hr;
2047 ULONG count;
2048 UINT i;
2049 UINT nr = 1;
2052 DWORD *ctab;
2053
2055 ok(hr == D3D_OK, "D3DXGetShaderConstantTable failed, got %08lx, expected %08lx\n", hr, D3D_OK);
2056
2058 ok(ctab[0] == test_get_shader_constant_variables_blob[3], "ID3DXConstantTable_GetBufferPointer failed\n");
2059
2061 {
2062 const char *fullname = test_get_shader_constant_variables_data[i].fullname;
2063 const D3DXCONSTANT_DESC *expected_desc = &test_get_shader_constant_variables_data[i].desc;
2065
2067 ok(constant != NULL, "GetConstantByName \"%s\" failed\n", fullname);
2068
2070 ok(hr == D3D_OK, "GetConstantDesc \"%s\" failed, got %08lx, expected %08lx\n", fullname, hr, D3D_OK);
2071
2072 ok(!strcmp(expected_desc->Name, desc.Name), "GetConstantDesc \"%s\" failed, got \"%s\", expected \"%s\"\n",
2073 fullname, desc.Name, expected_desc->Name);
2074 ok(expected_desc->RegisterSet == desc.RegisterSet, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
2075 fullname, desc.RegisterSet, expected_desc->RegisterSet);
2076 ok(expected_desc->RegisterIndex == desc.RegisterIndex, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
2077 fullname, desc.RegisterIndex, expected_desc->RegisterIndex);
2078 ok(expected_desc->RegisterCount == desc.RegisterCount, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
2079 fullname, desc.RegisterCount, expected_desc->RegisterCount);
2080 ok(expected_desc->Class == desc.Class, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
2081 fullname, desc.Class, expected_desc->Class);
2082 ok(expected_desc->Type == desc.Type, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
2083 fullname, desc.Type, expected_desc->Type);
2084 ok(expected_desc->Rows == desc.Rows, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
2085 fullname, desc.Rows, expected_desc->Rows);
2086 ok(expected_desc->Columns == desc.Columns, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
2087 fullname, desc.Columns, expected_desc->Columns);
2088 ok(expected_desc->Elements == desc.Elements, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
2089 fullname, desc.Elements, expected_desc->Elements);
2090 ok(expected_desc->StructMembers == desc.StructMembers, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
2091 fullname, desc.StructMembers, expected_desc->StructMembers);
2092 ok(expected_desc->Bytes == desc.Bytes, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
2093 fullname, desc.Bytes, expected_desc->Bytes);
2094 ok(ctaboffset == (DWORD *)desc.DefaultValue - ctab, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
2096 }
2097
2099 ok(element == NULL, "GetConstantElement failed\n");
2100
2102 ok(constant != NULL, "GetConstantByName failed\n");
2103
2105 ok(constant == element, "GetConstantByName failed, got %p, expected %p\n", element, constant);
2106
2108 ok(element == constant, "GetConstantElement failed, got %p, expected %p\n", element, constant);
2109
2111 ok(constant != NULL, "GetConstantByName failed\n");
2112
2114 ok(element == constant, "GetConstant failed, got %p, expected %p\n", element, constant);
2115
2117 ok(element == NULL, "GetConstant failed\n");
2118
2120 ok(element == NULL, "GetConstant failed\n");
2121
2123 ok(constant == element, "GetConstantByName failed, got %p, expected %p\n", element, constant);
2124
2126 ok(NULL == element, "GetConstantByName failed\n");
2127
2129 ok(constant == element, "GetConstantByName failed, got %p, expected %p\n", element, constant);
2130
2132 ok(element == NULL, "GetConstantByName failed\n");
2133
2135 ok(element == constant, "GetConstantElement failed, got %p, expected %p\n", element, constant);
2136
2138 ok(element == NULL, "GetConstantElement failed\n");
2139
2141 ok(constant != NULL, "GetConstantByName failed\n");
2142
2144 ok(element != constant, "GetConstantByName failed, got %p, expected %p\n", element, constant);
2145
2147 ok(element == constant, "GetConstantElement failed, got %p, expected %p\n", element, constant);
2148
2150 ok(constant != NULL, "GetConstantByName failed\n");
2151
2153 ok(element == constant, "GetConstantElement failed, got %p, expected %p\n", element, constant);
2154
2156 ok(constant != NULL, "GetConstantByName failed\n");
2157
2159 ok(element == constant, "GetConstant failed, got %p, expected %p\n", element, constant);
2160
2162 ok(element == constant, "GetConstantByName failed, got %p, expected %p\n", element, constant);
2163
2164 element = ID3DXConstantTable_GetConstantByName(ctable, "s_2[0]", "invalid");
2165 ok(element == NULL, "GetConstantByName failed\n");
2166
2168 ok(constant != NULL, "GetConstantByName failed\n");
2169
2171 ok(constant == element, "GetConstantByName failed, got %p, expected %p\n", element, constant);
2172
2174 ok(count == 0, "Release failed, got %lu, expected %u\n", count, 0);
2175}
2176
2177#define REGISTER_OUTPUT_SIZE 48
2178
2182
2184{
2191};
2192
2194{
2195 const char *fullname;
2198};
2199
2201{
2202 /* float */
2203 {0x40000123, 0x00000000, 0x40800123, 0x40a00123,
2204 0x40c00123, 0x40e00123, 0x41000123, 0x41100123,
2205 0x41200123, 0x41300123, 0x41400123, 0x41500123,
2206 0x41600123, 0x41700123, 0x41800123, 0x41900123,
2207 0x41a00123, 0x41b00123, 0x41c00123, 0x41d00123,
2208 0x00000000, 0x41f00123, 0x42000123, 0x42100123,
2209 0x00000000, 0x42300123, 0x42400123, 0x42500123,
2210 0x42600123, 0x42700123, 0x42800123, 0x42900123,
2211 0x43000123, 0x43100123, 0x43200123, 0x43300123,
2212 0x43400123, 0x43500123, 0x43600123, 0x43700123,
2213 0x43800123, 0x43900123, 0x43a00123, 0x43b00123,
2214 0x43c00123, 0x43d00123, 0x43e00123, 0x43f00123},
2215 /* int */
2216 {0x00000002, 0x00000003, 0x00000004, 0x00000005,
2217 0x00000000, 0x00000007, 0x00000008, 0x00000009,
2218 0x0000000a, 0x0000000b, 0x0000000c, 0x0000000d,
2219 0x0000000e, 0x0000000f, 0x00000010, 0x00000011,
2220 0x00000012, 0x00000000, 0x00000000, 0x00000015,
2221 0x00000016, 0x00000017, 0x00000018, 0x00000019,
2222 0x0000001a, 0x0000001b, 0x0000001c, 0x0000001d,
2223 0x0000001e, 0x0000001f, 0x00000020, 0x00000021,
2224 0x00000022, 0x00000023, 0x00000024, 0x00000025,
2225 0x00000026, 0x00000027, 0x00000028, 0x00000029,
2226 0x0000002a, 0x0000002b, 0x0000002c, 0x0000002d,
2227 0x0000002e, 0x0000002f, 0x00000030, 0x00000031},
2228};
2229
2230/*
2231 * fxc.exe /Tvs_3_0
2232 */
2233#if 0
2234bool b = 1;
2235int n = 8;
2236float f = 5.1;
2237int nf = 11;
2238bool bf = 1;
2239float4 main(float4 pos : POSITION) : POSITION
2240{
2241 float4 tmp = 0;
2242 int i;
2243 if (b) for (i = 0; i < n; i++) tmp.x += pos.z * f * nf;
2244 else for (i = 0; i < n; i++) tmp.y += pos.y * f * bf;
2245 return tmp;
2246}
2247#endif
2249{
22500xfffe0300, 0x0051fffe, 0x42415443, 0x0000001c, 0x0000010f, 0xfffe0300, 0x00000005, 0x0000001c,
22510x00000100, 0x00000108, 0x00000080, 0x00000000, 0x00000001, 0x00000084, 0x00000094, 0x00000098,
22520x00020002, 0x00000001, 0x00000084, 0x0000009c, 0x000000ac, 0x00000002, 0x00000001, 0x000000b0,
22530x000000c0, 0x000000d0, 0x00000001, 0x00000001, 0x000000d4, 0x000000e4, 0x000000f4, 0x00010002,
22540x00000001, 0x000000d4, 0x000000f8, 0xabab0062, 0x00010000, 0x00010001, 0x00000001, 0x00000000,
22550xffffffff, 0xab006662, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0xabab0066, 0x00030000,
22560x00010001, 0x00000001, 0x00000000, 0x40a33333, 0x00000000, 0x00000000, 0x00000000, 0xabab006e,
22570x00020000, 0x00010001, 0x00000001, 0x00000000, 0x00000008, 0x00000000, 0x00000001, 0x00000000,
22580xab00666e, 0x41300000, 0x00000000, 0x00000000, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369,
22590x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072,
22600x392e3932, 0x332e3235, 0x00313131, 0x05000051, 0xa00f0003, 0x00000000, 0x00000000, 0x00000000,
22610x00000000, 0x0200001f, 0x80000000, 0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x01000028,
22620xe0e40800, 0x03000005, 0x80010000, 0xa0000000, 0x90aa0000, 0x02000001, 0x80010001, 0xa0000003,
22630x01000026, 0xf0e40000, 0x04000004, 0x80010001, 0x80000000, 0xa0000001, 0x80000001, 0x00000027,
22640x02000001, 0x80020001, 0xa0000003, 0x0000002a, 0x03000005, 0x80010000, 0xa0000000, 0x90550000,
22650x02000001, 0x80020001, 0xa0000003, 0x01000026, 0xf0e40000, 0x04000004, 0x80020001, 0x80000000,
22660xa0000002, 0x80550001, 0x00000027, 0x02000001, 0x80010001, 0xa0000003, 0x0000002b, 0x02000001,
22670xe0030000, 0x80e40001, 0x02000001, 0xe00c0000, 0xa0000003, 0x0000ffff,
2268};
2269
2271{
2272 {"f", {"f", D3DXRS_FLOAT4, 0, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 48},
2273};
2274
2276{
2277 {SetFloat, 0, 0, 0, 4, {0x40000123}},
2278 {SetInt, 1, 0, 0, 4, {0x40000000}},
2279 {SetBool, 1, 0, 0, 4, {0x3f800000}},
2280 {SetIntArray},
2281 {SetIntArray, 1, 1, REGISTER_OUTPUT_SIZE, 4, {0x40000000}},
2282 {SetBoolArray},
2283 {SetBoolArray, 1, 1, REGISTER_OUTPUT_SIZE, 4, {0x3f800000}},
2284 {SetFloatArray},
2285 {SetFloatArray, 0, 1, REGISTER_OUTPUT_SIZE, 4, {0x40000123}},
2286 {SetValue, 0, 0, 3},
2287 {SetValue, 0, 4, REGISTER_OUTPUT_SIZE * 4, 4, {0x40000123}},
2288 {SetVector, 0, 0, 0, 4, {0x40000123}},
2290 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 4, {0x40000123}},
2291 {SetMatrix, 0, 0, 0, 4, {0x40000123},},
2293 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000123}},
2294 {SetMatrixTranspose, 0, 0, 0, 4, {0x40000123},},
2296 {SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000123}},
2298 {SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000123}},
2300 {SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000123}},
2301};
2302
2304{
2305 {"n", {"n", D3DXRS_INT4, 0, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 57},
2306};
2307
2309{
2310 {SetFloat, 0, 0, 0, 4,
2311 {0x00000002, 0x00000000, 0x00000001}},
2312 {SetInt, 1, 0, 0, 4,
2313 {0x00000002, 0x00000000, 0x00000001}},
2314 {SetBool, 1, 0, 0, 4,
2315 {0x00000001, 0x00000000, 0x00000001}},
2316 {SetIntArray},
2318 {0x00000002, 0x00000000, 0x00000001}},
2319 {SetBoolArray},
2321 {0x00000001, 0x00000000, 0x00000001}},
2322 {SetFloatArray},
2324 {0x00000002, 0x00000000, 0x00000001}},
2325 {SetValue, 1, 0, 3},
2326 {SetValue, 1, 4, REGISTER_OUTPUT_SIZE * 4, 4,
2327 {0x00000002, 0x00000000, 0x00000001}},
2328 {SetVector, 0, 0, 0, 4,
2329 {0x00000002, 0x00000000, 0x00000001},},
2331 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 4,
2332 {0x00000002, 0x00000000, 0x00000001}},
2333 {SetMatrix, 0, 0, 0, 4,
2334 {0x00000002, 0x00000000, 0x00000001}},
2336 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4,
2337 {0x00000002, 0x00000000, 0x00000001}},
2338 {SetMatrixTranspose, 0, 0, 0, 4,
2339 {0x00000002, 0x00000000, 0x00000001}},
2342 {0x00000002, 0x00000000, 0x00000001}},
2345 {0x00000002, 0x00000000, 0x00000001}},
2348 {0x00000002, 0x00000000, 0x00000001}},
2349};
2350
2352{
2353 {"nf", {"nf", D3DXRS_FLOAT4, 1, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 62},
2354};
2355
2357{
2358 {SetFloat, 0, 0, 0, 4, {0x40000000}},
2359 {SetInt, 1, 0, 0, 4, {0x40000000}},
2360 {SetBool, 1, 0, 0, 4, {0x3f800000}},
2361 {SetIntArray},
2362 {SetIntArray, 1, 1, REGISTER_OUTPUT_SIZE, 4, {0x40000000}},
2363 {SetBoolArray},
2364 {SetBoolArray, 1, 1, REGISTER_OUTPUT_SIZE, 4, {0x3f800000}},
2365 {SetFloatArray},
2366 {SetFloatArray, 0, 1, REGISTER_OUTPUT_SIZE, 4, {0x40000000}},
2367 {SetValue, 1, 0, 3},
2368 {SetValue, 1, 4, REGISTER_OUTPUT_SIZE * 4, 4, {0x40000000}},
2369 {SetVector, 0, 0, 0, 4, {0x40000000}},
2371 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 4, {0x40000000}},
2372 {SetMatrix, 0, 0, 0, 4, {0x40000000}},
2374 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000000}},
2375 {SetMatrixTranspose, 0, 0, 0, 4, {0x40000000}},
2377 {SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000000}},
2379 {SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000000}},
2381 {SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000000}},
2382};
2383
2385{
2386 {"bf", {"bf", D3DXRS_FLOAT4, 2, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 39},
2387};
2388
2390{
2391 {SetFloat, 0, 0, 0, 4, {0x3f800000}},
2392 {SetInt, 1, 0, 0, 4, {0x3f800000}},
2393 {SetBool, 1, 0, 0, 4, {0x3f800000}},
2394 {SetIntArray},
2395 {SetIntArray, 1, 1, REGISTER_OUTPUT_SIZE, 4, {0x3f800000}},
2396 {SetBoolArray},
2397 {SetBoolArray, 1, 1, REGISTER_OUTPUT_SIZE, 4, {0x3f800000}},
2398 {SetFloatArray},
2399 {SetFloatArray, 0, 1, REGISTER_OUTPUT_SIZE, 4, {0x3f800000}},
2400 {SetValue, 1, 0, 3},
2401 {SetValue, 1, 4, REGISTER_OUTPUT_SIZE * 4, 4, {0x3f800000}},
2402 {SetVector, 0, 0, 0, 4, {0x3f800000}},
2404 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 4, {0x3f800000}},
2405 {SetMatrix, 0, 0, 0, 4, {0x3f800000}},
2407 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x3f800000}},
2408 {SetMatrixTranspose, 0, 0, 0, 4, {0x3f800000}},
2410 {SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x3f800000}},
2412 {SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x3f800000}},
2414 {SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x3f800000}},
2415};
2416
2418{
2419 {"b", {"b", D3DXRS_BOOL, 0, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 37},
2420};
2421
2423{
2424 {SetFloat, 0, 0, 0, 1, {0x00000001}},
2425 {SetInt, 1, 0, 0, 1, {0x00000001}},
2426 {SetBool, 1, 0, 0, 1, {0x00000002}},
2427 {SetIntArray},
2428 {SetIntArray, 1, 1, REGISTER_OUTPUT_SIZE, 1, {0x00000001}},
2429 {SetBoolArray},
2430 {SetBoolArray, 1, 1, REGISTER_OUTPUT_SIZE, 1, {0x00000002}},
2431 {SetFloatArray},
2432 {SetFloatArray, 0, 1, REGISTER_OUTPUT_SIZE, 1, {0x00000001}},
2433 {SetValue, 1, 0, 3},
2434 {SetValue, 1, 4, REGISTER_OUTPUT_SIZE * 4, 1, {0x00000002}},
2435 {SetVector, 0, 0, 0, 1, {0x00000001}},
2437 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 1, {0x00000001}},
2438 {SetMatrix, 0, 0, 0, 1, {0x00000001}},
2440 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 1, {0x00000001}},
2441 {SetMatrixTranspose, 0, 0, 0, 1, {0x00000001}},
2443 {SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 1, {0x00000001}},
2445 {SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 1, {0x00000001}},
2447 {SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 1, {0x00000001}},
2448};
2449
2450/*
2451 * fxc.exe /Tvs_3_0
2452 */
2453#if 0
2454bool ab[2] = {1, 0};
2455int an[2] = {32, 33};
2456float af[2] = {3.1, 3.2};
2457int anf[2] = {14, 15};
2458bool abf[2] = {1, 1};
2459float4 main(float4 pos : POSITION) : POSITION
2460{
2461 float4 tmp = 0;
2462 int i;
2463 if (ab[1]) for (i = 0; i < an[1]; i++) tmp.x += pos.z * af[0] * anf[1];
2464 else for (i = 0; i < an[0]; i++) tmp.y += pos.y * af[1] * abf[1];
2465 return tmp;
2466}
2467#endif
2469{
24700xfffe0300, 0x006afffe, 0x42415443, 0x0000001c, 0x00000173, 0xfffe0300, 0x00000005, 0x0000001c,
24710x00000100, 0x0000016c, 0x00000080, 0x00000000, 0x00000002, 0x00000084, 0x00000094, 0x0000009c,
24720x00040002, 0x00000002, 0x000000a0, 0x000000b0, 0x000000d0, 0x00000002, 0x00000002, 0x000000d4,
24730x000000e4, 0x00000104, 0x00000001, 0x00000002, 0x00000108, 0x00000118, 0x00000138, 0x00020002,
24740x00000002, 0x0000013c, 0x0000014c, 0xab006261, 0x00010000, 0x00010001, 0x00000002, 0x00000000,
24750xffffffff, 0x00000000, 0x00666261, 0x00010000, 0x00010001, 0x00000002, 0x00000000, 0x3f800000,
24760x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0xab006661,
24770x00030000, 0x00010001, 0x00000002, 0x00000000, 0x40466666, 0x00000000, 0x00000000, 0x00000000,
24780x404ccccd, 0x00000000, 0x00000000, 0x00000000, 0xab006e61, 0x00020000, 0x00010001, 0x00000002,
24790x00000000, 0x00000020, 0x00000000, 0x00000001, 0x00000000, 0x00000021, 0x00000000, 0x00000001,
24800x00000000, 0x00666e61, 0x00020000, 0x00010001, 0x00000002, 0x00000000, 0x41600000, 0x00000000,
24810x00000000, 0x00000000, 0x41700000, 0x00000000, 0x00000000, 0x00000000, 0x335f7376, 0x4d00305f,
24820x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970,
24830x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x05000051, 0xa00f0006, 0x00000000, 0x00000000,
24840x00000000, 0x00000000, 0x0200001f, 0x80000000, 0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000,
24850x01000028, 0xe0e40801, 0x03000005, 0x80010000, 0xa0000000, 0x90aa0000, 0x02000001, 0x80010001,
24860xa0000006, 0x01000026, 0xf0e40001, 0x04000004, 0x80010001, 0x80000000, 0xa0000003, 0x80000001,
24870x00000027, 0x02000001, 0x80020001, 0xa0000006, 0x0000002a, 0x03000005, 0x80010000, 0xa0000001,
24880x90550000, 0x02000001, 0x80020001, 0xa0000006, 0x01000026, 0xf0e40000, 0x04000004, 0x80020001,
24890x80000000, 0xa0000005, 0x80550001, 0x00000027, 0x02000001, 0x80010001, 0xa0000006, 0x0000002b,
24900x02000001, 0xe0030000, 0x80e40001, 0x02000001, 0xe00c0000, 0xa0000006, 0x0000ffff,
2491};
2492
2494{
2495 {"af", {"af", D3DXRS_FLOAT4, 0, 2, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 2, 0, 8, NULL}, 57},
2496 {"af[0]", {"af", D3DXRS_FLOAT4, 0, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 57},
2497 {"af[1]", {"af", D3DXRS_FLOAT4, 1, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 61},
2498};
2499
2501{
2502 {SetFloat, 0, 0, 0, 4, {0x40000123}},
2503 {SetInt, 1, 0, 0, 4, {0x40000000}},
2504 {SetBool, 1, 0, 0, 4, {0x3f800000}},
2505 {SetIntArray},
2506 {SetIntArray, 1, 1, 1, 4, {0x40000000}},
2508 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40400000}},
2509 {SetBoolArray},
2510 {SetBoolArray, 1, 1, 1, 4, {0x3f800000}},
2512 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000}},
2513 {SetFloatArray},
2514 {SetFloatArray, 0, 1, 1, 4, {0x40000123}},
2516 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2517 {SetValue, 0, 0, 3},
2518 {SetValue, 0, 4, 7, 4, {0x40000123}},
2519 {SetValue, 0, 8, REGISTER_OUTPUT_SIZE * 4, 8,
2520 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2521 {SetVector, 0, 0, 0, 8,
2522 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2524 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 8,
2525 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2526 {SetMatrix, 0, 0, 0, 8,
2527 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2529 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
2530 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2531 {SetMatrixTranspose, 0, 0, 0, 8,
2532 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40c00123}},
2535 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40c00123}},
2538 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2541 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40c00123}},
2542};
2543
2545{
2546 {"an", {"an", D3DXRS_INT4, 0, 2, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 2, 0, 8, NULL}, 70},
2547 {"an[0]", {"an", D3DXRS_INT4, 0, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 70},
2548 {"an[1]", {"an", D3DXRS_INT4, 1, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 74},
2549};
2550
2552{
2553 {SetFloat, 0, 0, 0, 4, {0x00000002, 0x00000000, 0x00000001}},
2554 {SetInt, 1, 0, 0, 4, {0x00000002, 0x00000000, 0x00000001}},
2555 {SetBool, 1, 0, 0, 4, {0x00000001, 0x00000000, 0x00000001}},
2556 {SetIntArray},
2557 {SetIntArray, 1, 1, 1, 4, {0x00000002, 0x00000000, 0x00000001}},
2559 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000003, 0x00000000, 0x00000001}},
2560 {SetBoolArray},
2561 {SetBoolArray, 1, 1, 1, 4, {0x00000001, 0x00000000, 0x00000001}},
2563 {0x00000001, 0x00000000, 0x00000001, 0x00000000, 0x00000001, 0x00000000, 0x00000001}},
2564 {SetFloatArray},
2565 {SetFloatArray, 0, 1, 1, 4, {0x00000002, 0x00000000, 0x00000001}},
2567 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001}},
2568 {SetValue, 1, 0, 3},
2569 {SetValue, 1, 4, 7, 4, {0x00000002, 0x00000000, 0x00000001}},
2570 {SetValue, 1, 8, REGISTER_OUTPUT_SIZE * 4, 8,
2571 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000003, 0x00000000, 0x00000001}},
2572 {SetVector, 0, 0, 0, 8,
2573 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001}},
2575 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 8,
2576 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001}},
2577 {SetMatrix, 0, 0, 0, 8,
2578 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001}},
2580 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
2581 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001}},
2582 {SetMatrixTranspose, 0, 0, 0, 8,
2583 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000006, 0x00000000, 0x00000001}},
2586 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000006, 0x00000000, 0x00000001}},
2589 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001}},
2592 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000006, 0x00000000, 0x00000001}},
2593};
2594
2596{
2597 {"ab", {"ab", D3DXRS_BOOL, 0, 2, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 2, 0, 8, NULL}, 37},
2598 {"ab[0]", {"ab", D3DXRS_BOOL, 0, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 37},
2599 {"ab[1]", {"ab", D3DXRS_BOOL, 1, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 38},
2600};
2601
2603{
2604 {SetFloat, 0, 0, 0, 1, {0x00000001}},
2605 {SetInt, 1, 0, 0, 1, {0x00000001}},
2606 {SetBool, 1, 0, 0, 1, {0x00000002}},
2607 {SetIntArray},
2608 {SetIntArray, 1, 1, 1, 1, {0x00000001}},
2609 {SetIntArray, 1, 2, REGISTER_OUTPUT_SIZE, 2, {0x00000001, 0x00000001}},
2610 {SetBoolArray},
2611 {SetBoolArray, 1, 1, 1, 1, {0x00000002}},
2612 {SetBoolArray, 1, 2, REGISTER_OUTPUT_SIZE, 2, {0x00000002, 0x00000003}},
2613 {SetFloatArray},
2614 {SetFloatArray, 0, 1, 1, 1, {0x00000001}},
2615 {SetFloatArray, 0, 2, REGISTER_OUTPUT_SIZE, 2, {0x00000001, 0x00000000}},
2616 {SetValue, 1, 0, 3},
2617 {SetValue, 1, 4, 7, 1, {0x00000002}},
2618 {SetValue, 1, 8, REGISTER_OUTPUT_SIZE * 4, 2, {0x00000002, 0x00000003}},
2619 {SetVector, 0, 0, 0, 2, {0x00000001, 0x00000000}},
2621 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 2, {0x00000001, 0x00000000}},
2622 {SetMatrix, 0, 0, 0, 2, {0x00000001, 0x00000000}},
2624 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 2, {0x00000001, 0x00000000}},
2625 {SetMatrixTranspose, 0, 0, 0, 2, {0x00000001, 0x00000001}},
2627 {SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 2, {0x00000001, 0x00000001}},
2629 {SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 2, {0x00000001, 0x00000000}},
2631 {SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 2, {0x00000001, 0x00000001}},
2632};
2633
2635{
2636 {"abf", {"abf", D3DXRS_FLOAT4, 4, 2, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 2, 0, 8, NULL}, 44},
2637 {"abf[0]", {"abf", D3DXRS_FLOAT4, 4, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 44},
2638 {"abf[1]", {"abf", D3DXRS_FLOAT4, 5, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 48},
2639};
2640
2642{
2643 {SetFloat, 0, 0, 0, 4, {0x3f800000}},
2644 {SetInt, 1, 0, 0, 4, {0x3f800000}},
2645 {SetBool, 1, 0, 0, 4, {0x3f800000}},
2646 {SetIntArray},
2647 {SetIntArray, 1, 1, 1, 4, {0x3f800000}},
2649 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000}},
2650 {SetBoolArray},
2651 {SetBoolArray, 1, 1, 1, 4, {0x3f800000}},
2653 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000}},
2654 {SetFloatArray},
2655 {SetFloatArray, 0, 1, 1, 4, {0x3f800000}},
2657 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2658 {SetValue, 1, 0, 3},
2659 {SetValue, 1, 4, 7, 4, {0x3f800000}},
2660 {SetValue, 1, 8, REGISTER_OUTPUT_SIZE * 4, 8,
2661 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000}},
2662 {SetVector, 0, 0, 0, 8,
2663 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2665 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 8,
2666 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2667 {SetMatrix, 0, 0, 0, 8,
2668 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2670 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
2671 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2672 {SetMatrixTranspose, 0, 0, 0, 8,
2673 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000}},
2676 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000}},
2679 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2682 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000}},
2683};
2684
2686{
2687 {"anf", {"anf", D3DXRS_FLOAT4, 2, 2, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 2, 0, 8, NULL}, 83},
2688 {"anf[0]", {"anf", D3DXRS_FLOAT4, 2, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 83},
2689 {"anf[1]", {"anf", D3DXRS_FLOAT4, 3, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 87},
2690};
2691
2693{
2694 {SetFloat, 0, 0, 0, 4, {0x40000000}},
2695 {SetInt, 1, 0, 0, 4, {0x40000000}},
2696 {SetBool, 1, 0, 0, 4, {0x3f800000}},
2697 {SetIntArray},
2698 {SetIntArray, 1, 1, 1, 4, {0x40000000}},
2700 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40400000}},
2701 {SetBoolArray},
2702 {SetBoolArray, 1, 1, 1, 4, {0x3f800000}},
2704 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000}},
2705 {SetFloatArray},
2706 {SetFloatArray, 0, 1, 1, 4, {0x40000000}},
2708 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2709 {SetValue, 1, 0, 3},
2710 {SetValue, 1, 4, 7, 4, {0x40000000}},
2711 {SetValue, 1, 8, REGISTER_OUTPUT_SIZE * 4, 8,
2712 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40400000}},
2713 {SetVector, 0, 0, 0, 8,
2714 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2716 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 8,
2717 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2718 {SetMatrix, 0, 0, 0, 8,
2719 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2721 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
2722 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2723 {SetMatrixTranspose, 0, 0, 0, 8,
2724 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40c00000}},
2727 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40c00000}},
2730 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
2733 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40c00000}},
2734};
2735
2736/*
2737 * fxc.exe /Tvs_3_0
2738 */
2739#if 0
2740bool3 vb = {1, 0, 1};
2741int3 vn = {7, 8, 9};
2742float3 vf = {5.1, 5.2, 5.3};
2743int3 vnf = {11, 85, 62};
2744bool3 vbf = {1, 1, 1};
2745float4 main(float4 pos : POSITION) : POSITION
2746{
2747 float4 tmp = 0;
2748 int i;
2749 if (vb.z) for (i = 0; i < vn.z; i++) tmp.x += pos.z * vf.z * vnf.z;
2750 else for (i = 0; i < vn.y; i++) tmp.y += pos.y * vf.y * vbf.z;
2751 return tmp;
2752}
2753#endif
2755{
27560xfffe0300, 0x0053fffe, 0x42415443, 0x0000001c, 0x00000117, 0xfffe0300, 0x00000005, 0x0000001c,
27570x00000100, 0x00000110, 0x00000080, 0x00000000, 0x00000003, 0x00000084, 0x00000094, 0x000000a0,
27580x00020002, 0x00000001, 0x00000084, 0x000000a4, 0x000000b4, 0x00000002, 0x00000001, 0x000000b8,
27590x000000c8, 0x000000d8, 0x00000001, 0x00000003, 0x000000dc, 0x000000ec, 0x000000fc, 0x00010002,
27600x00000001, 0x000000dc, 0x00000100, 0xab006276, 0x00010001, 0x00030001, 0x00000001, 0x00000000,
27610xffffffff, 0x00000000, 0xffffffff, 0x00666276, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000,
27620xab006676, 0x00030001, 0x00030001, 0x00000001, 0x00000000, 0x40a33333, 0x40a66666, 0x40a9999a,
27630x00000000, 0xab006e76, 0x00020001, 0x00030001, 0x00000001, 0x00000000, 0x00000007, 0x00000008,
27640x00000009, 0x00000000, 0x00666e76, 0x41300000, 0x42aa0000, 0x42780000, 0x00000000, 0x335f7376,
27650x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320,
27660x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x05000051, 0xa00f0003, 0x00000000,
27670x00000000, 0x00000000, 0x00000000, 0x0200001f, 0x80000000, 0x900f0000, 0x0200001f, 0x80000000,
27680xe00f0000, 0x01000028, 0xe0e40802, 0x03000005, 0x80010000, 0xa0aa0000, 0x90aa0000, 0x02000001,
27690x80010001, 0xa0000003, 0x01000026, 0xf0e40002, 0x04000004, 0x80010001, 0x80000000, 0xa0aa0001,
27700x80000001, 0x00000027, 0x02000001, 0x80020001, 0xa0000003, 0x0000002a, 0x03000005, 0x80010000,
27710xa0550000, 0x90550000, 0x02000001, 0x80020001, 0xa0000003, 0x01000026, 0xf0e40001, 0x04000004,
27720x80020001, 0x80000000, 0xa0aa0002, 0x80550001, 0x00000027, 0x02000001, 0x80010001, 0xa0000003,
27730x0000002b, 0x02000001, 0xe0030000, 0x80e40001, 0x02000001, 0xe00c0000, 0xa0000003, 0x0000ffff,
2774};
2775
2777{
2778 {"vf", {"vf", D3DXRS_FLOAT4, 0, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 50},
2779};
2780
2782{
2783 {SetInt},
2784 {SetBool},
2785 {SetFloat},
2786 {SetIntArray, 1, 0, 2},
2787 {SetIntArray, 1, 3, REGISTER_OUTPUT_SIZE, 4, {0x40000000, 0x40400000, 0x40800000}},
2788 {SetBoolArray, 1, 0, 2},
2789 {SetBoolArray, 1, 3, REGISTER_OUTPUT_SIZE, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
2790 {SetFloatArray, 0, 0, 2},
2791 {SetFloatArray, 0, 3, REGISTER_OUTPUT_SIZE, 4, {0x40000123, 0x00000000, 0x40800123}},
2792 {SetValue, 0, 0, 11},
2793 {SetValue, 0, 12, REGISTER_OUTPUT_SIZE * 4, 4, {0x40000123, 0x00000000, 0x40800123}},
2794 {SetVector, 0, 0, 0, 4, {0x40000123, 0x00000000, 0x40800123}},
2796 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 4, {0x40000123, 0x00000000, 0x40800123}},
2797 {SetMatrix, 0, 0, 0, 4, {0x40000123, 0x00000000, 0x40800123}},
2799 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000123, 0x00000000, 0x40800123}},
2800 {SetMatrixTranspose, 0, 0, 0, 4, {0x40000123, 0x40c00123, 0x41200123}},
2802 {SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000123, 0x40c00123, 0x41200123}},
2804 {SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000123, 0x00000000, 0x40800123}},
2806 {SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000123, 0x40c00123, 0x41200123}},
2807};
2808
2810{
2811 {"vn", {"vn", D3DXRS_INT4, 0, 3, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 59},
2812};
2813
2815{
2816 {SetInt},
2817 {SetBool},
2818 {SetFloat},
2819 {SetIntArray, 1, 0, 2},
2820 {SetIntArray, 1, 3, REGISTER_OUTPUT_SIZE, 4, {0x00000002, 0x00000003, 0x00000004}},
2821 {SetBoolArray, 1, 0, 2},
2822 {SetBoolArray, 1, 3, REGISTER_OUTPUT_SIZE, 4, {0x00000001, 0x00000001, 0x00000001}},
2823 {SetFloatArray, 0, 0, 2},
2824 {SetFloatArray, 0, 3, REGISTER_OUTPUT_SIZE, 4, {0x00000002, 0x00000000, 0x00000004}},
2825 {SetValue, 1, 0, 11},
2826 {SetValue, 1, 12, REGISTER_OUTPUT_SIZE * 4, 4, {0x00000002, 0x00000003, 0x00000004}},
2827 {SetVector, 0, 0, 0, 4, {0x00000002, 0x00000000, 0x00000004}},
2829 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 4, {0x00000002, 0x00000000, 0x00000004}},
2830 {SetMatrix, 0, 0, 0, 4, {0x00000002, 0x00000000, 0x00000004}},
2832 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x00000002, 0x00000000, 0x00000004}},
2833 {SetMatrixTranspose, 0, 0, 0, 4, {0x00000002, 0x00000006, 0x0000000a}},
2835 {SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x00000002, 0x00000006, 0x0000000a}},
2837 {SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x00000002, 0x00000000, 0x00000004}},
2839 {SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x00000002, 0x00000006, 0x0000000a}},
2840};
2841
2843{
2844 {"vb", {"vb", D3DXRS_BOOL, 0, 3, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 37},
2845};
2846
2848{
2849 {SetInt},
2850 {SetBool},
2851 {SetFloat},
2852 {SetIntArray, 1, 0, 2},
2853 {SetIntArray, 1, 3, REGISTER_OUTPUT_SIZE, 3, {0x00000001, 0x00000001, 0x00000001}},
2854 {SetBoolArray, 1, 0, 2},
2855 {SetBoolArray, 1, 3, REGISTER_OUTPUT_SIZE, 3, {0x00000002, 0x00000003, 0x00000004}},
2856 {SetFloatArray, 0, 0, 2},
2857 {SetFloatArray, 0, 3, REGISTER_OUTPUT_SIZE, 3, {0x00000001, 0x00000000, 0x00000001}},
2858 {SetValue, 1, 0, 11},
2859 {SetValue, 1, 12, REGISTER_OUTPUT_SIZE * 4, 3, {0x00000002, 0x00000003, 0x00000004}},
2860 {SetVector, 0, 0, 0, 3, {0x00000001, 0x00000000, 0x00000001}},
2862 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 3, {0x00000001, 0x00000000, 0x00000001}},
2863 {SetMatrix, 0, 0, 0, 3, {0x00000001, 0x00000000, 0x00000001}},
2865 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 3, {0x00000001, 0x00000000, 0x00000001}},
2866 {SetMatrixTranspose, 0, 0, 0, 3, {0x00000001, 0x00000001, 0x00000001}},
2868 {SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 3, {0x00000001, 0x00000001, 0x00000001}},
2870 {SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 3, {0x00000001, 0x00000000, 0x00000001}},
2872 {SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 3, {0x00000001, 0x00000001, 0x00000001}},
2873};
2874
2876{
2877 {"vbf", {"vbf", D3DXRS_FLOAT4, 2, 1, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 41},
2878};
2879
2881{
2882 {SetInt},
2883 {SetBool},
2884 {SetFloat},
2885 {SetIntArray, 1, 0, 2},
2886 {SetIntArray, 1, 3, REGISTER_OUTPUT_SIZE, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
2887 {SetBoolArray, 1, 0, 2},
2888 {SetBoolArray, 1, 3, REGISTER_OUTPUT_SIZE, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
2889 {SetFloatArray, 0, 0, 2},
2890 {SetFloatArray, 0, 3, REGISTER_OUTPUT_SIZE, 4, {0x3f800000, 0x00000000, 0x3f800000}},
2891 {SetValue, 1, 0, 11},
2892 {SetValue, 1, 12, REGISTER_OUTPUT_SIZE * 4, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
2893 {SetVector, 0, 0, 0, 4, {0x3f800000, 0x00000000, 0x3f800000}},
2895 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 4, {0x3f800000, 0x00000000, 0x3f800000}},
2896 {SetMatrix, 0, 0, 0, 4, {0x3f800000, 0x00000000, 0x3f800000}},
2898 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x3f800000, 0x00000000, 0x3f800000}},
2899 {SetMatrixTranspose, 0, 0, 0, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
2901 {SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
2903 {SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x3f800000, 0x00000000, 0x3f800000}},
2905 {SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
2906};
2907
2909{
2910 {"vnf", {"vnf", D3DXRS_FLOAT4, 1, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 64},
2911};
2912
2914{
2915 {SetInt},
2916 {SetBool},
2917 {SetFloat},
2918 {SetIntArray, 1, 0, 2},
2919 {SetIntArray, 1, 3, REGISTER_OUTPUT_SIZE, 4, {0x40000000, 0x40400000, 0x40800000}},
2920 {SetBoolArray, 1, 0, 2},
2921 {SetBoolArray, 1, 3, REGISTER_OUTPUT_SIZE, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
2922 {SetFloatArray, 0, 0, 2},
2923 {SetFloatArray, 0, 3, REGISTER_OUTPUT_SIZE, 4, {0x40000000, 0x00000000, 0x40800000}},
2924 {SetValue, 1, 0, 11},
2925 {SetValue, 1, 12, REGISTER_OUTPUT_SIZE * 4, 4, {0x40000000, 0x40400000, 0x40800000}},
2926 {SetVector, 0, 0, 0, 4, {0x40000000, 0x00000000, 0x40800000}},
2928 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 4, {0x40000000, 0x00000000, 0x40800000}},
2929 {SetMatrix, 0, 0, 0, 4, {0x40000000, 0x00000000, 0x40800000}},
2931 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000000, 0x00000000, 0x40800000}},
2932 {SetMatrixTranspose, 0, 0, 0, 4, {0x40000000, 0x40c00000, 0x41200000}},
2934 {SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000000, 0x40c00000, 0x41200000}},
2936 {SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000000, 0x00000000, 0x40800000}},
2938 {SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000000, 0x40c00000, 0x41200000}},
2939};
2940
2941/*
2942 * fxc.exe /Tvs_3_0
2943 */
2944#if 0
2945bool3 vab[2] = {1, 0, 1, 1, 0, 1};
2946int3 van[2] = {70, 80, 90, 100, 110, 120};
2947float3 vaf[2] = {55.1, 55.2, 55.3, 55.4, 55.5, 55.6};
2948int3 vanf[2] = {130, 140, 150, 160, 170, 180};
2949bool3 vabf[2] = {1, 1, 1, 1, 1, 1};
2950float4 main(float4 pos : POSITION) : POSITION
2951{
2952 float4 tmp = 0;
2953 int i;
2954 if (vab[1].z) for (i = 0; i < van[1].z; i++) tmp.x += pos.z * vaf[1].z * vanf[1].z;
2955 else for (i = 0; i < van[1].y; i++) tmp.y += pos.y * vaf[0].y * vabf[1].z;
2956 return tmp;
2957}
2958#endif
2960{
29610xfffe0300, 0x0070fffe, 0x42415443, 0x0000001c, 0x0000018b, 0xfffe0300, 0x00000005, 0x0000001c,
29620x00000100, 0x00000184, 0x00000080, 0x00000000, 0x00000006, 0x00000084, 0x00000094, 0x000000ac,
29630x00040002, 0x00000002, 0x000000b4, 0x000000c4, 0x000000e4, 0x00000002, 0x00000002, 0x000000e8,
29640x000000f8, 0x00000118, 0x00000001, 0x00000006, 0x0000011c, 0x0000012c, 0x0000014c, 0x00020002,
29650x00000002, 0x00000154, 0x00000164, 0x00626176, 0x00010001, 0x00030001, 0x00000002, 0x00000000,
29660xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0x66626176, 0xababab00,
29670x00010001, 0x00030001, 0x00000002, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000,
29680x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00666176, 0x00030001, 0x00030001, 0x00000002,
29690x00000000, 0x425c6666, 0x425ccccd, 0x425d3333, 0x00000000, 0x425d999a, 0x425e0000, 0x425e6666,
29700x00000000, 0x006e6176, 0x00020001, 0x00030001, 0x00000002, 0x00000000, 0x00000046, 0x00000050,
29710x0000005a, 0x00000000, 0x00000064, 0x0000006e, 0x00000078, 0x00000000, 0x666e6176, 0xababab00,
29720x00020001, 0x00030001, 0x00000002, 0x00000000, 0x43020000, 0x430c0000, 0x43160000, 0x00000000,
29730x43200000, 0x432a0000, 0x43340000, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73,
29740x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932,
29750x332e3235, 0x00313131, 0x05000051, 0xa00f0006, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
29760x0200001f, 0x80000000, 0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x01000028, 0xe0e40805,
29770x03000005, 0x80010000, 0xa0aa0001, 0x90aa0000, 0x02000001, 0x80010001, 0xa0000006, 0x01000026,
29780xf0e40005, 0x04000004, 0x80010001, 0x80000000, 0xa0aa0003, 0x80000001, 0x00000027, 0x02000001,
29790x80020001, 0xa0000006, 0x0000002a, 0x03000005, 0x80010000, 0xa0550000, 0x90550000, 0x02000001,
29800x80020001, 0xa0000006, 0x01000026, 0xf0e40004, 0x04000004, 0x80020001, 0x80000000, 0xa0aa0005,
29810x80550001, 0x00000027, 0x02000001, 0x80010001, 0xa0000006, 0x0000002b, 0x02000001, 0xe0030000,
29820x80e40001, 0x02000001, 0xe00c0000, 0xa0000006, 0x0000ffff,
2983};
2984
2986{
2987 {"vaf", {"vaf", D3DXRS_FLOAT4, 0, 2, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 2, 0, 24, NULL}, 62},
2988 {"vaf[0]", {"vaf", D3DXRS_FLOAT4, 0, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 62},
2989 {"vaf[1]", {"vaf", D3DXRS_FLOAT4, 1, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 66},
2990};
2991
2993{
2994 {SetInt},
2995 {SetBool},
2996 {SetFloat},
2997 {SetIntArray, 1, 0, 2},
2998 {SetIntArray, 1, 3, 5, 4, {0x40000000, 0x40400000, 0x40800000}},
3000 {0x40000000, 0x40400000, 0x40800000, 0x00000000, 0x40a00000, 0x00000000, 0x40e00000}},
3001 {SetBoolArray, 1, 0, 2},
3002 {SetBoolArray, 1, 3, 5, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
3004 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000}},
3005 {SetFloatArray, 0, 0, 2},
3006 {SetFloatArray, 0, 3, 5, 4, {0x40000123, 0x00000000, 0x40800123}},
3008 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40a00123, 0x40c00123, 0x40e00123}},
3009 {SetValue, 0, 0, 11},
3010 {SetValue, 0, 12, 23, 4, {0x40000123, 0x00000000, 0x40800123}},
3011 {SetValue, 0, 24, REGISTER_OUTPUT_SIZE * 4, 8,
3012 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40a00123, 0x40c00123, 0x40e00123}},
3013 {SetVector, 0, 0, 0, 4, {0x40000123, 0x00000000, 0x40800123}},
3015 {SetVectorArray, 0, 1, 1, 4, {0x40000123, 0x00000000, 0x40800123}},
3016 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 8,
3017 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123}},
3018 {SetMatrix, 0, 0, 0, 8,
3019 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123}},
3021 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
3022 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123}},
3023 {SetMatrixTranspose, 0, 0, 0, 8,
3024 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123}},
3027 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123}},
3030 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123}},
3033 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123}},
3034};
3035
3037{
3038 {"van", {"van", D3DXRS_INT4, 0, 6, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 2, 0, 24, NULL}, 75},
3039 {"van[0]", {"van", D3DXRS_INT4, 0, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 75},
3040 {"van[1]", {"van", D3DXRS_INT4, 1, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 79},
3041};
3042
3044{
3045 {SetInt},
3046 {SetBool},
3047 {SetFloat},
3048 {SetIntArray, 1, 0, 2},
3049 {SetIntArray, 1, 3, 5, 4, {0x00000002, 0x00000003, 0x00000004}},
3051 {0x00000002, 0x00000003, 0x00000004, 0x00000000, 0x00000005, 0x00000000, 0x00000007}},
3052 {SetBoolArray, 1, 0, 2},
3053 {SetBoolArray, 1, 3, 5, 4, {0x00000001, 0x00000001, 0x00000001}},
3055 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000000, 0x00000001}},
3056 {SetFloatArray, 0, 0, 2},
3057 {SetFloatArray, 0, 3, 5, 4, {0x00000002, 0x00000000, 0x00000004}},
3059 {0x00000002, 0x00000000, 0x00000004, 0x00000000, 0x00000005, 0x00000006, 0x00000007}},
3060 {SetValue, 1, 0, 11},
3061 {SetValue, 1, 12, 23, 4, {0x00000002, 0x00000003, 0x00000004}},
3062 {SetValue, 1, 24, REGISTER_OUTPUT_SIZE * 4, 8,
3063 {0x00000002, 0x00000003, 0x00000004, 0x00000000, 0x00000005, 0x00000000, 0x00000007}},
3064 {SetVector, 0, 0, 0, 4, {0x00000002, 0x00000000, 0x00000004}},
3065 {SetVectorArray, 0, 0, 0},
3066 {SetVectorArray, 0, 1, 1, 4, {0x00000002, 0x00000000, 0x00000004}},
3067 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 8,
3068 {0x00000002, 0x00000000, 0x00000004, 0x00000000, 0x00000006, 0x00000007, 0x00000008}},
3069 {SetMatrix, 0, 0, 0, 8,
3070 {0x00000002, 0x00000000, 0x00000004, 0x00000000, 0x00000006, 0x00000007, 0x00000008}},
3072 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
3073 {0x00000002, 0x00000000, 0x00000004, 0x00000000, 0x00000006, 0x00000007, 0x00000008}},
3074 {SetMatrixTranspose, 0, 0, 0, 8,
3075 {0x00000002, 0x00000006, 0x0000000a, 0x00000000, 0x00000000, 0x00000007, 0x0000000b}},
3078 {0x00000002, 0x00000006, 0x0000000a, 0x00000000, 0x00000000, 0x00000007, 0x0000000b}},
3081 {0x00000002, 0x00000000, 0x00000004, 0x00000000, 0x00000006, 0x00000007, 0x00000008}},
3084 {0x00000002, 0x00000006, 0x0000000a, 0x00000000, 0x00000000, 0x00000007, 0x0000000b}},
3085};
3086
3088{
3089 {"vab", {"vab", D3DXRS_BOOL, 0, 6, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 2, 0, 24, NULL}, 37},
3090 {"vab[0]", {"vab", D3DXRS_BOOL, 0, 3, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 37},
3091 {"vab[1]", {"vab", D3DXRS_BOOL, 3, 3, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 40},
3092};
3093
3095{
3096 {SetInt},
3097 {SetBool},
3098 {SetFloat},
3099 {SetIntArray, 1, 0, 2},
3100 {SetIntArray, 1, 3, 5, 3, {0x00000001, 0x00000001, 0x00000001}},
3102 {0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001}},
3103 {SetBoolArray, 1, 0},
3104 {SetBoolArray, 1, 3, 5, 3, {0x00000002, 0x00000003, 0x00000004}},
3106 {0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000000, 0x00000007}},
3107 {SetFloatArray, 0, 0, 2},
3108 {SetFloatArray, 0, 3, 5, 3, {0x00000001, 0x00000000, 0x00000001}},
3110 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
3111 {SetValue, 1, 0, 11},
3112 {SetValue, 1, 12, 23, 3, {0x00000002, 0x00000003, 0x00000004}},
3113 {SetValue, 1, 24, REGISTER_OUTPUT_SIZE * 4, 6,
3114 {0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000000, 0x00000007}},
3115 {SetVector, 0, 0, 0, 3, {0x00000001, 0x00000000, 0x00000001}},
3117 {SetVectorArray, 0, 1, 1, 3, {0x00000001, 0x00000000, 0x00000001}},
3118 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 6,
3119 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
3120 {SetMatrix, 0, 0, 0, 6,
3121 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
3123 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 6,
3124 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
3125 {SetMatrixTranspose, 0, 0, 0, 6,
3126 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001}},
3129 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001}},
3132 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
3135 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001}},
3136};
3137
3139{
3140 {"vabf", {"vabf", D3DXRS_FLOAT4, 4, 2, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 2, 0, 24, NULL}, 49},
3141 {"vabf[0]", {"vabf", D3DXRS_FLOAT4, 4, 1, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 49},
3142 {"vabf[1]", {"vabf", D3DXRS_FLOAT4, 5, 1, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 53},
3143};
3144
3146{
3147 {SetInt},
3148 {SetBool},
3149 {SetFloat},
3150 {SetIntArray, 1, 0, 2},
3151 {SetIntArray, 1, 3, 5, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
3153 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000}},
3154 {SetBoolArray, 1, 0, 2},
3155 {SetBoolArray, 1, 3, 5, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
3157 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000}},
3158 {SetFloatArray, 0, 0, 2},
3159 {SetFloatArray, 0, 3, 5, 4, {0x3f800000, 0x00000000, 0x3f800000}},
3161 {0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3162 {SetValue, 1, 0, 11},
3163 {SetValue, 1, 12, 23, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
3164 {SetValue, 1, 24, REGISTER_OUTPUT_SIZE * 4, 8,
3165 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000}},
3166 {SetVector, 0, 0, 0, 4, {0x3f800000, 0x00000000, 0x3f800000},},
3168 {SetVectorArray, 0, 1, 1, 4, {0x3f800000, 0x00000000, 0x3f800000}},
3169 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 8,
3170 {0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3171 {SetMatrix, 0, 0, 0, 8,
3172 {0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3174 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
3175 {0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3176 {SetMatrixTranspose, 0, 0, 0, 8,
3177 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
3180 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
3183 {0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3186 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
3187};
3188
3190{
3191 {"vanf", {"vanf", D3DXRS_FLOAT4, 2, 2, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 2, 0, 24, NULL}, 89},
3192 {"vanf[0]", {"vanf", D3DXRS_FLOAT4, 2, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 89},
3193 {"vanf[1]", {"vanf", D3DXRS_FLOAT4, 3, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 93},
3194};
3195
3197{
3198 {SetInt},
3199 {SetBool},
3200 {SetFloat},
3201 {SetIntArray, 1, 0, 2},
3202 {SetIntArray, 1, 3, 5, 4, {0x40000000, 0x40400000, 0x40800000}},
3204 {0x40000000, 0x40400000, 0x40800000, 0x00000000, 0x40a00000, 0x00000000, 0x40e00000}},
3205 {SetBoolArray, 1, 0, 2},
3206 {SetBoolArray, 1, 3, 5, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
3208 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000}},
3209 {SetFloatArray, 2, 0, 2,},
3210 {SetFloatArray, 0, 3, 5, 4, {0x40000000, 0x00000000, 0x40800000}},
3212 {0x40000000, 0x00000000, 0x40800000, 0x00000000, 0x40a00000, 0x40c00000, 0x40e00000}},
3213 {SetValue, 1, 0, 11},
3214 {SetValue, 1, 12, 23, 4, {0x40000000, 0x40400000, 0x40800000}},
3215 {SetValue, 1, 24, REGISTER_OUTPUT_SIZE * 4, 8,
3216 {0x40000000, 0x40400000, 0x40800000, 0x00000000, 0x40a00000, 0x00000000, 0x40e00000}},
3217 {SetVector, 0, 0, 0, 4, {0x40000000, 0x00000000, 0x40800000}},
3219 {SetVectorArray, 0, 1, 1, 4, {0x40000000, 0x00000000, 0x40800000}},
3220 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 8,
3221 {0x40000000, 0x00000000, 0x40800000, 0x00000000, 0x40c00000, 0x40e00000, 0x41000000}},
3222 {SetMatrix, 0, 0, 0, 8,
3223 {0x40000000, 0x00000000, 0x40800000, 0x00000000, 0x40c00000, 0x40e00000, 0x41000000}},
3225 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
3226 {0x40000000, 0x00000000, 0x40800000, 0x00000000, 0x40c00000, 0x40e00000, 0x41000000}},
3227 {SetMatrixTranspose, 0, 0, 0, 8,
3228 {0x40000000, 0x40c00000, 0x41200000, 0x00000000, 0x00000000, 0x40e00000, 0x41300000}},
3231 {0x40000000, 0x40c00000, 0x41200000, 0x00000000, 0x00000000, 0x40e00000, 0x41300000}},
3234 {0x40000000, 0x00000000, 0x40800000, 0x00000000, 0x40c00000, 0x40e00000, 0x41000000}},
3237 {0x40000000, 0x40c00000, 0x41200000, 0x00000000, 0x00000000, 0x40e00000, 0x41300000}},
3238};
3239
3240/*
3241 * fxc.exe /Tvs_3_0
3242 */
3243#if 0
3244bool3x2 cb = {1, 0, 1, 1, 0, 1};
3245int3x2 cn = {4, 5, 6, 7, 8, 9};
3246float3x2 cf = {15.1, 15.2, 15.3, 15.4, 15.5, 15.6};
3247bool3x2 cbf = {1, 1, 0, 1, 0, 1};
3248int3x2 cnf = {30, 31, 33, 32, 34, 36};
3249float4 main(float4 pos : POSITION) : POSITION
3250{
3251 float4 tmp = 0;
3252 int i;
3253 if (cb._32) for (i = 0; i < cn._31; i++) tmp.x += pos.z * cf._31 * cbf._32;
3254 else for (i = 0; i < cn._32; i++) tmp.y += pos.y * cf._32 * cnf._32;
3255 return tmp;
3256}
3257#endif
3259{
32600xfffe0300, 0x0066fffe, 0x42415443, 0x0000001c, 0x00000163, 0xfffe0300, 0x00000005, 0x0000001c,
32610x00000100, 0x0000015c, 0x00000080, 0x00000000, 0x00000006, 0x00000084, 0x00000094, 0x000000ac,
32620x00020002, 0x00000002, 0x00000084, 0x000000b0, 0x000000d0, 0x00000002, 0x00000002, 0x000000d4,
32630x000000e4, 0x00000104, 0x00000001, 0x00000006, 0x00000108, 0x00000118, 0x00000138, 0x00040002,
32640x00000002, 0x00000108, 0x0000013c, 0xab006263, 0x00010003, 0x00020003, 0x00000001, 0x00000000,
32650xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0x00666263, 0x3f800000,
32660x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0xab006663,
32670x00030003, 0x00020003, 0x00000001, 0x00000000, 0x4171999a, 0x4174cccd, 0x41780000, 0x00000000,
32680x41733333, 0x41766666, 0x4179999a, 0x00000000, 0xab006e63, 0x00020003, 0x00020003, 0x00000001,
32690x00000000, 0x00000004, 0x00000006, 0x00000008, 0x00000000, 0x00000005, 0x00000007, 0x00000009,
32700x00000000, 0x00666e63, 0x41f00000, 0x42040000, 0x42080000, 0x00000000, 0x41f80000, 0x42000000,
32710x42100000, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820,
32720x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131,
32730x05000051, 0xa00f0006, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0200001f, 0x80000000,
32740x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x01000028, 0xe0e40805, 0x03000005, 0x80010000,
32750xa0aa0000, 0x90aa0000, 0x02000001, 0x80010001, 0xa0000006, 0x01000026, 0xf0e40004, 0x04000004,
32760x80010001, 0x80000000, 0xa0aa0003, 0x80000001, 0x00000027, 0x02000001, 0x80020001, 0xa0000006,
32770x0000002a, 0x03000005, 0x80010000, 0xa0aa0001, 0x90550000, 0x02000001, 0x80020001, 0xa0000006,
32780x01000026, 0xf0e40005, 0x04000004, 0x80020001, 0x80000000, 0xa0aa0005, 0x80550001, 0x00000027,
32790x02000001, 0x80010001, 0xa0000006, 0x0000002b, 0x02000001, 0xe0030000, 0x80e40001, 0x02000001,
32800xe00c0000, 0xa0000006, 0x0000ffff,
3281};
3282
3284{
3285 {"cf", {"cf", D3DXRS_FLOAT4, 0, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL}, 57},
3286};
3287
3289{
3290 {SetInt},
3291 {SetBool},
3292 {SetFloat},
3293 {SetIntArray, 1, 0, 5},
3295 {0x40000000, 0x40800000, 0x00000000, 0x00000000, 0x40400000, 0x40a00000, 0x40e00000}},
3296 {SetBoolArray, 1, 0, 5},
3298 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3299 {SetFloatArray, 0, 0, 5},
3301 {0x40000123, 0x40800123, 0x40c00123, 0x00000000, 0x00000000, 0x40a00123, 0x40e00123}},
3302 {SetValue, 0, 0, 23},
3303 {SetValue, 0, 24, REGISTER_OUTPUT_SIZE * 4, 8,
3304 {0x40000123, 0x40800123, 0x40c00123, 0x00000000, 0x00000000, 0x40a00123, 0x40e00123}},
3305 {SetVector},
3306 {SetVectorArray, 0, 0, 1},
3307 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 8,
3308 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123}},
3309 {SetMatrix, 0, 0, 0, 8,
3310 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123}},
3312 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
3313 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123}},
3314 {SetMatrixTranspose, 0, 0, 0, 8,
3315 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123}},
3318 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123}},
3321 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123}},
3324 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123}},
3325};
3326
3328{
3329 {"cn", {"cn", D3DXRS_INT4, 0, 6, D3DXPC_MATRIX_COLUMNS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 70},
3330};
3331
3333{
3334 {SetInt},
3335 {SetBool},
3336 {SetFloat},
3337 {SetIntArray, 1, 0, 5},
3339 {0x00000002, 0x00000004, 0x00000000, 0x00000000, 0x00000003, 0x00000005, 0x00000007}},
3340 {SetBoolArray, 1, 0, 5},
3342 {0x00000001, 0x00000001, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001}},
3343 {SetFloatArray, 0, 0, 5},
3345 {0x00000002, 0x00000004, 0x00000006, 0x00000000, 0x00000000, 0x00000005, 0x00000007}},
3346 {SetValue, 1, 0, 23},
3347 {SetValue, 1, 24, REGISTER_OUTPUT_SIZE * 4, 8,
3348 {0x00000002, 0x00000004, 0x00000000, 0x00000000, 0x00000003, 0x00000005, 0x00000007}},
3349 {SetVector},
3350 {SetVectorArray, 0, 0, 1},
3351 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 8,
3352 {0x00000002, 0x00000006, 0x0000000a, 0x00000000, 0x00000000, 0x00000007, 0x0000000b}},
3353 {SetMatrix, 0, 0, 0, 8,
3354 {0x00000002, 0x00000006, 0x0000000a, 0x00000000, 0x00000000, 0x00000007, 0x0000000b}},
3356 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
3357 {0x00000002, 0x00000006, 0x0000000a, 0x00000000, 0x00000000, 0x00000007, 0x0000000b}},
3358 {SetMatrixTranspose, 0, 0, 0, 8,
3359 {0x00000002, 0x00000000, 0x00000004, 0x00000000, 0x00000006, 0x00000007, 0x00000008}},
3362 {0x00000002, 0x00000000, 0x00000004, 0x00000000, 0x00000006, 0x00000007, 0x00000008}},
3365 {0x00000002, 0x00000006, 0x0000000a, 0x00000000, 0x00000000, 0x00000007, 0x0000000b}},
3368 {0x00000002, 0x00000000, 0x00000004, 0x00000000, 0x00000006, 0x00000007, 0x00000008}},
3369};
3370
3372{
3373 {"cb", {"cb", D3DXRS_BOOL, 0, 6, D3DXPC_MATRIX_COLUMNS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 37},
3374};
3375
3377{
3378 {SetInt},
3379 {SetBool},
3380 {SetFloat},
3381 {SetIntArray, 1, 0, 5},
3383 {0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001}},
3384 {SetBoolArray, 1, 0, 5},
3386 {0x00000002, 0x00000004, 0x00000000, 0x00000003, 0x00000005, 0x00000007}},
3387 {SetFloatArray, 0, 0, 5},
3389 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001}},
3390 {SetValue, 1, 0, 23},
3391 {SetValue, 1, 24, REGISTER_OUTPUT_SIZE * 4, 6,
3392 {0x00000002, 0x00000004, 0x00000000, 0x00000003, 0x00000005, 0x00000007}},
3393 {SetVector},
3394 {SetVectorArray, 0, 0, 1},
3395 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 6,
3396 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001}},
3397 {SetMatrix, 0, 0, 0, 6,
3398 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001}},
3400 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 6,
3401 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001}},
3402 {SetMatrixTranspose, 0, 0, 0, 6,
3403 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
3406 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
3409 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001}},
3412 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
3413};
3414
3416{
3417 {"cnf", {"cnf", D3DXRS_FLOAT4, 4, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 79},
3418};
3419
3421{
3422 {SetInt},
3423 {SetBool},
3424 {SetFloat},
3425 {SetIntArray, 1, 0, 5},
3427 {0x40000000, 0x40800000, 0x00000000, 0x00000000, 0x40400000, 0x40a00000, 0x40e00000}},
3428 {SetBoolArray, 1, 0, 5},
3430 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3431 {SetFloatArray, 0, 0, 5},
3433 {0x40000000, 0x40800000, 0x40c00000, 0x00000000, 0x00000000, 0x40a00000, 0x40e00000}},
3434 {SetValue, 1, 0, 23},
3435 {SetValue, 1, 24, REGISTER_OUTPUT_SIZE * 4, 8,
3436 {0x40000000, 0x40800000, 0x00000000, 0x00000000, 0x40400000, 0x40a00000, 0x40e00000}},
3437 {SetVector},
3438 {SetVectorArray, 0, 0, 1},
3439 {SetValue, 0, 0, 23},
3440 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 8,
3441 {0x40000000, 0x40c00000, 0x41200000, 0x00000000, 0x00000000, 0x40e00000, 0x41300000}},
3442 {SetMatrix, 0, 0, 0, 8,
3443 {0x40000000, 0x40c00000, 0x41200000, 0x00000000, 0x00000000, 0x40e00000, 0x41300000}},
3445 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
3446 {0x40000000, 0x40c00000, 0x41200000, 0x00000000, 0x00000000, 0x40e00000, 0x41300000}},
3447 {SetMatrixTranspose, 0, 0, 0, 8,
3448 {0x40000000, 0x00000000, 0x40800000, 0x00000000, 0x40c00000, 0x40e00000, 0x41000000}},
3451 {0x40000000, 0x00000000, 0x40800000, 0x00000000, 0x40c00000, 0x40e00000, 0x41000000}},
3454 {0x40000000, 0x40c00000, 0x41200000, 0x00000000, 0x00000000, 0x40e00000, 0x41300000}},
3457 {0x40000000, 0x00000000, 0x40800000, 0x00000000, 0x40c00000, 0x40e00000, 0x41000000}},
3458};
3459
3461{
3462 {"cbf", {"cbf", D3DXRS_FLOAT4, 2, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 44},
3463};
3464
3466{
3467 {SetInt},
3468 {SetBool},
3469 {SetFloat},
3470 {SetIntArray, 1, 0, 5},
3472 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3473 {SetBoolArray, 1, 0, 5},
3475 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3476 {SetFloatArray, 0, 0, 5},
3478 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
3479 {SetValue, 1, 0, 23},
3480 {SetValue, 1, 24, REGISTER_OUTPUT_SIZE * 4, 8,
3481 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3482 {SetVector},
3483 {SetVectorArray, 0, 0, 1},
3484 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 8,
3485 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
3486 {SetMatrix, 0, 0, 0, 8,
3487 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
3489 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
3490 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
3491 {SetMatrixTranspose, 0, 0, 0, 8,
3492 {0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3495 {0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3498 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
3501 {0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3502};
3503
3504/*
3505 * fxc.exe /Tvs_3_0
3506 */
3507#if 0
3508bool3x2 cab[2] = {1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1};
3509int3x2 can[2] = {14, 15, 16, 71, 18, 19, 55, 63, 96, 96, 97, 13};
3510float3x2 caf[2] = {1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 1.2, 1.3, 1.4};
3511bool3x2 cabf[2] = {1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1};
3512int3x2 canf[2] = {300, 301, 303, 302, 304, 306, 350, 365, 654, 612, 326, 999};
3513float4 main(float4 pos : POSITION) : POSITION
3514{
3515 float4 tmp = 0;
3516 int i;
3517 if (cab[1]._32) for (i = 0; i < can[1]._31; i++) tmp.x += pos.z * caf[1]._31 * cabf[1]._32;
3518 else for (i = 0; i < can[1]._32; i++) tmp.y += pos.y * caf[1]._32 * canf[1]._32;
3519 return tmp;
3520}
3521#endif
3523{
35240xfffe0300, 0x0096fffe, 0x42415443, 0x0000001c, 0x00000223, 0xfffe0300, 0x00000005, 0x0000001c,
35250x00000100, 0x0000021c, 0x00000080, 0x00000000, 0x0000000c, 0x00000084, 0x00000094, 0x000000c4,
35260x00040002, 0x00000004, 0x000000cc, 0x000000dc, 0x0000011c, 0x00000002, 0x00000004, 0x00000120,
35270x00000130, 0x00000170, 0x00000001, 0x0000000c, 0x00000174, 0x00000184, 0x000001c4, 0x00080002,
35280x00000004, 0x000001cc, 0x000001dc, 0x00626163, 0x00010003, 0x00020003, 0x00000002, 0x00000000,
35290xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000,
35300xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0x66626163, 0xababab00, 0x00010003, 0x00020003,
35310x00000002, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000,
35320x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000,
35330x3f800000, 0x00000000, 0x00666163, 0x00030003, 0x00020003, 0x00000002, 0x00000000, 0x3f8ccccd,
35340x40533333, 0x40b00000, 0x00000000, 0x400ccccd, 0x408ccccd, 0x40d33333, 0x00000000, 0x40f66666,
35350x411e6666, 0x3fa66666, 0x00000000, 0x410ccccd, 0x3f99999a, 0x3fb33333, 0x00000000, 0x006e6163,
35360x00020003, 0x00020003, 0x00000002, 0x00000000, 0x0000000e, 0x00000010, 0x00000012, 0x00000000,
35370x0000000f, 0x00000047, 0x00000013, 0x00000000, 0x00000037, 0x00000060, 0x00000061, 0x00000000,
35380x0000003f, 0x00000060, 0x0000000d, 0x00000000, 0x666e6163, 0xababab00, 0x00020003, 0x00020003,
35390x00000002, 0x00000000, 0x43960000, 0x43978000, 0x43980000, 0x00000000, 0x43968000, 0x43970000,
35400x43990000, 0x00000000, 0x43af0000, 0x44238000, 0x43a30000, 0x00000000, 0x43b68000, 0x44190000,
35410x4479c000, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820,
35420x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131,
35430x05000051, 0xa00f000c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0200001f, 0x80000000,
35440x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x01000028, 0xe0e4080b, 0x03000005, 0x80010000,
35450xa0aa0002, 0x90aa0000, 0x02000001, 0x80010001, 0xa000000c, 0x01000026, 0xf0e4000a, 0x04000004,
35460x80010001, 0x80000000, 0xa0aa0007, 0x80000001, 0x00000027, 0x02000001, 0x80020001, 0xa000000c,
35470x0000002a, 0x03000005, 0x80010000, 0xa0aa0003, 0x90550000, 0x02000001, 0x80020001, 0xa000000c,
35480x01000026, 0xf0e4000b, 0x04000004, 0x80020001, 0x80000000, 0xa0aa000b, 0x80550001, 0x00000027,
35490x02000001, 0x80010001, 0xa000000c, 0x0000002b, 0x02000001, 0xe0030000, 0x80e40001, 0x02000001,
35500xe00c0000, 0xa000000c, 0x0000ffff,
3551};
3552
3554{
3555 {"caf", {"caf", D3DXRS_FLOAT4, 0, 4, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 2, 2, 0, 48, NULL}, 76},
3556 {"caf[0]", {"caf", D3DXRS_FLOAT4, 0, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL}, 76},
3557 {"caf[1]", {"caf", D3DXRS_FLOAT4, 2, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL}, 84},
3558};
3559
3561{
3562 {SetInt},
3563 {SetBool},
3564 {SetFloat},
3565 {SetIntArray, 1, 0, 5},
3566 {SetIntArray, 1, 6, 11, 8,
3567 {0x40000000, 0x40800000, 0x00000000, 0x00000000, 0x40400000, 0x40a00000, 0x40e00000}},
3568 {SetIntArray, 1, 12, REGISTER_OUTPUT_SIZE, 16,
3569 {0x40000000, 0x40800000, 0x00000000, 0x00000000, 0x40400000, 0x40a00000, 0x40e00000, 0x00000000,
3570 0x41000000, 0x41200000, 0x41400000, 0x00000000, 0x41100000, 0x41300000, 0x41500000}},
3571 {SetBoolArray, 1, 0, 5},
3572 {SetBoolArray, 1, 6, 11, 8,
3573 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3575 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000,
3576 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3577 {SetFloatArray, 0, 0, 5},
3578 {SetFloatArray, 0, 6, 11, 8,
3579 {0x40000123, 0x40800123, 0x40c00123, 0x00000000, 0x00000000, 0x40a00123, 0x40e00123}},
3581 {0x40000123, 0x40800123, 0x40c00123, 0x00000000, 0x00000000, 0x40a00123, 0x40e00123, 0x00000000,
3582 0x41000123, 0x41200123, 0x41400123, 0x00000000, 0x41100123, 0x41300123, 0x41500123}},
3583 {SetValue, 0, 0, 23},
3584 {SetValue, 0, 24, 47, 8,
3585 {0x40000123, 0x40800123, 0x40c00123, 0x00000000, 0x00000000, 0x40a00123, 0x40e00123}},
3586 {SetValue, 0, 48, REGISTER_OUTPUT_SIZE * 4, 16,
3587 {0x40000123, 0x40800123, 0x40c00123, 0x00000000, 0x00000000, 0x40a00123, 0x40e00123, 0x00000000,
3588 0x41000123, 0x41200123, 0x41400123, 0x00000000, 0x41100123, 0x41300123, 0x41500123}},
3589 {SetVector},
3590 {SetVectorArray, 0, 0, 1},
3591 {SetVectorArray, 0, 2, 3, 8,
3592 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123}},
3593 {SetVectorArray, 0, 4, REGISTER_OUTPUT_SIZE / 4, 16,
3594 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
3595 0x41600123, 0x41a00123, 0x00000000, 0x00000000, 0x41700123, 0x41b00123, 0x41f00123}},
3596 {SetMatrix, 0, 0, 0, 8,
3597 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123}},
3599 {SetMatrixArray, 0, 1, 1, 8,
3600 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123}},
3601 {SetMatrixArray, 0, 2, REGISTER_OUTPUT_SIZE / 16, 16,
3602 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
3603 0x41a00123, 0x00000000, 0x00000000, 0x00000000, 0x41b00123, 0x41f00123, 0x42300123}},
3604 {SetMatrixTranspose, 0, 0, 0, 8,
3605 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123}},
3607 {SetMatrixTransposeArray, 0, 1, 1, 8,
3608 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123}},
3610 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123, 0x00000000,
3611 0x41a00123, 0x41b00123, 0x41c00123, 0x00000000, 0x00000000, 0x41f00123, 0x42000123}},
3613 {SetMatrixPointerArray, 0, 1, 1, 8,
3614 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123}},
3616 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
3617 0x41900123, 0x41d00123, 0x42100123, 0x00000000, 0x41a00123, 0x00000000, 0x00000000}},
3619 {SetMatrixTransposePointerArray, 0, 1, 1, 8,
3620 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123}},
3622 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123, 0x00000000,
3623 0x41900123, 0x41a00123, 0x41b00123, 0x00000000, 0x41d00123, 0x00000000, 0x41f00123}},
3624};
3625
3627{
3628 {"can", {"can", D3DXRS_INT4, 0, 12, D3DXPC_MATRIX_COLUMNS, D3DXPT_INT, 3, 2, 2, 0, 48, NULL}, 97},
3629 {"can[0]", {"can", D3DXRS_INT4, 0, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 97},
3630 {"can[1]", {"can", D3DXRS_INT4, 2, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 105},
3631};
3632
3634{
3635 {SetInt},
3636 {SetBool},
3637 {SetFloat},
3638 {SetIntArray, 1, 0, 5},
3639 {SetIntArray, 1, 6, 11, 8,
3640 {0x00000002, 0x00000004, 0x00000000, 0x00000000, 0x00000003, 0x00000005, 0x00000007}},
3641 {SetIntArray, 1, 12, REGISTER_OUTPUT_SIZE, 16,
3642 {0x00000002, 0x00000004, 0x00000000, 0x00000000, 0x00000003, 0x00000005, 0x00000007, 0x00000000,
3643 0x00000008, 0x0000000a, 0x0000000c, 0x00000000, 0x00000009, 0x0000000b, 0x0000000d}},
3644 {SetBoolArray, 1, 0, 5},
3645 {SetBoolArray, 1, 6, 11, 8,
3646 {0x00000001, 0x00000001, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001}},
3648 {0x00000001, 0x00000001, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000000,
3649 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001}},
3650 {SetFloatArray, 0, 0, 5},
3651 {SetFloatArray, 0, 6, 11, 8,
3652 {0x00000002, 0x00000004, 0x00000006, 0x00000000, 0x00000000, 0x00000005, 0x00000007}},
3654 {0x00000002, 0x00000004, 0x00000006, 0x00000000, 0x00000000, 0x00000005, 0x00000007, 0x00000000,
3655 0x00000008, 0x0000000a, 0x0000000c, 0x00000000, 0x00000009, 0x0000000b, 0x0000000d}},
3656 {SetValue, 1, 0, 23},
3657 {SetValue, 1, 24, 47, 8,
3658 {0x00000002, 0x00000004, 0x00000000, 0x00000000, 0x00000003, 0x00000005, 0x00000007}},
3659 {SetValue, 1, 48, REGISTER_OUTPUT_SIZE * 4, 16,
3660 {0x00000002, 0x00000004, 0x00000000, 0x00000000, 0x00000003, 0x00000005, 0x00000007, 0x00000000,
3661 0x00000008, 0x0000000a, 0x0000000c, 0x00000000, 0x00000009, 0x0000000b, 0x0000000d}},
3662 {SetVector},
3663 {SetVectorArray, 0, 0, 1},
3664 {SetVectorArray, 0, 2, 3, 8,
3665 {0x00000002, 0x00000006, 0x0000000a, 0x00000000, 0x00000000, 0x00000007, 0x0000000b}},
3666 {SetVectorArray, 0, 4, REGISTER_OUTPUT_SIZE / 4, 16,
3667 {0x00000002, 0x00000006, 0x0000000a, 0x00000000, 0x00000000, 0x00000007, 0x0000000b, 0x00000000,
3668 0x0000000e, 0x00000014, 0x00000000, 0x00000000, 0x0000000f, 0x00000016, 0x0000001e}},
3669 {SetMatrix, 0, 0, 0, 8,
3670 {0x00000002, 0x00000006, 0x0000000a, 0x00000000, 0x00000000, 0x00000007, 0x0000000b}},
3672 {SetMatrixArray, 0, 1, 1, 8,
3673 {0x00000002, 0x00000006, 0x0000000a, 0x00000000, 0x00000000, 0x00000007, 0x0000000b}},
3674 {SetMatrixArray, 0, 2, REGISTER_OUTPUT_SIZE / 16, 16,
3675 {0x00000002, 0x00000006, 0x0000000a, 0x00000000, 0x00000000, 0x00000007, 0x0000000b, 0x00000000,
3676 0x00000014, 0x00000000, 0x00000000, 0x00000000, 0x00000016, 0x0000001e, 0x0000002c}},
3677 {SetMatrixTranspose, 0, 0, 0, 8,
3678 {0x00000002, 0x00000000, 0x00000004, 0x00000000, 0x00000006, 0x00000007, 0x00000008}},
3680 {SetMatrixTransposeArray, 0, 1, 1, 8,
3681 {0x00000002, 0x00000000, 0x00000004, 0x00000000, 0x00000006, 0x00000007, 0x00000008}},
3683 {0x00000002, 0x00000000, 0x00000004, 0x00000000, 0x00000006, 0x00000007, 0x00000008, 0x00000000,
3684 0x00000014, 0x00000016, 0x00000018, 0x00000000, 0x00000000, 0x0000001e, 0x00000020}},
3686 {SetMatrixPointerArray, 0, 1, 1, 8,
3687 {0x00000002, 0x00000006, 0x0000000a, 0x00000000, 0x00000000, 0x00000007, 0x0000000b}},
3689 {0x00000002, 0x00000006, 0x0000000a, 0x00000000, 0x00000000, 0x00000007, 0x0000000b, 0x00000000,
3690 0x00000012, 0x0000001a, 0x00000024, 0x00000000, 0x00000014, 0x00000000, 0x00000000}},
3692 {SetMatrixTransposePointerArray, 0, 1, 1, 8,
3693 {0x00000002, 0x00000000, 0x00000004, 0x00000000, 0x00000006, 0x00000007, 0x00000008}},
3695 {0x00000002, 0x00000000, 0x00000004, 0x00000000, 0x00000006, 0x00000007, 0x00000008, 0x00000000,
3696 0x00000012, 0x00000014, 0x00000016, 0x00000000, 0x0000001a, 0x00000000, 0x0000001e}},
3697};
3698
3700{
3701 {"cab", {"cab", D3DXRS_BOOL, 0, 12, D3DXPC_MATRIX_COLUMNS, D3DXPT_BOOL, 3, 2, 2, 0, 48, NULL}, 37},
3702 {"cab[0]", {"cab", D3DXRS_BOOL, 0, 6, D3DXPC_MATRIX_COLUMNS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 37},
3703 {"cab[1]", {"cab", D3DXRS_BOOL, 6, 6, D3DXPC_MATRIX_COLUMNS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 43},
3704};
3705
3707{
3708 {SetInt},
3709 {SetBool},
3710 {SetFloat},
3711 {SetIntArray, 1, 0, 5},
3712 {SetIntArray, 1, 6, 11, 6,
3713 {0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001}},
3714 {SetIntArray, 1, 12, REGISTER_OUTPUT_SIZE, 12,
3715 {0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
3716 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
3717 {SetBoolArray, 1, 0, 5},
3718 {SetBoolArray, 1, 6, 11, 6,
3719 {0x00000002, 0x00000004, 0x00000000, 0x00000003, 0x00000005, 0x00000007}},
3721 {0x00000002, 0x00000004, 0x00000000, 0x00000003, 0x00000005, 0x00000007, 0x00000008, 0x0000000a,
3722 0x0000000c, 0x00000009, 0x0000000b, 0x0000000d}},
3723 {SetFloatArray, 0, 0, 5},
3724 {SetFloatArray, 0, 6, 11, 6,
3725 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001}},
3727 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
3728 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
3729 {SetValue, 1, 0, 23},
3730 {SetValue, 1, 24, 47, 6,
3731 {0x00000002, 0x00000004, 0x00000000, 0x00000003, 0x00000005, 0x00000007}},
3732 {SetValue, 1, 48, REGISTER_OUTPUT_SIZE * 4, 12,
3733 {0x00000002, 0x00000004, 0x00000000, 0x00000003, 0x00000005, 0x00000007, 0x00000008, 0x0000000a,
3734 0x0000000c, 0x00000009, 0x0000000b, 0x0000000d}},
3735 {SetVector},
3736 {SetVectorArray, 0, 0, 1},
3737 {SetVectorArray, 0, 2, 3, 6,
3738 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001}},
3739 {SetVectorArray, 0, 4, REGISTER_OUTPUT_SIZE / 4, 12,
3740 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
3741 0x00000000, 0x00000001, 0x00000001, 0x00000001}},
3742 {SetMatrix, 0, 0, 0, 6,
3743 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001}},
3745 {SetMatrixArray, 0, 1, 1, 6,
3746 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001}},
3747 {SetMatrixArray, 0, 2, REGISTER_OUTPUT_SIZE / 16, 12,
3748 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000000,
3749 0x00000000, 0x00000001, 0x00000001, 0x00000001}},
3750 {SetMatrixTranspose, 0, 0, 0, 6,
3751 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
3753 {SetMatrixTransposeArray, 0, 1, 1, 6,
3754 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
3756 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
3757 0x00000001, 0x00000000, 0x00000001, 0x00000001}},
3759 {SetMatrixPointerArray, 0, 1, 1, 6,
3760 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001}},
3762 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
3763 0x00000001, 0x00000001, 0x00000000, 0x00000000}},
3765 {SetMatrixTransposePointerArray, 0, 1, 1, 6,
3766 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
3768 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
3769 0x00000001, 0x00000001, 0x00000000, 0x00000001}},
3770};
3771
3773{
3774 {"canf", {"canf", D3DXRS_FLOAT4, 8, 4, D3DXPC_MATRIX_COLUMNS, D3DXPT_INT, 3, 2, 2, 0, 48, NULL}, 119},
3775 {"canf[0]", {"canf", D3DXRS_FLOAT4, 8, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 119},
3776 {"canf[1]", {"canf", D3DXRS_FLOAT4, 10, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 127},
3777};
3778
3780{
3781 {SetInt},
3782 {SetBool},
3783 {SetFloat},
3784 {SetIntArray, 1, 0, 5},
3785 {SetIntArray, 1, 6, 11, 8,
3786 {0x40000000, 0x40800000, 0x00000000, 0x00000000, 0x40400000, 0x40a00000, 0x40e00000}},
3787 {SetIntArray, 1, 12, REGISTER_OUTPUT_SIZE, 16,
3788 {0x40000000, 0x40800000, 0x00000000, 0x00000000, 0x40400000, 0x40a00000, 0x40e00000, 0x00000000,
3789 0x41000000, 0x41200000, 0x41400000, 0x00000000, 0x41100000, 0x41300000, 0x41500000}},
3790 {SetBoolArray, 1, 0, 5},
3791 {SetBoolArray, 1, 6, 11, 8,
3792 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3794 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000,
3795 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3796 {SetFloatArray, 0, 0, 5},
3797 {SetFloatArray, 0, 6, 11, 8,
3798 {0x40000000, 0x40800000, 0x40c00000, 0x00000000, 0x00000000, 0x40a00000, 0x40e00000}},
3800 {0x40000000, 0x40800000, 0x40c00000, 0x00000000, 0x00000000, 0x40a00000, 0x40e00000, 0x00000000,
3801 0x41000000, 0x41200000, 0x41400000, 0x00000000, 0x41100000, 0x41300000, 0x41500000}},
3802 {SetValue, 1, 0, 23},
3803 {SetValue, 1, 24, 47, 8,
3804 {0x40000000, 0x40800000, 0x00000000, 0x00000000, 0x40400000, 0x40a00000, 0x40e00000}},
3805 {SetValue, 1, 48, REGISTER_OUTPUT_SIZE * 4, 16,
3806 {0x40000000, 0x40800000, 0x00000000, 0x00000000, 0x40400000, 0x40a00000, 0x40e00000, 0x00000000,
3807 0x41000000, 0x41200000, 0x41400000, 0x00000000, 0x41100000, 0x41300000, 0x41500000}},
3808 {SetVector},
3809 {SetVectorArray, 0, 0, 1},/*16*/
3810 {SetVectorArray, 0, 2, 3, 8,
3811 {0x40000000, 0x40c00000, 0x41200000, 0x00000000, 0x00000000, 0x40e00000, 0x41300000}},
3812 {SetVectorArray, 0, 4, REGISTER_OUTPUT_SIZE / 4, 16,
3813 {0x40000000, 0x40c00000, 0x41200000, 0x00000000, 0x00000000, 0x40e00000, 0x41300000, 0x00000000,
3814 0x41600000, 0x41a00000, 0x00000000, 0x00000000, 0x41700000, 0x41b00000, 0x41f00000}},
3815 {SetMatrix, 0, 0, 0, 8,
3816 {0x40000000, 0x40c00000, 0x41200000, 0x00000000, 0x00000000, 0x40e00000, 0x41300000}},
3818 {SetMatrixArray, 0, 1, 1, 8,
3819 {0x40000000, 0x40c00000, 0x41200000, 0x00000000, 0x00000000, 0x40e00000, 0x41300000}},
3820 {SetMatrixArray, 0, 2, REGISTER_OUTPUT_SIZE / 16, 16,
3821 {0x40000000, 0x40c00000, 0x41200000, 0x00000000, 0x00000000, 0x40e00000, 0x41300000, 0x00000000,
3822 0x41a00000, 0x00000000, 0x00000000, 0x00000000, 0x41b00000, 0x41f00000, 0x42300000}},
3823 {SetMatrixTranspose, 0, 0, 0, 8,
3824 {0x40000000, 0x00000000, 0x40800000, 0x00000000, 0x40c00000, 0x40e00000, 0x41000000}},
3826 {SetMatrixTransposeArray, 0, 1, 1, 8,
3827 {0x40000000, 0x00000000, 0x40800000, 0x00000000, 0x40c00000, 0x40e00000, 0x41000000}},
3829 {0x40000000, 0x00000000, 0x40800000, 0x00000000, 0x40c00000, 0x40e00000, 0x41000000, 0x00000000,
3830 0x41a00000, 0x41b00000, 0x41c00000, 0x00000000, 0x00000000, 0x41f00000, 0x42000000}},
3832 {SetMatrixPointerArray, 0, 1, 1, 8,
3833 {0x40000000, 0x40c00000, 0x41200000, 0x00000000, 0x00000000, 0x40e00000, 0x41300000}},
3835 {0x40000000, 0x40c00000, 0x41200000, 0x00000000, 0x00000000, 0x40e00000, 0x41300000, 0x00000000,
3836 0x41900000, 0x41d00000, 0x42100000, 0x00000000, 0x41a00000, 0x00000000, 0x00000000}},
3838 {SetMatrixTransposePointerArray, 0, 1, 1, 8,
3839 {0x40000000, 0x00000000, 0x40800000, 0x00000000, 0x40c00000, 0x40e00000, 0x41000000}},
3841 {0x40000000, 0x00000000, 0x40800000, 0x00000000, 0x40c00000, 0x40e00000, 0x41000000, 0x00000000,
3842 0x41900000, 0x41a00000, 0x41b00000, 0x00000000, 0x41d00000, 0x00000000, 0x41f00000}},
3843};
3844
3846{
3847 {"cabf", {"cabf", D3DXRS_FLOAT4, 4, 4, D3DXPC_MATRIX_COLUMNS, D3DXPT_BOOL, 3, 2, 2, 0, 48, NULL}, 55},
3848 {"cabf[0]", {"cabf", D3DXRS_FLOAT4, 4, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 55},
3849 {"cabf[1]", {"cabf", D3DXRS_FLOAT4, 6, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 63},
3850};
3851
3853{
3854 {SetInt},
3855 {SetBool},
3856 {SetFloat},
3857 {SetIntArray, 1, 0, 5},
3858 {SetIntArray, 1, 6, 11, 8,
3859 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3860 {SetIntArray, 1, 12, REGISTER_OUTPUT_SIZE, 16,
3861 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000,
3862 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3863 {SetBoolArray, 1, 0, 5},
3864 {SetBoolArray, 1, 6, 11, 8,
3865 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3867 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000,
3868 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3869 {SetFloatArray, 0, 0, 5},
3870 {SetFloatArray, 0, 6, 11, 8,
3871 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
3873 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000,
3874 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3875 {SetValue, 1, 0, 23},
3876 {SetValue, 1, 24, 47, 8,
3877 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3878 {SetValue, 1, 48, REGISTER_OUTPUT_SIZE * 4, 16,
3879 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000,
3880 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3881 {SetVector},
3882 {SetVectorArray, 0, 0, 1},
3883 {SetVectorArray, 0, 2, 3, 8,
3884 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
3885 {SetVectorArray, 0, 4, REGISTER_OUTPUT_SIZE / 4, 16,
3886 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000,
3887 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3888 {SetMatrix, 0, 0, 0, 8,
3889 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
3891 {SetMatrixArray, 0, 1, 1, 8,
3892 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
3893 {SetMatrixArray, 0, 2, REGISTER_OUTPUT_SIZE / 16, 16,
3894 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000,
3895 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3896 {SetMatrixTranspose, 0, 0, 0, 8,
3897 {0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3899 {SetMatrixTransposeArray, 0, 1, 1, 8,
3900 {0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3902 {0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000,
3903 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
3905 {SetMatrixPointerArray, 0, 1, 1, 8,
3906 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
3908 {0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000,
3909 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000}},
3911 {SetMatrixTransposePointerArray, 0, 1, 1, 8,
3912 {0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000}},
3914 {0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000,
3915 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000}},
3916};
3917
3918/*
3919 * fxc.exe /Tvs_3_0
3920 */
3921#if 0
3922row_major bool3x2 rb = {1, 1, 0, 0, 1, 1};
3923row_major int3x2 rn = {80, 81, 82, 83, 84, 85};
3924row_major float3x2 rf = {95.1, 95.2, 95.3, 95.4, 95.5, 95.6};
3925row_major bool3x2 rbf = {1, 1, 1, 1, 0, 1};
3926row_major int3x2 rnf = {37, 13, 98, 54, 77, 36};
3927float4 main(float4 pos : POSITION) : POSITION
3928{
3929 float4 tmp = 0;
3930 int i;
3931 if (rb._32) for (i = 0; i < rn._31; i++) tmp.x += pos.z * rf._31 * rbf._32;
3932 else for (i = 0; i < rn._32; i++) tmp.y += pos.y * rf._32 * rnf._32;
3933 return tmp;
3934}
3935#endif
3937{
39380xfffe0300, 0x0076fffe, 0x42415443, 0x0000001c, 0x000001a3, 0xfffe0300, 0x00000005, 0x0000001c,
39390x00000100, 0x0000019c, 0x00000080, 0x00000000, 0x00000006, 0x00000084, 0x00000094, 0x000000ac,
39400x00030002, 0x00000003, 0x00000084, 0x000000b0, 0x000000e0, 0x00000002, 0x00000003, 0x000000e4,
39410x000000f4, 0x00000124, 0x00000001, 0x00000006, 0x00000128, 0x00000138, 0x00000168, 0x00060002,
39420x00000003, 0x00000128, 0x0000016c, 0xab006272, 0x00010002, 0x00020003, 0x00000001, 0x00000000,
39430xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00666272, 0x3f800000,
39440x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000,
39450x3f800000, 0x00000000, 0x00000000, 0xab006672, 0x00030002, 0x00020003, 0x00000001, 0x00000000,
39460x42be3333, 0x42be6666, 0x00000000, 0x00000000, 0x42be999a, 0x42becccd, 0x00000000, 0x00000000,
39470x42bf0000, 0x42bf3333, 0x00000000, 0x00000000, 0xab006e72, 0x00020002, 0x00020003, 0x00000001,
39480x00000000, 0x00000050, 0x00000051, 0x00000001, 0x00000000, 0x00000052, 0x00000053, 0x00000001,
39490x00000000, 0x00000054, 0x00000055, 0x00000001, 0x00000000, 0x00666e72, 0x42140000, 0x41500000,
39500x00000000, 0x00000000, 0x42c40000, 0x42580000, 0x00000000, 0x00000000, 0x429a0000, 0x42100000,
39510x00000000, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820,
39520x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131,
39530x05000051, 0xa00f0009, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0200001f, 0x80000000,
39540x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x01000028, 0xe0e40805, 0x03000005, 0x80010000,
39550xa0000002, 0x90aa0000, 0x02000001, 0x80010001, 0xa0000009, 0x01000026, 0xf0e40004, 0x04000004,
39560x80010001, 0x80000000, 0xa0550005, 0x80000001, 0x00000027, 0x02000001, 0x80020001, 0xa0000009,
39570x0000002a, 0x03000005, 0x80010000, 0xa0550002, 0x90550000, 0x02000001, 0x80020001, 0xa0000009,
39580x01000026, 0xf0e40005, 0x04000004, 0x80020001, 0x80000000, 0xa0550008, 0x80550001, 0x00000027,
39590x02000001, 0x80010001, 0xa0000009, 0x0000002b, 0x02000001, 0xe0030000, 0x80e40001, 0x02000001,
39600xe00c0000, 0xa0000009, 0x0000ffff,
3961};
3962
3964{
3965 {"rf", {"rf", D3DXRS_FLOAT4, 0, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL}, 61},
3966};
3967
3969{
3970 {SetInt},
3971 {SetBool},
3972 {SetFloat},
3973 {SetIntArray, 1, 0, 5},
3975 {0x40000000, 0x40400000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000, 0x00000000,
3976 0x00000000, 0x40e00000}},
3977 {SetBoolArray, 1, 0, 5},
3979 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
3980 0x00000000, 0x3f800000}},
3981 {SetFloatArray, 0, 0, 5},
3983 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40800123, 0x40a00123, 0x00000000, 0x00000000,
3984 0x40c00123, 0x40e00123}},
3985 {SetValue, 0, 0, 23},
3986 {SetValue, 0, 24, REGISTER_OUTPUT_SIZE * 4, 12,
3987 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40800123, 0x40a00123, 0x00000000, 0x00000000,
3988 0x40c00123, 0x40e00123}},
3989 {SetVector},
3990 {SetVectorArray, 0, 0, 2},
3991 {SetVectorArray, 0, 3, REGISTER_OUTPUT_SIZE / 4, 12,
3992 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40c00123, 0x40e00123, 0x00000000, 0x00000000,
3993 0x41200123, 0x41300123}},
3994 {SetMatrix, 0, 0, 0, 12,
3995 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40c00123, 0x40e00123, 0x00000000, 0x00000000,
3996 0x41200123, 0x41300123}},
3998 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 12,
3999 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40c00123, 0x40e00123, 0x00000000, 0x00000000,
4000 0x41200123, 0x41300123}},
4001 {SetMatrixTranspose, 0, 0, 0, 12,
4002 {0x40000123, 0x40c00123, 0x00000000, 0x00000000, 0x00000000, 0x40e00123, 0x00000000, 0x00000000,
4003 0x40800123, 0x41000123}},
4006 {0x40000123, 0x40c00123, 0x00000000, 0x00000000, 0x00000000, 0x40e00123, 0x00000000, 0x00000000,
4007 0x40800123, 0x41000123}},
4010 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40c00123, 0x40e00123, 0x00000000, 0x00000000,
4011 0x41200123, 0x41300123}},
4014 {0x40000123, 0x40c00123, 0x00000000, 0x00000000, 0x00000000, 0x40e00123, 0x00000000, 0x00000000,
4015 0x40800123, 0x41000123}},
4016};
4017
4019{
4020 {"rn", {"rn", D3DXRS_INT4, 0, 6, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 78},
4021};
4022
4024{
4025 {SetInt},
4026 {SetBool},
4027 {SetFloat},
4028 {SetIntArray, 1, 0, 5},
4030 {0x00000002, 0x00000003, 0x00000001, 0x00000000, 0x00000004, 0x00000005, 0x00000001, 0x00000000,
4031 0x00000000, 0x00000007, 0x00000001}},
4032 {SetBoolArray, 1, 0, 5},
4034 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000000,
4035 0x00000000, 0x00000001, 0x00000001}},
4036 {SetFloatArray, 0, 0, 5},
4038 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000004, 0x00000005, 0x00000001, 0x00000000,
4039 0x00000006, 0x00000007, 0x00000001}},
4040 {SetValue, 1, 0, 23},
4041 {SetValue, 1, 24, REGISTER_OUTPUT_SIZE * 4, 12,
4042 {0x00000002, 0x00000003, 0x00000001, 0x00000000, 0x00000004, 0x00000005, 0x00000001, 0x00000000,
4043 0x00000000, 0x00000007, 0x00000001}},
4044 {SetVector},
4045 {SetVectorArray, 0, 0, 2},
4046 {SetVectorArray, 0, 3, REGISTER_OUTPUT_SIZE / 4, 12,
4047 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000006, 0x00000007, 0x00000001, 0x00000000,
4048 0x0000000a, 0x0000000b, 0x00000001}},
4049 {SetMatrix, 0, 0, 0, 12,
4050 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000006, 0x00000007, 0x00000001, 0x00000000,
4051 0x0000000a, 0x0000000b, 0x00000001}},
4053 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 12,
4054 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000006, 0x00000007, 0x00000001, 0x00000000,
4055 0x0000000a, 0x0000000b, 0x00000001}},
4056 {SetMatrixTranspose, 0, 0, 0, 12,
4057 {0x00000002, 0x00000006, 0x00000001, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000000,
4058 0x00000004, 0x00000008, 0x00000001}},
4061 {0x00000002, 0x00000006, 0x00000001, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000000,
4062 0x00000004, 0x00000008, 0x00000001}},
4065 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000006, 0x00000007, 0x00000001, 0x00000000,
4066 0x0000000a, 0x0000000b, 0x00000001}},
4069 {0x00000002, 0x00000006, 0x00000001, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000000,
4070 0x00000004, 0x00000008, 0x00000001}},
4071};
4072
4074{
4075 {"rb", {"rb", D3DXRS_BOOL, 0, 6, D3DXPC_MATRIX_ROWS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 37},
4076};
4077
4079{
4080 {SetInt},
4081 {SetBool},
4082 {SetFloat},
4083 {SetIntArray, 0, 0, 5,},
4085 {0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001}},
4086 {SetBoolArray, 0, 0, 5},
4088 {0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000000, 0x00000007}},
4089 {SetFloatArray, 0, 0, 5},
4091 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
4092 {SetValue, 0, 0, 23},
4093 {SetValue, 1, 24, REGISTER_OUTPUT_SIZE * 4, 6,
4094 {0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000000, 0x00000007}},
4095 {SetVector},
4096 {SetVectorArray, 0, 0, 2},
4097 {SetVectorArray, 0, 3, REGISTER_OUTPUT_SIZE / 4, 6,
4098 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
4099 {SetMatrix, 0, 0, 0, 6,
4100 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001},},
4102 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 6,
4103 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
4104 {SetMatrixTranspose, 0, 0, 0, 6,
4105 {0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001}},
4108 {0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001}},
4111 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
4114 {0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001}},
4115};
4116
4118{
4119 {"rnf", {"rnf", D3DXRS_FLOAT4, 6, 3, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 91},
4120};
4121
4123{
4124 {SetInt},
4125 {SetBool},
4126 {SetFloat},
4127 {SetIntArray, 1, 0, 5},
4129 {0x40000000, 0x40400000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000, 0x00000000,
4130 0x00000000, 0x40e00000}},
4131 {SetBoolArray, 1, 0, 5},
4133 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4134 0x00000000, 0x3f800000}},
4135 {SetFloatArray, 0, 0, 5},
4137 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000, 0x00000000,
4138 0x40c00000, 0x40e00000}},
4139 {SetValue, 1, 0, 23},
4140 {SetValue, 1, 24, REGISTER_OUTPUT_SIZE * 4, 12,
4141 {0x40000000, 0x40400000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000, 0x00000000,
4142 0x00000000, 0x40e00000}},
4143 {SetVector},
4144 {SetVectorArray, 0, 0, 2},
4145 {SetVectorArray, 0, 3, REGISTER_OUTPUT_SIZE / 4, 12,
4146 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40c00000, 0x40e00000, 0x00000000, 0x00000000,
4147 0x41200000, 0x41300000}},
4148 {SetMatrix, 0, 0, 0, 12,
4149 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40c00000, 0x40e00000, 0x00000000, 0x00000000,
4150 0x41200000, 0x41300000}},
4152 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 12,
4153 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40c00000, 0x40e00000, 0x00000000, 0x00000000,
4154 0x41200000, 0x41300000}},
4155 {SetMatrixTranspose, 0, 0, 0, 12,
4156 {0x40000000, 0x40c00000, 0x00000000, 0x00000000, 0x00000000, 0x40e00000, 0x00000000, 0x00000000,
4157 0x40800000, 0x41000000}},
4160 {0x40000000, 0x40c00000, 0x00000000, 0x00000000, 0x00000000, 0x40e00000, 0x00000000, 0x00000000,
4161 0x40800000, 0x41000000}},
4164 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40c00000, 0x40e00000, 0x00000000, 0x00000000,
4165 0x41200000, 0x41300000}},
4168 {0x40000000, 0x40c00000, 0x00000000, 0x00000000, 0x00000000, 0x40e00000, 0x00000000, 0x00000000,
4169 0x40800000, 0x41000000}},
4170};
4171
4173{
4174 {"rbf", {"rbf", D3DXRS_FLOAT4, 3, 3, D3DXPC_MATRIX_ROWS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 44},
4175};
4176
4178{
4179 {SetInt},
4180 {SetBool},
4181 {SetFloat},
4182 {SetIntArray, 1, 0, 5},
4184 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4185 0x00000000, 0x3f800000}},
4186 {SetBoolArray, 1, 0, 5},
4188 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4189 0x00000000, 0x3f800000}},
4190 {SetFloatArray, 0, 0, 5},
4192 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4193 0x3f800000, 0x3f800000}},
4194 {SetValue, 1, 0, 23},
4195 {SetValue, 1, 24, REGISTER_OUTPUT_SIZE * 4, 12,
4196 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4197 0x00000000, 0x3f800000}},
4198 {SetVector},
4199 {SetVectorArray, 0, 0, 2},
4200 {SetVectorArray, 0, 3, REGISTER_OUTPUT_SIZE / 4, 12,
4201 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4202 0x3f800000, 0x3f800000}},
4203 {SetMatrix, 0, 0, 0, 12,
4204 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4205 0x3f800000, 0x3f800000}},
4207 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 12,
4208 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4209 0x3f800000, 0x3f800000}},
4210 {SetMatrixTranspose, 0, 0, 0, 12,
4211 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000,
4212 0x3f800000, 0x3f800000}},
4215 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000,
4216 0x3f800000, 0x3f800000}},
4219 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4220 0x3f800000, 0x3f800000}},
4223 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000,
4224 0x3f800000, 0x3f800000}},
4225};
4226
4227/*
4228 * fxc.exe /Tvs_3_0
4229 */
4230#if 0
4231row_major bool3x2 rab[2] = {1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1};
4232row_major int3x2 ran[2] = {4, 5, 6, 1, 8, 1, 5, 3, 9, 6, 7, 3};
4233row_major float3x2 raf[2] = {1.5, 2.8, 3.3, 4.9, 5.9, 6.8, 7.9, 8.5, 9.4, 1.3, 1.2, 1.1};
4234row_major bool3x2 rabf[2] = {1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1};
4235row_major int3x2 ranf[2] = {35, 40, 60, 80, 70, 56, 37, 13, 98, 54, 77, 36};
4236float4 main(float4 pos : POSITION) : POSITION
4237{
4238 float4 tmp = 0;
4239 int i;
4240 if (rab[1]._32) for (i = 0; i < ran[1]._31; i++) tmp.x += pos.z * raf[1]._31 * rabf[1]._32;
4241 else for (i = 0; i < ran[1]._32; i++) tmp.y += pos.y * raf[1]._32 * ranf[1]._32;
4242 return tmp;
4243}
4244#endif
4246{
42470xfffe0300, 0x00b6fffe, 0x42415443, 0x0000001c, 0x000002a3, 0xfffe0300, 0x00000005, 0x0000001c,
42480x00000100, 0x0000029c, 0x00000080, 0x00000000, 0x0000000c, 0x00000084, 0x00000094, 0x000000c4,
42490x00060002, 0x00000006, 0x000000cc, 0x000000dc, 0x0000013c, 0x00000002, 0x00000006, 0x00000140,
42500x00000150, 0x000001b0, 0x00000001, 0x0000000c, 0x000001b4, 0x000001c4, 0x00000224, 0x000c0002,
42510x00000006, 0x0000022c, 0x0000023c, 0x00626172, 0x00010002, 0x00020003, 0x00000002, 0x00000000,
42520xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0xffffffff, 0x00000000, 0x00000000,
42530xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0x66626172, 0xababab00, 0x00010002, 0x00020003,
42540x00000002, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000,
42550x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000,
42560x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000,
42570x00000000, 0x00000000, 0x00666172, 0x00030002, 0x00020003, 0x00000002, 0x00000000, 0x3fc00000,
42580x40333333, 0x00000000, 0x00000000, 0x40533333, 0x409ccccd, 0x00000000, 0x00000000, 0x40bccccd,
42590x40d9999a, 0x00000000, 0x00000000, 0x40fccccd, 0x41080000, 0x00000000, 0x00000000, 0x41166666,
42600x3fa66666, 0x00000000, 0x00000000, 0x3f99999a, 0x3f8ccccd, 0x00000000, 0x00000000, 0x006e6172,
42610x00020002, 0x00020003, 0x00000002, 0x00000000, 0x00000004, 0x00000005, 0x00000001, 0x00000000,
42620x00000006, 0x00000001, 0x00000001, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000000,
42630x00000005, 0x00000003, 0x00000001, 0x00000000, 0x00000009, 0x00000006, 0x00000001, 0x00000000,
42640x00000007, 0x00000003, 0x00000001, 0x00000000, 0x666e6172, 0xababab00, 0x00020002, 0x00020003,
42650x00000002, 0x00000000, 0x420c0000, 0x42200000, 0x00000000, 0x00000000, 0x42700000, 0x42a00000,
42660x00000000, 0x00000000, 0x428c0000, 0x42600000, 0x00000000, 0x00000000, 0x42140000, 0x41500000,
42670x00000000, 0x00000000, 0x42c40000, 0x42580000, 0x00000000, 0x00000000, 0x429a0000, 0x42100000,
42680x00000000, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820,
42690x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131,
42700x05000051, 0xa00f0012, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0200001f, 0x80000000,
42710x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x01000028, 0xe0e4080b, 0x03000005, 0x80010000,
42720xa0000005, 0x90aa0000, 0x02000001, 0x80010001, 0xa0000012, 0x01000026, 0xf0e4000a, 0x04000004,
42730x80010001, 0x80000000, 0xa055000b, 0x80000001, 0x00000027, 0x02000001, 0x80020001, 0xa0000012,
42740x0000002a, 0x03000005, 0x80010000, 0xa0550005, 0x90550000, 0x02000001, 0x80020001, 0xa0000012,
42750x01000026, 0xf0e4000b, 0x04000004, 0x80020001, 0x80000000, 0xa0550011, 0x80550001, 0x00000027,
42760x02000001, 0x80010001, 0xa0000012, 0x0000002b, 0x02000001, 0xe0030000, 0x80e40001, 0x02000001,
42770xe00c0000, 0xa0000012, 0x0000ffff,
4278};
4279
4281{
4282 {"raf", {"raf", D3DXRS_FLOAT4, 0, 6, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 2, 2, 0, 48, NULL}, 84},
4283 {"raf[0]", {"raf", D3DXRS_FLOAT4, 0, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL}, 84},
4284 {"raf[1]", {"raf", D3DXRS_FLOAT4, 3, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL}, 96},
4285};
4286
4288{
4289 {SetInt},
4290 {SetBool},
4291 {SetFloat},
4292 {SetIntArray, 1, 0, 5},
4293 {SetIntArray, 1, 6, 11, 12,
4294 {0x40000000, 0x40400000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000, 0x00000000,
4295 0x00000000, 0x40e00000}},
4296 {SetIntArray, 1, 12, REGISTER_OUTPUT_SIZE, 24,
4297 {0x40000000, 0x40400000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000, 0x00000000,
4298 0x00000000, 0x40e00000, 0x00000000, 0x00000000, 0x41000000, 0x41100000, 0x00000000, 0x00000000,
4299 0x41200000, 0x41300000, 0x00000000, 0x00000000, 0x41400000, 0x41500000}},
4300 {SetBoolArray, 1, 0, 5},
4301 {SetBoolArray, 1, 6, 11, 12,
4302 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4303 0x00000000, 0x3f800000}},
4305 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4306 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4307 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
4308 {SetFloatArray, 0, 0, 5},
4309 {SetFloatArray, 0, 6, 11, 12,
4310 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40800123, 0x40a00123, 0x00000000, 0x00000000,
4311 0x40c00123, 0x40e00123}},
4313 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40800123, 0x40a00123, 0x00000000, 0x00000000,
4314 0x40c00123, 0x40e00123, 0x00000000, 0x00000000, 0x41000123, 0x41100123, 0x00000000, 0x00000000,
4315 0x41200123, 0x41300123, 0x00000000, 0x00000000, 0x41400123, 0x41500123}},
4316 {SetValue, 0, 0, 23},
4317 {SetValue, 0, 24, 47, 12,
4318 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40800123, 0x40a00123, 0x00000000, 0x00000000,
4319 0x40c00123, 0x40e00123}},
4320 {SetValue, 0, 48, REGISTER_OUTPUT_SIZE * 4, 24,
4321 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40800123, 0x40a00123, 0x00000000, 0x00000000,
4322 0x40c00123, 0x40e00123, 0x00000000, 0x00000000, 0x41000123, 0x41100123, 0x00000000, 0x00000000,
4323 0x41200123, 0x41300123, 0x00000000, 0x00000000, 0x41400123, 0x41500123}},
4324 {SetVector},
4325 {SetVectorArray, 0, 0, 2},
4326 {SetVectorArray, 0, 3, 5, 12,
4327 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40c00123, 0x40e00123, 0x00000000, 0x00000000,
4328 0x41200123, 0x41300123}},
4329 {SetVectorArray, 0, 6, REGISTER_OUTPUT_SIZE / 4, 24,
4330 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40c00123, 0x40e00123, 0x00000000, 0x00000000,
4331 0x41200123, 0x41300123, 0x00000000, 0x00000000, 0x41600123, 0x41700123, 0x00000000, 0x00000000,
4332 0x41a00123, 0x41b00123, 0x00000000, 0x00000000, 0x00000000, 0x41f00123}},
4333 {SetMatrix, 0, 0, 0, 12,
4334 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40c00123, 0x40e00123, 0x00000000, 0x00000000,
4335 0x41200123, 0x41300123}},
4337 {SetMatrixArray, 0, 1, 1, 12,
4338 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40c00123, 0x40e00123, 0x00000000, 0x00000000,
4339 0x41200123, 0x41300123}},
4340 {SetMatrixArray, 0, 2, REGISTER_OUTPUT_SIZE / 16, 24,
4341 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40c00123, 0x40e00123, 0x00000000, 0x00000000,
4342 0x41200123, 0x41300123, 0x00000000, 0x00000000, 0x41a00123, 0x41b00123, 0x00000000, 0x00000000,
4343 0x00000000, 0x41f00123, 0x00000000, 0x00000000, 0x00000000, 0x42300123}},
4344 {SetMatrixTranspose, 0, 0, 0, 12,
4345 {0x40000123, 0x40c00123, 0x00000000, 0x00000000, 0x00000000, 0x40e00123, 0x00000000, 0x00000000,
4346 0x40800123, 0x41000123}},
4348 {SetMatrixTransposeArray, 0, 1, 1, 12,
4349 {0x40000123, 0x40c00123, 0x00000000, 0x00000000, 0x00000000, 0x40e00123, 0x00000000, 0x00000000,
4350 0x40800123, 0x41000123}},
4352 {0x40000123, 0x40c00123, 0x00000000, 0x00000000, 0x00000000, 0x40e00123, 0x00000000, 0x00000000,
4353 0x40800123, 0x41000123, 0x00000000, 0x00000000, 0x41a00123, 0x00000000, 0x00000000, 0x00000000,
4354 0x41b00123, 0x41f00123, 0x00000000, 0x00000000, 0x41c00123, 0x42000123}},
4356 {SetMatrixPointerArray, 0, 1, 1, 12,
4357 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40c00123, 0x40e00123, 0x00000000, 0x00000000,
4358 0x41200123, 0x41300123}},
4360 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x40c00123, 0x40e00123, 0x00000000, 0x00000000,
4361 0x41200123, 0x41300123, 0x00000000, 0x00000000, 0x41900123, 0x41a00123, 0x00000000, 0x00000000,
4362 0x41d00123, 0x00000000, 0x00000000, 0x00000000, 0x42100123, 0x00000000}},
4364 {SetMatrixTransposePointerArray, 0, 1, 1, 12,
4365 {0x40000123, 0x40c00123, 0x00000000, 0x00000000, 0x00000000, 0x40e00123, 0x00000000, 0x00000000,
4366 0x40800123, 0x41000123}},
4368 {0x40000123, 0x40c00123, 0x00000000, 0x00000000, 0x00000000, 0x40e00123, 0x00000000, 0x00000000,
4369 0x40800123, 0x41000123, 0x00000000, 0x00000000, 0x41900123, 0x41d00123, 0x00000000, 0x00000000,
4370 0x41a00123, 0x00000000, 0x00000000, 0x00000000, 0x41b00123, 0x41f00123}},
4371};
4372
4374{
4375 {"ran", {"ran", D3DXRS_INT4, 0, 12, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 2, 0, 48, NULL}, 113},
4376 {"ran[0]", {"ran", D3DXRS_INT4, 0, 3, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 113},
4377 {"ran[1]", {"ran", D3DXRS_INT4, 3, 3, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 125},
4378};
4379
4381{
4382 {SetInt},
4383 {SetBool},
4384 {SetFloat},
4385 {SetIntArray, 1, 0, 5},
4386 {SetIntArray, 1, 6, 11, 12,
4387 {0x00000002, 0x00000003, 0x00000001, 0x00000000, 0x00000004, 0x00000005, 0x00000001, 0x00000000,
4388 0x00000000, 0x00000007, 0x00000001}},
4389 {SetIntArray, 1, 12, REGISTER_OUTPUT_SIZE, 24,
4390 {0x00000002, 0x00000003, 0x00000001, 0x00000000, 0x00000004, 0x00000005, 0x00000001, 0x00000000,
4391 0x00000000, 0x00000007, 0x00000001, 0x00000000, 0x00000008, 0x00000009, 0x00000001, 0x00000000,
4392 0x0000000a, 0x0000000b, 0x00000001, 0x00000000, 0x0000000c, 0x0000000d, 0x00000001}},
4393 {SetBoolArray, 1, 0, 5},
4394 {SetBoolArray, 1, 6, 11, 12,
4395 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000000,
4396 0x00000000, 0x00000001, 0x00000001}},
4398 {0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000000,
4399 0x00000000, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000000,
4400 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001}},
4401 {SetFloatArray, 0, 0, 5},
4402 {SetFloatArray, 0, 6, 11, 12,
4403 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000004, 0x00000005, 0x00000001, 0x00000000,
4404 0x00000006, 0x00000007, 0x00000001}},
4406 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000004, 0x00000005, 0x00000001, 0x00000000,
4407 0x00000006, 0x00000007, 0x00000001, 0x00000000, 0x00000008, 0x00000009, 0x00000001, 0x00000000,
4408 0x0000000a, 0x0000000b, 0x00000001, 0x00000000, 0x0000000c, 0x0000000d, 0x00000001}},
4409 {SetValue, 1, 0, 23},
4410 {SetValue, 1, 24, 47, 12,
4411 {0x00000002, 0x00000003, 0x00000001, 0x00000000, 0x00000004, 0x00000005, 0x00000001, 0x00000000,
4412 0x00000000, 0x00000007, 0x00000001}},
4413 {SetValue, 1, 48, REGISTER_OUTPUT_SIZE * 4, 24,
4414 {0x00000002, 0x00000003, 0x00000001, 0x00000000, 0x00000004, 0x00000005, 0x00000001, 0x00000000,
4415 0x00000000, 0x00000007, 0x00000001, 0x00000000, 0x00000008, 0x00000009, 0x00000001, 0x00000000,
4416 0x0000000a, 0x0000000b, 0x00000001, 0x00000000, 0x0000000c, 0x0000000d, 0x00000001}},
4417 {SetVector},
4418 {SetVectorArray, 0, 0, 2},
4419 {SetVectorArray, 0, 3, 5, 12,
4420 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000006, 0x00000007, 0x00000001, 0x00000000,
4421 0x0000000a, 0x0000000b, 0x00000001}},
4422 {SetVectorArray, 0, 6, REGISTER_OUTPUT_SIZE / 4, 24,
4423 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000006, 0x00000007, 0x00000001, 0x00000000,
4424 0x0000000a, 0x0000000b, 0x00000001, 0x00000000, 0x0000000e, 0x0000000f, 0x00000001, 0x00000000,
4425 0x00000014, 0x00000016, 0x00000001, 0x00000000, 0x00000000, 0x0000001e, 0x00000001}},
4426 {SetMatrix, 0, 0, 0, 12,
4427 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000006, 0x00000007, 0x00000001, 0x00000000,
4428 0x0000000a, 0x0000000b, 0x00000001}},
4430 {SetMatrixArray, 0, 1, 1, 12,
4431 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000006, 0x00000007, 0x00000001, 0x00000000,
4432 0x0000000a, 0x0000000b, 0x00000001}},
4433 {SetMatrixArray, 0, 2, REGISTER_OUTPUT_SIZE / 16, 24,
4434 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000006, 0x00000007, 0x00000001, 0x00000000,
4435 0x0000000a, 0x0000000b, 0x00000001, 0x00000000, 0x00000014, 0x00000016, 0x00000001, 0x00000000,
4436 0x00000000, 0x0000001e, 0x00000001, 0x00000000, 0x00000000, 0x0000002c, 0x00000001}},
4437 {SetMatrixTranspose, 0, 0, 0, 12,
4438 {0x00000002, 0x00000006, 0x00000001, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000000,
4439 0x00000004, 0x00000008, 0x00000001}},
4441 {SetMatrixTransposeArray, 0, 1, 1, 12,
4442 {0x00000002, 0x00000006, 0x00000001, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000000,
4443 0x00000004, 0x00000008, 0x00000001}},
4445 {0x00000002, 0x00000006, 0x00000001, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000000,
4446 0x00000004, 0x00000008, 0x00000001, 0x00000000, 0x00000014, 0x00000000, 0x00000001, 0x00000000,
4447 0x00000016, 0x0000001e, 0x00000001, 0x00000000, 0x00000018, 0x00000020, 0x00000001}},
4449 {SetMatrixPointerArray, 0, 1, 1, 12,
4450 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000006, 0x00000007, 0x00000001, 0x00000000,
4451 0x0000000a, 0x0000000b, 0x00000001}},
4453 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000006, 0x00000007, 0x00000001, 0x00000000,
4454 0x0000000a, 0x0000000b, 0x00000001, 0x00000000, 0x00000012, 0x00000014, 0x00000001, 0x00000000,
4455 0x0000001a, 0x00000000, 0x00000001, 0x00000000, 0x00000024, 0x00000000, 0x00000001}},
4457 {SetMatrixTransposePointerArray, 0, 1, 1, 12,
4458 {0x00000002, 0x00000006, 0x00000001, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000000,
4459 0x00000004, 0x00000008, 0x00000001}},
4461 {0x00000002, 0x00000006, 0x00000001, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000000,
4462 0x00000004, 0x00000008, 0x00000001, 0x00000000, 0x00000012, 0x0000001a, 0x00000001, 0x00000000,
4463 0x00000014, 0x00000000, 0x00000001, 0x00000000, 0x00000016, 0x0000001e, 0x00000001}},
4464};
4465
4467{
4468 {"rab", {"rab", D3DXRS_BOOL, 0, 12, D3DXPC_MATRIX_ROWS, D3DXPT_BOOL, 3, 2, 2, 0, 48, NULL}, 37},
4469 {"rab[0]", {"rab", D3DXRS_BOOL, 0, 6, D3DXPC_MATRIX_ROWS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 37},
4470 {"rab[1]", {"rab", D3DXRS_BOOL, 6, 6, D3DXPC_MATRIX_ROWS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 43},
4471};
4472
4474{
4475 {SetInt},
4476 {SetBool},
4477 {SetFloat},
4478 {SetIntArray, 1, 0, 5,},
4479 {SetIntArray, 1, 6, 11, 6,
4480 {0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001}},
4481 {SetIntArray, 1, 12, REGISTER_OUTPUT_SIZE, 12,
4482 {0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001,
4483 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
4484 {SetBoolArray, 1, 0, 5},
4485 {SetBoolArray, 1, 6, 11, 6,
4486 {0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000000, 0x00000007}},
4488 {0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000000, 0x00000007, 0x00000008, 0x00000009,
4489 0x0000000a, 0x0000000b, 0x0000000c, 0x0000000d}},
4490 {SetFloatArray, 0, 0, 5},
4491 {SetFloatArray, 0, 6, 11, 6,
4492 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
4494 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
4495 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
4496 {SetValue, 1, 0, 23},
4497 {SetValue, 1, 24, 47, 6,
4498 {0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000000, 0x00000007}},
4499 {SetValue, 1, 48, REGISTER_OUTPUT_SIZE * 4, 12,
4500 {0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000000, 0x00000007, 0x00000008, 0x00000009,
4501 0x0000000a, 0x0000000b, 0x0000000c, 0x0000000d}},
4502 {SetVector},
4503 {SetVectorArray, 0, 0, 2},
4504 {SetVectorArray, 0, 3, 5, 6,
4505 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
4506 {SetVectorArray, 0, 6, REGISTER_OUTPUT_SIZE / 4, 12,
4507 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
4508 0x00000001, 0x00000001, 0x00000000, 0x00000001}},
4509 {SetMatrix, 0, 0, 0, 6,
4510 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
4512 {SetMatrixArray, 0, 1, 1, 6,
4513 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
4514 {SetMatrixArray, 0, 2, REGISTER_OUTPUT_SIZE / 16, 12,
4515 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
4516 0x00000000, 0x00000001, 0x00000000, 0x00000001}},
4517 {SetMatrixTranspose, 0, 0, 0, 6,
4518 {0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001}},
4520 {SetMatrixTransposeArray, 0, 1, 1, 6,
4521 {0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001}},
4523 {0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000000,
4524 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
4526 {SetMatrixPointerArray, 0, 1, 1, 6,
4527 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
4529 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
4530 0x00000001, 0x00000000, 0x00000001, 0x00000000}},
4532 {SetMatrixTransposePointerArray, 0, 1, 1, 6,
4533 {0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001}},
4535 {0x00000001, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001,
4536 0x00000001, 0x00000000, 0x00000001, 0x00000001}},
4537};
4538
4540{
4541 {"ranf", {"ranf", D3DXRS_FLOAT4, 12, 6, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 2, 0, 48, NULL}, 143},
4542 {"ranf[0]", {"ranf", D3DXRS_FLOAT4, 12, 3, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 143},
4543 {"ranf[1]", {"ranf", D3DXRS_FLOAT4, 15, 3, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 155},
4544};
4545
4547{
4548 {SetInt},
4549 {SetBool},
4550 {SetFloat},
4551 {SetIntArray, 1, 0, 5},
4552 {SetIntArray, 1, 6, 11, 12,
4553 {0x40000000, 0x40400000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000, 0x00000000,
4554 0x00000000, 0x40e00000,}},
4555 {SetIntArray, 1, 12, REGISTER_OUTPUT_SIZE, 24,
4556 {0x40000000, 0x40400000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000, 0x00000000,
4557 0x00000000, 0x40e00000, 0x00000000, 0x00000000, 0x41000000, 0x41100000, 0x00000000, 0x00000000,
4558 0x41200000, 0x41300000, 0x00000000, 0x00000000, 0x41400000, 0x41500000}},
4559 {SetBoolArray, 1, 0, 5},
4560 {SetBoolArray, 1, 6, 11, 12,
4561 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4562 0x00000000, 0x3f800000}},
4564 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4565 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4566 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
4567 {SetFloatArray, 0, 0, 5},
4568 {SetFloatArray, 0, 6, 11, 12,
4569 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000, 0x00000000,
4570 0x40c00000, 0x40e00000}},
4572 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000, 0x00000000,
4573 0x40c00000, 0x40e00000, 0x00000000, 0x00000000, 0x41000000, 0x41100000, 0x00000000, 0x00000000,
4574 0x41200000, 0x41300000, 0x00000000, 0x00000000, 0x41400000, 0x41500000}},
4575 {SetValue, 1, 0, 23},
4576 {SetValue, 1, 24, 47, 12,
4577 {0x40000000, 0x40400000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000, 0x00000000,
4578 0x00000000, 0x40e00000}},
4579 {SetValue, 1, 48, REGISTER_OUTPUT_SIZE * 4, 24,
4580 {0x40000000, 0x40400000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000, 0x00000000,
4581 0x00000000, 0x40e00000, 0x00000000, 0x00000000, 0x41000000, 0x41100000, 0x00000000, 0x00000000,
4582 0x41200000, 0x41300000, 0x00000000, 0x00000000, 0x41400000, 0x41500000}},
4583 {SetVector},
4584 {SetVectorArray, 0, 0, 2},
4585 {SetVectorArray, 0, 3, 5, 12,
4586 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40c00000, 0x40e00000, 0x00000000, 0x00000000,
4587 0x41200000, 0x41300000}},
4588 {SetVectorArray, 0, 6, REGISTER_OUTPUT_SIZE / 4, 24,
4589 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40c00000, 0x40e00000, 0x00000000, 0x00000000,
4590 0x41200000, 0x41300000, 0x00000000, 0x00000000, 0x41600000, 0x41700000, 0x00000000, 0x00000000,
4591 0x41a00000, 0x41b00000, 0x00000000, 0x00000000, 0x00000000, 0x41f00000}},
4592 {SetMatrix, 0, 0, 0, 12,
4593 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40c00000, 0x40e00000, 0x00000000, 0x00000000,
4594 0x41200000, 0x41300000}},
4596 {SetMatrixArray, 0, 1, 1, 12,
4597 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40c00000, 0x40e00000, 0x00000000, 0x00000000,
4598 0x41200000, 0x41300000}},
4599 {SetMatrixArray, 0, 2, REGISTER_OUTPUT_SIZE / 16, 24,
4600 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40c00000, 0x40e00000, 0x00000000, 0x00000000,
4601 0x41200000, 0x41300000, 0x00000000, 0x00000000, 0x41a00000, 0x41b00000, 0x00000000, 0x00000000,
4602 0x00000000, 0x41f00000, 0x00000000, 0x00000000, 0x00000000, 0x42300000}},
4603 {SetMatrixTranspose, 0, 0, 0, 12,
4604 {0x40000000, 0x40c00000, 0x00000000, 0x00000000, 0x00000000, 0x40e00000, 0x00000000, 0x00000000,
4605 0x40800000, 0x41000000}},
4607 {SetMatrixTransposeArray, 0, 1, 1, 12,
4608 {0x40000000, 0x40c00000, 0x00000000, 0x00000000, 0x00000000, 0x40e00000, 0x00000000, 0x00000000,
4609 0x40800000, 0x41000000}},
4611 {0x40000000, 0x40c00000, 0x00000000, 0x00000000, 0x00000000, 0x40e00000, 0x00000000, 0x00000000,
4612 0x40800000, 0x41000000, 0x00000000, 0x00000000, 0x41a00000, 0x00000000, 0x00000000, 0x00000000,
4613 0x41b00000, 0x41f00000, 0x00000000, 0x00000000, 0x41c00000, 0x42000000}},
4615 {SetMatrixPointerArray, 0, 1, 1, 12,
4616 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40c00000, 0x40e00000, 0x00000000, 0x00000000,
4617 0x41200000, 0x41300000}},
4619 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40c00000, 0x40e00000, 0x00000000, 0x00000000,
4620 0x41200000, 0x41300000, 0x00000000, 0x00000000, 0x41900000, 0x41a00000, 0x00000000, 0x00000000,
4621 0x41d00000, 0x00000000, 0x00000000, 0x00000000, 0x42100000, 0x00000000}},
4623 {SetMatrixTransposePointerArray, 0, 1, 1, 12,
4624 {0x40000000, 0x40c00000, 0x00000000, 0x00000000, 0x00000000, 0x40e00000, 0x00000000, 0x00000000,
4625 0x40800000, 0x41000000}},
4627 {0x40000000, 0x40c00000, 0x00000000, 0x00000000, 0x00000000, 0x40e00000, 0x00000000, 0x00000000,
4628 0x40800000, 0x41000000, 0x00000000, 0x00000000, 0x41900000, 0x41d00000, 0x00000000, 0x00000000,
4629 0x41a00000, 0x00000000, 0x00000000, 0x00000000, 0x41b00000, 0x41f00000}},
4630};
4631
4633{
4634 {"rabf", {"rabf", D3DXRS_FLOAT4, 6, 6, D3DXPC_MATRIX_ROWS, D3DXPT_BOOL, 3, 2, 2, 0, 48, NULL}, 55},
4635 {"rabf[0]", {"rabf", D3DXRS_FLOAT4, 6, 3, D3DXPC_MATRIX_ROWS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 55},
4636 {"rabf[1]", {"rabf", D3DXRS_FLOAT4, 9, 3, D3DXPC_MATRIX_ROWS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 67},
4637};
4638
4640{
4641 {SetInt},
4642 {SetBool},
4643 {SetFloat},
4644 {SetIntArray, 1, 0, 5},
4645 {SetIntArray, 1, 6, 11, 12,
4646 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4647 0x00000000, 0x3f800000}},
4648 {SetIntArray, 1, 12, REGISTER_OUTPUT_SIZE, 24,
4649 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4650 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4651 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
4652 {SetBoolArray, 1, 0, 5},
4653 {SetBoolArray, 1, 6, 11, 12,
4654 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4655 0x00000000, 0x3f800000}},
4657 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4658 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4659 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
4660 {SetFloatArray, 0, 0, 5},
4661 {SetFloatArray, 0, 6, 11, 12,
4662 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4663 0x3f800000, 0x3f800000}},
4665 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4666 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4667 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
4668 {SetValue, 1, 0, 23},
4669 {SetValue, 1, 24, 47, 12,
4670 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4671 0x00000000, 0x3f800000}},
4672 {SetValue, 1, 48, REGISTER_OUTPUT_SIZE * 4, 24,
4673 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4674 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4675 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
4676 {SetVector},
4677 {SetVectorArray, 0, 0, 2},
4678 {SetVectorArray, 0, 3, 5, 12,
4679 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4680 0x3f800000, 0x3f800000}},
4681 {SetVectorArray, 0, 6, REGISTER_OUTPUT_SIZE / 4, 24,
4682 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4683 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4684 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000}},
4685 {SetMatrix, 0, 0, 0, 12,
4686 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4687 0x3f800000, 0x3f800000}},
4689 {SetMatrixArray, 0, 1, 1, 12,
4690 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4691 0x3f800000, 0x3f800000}},
4692 {SetMatrixArray, 0, 2, REGISTER_OUTPUT_SIZE / 16, 24,
4693 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4694 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4695 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000}},
4696 {SetMatrixTranspose, 0, 0, 0, 12,
4697 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000,
4698 0x3f800000, 0x3f800000}},
4700 {SetMatrixTransposeArray, 0, 1, 1, 12,
4701 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000,
4702 0x3f800000, 0x3f800000}},
4704 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000,
4705 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000,
4706 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
4708 {SetMatrixPointerArray, 0, 1, 1, 12,
4709 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4710 0x3f800000, 0x3f800000}},
4712 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4713 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4714 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000}},
4716 {SetMatrixTransposePointerArray, 0, 1, 1, 12,
4717 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000,
4718 0x3f800000, 0x3f800000}},
4720 {0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000,
4721 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
4722 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
4723};
4724
4725/*
4726 * fxc.exe /Tvs_3_0
4727 */
4728#if 0
4729struct {bool b; bool3 vb;} sb = {1, 1, 0, 1};
4730struct {int n; int3 vn;} sn = {11, 12, 13, 14};
4731struct {float f; float3 vf;} sf = {1.1f, 2.2f, 3.3f, 4.4f};
4732struct {int nf; int3 vnf;} snf = {31, 32, 33, 34};
4733struct {bool bf; bool3 vbf;} sbf = {1, 0, 0, 1};
4734float4 main(float4 pos : POSITION) : POSITION
4735{
4736 float4 tmp = 0;
4737 int i;
4738 if (sb.vb.z) for (i = 0; i < sn.n; i++) tmp.x += pos.z * sf.vf.x * snf.vnf.z;
4739 else for (i = 0; i < sn.vn.z; i++) tmp.y += pos.y * sf.vf.z * sbf.vbf.y;
4740 return tmp;
4741}
4742#endif
4744{
47450xfffe0300, 0x00a2fffe, 0x42415443, 0x0000001c, 0x00000253, 0xfffe0300, 0x00000005, 0x0000001c,
47460x00000100, 0x0000024c, 0x00000080, 0x00000000, 0x00000004, 0x000000bc, 0x000000cc, 0x000000dc,
47470x00040002, 0x00000002, 0x000000f8, 0x00000108, 0x00000128, 0x00000002, 0x00000002, 0x00000164,
47480x00000174, 0x00000194, 0x00000001, 0x00000004, 0x000001d0, 0x000001e0, 0x00000200, 0x00020002,
47490x00000002, 0x0000021c, 0x0000022c, 0x62006273, 0xababab00, 0x00010000, 0x00010001, 0x00000001,
47500x00000000, 0xab006276, 0x00010001, 0x00030001, 0x00000001, 0x00000000, 0x00000083, 0x00000088,
47510x00000098, 0x0000009c, 0x00000005, 0x00040001, 0x00020001, 0x000000ac, 0xffffffff, 0xffffffff,
47520x00000000, 0xffffffff, 0x00666273, 0x76006662, 0xab006662, 0x000000e0, 0x00000088, 0x000000e3,
47530x0000009c, 0x00000005, 0x00040001, 0x00020001, 0x000000e8, 0x3f800000, 0x00000000, 0x00000000,
47540x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x66006673, 0xababab00, 0x00030000,
47550x00010001, 0x00000001, 0x00000000, 0xab006676, 0x00030001, 0x00030001, 0x00000001, 0x00000000,
47560x0000012b, 0x00000130, 0x00000140, 0x00000144, 0x00000005, 0x00040001, 0x00020001, 0x00000154,
47570x3f8ccccd, 0x00000000, 0x00000000, 0x00000000, 0x400ccccd, 0x40533333, 0x408ccccd, 0x00000000,
47580x6e006e73, 0xababab00, 0x00020000, 0x00010001, 0x00000001, 0x00000000, 0xab006e76, 0x00020001,
47590x00030001, 0x00000001, 0x00000000, 0x00000197, 0x0000019c, 0x000001ac, 0x000001b0, 0x00000005,
47600x00040001, 0x00020001, 0x000001c0, 0x0000000b, 0x00000000, 0x00000001, 0x00000000, 0x0000000c,
47610x0000000d, 0x0000000e, 0x00000000, 0x00666e73, 0x7600666e, 0xab00666e, 0x00000204, 0x0000019c,
47620x00000207, 0x000001b0, 0x00000005, 0x00040001, 0x00020001, 0x0000020c, 0x41f80000, 0x00000000,
47630x00000000, 0x00000000, 0x42000000, 0x42040000, 0x42080000, 0x00000000, 0x335f7376, 0x4d00305f,
47640x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970,
47650x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x05000051, 0xa00f0006, 0x00000000, 0x00000000,
47660x00000000, 0x00000000, 0x0200001f, 0x80000000, 0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000,
47670x01000028, 0xe0e40803, 0x03000005, 0x80010000, 0xa0000001, 0x90aa0000, 0x02000001, 0x80010001,
47680xa0000006, 0x01000026, 0xf0e40000, 0x04000004, 0x80010001, 0x80000000, 0xa0aa0003, 0x80000001,
47690x00000027, 0x02000001, 0x80020001, 0xa0000006, 0x0000002a, 0x03000005, 0x80010000, 0xa0aa0001,
47700x90550000, 0x02000001, 0x80020001, 0xa0000006, 0x01000026, 0xf0e40003, 0x04000004, 0x80020001,
47710x80000000, 0xa0550005, 0x80550001, 0x00000027, 0x02000001, 0x80010001, 0xa0000006, 0x0000002b,
47720x02000001, 0xe0030000, 0x80e40001, 0x02000001, 0xe00c0000, 0xa0000006, 0x0000ffff,
4773};
4774
4776{
4777 {"sf", {"sf", D3DXRS_FLOAT4, 0, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 93},
4778 {"sf.f", {"f", D3DXRS_FLOAT4, 0, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 93},
4779 {"sf.vf", {"vf", D3DXRS_FLOAT4, 1, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 97},
4780};
4781
4783{
4784 {SetInt},
4785 {SetBool},
4786 {SetFloat},
4787 {SetIntArray, 1, 0, 3},
4789 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40400000, 0x40800000, 0x40a00000, 0x00000000}},
4790 {SetBoolArray, 1, 0, 3},
4792 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
4793 {SetFloatArray, 0, 0, 3},
4795 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800123, 0x40a00123, 0x00000000}},
4796 {SetValue, 0, 0, 15},
4797 {SetValue, 0, 16, REGISTER_OUTPUT_SIZE * 4, 8,
4798 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800123, 0x40a00123, 0x00000000}},
4799 {SetVector, 0, 0, 0, 8,
4800 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800123, 0x40a00123, 0x00000000}},
4802 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 8,
4803 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800123, 0x40a00123, 0x00000000}},
4804 {SetMatrix, 0, 0, 0, 8,
4805 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800123, 0x40a00123, 0x00000000}},
4807 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
4808 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800123, 0x40a00123, 0x00000000}},
4809 {SetMatrixTranspose, 0, 0, 0, 8,
4810 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
4813 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
4816 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
4819 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
4820};
4821
4823{
4824 {"sn", {"sn", D3DXRS_INT4, 0, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 120},
4825 {"sn.n", {"n", D3DXRS_INT4, 0, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 120},
4826 {"sn.vn", {"vn", D3DXRS_INT4, 1, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 124},
4827};
4828
4830{
4831 {SetInt},
4832 {SetBool},
4833 {SetFloat},
4834 {SetIntArray, 1, 0, 3},
4836 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000003, 0x00000004, 0x00000005, 0x00000000}},
4837 {SetBoolArray, 1, 0, 3},
4839 {0x00000001, 0x00000000, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000000}},
4840 {SetFloatArray, 0, 0, 3},
4842 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000004, 0x00000005, 0x00000000}},
4843 {SetValue, 1, 0, 15},
4844 {SetValue, 1, 16, REGISTER_OUTPUT_SIZE * 4, 8,
4845 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000003, 0x00000004, 0x00000005, 0x00000000}},
4846 {SetVector, 0, 0, 0, 8,
4847 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000004, 0x00000005, 0x00000000}},
4849 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 8,
4850 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000004, 0x00000005, 0x00000000}},
4851 {SetMatrix, 0, 0, 0, 8,
4852 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000004, 0x00000005, 0x00000000}},
4854 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
4855 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000004, 0x00000005, 0x00000000}},
4856 {SetMatrixTranspose, 0, 0, 0, 8,
4857 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
4860 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
4863 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
4866 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
4867};
4868
4870{
4871 {"sb", {"sb", D3DXRS_BOOL, 0, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 51},
4872 {"sb.b", {"b", D3DXRS_BOOL, 0, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 51},
4873 {"sb.vb", {"vb", D3DXRS_BOOL, 1, 3, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 52},
4874};
4875
4877{
4878 {SetInt},
4879 {SetBool},
4880 {SetFloat},
4881 {SetIntArray, 1, 0, 3},
4883 {0x00000001, 0x00000001, 0x00000001, 0x00000001}},
4884 {SetBoolArray, 1, 0, 3},
4886 {0x00000002, 0x00000003, 0x00000004, 0x00000005}},
4887 {SetFloatArray, 0, 0, 3},
4889 {0x00000001, 0x00000000, 0x00000001, 0x00000001}},
4890 {SetValue, 1, 0, 15},
4891 {SetValue, 1, 16, REGISTER_OUTPUT_SIZE * 4, 4,
4892 {0x00000002, 0x00000003, 0x00000004, 0x00000005}},
4893 {SetVector, 0, 0, 0, 4,
4894 {0x00000001, 0x00000000, 0x00000001, 0x00000001}},
4896 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 4,
4897 {0x00000001, 0x00000000, 0x00000001, 0x00000001}},
4898 {SetMatrix, 0, 0, 0, 4,
4899 {0x00000001, 0x00000000, 0x00000001, 0x00000001}},
4901 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4,
4902 {0x00000001, 0x00000000, 0x00000001, 0x00000001}},
4903 {SetMatrixTranspose, 0, 0, 0, 4,
4904 {0x00000001, 0x00000001, 0x00000001, 0x00000001}},
4907 {0x00000001, 0x00000001, 0x00000001, 0x00000001}},
4910 {0x00000001, 0x00000000, 0x00000001, 0x00000001}},
4913 {0x00000001, 0x00000001, 0x00000001, 0x00000001}},
4914};
4915
4917{
4918 {"snf", {"snf", D3DXRS_FLOAT4, 2, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 139},
4919 {"snf.nf", {"nf", D3DXRS_FLOAT4, 2, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 139},
4920 {"snf.vnf", {"vnf", D3DXRS_FLOAT4, 3, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 143},
4921};
4922
4924{
4925 {SetInt},
4926 {SetBool},
4927 {SetFloat},
4928 {SetIntArray, 1, 0, 3},
4930 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40400000, 0x40800000, 0x40a00000, 0x00000000}},
4931 {SetBoolArray, 1, 0, 3},
4933 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
4934 {SetFloatArray, 0, 0, 3},
4936 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000}},
4937 {SetValue, 1, 0, 15},
4938 {SetValue, 1, 16, REGISTER_OUTPUT_SIZE * 4, 8,
4939 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40400000, 0x40800000, 0x40a00000, 0x00000000}},
4940 {SetVector, 0, 0, 0, 8,
4941 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000}},
4943 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 8,
4944 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000}},
4945 {SetMatrix, 0, 0, 0, 8,
4946 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000}},
4948 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
4949 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000}},
4950 {SetMatrixTranspose, 0, 0, 0, 8,
4951 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
4954 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
4957 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
4960 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
4961};
4962
4964{
4965 {"sbf", {"sbf", D3DXRS_FLOAT4, 4, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 66},
4966 {"sbf.bf", {"bf", D3DXRS_FLOAT4, 4, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 66},
4967 {"sbf.vbf", {"vbf", D3DXRS_FLOAT4, 5, 1, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 70},
4968};
4969
4971{
4972 {SetInt},
4973 {SetBool},
4974 {SetFloat},
4975 {SetIntArray, 1, 0, 3},
4977 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
4978 {SetBoolArray, 1, 0, 3},
4980 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
4981 {SetFloatArray, 0, 0, 3},
4983 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000}},
4984 {SetValue, 1, 0, 15},
4985 {SetValue, 1, 16, REGISTER_OUTPUT_SIZE * 4, 8,
4986 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
4987 {SetVector, 0, 0, 0, 8,
4988 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000}},
4990 {SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 8,
4991 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000}},
4992 {SetMatrix, 0, 0, 0, 8,
4993 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000}},
4995 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
4996 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000}},
4997 {SetMatrixTranspose, 0, 0, 0, 8,
4998 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
5001 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
5004 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
5007 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
5008};
5009
5010/*
5011 * fxc.exe /Tvs_3_0
5012 */
5013#if 0
5014struct {bool b; bool3 vb;} sab[2] = {1, 1, 0, 1, 0, 1, 0, 1};
5015struct {int n; int3 vn;} san[2] = {21, 22, 23, 24, 25, 26, 27, 28};
5016struct {float f; float3 vf;} saf[2] = {1.1f, 2.1f, 3.1f, 4.1f, 5.1f, 6.1f, 7.1f, 8.1f};
5017struct {int nf; int3 vnf;} sanf[2] = {41, 0, 43, 44, 41, 42, 43, 44};
5018struct {bool bf; bool3 vbf;} sabf[2] = {1, 0, 0, 1, 1, 1, 0, 1};
5019float4 main(float4 pos : POSITION) : POSITION
5020{
5021 float4 tmp = 0;
5022 int i;
5023 if (sab[1].vb.z) for (i = 0; i < san[1].n; i++) tmp.x += pos.z * saf[1].vf.x * sanf[1].vnf.z;
5024 else for (i = 0; i < san[1].vn.z; i++) tmp.y += pos.y * saf[1].vf.z * sabf[1].vbf.y;
5025 return tmp;
5026}
5027#endif
5029{
50300xfffe0300, 0x00c6fffe, 0x42415443, 0x0000001c, 0x000002e3, 0xfffe0300, 0x00000005, 0x0000001c,
50310x00000100, 0x000002dc, 0x00000080, 0x00000000, 0x00000008, 0x000000bc, 0x000000cc, 0x000000ec,
50320x00080002, 0x00000004, 0x00000108, 0x00000118, 0x00000158, 0x00000002, 0x00000004, 0x00000194,
50330x000001a4, 0x000001e4, 0x00000001, 0x00000008, 0x00000220, 0x00000230, 0x00000270, 0x00040002,
50340x00000004, 0x0000028c, 0x0000029c, 0x00626173, 0xabab0062, 0x00010000, 0x00010001, 0x00000001,
50350x00000000, 0xab006276, 0x00010001, 0x00030001, 0x00000001, 0x00000000, 0x00000084, 0x00000088,
50360x00000098, 0x0000009c, 0x00000005, 0x00040001, 0x00020002, 0x000000ac, 0xffffffff, 0xffffffff,
50370x00000000, 0xffffffff, 0x00000000, 0xffffffff, 0x00000000, 0xffffffff, 0x66626173, 0x00666200,
50380x00666276, 0x000000f1, 0x00000088, 0x000000f4, 0x0000009c, 0x00000005, 0x00040001, 0x00020002,
50390x000000f8, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000,
50400x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000,
50410x00000000, 0x00666173, 0xabab0066, 0x00030000, 0x00010001, 0x00000001, 0x00000000, 0xab006676,
50420x00030001, 0x00030001, 0x00000001, 0x00000000, 0x0000015c, 0x00000160, 0x00000170, 0x00000174,
50430x00000005, 0x00040001, 0x00020002, 0x00000184, 0x3f8ccccd, 0x00000000, 0x00000000, 0x00000000,
50440x40066666, 0x40466666, 0x40833333, 0x00000000, 0x40a33333, 0x00000000, 0x00000000, 0x00000000,
50450x40c33333, 0x40e33333, 0x4101999a, 0x00000000, 0x006e6173, 0xabab006e, 0x00020000, 0x00010001,
50460x00000001, 0x00000000, 0xab006e76, 0x00020001, 0x00030001, 0x00000001, 0x00000000, 0x000001e8,
50470x000001ec, 0x000001fc, 0x00000200, 0x00000005, 0x00040001, 0x00020002, 0x00000210, 0x00000015,
50480x00000000, 0x00000001, 0x00000000, 0x00000016, 0x00000017, 0x00000018, 0x00000000, 0x00000019,
50490x00000000, 0x00000001, 0x00000000, 0x0000001a, 0x0000001b, 0x0000001c, 0x00000000, 0x666e6173,
50500x00666e00, 0x00666e76, 0x00000275, 0x000001ec, 0x00000278, 0x00000200, 0x00000005, 0x00040001,
50510x00020002, 0x0000027c, 0x42240000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x422c0000,
50520x42300000, 0x00000000, 0x42240000, 0x00000000, 0x00000000, 0x00000000, 0x42280000, 0x422c0000,
50530x42300000, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820,
50540x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131,
50550x05000051, 0xa00f000c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0200001f, 0x80000000,
50560x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x01000028, 0xe0e40807, 0x03000005, 0x80010000,
50570xa0000003, 0x90aa0000, 0x02000001, 0x80010001, 0xa000000c, 0x01000026, 0xf0e40004, 0x04000004,
50580x80010001, 0x80000000, 0xa0aa0007, 0x80000001, 0x00000027, 0x02000001, 0x80020001, 0xa000000c,
50590x0000002a, 0x03000005, 0x80010000, 0xa0aa0003, 0x90550000, 0x02000001, 0x80020001, 0xa000000c,
50600x01000026, 0xf0e40007, 0x04000004, 0x80020001, 0x80000000, 0xa055000b, 0x80550001, 0x00000027,
50610x02000001, 0x80010001, 0xa000000c, 0x0000002b, 0x02000001, 0xe0030000, 0x80e40001, 0x02000001,
50620xe00c0000, 0xa000000c, 0x0000ffff,
5063};
5064
5066{
5067 {"saf", {"saf", D3DXRS_FLOAT4, 0, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 2, 2, 32, NULL}, 105},
5068 {"saf[0]", {"saf", D3DXRS_FLOAT4, 0, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 105},
5069 {"saf[0].f", {"f", D3DXRS_FLOAT4, 0, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 105},
5070 {"saf[0].vf", {"vf", D3DXRS_FLOAT4, 1, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 109},
5071 {"saf[1]", {"saf", D3DXRS_FLOAT4, 2, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 113},
5072 {"saf[1].f", {"f", D3DXRS_FLOAT4, 2, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 113},
5073 {"saf[1].vf", {"vf", D3DXRS_FLOAT4, 3, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 117},
5074};
5075
5077{
5078 {SetInt},
5079 {SetBool},
5080 {SetFloat},
5081 {SetIntArray, 1, 0, 3},
5082 {SetIntArray, 1, 4, 7, 8,
5083 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40400000, 0x40800000, 0x40a00000, 0x00000000}},
5085 {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40e00000, 0x41000000, 0x41100000, 0x00000000}},
5086 {SetBoolArray, 1, 0, 3},
5087 {SetBoolArray, 1, 4, 7, 8,
5088 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
5090 {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
5091 {SetFloatArray, 0, 0, 3},
5092 {SetFloatArray, 0, 4, 7, 8,
5093 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800123, 0x40a00123, 0x00000000}},
5095 {0x40c00123, 0x00000000, 0x00000000, 0x00000000, 0x40e00123, 0x41000123, 0x41100123, 0x00000000}},
5096 {SetValue, 0, 0, 15},
5097 {SetValue, 0, 16, 31, 8,
5098 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800123, 0x40a00123, 0x00000000}},
5099 {SetValue, 0, 32, REGISTER_OUTPUT_SIZE * 4, 8,
5100 {0x40c00123, 0x00000000, 0x00000000, 0x00000000, 0x40e00123, 0x41000123, 0x41100123, 0x00000000}},
5101 {SetVector, 0, 0, 0, 8,
5102 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800123, 0x40a00123, 0x00000000}},
5104 {SetVectorArray, 0, 1, 1, 8,
5105 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800123, 0x40a00123, 0x00000000}},
5106 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 8,
5107 {0x40c00123, 0x00000000, 0x00000000, 0x00000000, 0x40e00123, 0x41000123, 0x41100123, 0x00000000}},
5108 {SetMatrix, 0, 0, 0, 8,
5109 {0x40c00123, 0x00000000, 0x00000000, 0x00000000, 0x40e00123, 0x41000123, 0x41100123, 0x00000000}},
5111 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
5112 {0x40c00123, 0x00000000, 0x00000000, 0x00000000, 0x40e00123, 0x41000123, 0x41100123, 0x00000000}},
5113 {SetMatrixTranspose, 0, 0, 0, 8,
5114 {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
5117 {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
5122};
5123
5125{
5126 {"san", {"san", D3DXRS_INT4, 0, 8, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 2, 2, 32, NULL}, 140},
5127 {"san[0]", {"san", D3DXRS_INT4, 0, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 140},
5128 {"san[0].n", {"n", D3DXRS_INT4, 0, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 140},
5129 {"san[0].vn", {"vn", D3DXRS_INT4, 1, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 144},
5130 {"san[1]", {"san", D3DXRS_INT4, 2, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 148},
5131 {"san[1].n", {"n", D3DXRS_INT4, 2, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 148},
5132 {"san[1].vn", {"vn", D3DXRS_INT4, 3, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 152},
5133};
5134
5136{
5137 {SetInt},
5138 {SetBool},
5139 {SetFloat},
5140 {SetIntArray, 1, 0, 3},
5141 {SetIntArray, 1, 4, 7, 8,
5142 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000003, 0x00000004, 0x00000005, 0x00000000}},
5144 {0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000007, 0x00000008, 0x00000009, 0x00000000}},
5145 {SetBoolArray, 1, 0, 3},
5146 {SetBoolArray, 1, 4, 7, 8,
5147 {0x00000001, 0x00000000, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000000}},
5149 {0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000000}},
5150 {SetFloatArray, 0, 0, 3},
5151 {SetFloatArray, 0, 4, 7, 8,
5152 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000004, 0x00000005, 0x00000000}},
5154 {0x00000006, 0x00000000, 0x00000001, 0x00000000, 0x00000007, 0x00000008, 0x00000009, 0x00000000}},
5155 {SetValue, 1, 0, 15},
5156 {SetValue, 1, 16, 31, 8,
5157 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000003, 0x00000004, 0x00000005, 0x00000000}},
5158 {SetValue, 1, 32, REGISTER_OUTPUT_SIZE * 4, 8,
5159 {0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000007, 0x00000008, 0x00000009, 0x00000000}},
5160 {SetVector, 0, 0, 0, 8,
5161 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000004, 0x00000005, 0x00000000}},
5163 {SetVectorArray, 0, 1, 1, 8,
5164 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000004, 0x00000005, 0x00000000}},
5165 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 8,
5166 {0x00000006, 0x00000000, 0x00000001, 0x00000000, 0x00000007, 0x00000008, 0x00000009, 0x00000000}},
5167 {SetMatrix, 0, 0, 0, 8,
5168 {0x00000006, 0x00000000, 0x00000001, 0x00000000, 0x00000007, 0x00000008, 0x00000009, 0x00000000},},
5170 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
5171 {0x00000006, 0x00000000, 0x00000001, 0x00000000, 0x00000007, 0x00000008, 0x00000009, 0x00000000}},
5172 {SetMatrixTranspose, 0, 0, 0, 8,
5173 {0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
5176 {0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
5179 {0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
5182 {0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
5183};
5184
5186{
5187 {"sab", {"sab", D3DXRS_BOOL, 0, 8, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 2, 2, 32, NULL}, 51},
5188 {"sab[0]", {"sab", D3DXRS_BOOL, 0, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 51},
5189 {"sab[0].b", {"b", D3DXRS_BOOL, 0, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 51},
5190 {"sab[0].vb", {"vb", D3DXRS_BOOL, 1, 3, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 52},
5191 {"sab[1]", {"sab", D3DXRS_BOOL, 4, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 55},
5192 {"sab[1].b", {"b", D3DXRS_BOOL, 4, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 55},
5193 {"sab[1].vb", {"vb", D3DXRS_BOOL, 5, 3, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 56},
5194};
5195
5197{
5198 {SetInt},
5199 {SetBool},
5200 {SetFloat},
5201 {SetIntArray, 1, 0, 3},
5202 {SetIntArray, 1, 4, 7, 4,
5203 {0x00000001, 0x00000001, 0x00000001, 0x00000001}},
5205 {0x00000000, 0x00000001, 0x00000001, 0x00000001}},
5206 {SetBoolArray, 1, 0, 3},
5207 {SetBoolArray, 1, 4, 7, 4,
5208 {0x00000002, 0x00000003, 0x00000004, 0x00000005}},
5210 {0x00000000, 0x00000007, 0x00000008, 0x00000009}},
5211 {SetFloatArray, 0, 0, 3},
5212 {SetFloatArray, 0, 4, 7, 4,
5213 {0x00000001, 0x00000000, 0x00000001, 0x00000001}},
5215 {0x00000001, 0x00000001, 0x00000001, 0x00000001}},
5216 {SetValue, 1, 0, 15},
5217 {SetValue, 1, 16, 31, 4,
5218 {0x00000002, 0x00000003, 0x00000004, 0x00000005}},
5219 {SetValue, 1, 32, REGISTER_OUTPUT_SIZE * 4, 4,
5220 {0x00000000, 0x00000007, 0x00000008, 0x00000009}},
5221 {SetVector, 0, 0, 0, 4,
5222 {0x00000001, 0x00000000, 0x00000001, 0x00000001}},
5224 {SetVectorArray, 0, 1, 1, 4,
5225 {0x00000001, 0x00000000, 0x00000001, 0x00000001}},
5226 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 4,
5227 {0x00000001, 0x00000001, 0x00000001, 0x00000001}},
5228 {SetMatrix, 0, 0, 0, 4,
5229 {0x00000001, 0x00000001, 0x00000001, 0x00000001}},
5231 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4,
5232 {0x00000001, 0x00000001, 0x00000001, 0x00000001}},
5233 {SetMatrixTranspose, 0, 0, 0, 4,
5234 {0x00000000, 0x00000001, 0x00000001, 0x00000001}},
5237 {0x00000000, 0x00000001, 0x00000001, 0x00000001}},
5240 {0x00000001, 0x00000001, 0x00000001, 0x00000001}},
5243 {0x00000000, 0x00000001, 0x00000001, 0x00000001}},
5244};
5245
5247{
5248 {"sanf", {"sanf", D3DXRS_FLOAT4, 4, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 2, 2, 32, NULL}, 167},
5249 {"sanf[0]", {"sanf", D3DXRS_FLOAT4, 4, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 167},
5250 {"sanf[0].nf", {"nf", D3DXRS_FLOAT4, 4, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 167},
5251 {"sanf[0].vnf", {"vnf", D3DXRS_FLOAT4, 5, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 171},
5252 {"sanf[1]", {"sanf", D3DXRS_FLOAT4, 6, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 175},
5253 {"sanf[1].nf", {"nf", D3DXRS_FLOAT4, 6, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 175},
5254 {"sanf[1].vnf", {"vnf", D3DXRS_FLOAT4, 7, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 179},
5255};
5256
5258{
5259 {SetInt},
5260 {SetBool},
5261 {SetFloat},
5262 {SetIntArray, 1, 0, 3},
5263 {SetIntArray, 1, 4, 7, 8,
5264 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40400000, 0x40800000, 0x40a00000, 0x00000000}},
5266 {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40e00000, 0x41000000, 0x41100000, 0x00000000}},
5267 {SetBoolArray, 1, 0, 3},
5268 {SetBoolArray, 1, 4, 7, 8,
5269 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
5271 {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
5272 {SetFloatArray, 0, 0, 3},
5273 {SetFloatArray, 0, 4, 7, 8,
5274 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000}},
5276 {0x40c00000, 0x00000000, 0x00000000, 0x00000000, 0x40e00000, 0x41000000, 0x41100000, 0x00000000}},
5277 {SetValue, 1, 0, 15},
5278 {SetValue, 1, 16, 31, 8,
5279 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40400000, 0x40800000, 0x40a00000, 0x00000000}},
5280 {SetValue, 1, 32, REGISTER_OUTPUT_SIZE * 4, 8,
5281 {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40e00000, 0x41000000, 0x41100000, 0x00000000}},
5282 {SetVector, 0, 0, 0, 8,
5283 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000}},
5285 {SetVectorArray, 0, 1, 1, 8,
5286 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40800000, 0x40a00000, 0x00000000}},
5287 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 8,
5288 {0x40c00000, 0x00000000, 0x00000000, 0x00000000, 0x40e00000, 0x41000000, 0x41100000, 0x00000000}},
5289 {SetMatrix, 0, 0, 0, 8,
5290 {0x40c00000, 0x00000000, 0x00000000, 0x00000000, 0x40e00000, 0x41000000, 0x41100000, 0x00000000}},
5292 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
5293 {0x40c00000, 0x00000000, 0x00000000, 0x00000000, 0x40e00000, 0x41000000, 0x41100000, 0x00000000}},
5294 {SetMatrixTranspose, 0, 0, 0, 8,
5295 {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
5298 {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
5303};
5304
5306{
5307 {"sabf", {"sabf", D3DXRS_FLOAT4, 8, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 2, 2, 32, NULL}, 70},
5308 {"sabf[0]", {"sabf", D3DXRS_FLOAT4, 8, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 70},
5309 {"sabf[0].bf", {"bf", D3DXRS_FLOAT4, 8, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 70},
5310 {"sabf[0].vbf", {"vbf", D3DXRS_FLOAT4, 9, 1, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 74},
5311 {"sabf[1]", {"sabf", D3DXRS_FLOAT4, 10, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 78},
5312 {"sabf[1].bf", {"bf", D3DXRS_FLOAT4, 10, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 78},
5313 {"sabf[1].vbf", {"vbf", D3DXRS_FLOAT4, 11, 1, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 82},
5314};
5315
5317{
5318 {SetInt},
5319 {SetBool},
5320 {SetFloat},
5321 {SetIntArray, 1, 0, 3},
5322 {SetIntArray, 1, 4, 7, 8,
5323 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
5325 {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
5326 {SetBoolArray, 1, 0, 3},
5327 {SetBoolArray, 1, 4, 7, 8,
5328 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
5330 {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
5331 {SetFloatArray, 0, 0, 3},
5332 {SetFloatArray, 0, 4, 7, 8,
5333 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000}},
5335 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
5336 {SetValue, 1, 0, 15},
5337 {SetValue, 1, 16, 31, 8,
5338 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
5339 {SetValue, 1, 32, REGISTER_OUTPUT_SIZE * 4, 8,
5340 {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
5341 {SetVector, 0, 0, 0, 8,
5342 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000}},
5344 {SetVectorArray, 0, 1, 1, 8,
5345 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000}},
5346 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 8,
5347 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
5348 {SetMatrix, 0, 0, 0, 8,
5349 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
5351 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 8,
5352 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000}},
5353 {SetMatrixTranspose, 0, 0, 0, 8,
5354 {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
5357 {0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}},
5362};
5363
5364/*
5365 * fxc.exe /Tvs_3_0
5366 */
5367#if 0
5368struct {bool b; struct {bool b; bool3 vb;} s; bool b1;} ssb = {1, 1, 0, 1, 1, 0};
5369struct {int n; struct {int n; int3 vn;} s; int n1;} ssn = {71, 72, 73, 74, 75, 76};
5370struct {float f; struct {float f; float3 vf;} s; float f1;} ssf = {1.1f, 2.1f, 3.1f, 4.1f, 5.1f, 6.1f};
5371struct {int nf; struct {int nf; int3 vnf;} s; int nf1;} ssnf = {41, 0, 43, 44, 41, 42};
5372struct {bool bf; struct {bool bf; bool3 vbf;} s; bool bf1;} ssbf = {1, 0, 0, 1, 1, 0};
5373float4 main(float4 pos : POSITION) : POSITION
5374{
5375 float4 tmp = 0;
5376 int i;
5377 if (ssb.b1) for (i = 0; i < ssn.n1; i++) tmp.x += pos.z * ssf.f1 * ssnf.nf1;
5378 else for (i = 0; i < ssn.s.vn.z; i++) tmp.y += pos.y * ssf.s.vf.z * ssbf.bf1;
5379 return tmp;
5380}
5381#endif
5383{
53840xfffe0300, 0x00fcfffe, 0x42415443, 0x0000001c, 0x000003bb, 0xfffe0300, 0x00000005, 0x0000001c,
53850x00000100, 0x000003b4, 0x00000080, 0x00000000, 0x00000006, 0x000000ec, 0x000000fc, 0x00000114,
53860x00080002, 0x00000004, 0x0000015c, 0x0000016c, 0x000001ac, 0x00000002, 0x00000004, 0x00000214,
53870x00000224, 0x00000264, 0x00000001, 0x00000006, 0x000002cc, 0x000002dc, 0x0000031c, 0x00040002,
53880x00000004, 0x00000364, 0x00000374, 0x00627373, 0xabab0062, 0x00010000, 0x00010001, 0x00000001,
53890x00000000, 0x62760073, 0xababab00, 0x00010001, 0x00030001, 0x00000001, 0x00000000, 0x00000084,
53900x00000088, 0x0000009a, 0x000000a0, 0x00000005, 0x00040001, 0x00020001, 0x000000b0, 0xab003162,
53910x00000084, 0x00000088, 0x00000098, 0x000000c0, 0x000000d0, 0x00000088, 0x00000005, 0x00060001,
53920x00030001, 0x000000d4, 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000,
53930x66627373, 0x00666200, 0x00666276, 0x00000119, 0x00000088, 0x0000011c, 0x000000a0, 0x00000005,
53940x00040001, 0x00020001, 0x00000120, 0x00316662, 0x00000119, 0x00000088, 0x00000098, 0x00000130,
53950x00000140, 0x00000088, 0x00000005, 0x00060001, 0x00030001, 0x00000144, 0x3f800000, 0x00000000,
53960x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000,
53970x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00667373, 0xabab0066,
53980x00030000, 0x00010001, 0x00000001, 0x00000000, 0xab006676, 0x00030001, 0x00030001, 0x00000001,
53990x00000000, 0x000001b0, 0x000001b4, 0x000001c4, 0x000001c8, 0x00000005, 0x00040001, 0x00020001,
54000x000001d8, 0xab003166, 0x000001b0, 0x000001b4, 0x00000098, 0x000001e8, 0x000001f8, 0x000001b4,
54010x00000005, 0x00060001, 0x00030001, 0x000001fc, 0x3f8ccccd, 0x00000000, 0x00000000, 0x00000000,
54020x40066666, 0x00000000, 0x00000000, 0x00000000, 0x40466666, 0x40833333, 0x40a33333, 0x00000000,
54030x40c33333, 0x00000000, 0x00000000, 0x00000000, 0x006e7373, 0xabab006e, 0x00020000, 0x00010001,
54040x00000001, 0x00000000, 0xab006e76, 0x00020001, 0x00030001, 0x00000001, 0x00000000, 0x00000268,
54050x0000026c, 0x0000027c, 0x00000280, 0x00000005, 0x00040001, 0x00020001, 0x00000290, 0xab00316e,
54060x00000268, 0x0000026c, 0x00000098, 0x000002a0, 0x000002b0, 0x0000026c, 0x00000005, 0x00060001,
54070x00030001, 0x000002b4, 0x00000047, 0x00000000, 0x00000001, 0x00000000, 0x00000048, 0x00000000,
54080x00000001, 0x00000000, 0x00000049, 0x0000004a, 0x0000004b, 0x00000000, 0x0000004c, 0x00000000,
54090x00000001, 0x00000000, 0x666e7373, 0x00666e00, 0x00666e76, 0x00000321, 0x0000026c, 0x00000324,
54100x00000280, 0x00000005, 0x00040001, 0x00020001, 0x00000328, 0x0031666e, 0x00000321, 0x0000026c,
54110x00000098, 0x00000338, 0x00000348, 0x0000026c, 0x00000005, 0x00060001, 0x00030001, 0x0000034c,
54120x42240000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
54130x422c0000, 0x42300000, 0x42240000, 0x00000000, 0x42280000, 0x00000000, 0x00000000, 0x00000000,
54140x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461,
54150x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x05000051, 0xa00f000c,
54160x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0200001f, 0x80000000, 0x900f0000, 0x0200001f,
54170x80000000, 0xe00f0000, 0x01000028, 0xe0e40805, 0x03000005, 0x80010000, 0xa0000003, 0x90aa0000,
54180x02000001, 0x80010001, 0xa000000c, 0x01000026, 0xf0e40005, 0x04000004, 0x80010001, 0x80000000,
54190xa0000007, 0x80000001, 0x00000027, 0x02000001, 0x80020001, 0xa000000c, 0x0000002a, 0x03000005,
54200x80010000, 0xa0aa0002, 0x90550000, 0x02000001, 0x80020001, 0xa000000c, 0x01000026, 0xf0e40004,
54210x04000004, 0x80020001, 0x80000000, 0xa000000b, 0x80550001, 0x00000027, 0x02000001, 0x80010001,
54220xa000000c, 0x0000002b, 0x02000001, 0xe0030000, 0x80e40001, 0x02000001, 0xe00c0000, 0xa000000c,
54230x0000ffff,
5424};
5425
5427{
5428 {"ssf", {"ssf", D3DXRS_FLOAT4, 0, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 6, 1, 3, 24, NULL}, 137},
5429 {"ssf.f", {"f", D3DXRS_FLOAT4, 0, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 137},
5430 {"ssf.s", {"s", D3DXRS_FLOAT4, 1, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 141},
5431 {"ssf.s.f", {"f", D3DXRS_FLOAT4, 1, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 141},
5432 {"ssf.s.vf", {"vf", D3DXRS_FLOAT4, 2, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 145},
5433 {"ssf.f1", {"f1", D3DXRS_FLOAT4, 3, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 149},
5434};
5435
5437{
5438 {SetInt},
5439 {SetBool},
5440 {SetFloat},
5441 {SetIntArray, 1, 0, 5},
5443 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40400000, 0x00000000, 0x00000000, 0x00000000,
5444 0x40800000, 0x40a00000, 0x00000000, 0x00000000, 0x40e00000}},
5445 {SetBoolArray, 1, 0, 5},
5447 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000,
5448 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000}},
5449 {SetFloatArray, 0, 0, 5},
5451 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
5452 0x40800123, 0x40a00123, 0x40c00123, 0x00000000, 0x40e00123}},
5453 {SetValue, 0, 0, 23},
5454 {SetValue, 0, 24, REGISTER_OUTPUT_SIZE * 4, 16,
5455 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
5456 0x40800123, 0x40a00123, 0x40c00123, 0x00000000, 0x40e00123}},
5457 {SetVector},
5458 {SetVectorArray, 0, 0, 1},
5459 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 16,
5460 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
5461 0x40800123, 0x40a00123, 0x40c00123, 0x00000000, 0x40e00123}},
5462 {SetMatrix, 0, 0, 0, 16,
5463 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
5464 0x40800123, 0x40a00123, 0x40c00123, 0x00000000, 0x40e00123}},
5466 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 16,
5467 {0x40000123, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
5468 0x40800123, 0x40a00123, 0x40c00123, 0x00000000, 0x40e00123}},
5469 {SetMatrixTranspose, 0, 0, 0, 16, {0x40000123}},
5471 {SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 16, {0x40000123}},
5473 {SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 16, {0x40000123}},
5475 {SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 16, {0x40000123}},
5476};
5477
5479{
5480 {"ssn", {"ssn", D3DXRS_INT4, 0, 6, D3DXPC_STRUCT, D3DXPT_VOID, 1, 6, 1, 3, 24, NULL}, 183},
5481 {"ssn.n", {"n", D3DXRS_INT4, 0, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 183},
5482 {"ssn.s", {"s", D3DXRS_INT4, 1, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 187},
5483 {"ssn.s.n", {"n", D3DXRS_INT4, 1, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 187},
5484 {"ssn.s.vn", {"vn", D3DXRS_INT4, 2, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 191},
5485 {"ssn.n1", {"n1", D3DXRS_INT4, 3, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 195},
5486};
5487
5489{
5490 {SetInt},
5491 {SetBool},
5492 {SetFloat},
5493 {SetIntArray, 1, 0, 5},
5495 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000003, 0x00000000, 0x00000001, 0x00000000,
5496 0x00000004, 0x00000005, 0x00000000, 0x00000000, 0x00000007, 0x00000000, 0x00000001}},
5497 {SetBoolArray, 1, 0, 5},
5499 {0x00000001, 0x00000000, 0x00000001, 0x00000000, 0x00000001, 0x00000000, 0x00000001, 0x00000000,
5500 0x00000001, 0x00000001, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000001}},
5501 {SetFloatArray, 0, 0, 5},
5503 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
5504 0x00000004, 0x00000005, 0x00000006, 0x00000000, 0x00000007, 0x00000000, 0x00000001}},
5505 {SetValue, 1, 0, 23},
5506 {SetValue, 1, 24, REGISTER_OUTPUT_SIZE * 4, 16,
5507 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000003, 0x00000000, 0x00000001, 0x00000000,
5508 0x00000004, 0x00000005, 0x00000000, 0x00000000, 0x00000007, 0x00000000, 0x00000001}},
5509 {SetVector},
5510 {SetVectorArray, 0, 0, 1},
5511 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 16,
5512 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
5513 0x00000004, 0x00000005, 0x00000006, 0x00000000, 0x00000007, 0x00000000, 0x00000001}},
5514 {SetMatrix, 0, 0, 0, 16,
5515 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
5516 0x00000004, 0x00000005, 0x00000006, 0x00000000, 0x00000007, 0x00000000, 0x00000001}},
5518 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 16,
5519 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
5520 0x00000004, 0x00000005, 0x00000006, 0x00000000, 0x00000007, 0x00000000, 0x00000001}},
5521 {SetMatrixTranspose, 0, 0, 0, 16,
5522 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
5523 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001}},
5526 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
5527 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001}},
5530 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
5531 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001}},
5534 {0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
5535 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001}},
5536};
5537
5539{
5540 {"ssb", {"ssb", D3DXRS_BOOL, 0, 6, D3DXPC_STRUCT, D3DXPT_VOID, 1, 6, 1, 3, 24, NULL}, 63},
5541 {"ssb.b", {"b", D3DXRS_BOOL, 0, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 63},
5542 {"ssb.s", {"s", D3DXRS_BOOL, 1, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 64},
5543 {"ssb.s.b", {"b", D3DXRS_BOOL, 1, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 64},
5544 {"ssb.s.vb", {"vb", D3DXRS_BOOL, 2, 3, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 65},
5545 {"ssb.b1", {"b1", D3DXRS_BOOL, 5, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 68},
5546};
5547
5549{
5550 {SetInt},
5551 {SetBool},
5552 {SetFloat},
5553 {SetIntArray, 1, 0, 5},
5555 {0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001}},
5556 {SetBoolArray, 1, 0, 5},
5558 {0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000000, 0x00000007}},
5559 {SetFloatArray, 0, 0, 5},
5561 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
5562 {SetValue, 1, 0, 23},
5563 {SetValue, 1, 24, REGISTER_OUTPUT_SIZE * 4, 6,
5564 {0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000000, 0x00000007}},
5565 {SetVector},
5566 {SetVectorArray, 0, 0, 1},
5567 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 6,
5568 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
5569 {SetMatrix, 0, 0, 0, 6,
5570 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
5572 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 6,
5573 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
5574 {SetMatrixTranspose, 0, 0, 0, 6,
5575 {0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001}},
5578 {0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001}},
5581 {0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001}},
5584 {0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000001}},
5585};
5586
5588{
5589 {"ssnf", {"ssnf", D3DXRS_FLOAT4, 4, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 6, 1, 3, 24, NULL}, 221},
5590 {"ssnf.nf", {"nf", D3DXRS_FLOAT4, 4, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 221},
5591 {"ssnf.s", {"s", D3DXRS_FLOAT4, 5, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 225},
5592 {"ssnf.s.nf", {"nf", D3DXRS_FLOAT4, 5, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 225},
5593 {"ssnf.s.vnf", {"vnf", D3DXRS_FLOAT4, 6, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 229},
5594 {"ssnf.nf1", {"nf1", D3DXRS_FLOAT4, 7, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 233},
5595};
5596
5598{
5599 {SetInt},
5600 {SetBool},
5601 {SetFloat},
5602 {SetIntArray, 1, 0, 5},
5604 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40400000, 0x00000000, 0x00000000, 0x00000000,
5605 0x40800000, 0x40a00000, 0x00000000, 0x00000000, 0x40e00000}},
5606 {SetBoolArray, 1, 0, 5},
5608 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000,
5609 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000}},
5610 {SetFloatArray, 0, 0, 5},
5612 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
5613 0x40800000, 0x40a00000, 0x40c00000, 0x00000000, 0x40e00000}},
5614 {SetValue, 1, 0, 23},
5615 {SetValue, 1, 24, REGISTER_OUTPUT_SIZE * 4, 16,
5616 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x40400000, 0x00000000, 0x00000000, 0x00000000,
5617 0x40800000, 0x40a00000, 0x00000000, 0x00000000, 0x40e00000}},
5618 {SetVector},
5619 {SetVectorArray, 0, 0, 1},
5620 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 16,
5621 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
5622 0x40800000, 0x40a00000, 0x40c00000, 0x00000000, 0x40e00000}},
5623 {SetMatrix, 0, 0, 0, 16,
5624 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
5625 0x40800000, 0x40a00000, 0x40c00000, 0x00000000, 0x40e00000}},
5627 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 16,
5628 {0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
5629 0x40800000, 0x40a00000, 0x40c00000, 0x00000000, 0x40e00000}},
5630 {SetMatrixTranspose, 0, 0, 0, 16, {0x40000000}},
5632 {SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 16, {0x40000000}},
5634 {SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 16, {0x40000000}},
5636 {SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 16, {0x40000000}},
5637};
5638
5640{
5641 {"ssbf", {"ssbf", D3DXRS_FLOAT4, 8, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 6, 1, 3, 24, NULL}, 91},
5642 {"ssbf.bf", {"bf", D3DXRS_FLOAT4, 8, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 91},
5643 {"ssbf.s", {"s", D3DXRS_FLOAT4, 9, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 95},
5644 {"ssbf.s.bf", {"bf", D3DXRS_FLOAT4, 9, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 95},
5645 {"ssbf.s.vbf", {"vbf", D3DXRS_FLOAT4, 10, 1, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 99},
5646 {"ssbf.bf1", {"bf1", D3DXRS_FLOAT4, 11, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 103},
5647};
5648
5650{
5651 {SetInt},
5652 {SetBool},
5653 {SetFloat},
5654 {SetIntArray, 1, 0, 5},
5656 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000,
5657 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000}},
5658 {SetBoolArray, 1, 0, 5},
5660 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000,
5661 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000}},
5662 {SetFloatArray, 0, 0, 5},
5664 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
5665 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000}},
5666 {SetValue, 1, 0, 23},
5667 {SetValue, 1, 24, REGISTER_OUTPUT_SIZE * 4, 16,
5668 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000,
5669 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000}},
5670 {SetVector},
5671 {SetVectorArray, 0, 0, 1},
5672 {SetVectorArray, 0, 2, REGISTER_OUTPUT_SIZE / 4, 16,
5673 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
5674 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000}},
5675 {SetMatrix, 0, 0, 0, 16,
5676 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
5677 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000}},
5679 {SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 16,
5680 {0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
5681 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000}},
5682 {SetMatrixTranspose, 0, 0, 0, 16, {0x3f800000}},
5684 {SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 16, {0x3f800000}},
5686 {SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 16, {0x3f800000}},
5688 {SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 16, {0x3f800000}},
5689};
5690
5691/*
5692 * fxc.exe /Tvs_3_0
5693 */
5694#if 0
5695row_major int3x2 ran[2] = {4, 5, 6, 1, 8, 1, 2, 3, 4, 7, 9, 1};
5696float4 main(float4 pos : POSITION) : POSITION
5697{
5698 float4 tmp = 0;
5699 int k;
5700 for (k = 0; k < ran[1]._21; k++)
5701 tmp.y += pos.y + tmp.x;
5702 return tmp;
5703}
5704#endif
5706{
57070xfffe0300, 0x0038fffe, 0x42415443, 0x0000001c, 0x000000ab, 0xfffe0300, 0x00000001, 0x0000001c,
57080x00000100, 0x000000a4, 0x00000030, 0x00000001, 0x00000009, 0x00000034, 0x00000044, 0x006e6172,
57090x00020002, 0x00020003, 0x00000002, 0x00000000, 0x00000004, 0x00000005, 0x00000001, 0x00000000,
57100x00000006, 0x00000001, 0x00000001, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000000,
57110x00000002, 0x00000003, 0x00000001, 0x00000000, 0x00000004, 0x00000007, 0x00000001, 0x00000000,
57120x00000009, 0x00000001, 0x00000001, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73,
57130x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932,
57140x332e3235, 0x00313131, 0x05000051, 0xa00f0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
57150x0200001f, 0x80000000, 0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x02000001, 0x80010000,
57160xa0000000, 0x01000026, 0xf0e40008, 0x03000002, 0x80010000, 0x80000000, 0x90550000, 0x00000027,
57170x02000001, 0xe0020000, 0x80000000, 0x02000001, 0xe00d0000, 0xa0000000, 0x0000ffff,
5718};
5719
5721{
5722 {"ran", {"ran", D3DXRS_INT4, 0, 9, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 2, 0, 48, NULL}, 17},
5723 {"ran[0]", {"ran", D3DXRS_INT4, 0, 3, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 17},
5724 {"ran[1]", {"ran", D3DXRS_INT4, 3, 3, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 29},
5725};
5726
5727/*
5728 * fxc.exe /Tvs_3_0
5729 */
5730#if 0
5731float3 vaf[10];
5732float4 main(float4 pos : POSITION) : POSITION
5733{
5734 float4 tmp = 0;
5735 tmp.y += pos.y + vaf[8].x;
5736 return tmp;
5737}
5738#endif
5740{
57410xfffe0300, 0x0020fffe, 0x42415443, 0x0000001c, 0x0000004b, 0xfffe0300, 0x00000001, 0x0000001c,
57420x00000100, 0x00000044, 0x00000030, 0x00000002, 0x00000009, 0x00000034, 0x00000000, 0x00666176,
57430x00030001, 0x00030001, 0x0000000a, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73,
57440x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932,
57450x332e3235, 0x00313131, 0x05000051, 0xa00f0009, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
57460x0200001f, 0x80000000, 0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x03000002, 0xe0020000,
57470xa0000008, 0x90550000, 0x02000001, 0xe00d0000, 0xa0000009, 0x0000ffff,
5748};
5749
5751{
5752 {"vaf", {"vaf", D3DXRS_FLOAT4, 0, 9, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 10, 0, 120, NULL}, 0},
5753 {"vaf[0]", {"vaf", D3DXRS_FLOAT4, 0, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
5754 {"vaf[1]", {"vaf", D3DXRS_FLOAT4, 1, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
5755 {"vaf[2]", {"vaf", D3DXRS_FLOAT4, 2, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
5756 {"vaf[3]", {"vaf", D3DXRS_FLOAT4, 3, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
5757 {"vaf[4]", {"vaf", D3DXRS_FLOAT4, 4, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
5758 {"vaf[5]", {"vaf", D3DXRS_FLOAT4, 5, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
5759 {"vaf[6]", {"vaf", D3DXRS_FLOAT4, 6, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
5760 {"vaf[7]", {"vaf", D3DXRS_FLOAT4, 7, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
5761 {"vaf[8]", {"vaf", D3DXRS_FLOAT4, 8, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
5762 {"vaf[9]", {"vaf", D3DXRS_FLOAT4, 9, 0, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
5763};
5764
5766{
5767 {SetMatrix, 0, 0, 0, 16,
5768 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123, 0x00000000,
5769 0x41200123, 0x41300123, 0x41400123, 0x00000000, 0x41600123, 0x41700123, 0x41800123}},
5771 {SetMatrixArray, 0, 1, 1, 16,
5772 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123, 0x00000000,
5773 0x41200123, 0x41300123, 0x41400123, 0x00000000, 0x41600123, 0x41700123, 0x41800123}},
5774 {SetMatrixArray, 0, 2, 2, 32,
5775 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123, 0x00000000,
5776 0x41200123, 0x41300123, 0x41400123, 0x00000000, 0x41600123, 0x41700123, 0x41800123, 0x00000000,
5777 0x41a00123, 0x41b00123, 0x41c00123, 0x00000000, 0x00000000, 0x41f00123, 0x42000123, 0x00000000,
5778 0x00000000, 0x42300123, 0x42400123, 0x00000000, 0x42600123, 0x42700123, 0x42800123}},
5779 {SetMatrixArray, 0, 3, REGISTER_OUTPUT_SIZE / 16, 36,
5780 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123, 0x00000000,
5781 0x41200123, 0x41300123, 0x41400123, 0x00000000, 0x41600123, 0x41700123, 0x41800123, 0x00000000,
5782 0x41a00123, 0x41b00123, 0x41c00123, 0x00000000, 0x00000000, 0x41f00123, 0x42000123, 0x00000000,
5783 0x00000000, 0x42300123, 0x42400123, 0x00000000, 0x42600123, 0x42700123, 0x42800123, 0x00000000,
5784 0x43000123, 0x43100123, 0x43200123}},
5785 {SetMatrixTranspose, 0, 0, 0, 16,
5786 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
5787 0x40800123, 0x41000123, 0x41400123, 0x00000000, 0x40a00123, 0x41100123, 0x41500123}},
5789 {SetMatrixTransposeArray, 0, 1, 1, 16,
5790 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
5791 0x40800123, 0x41000123, 0x41400123, 0x00000000, 0x40a00123, 0x41100123, 0x41500123}},
5792 {SetMatrixTransposeArray, 0, 2, 2, 32,
5793 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
5794 0x40800123, 0x41000123, 0x41400123, 0x00000000, 0x40a00123, 0x41100123, 0x41500123, 0x00000000,
5795 0x41a00123, 0x00000000, 0x00000000, 0x00000000, 0x41b00123, 0x41f00123, 0x42300123, 0x00000000,
5796 0x41c00123, 0x42000123, 0x42400123, 0x00000000, 0x41d00123, 0x42100123, 0x42500123}},
5798 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
5799 0x40800123, 0x41000123, 0x41400123, 0x00000000, 0x40a00123, 0x41100123, 0x41500123, 0x00000000,
5800 0x41a00123, 0x00000000, 0x00000000, 0x00000000, 0x41b00123, 0x41f00123, 0x42300123, 0x00000000,
5801 0x41c00123, 0x42000123, 0x42400123, 0x00000000, 0x41d00123, 0x42100123, 0x42500123, 0x00000000,
5802 0x43000123, 0x43400123, 0x43800123}},
5804 {SetMatrixPointerArray, 0, 1, 1, 16,
5805 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123, 0x00000000,
5806 0x41200123, 0x41300123, 0x41400123, 0x00000000, 0x41600123, 0x41700123, 0x41800123}},
5807 {SetMatrixPointerArray, 0, 2, 2, 32,
5808 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123, 0x00000000,
5809 0x41200123, 0x41300123, 0x41400123, 0x00000000, 0x41600123, 0x41700123, 0x41800123, 0x00000000,
5810 0x41900123, 0x41a00123, 0x41b00123, 0x00000000, 0x41d00123, 0x00000000, 0x41f00123, 0x00000000,
5811 0x42100123, 0x00000000, 0x42300123, 0x00000000, 0x42500123, 0x42600123, 0x42700123}},
5813 {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123, 0x00000000,
5814 0x41200123, 0x41300123, 0x41400123, 0x00000000, 0x41600123, 0x41700123, 0x41800123, 0x00000000,
5815 0x41900123, 0x41a00123, 0x41b00123, 0x00000000, 0x41d00123, 0x00000000, 0x41f00123, 0x00000000,
5816 0x42100123, 0x00000000, 0x42300123, 0x00000000, 0x42500123, 0x42600123, 0x42700123, 0x00000000,
5817 0x42800123, 0x42900123, 0x43000123}},
5819 {SetMatrixTransposePointerArray, 0, 1, 1, 16,
5820 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
5821 0x40800123, 0x41000123, 0x41400123, 0x00000000, 0x40a00123, 0x41100123, 0x41500123}},
5822 {SetMatrixTransposePointerArray, 0, 2, 2, 32,
5823 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
5824 0x40800123, 0x41000123, 0x41400123, 0x00000000, 0x40a00123, 0x41100123, 0x41500123, 0x00000000,
5825 0x41900123, 0x41d00123, 0x42100123, 0x00000000, 0x41a00123, 0x00000000, 0x00000000, 0x00000000,
5826 0x41b00123, 0x41f00123, 0x42300123, 0x00000000, 0x41c00123, 0x42000123, 0x42400123}},
5828 {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
5829 0x40800123, 0x41000123, 0x41400123, 0x00000000, 0x40a00123, 0x41100123, 0x41500123, 0x00000000,
5830 0x41900123, 0x41d00123, 0x42100123, 0x00000000, 0x41a00123, 0x00000000, 0x00000000, 0x00000000,
5831 0x41b00123, 0x41f00123, 0x42300123, 0x00000000, 0x41c00123, 0x42000123, 0x42400123, 0x00000000,
5832 0x42800123, 0x43200123, 0x43600123}},
5833};
5834
5835/*
5836 * fxc.exe /Tvs_3_0
5837 */
5838#if 0
5839float4x4 cf = {1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8};
5840float f = 33.33;
5841float4 main(float4 pos : POSITION) : POSITION
5842{
5843 float4 tmp = 0;
5844 tmp.y += cf._22;
5845 tmp.z = f;
5846 return tmp;
5847}
5848#endif
5850{
58510xfffe0300, 0x003efffe, 0x42415443, 0x0000001c, 0x000000c3, 0xfffe0300, 0x00000002, 0x0000001c,
58520x00000100, 0x000000bc, 0x00000044, 0x00000002, 0x00000002, 0x00000048, 0x00000058, 0x00000098,
58530x00020002, 0x00000001, 0x0000009c, 0x000000ac, 0xab006663, 0x00030003, 0x00040004, 0x00000001,
58540x00000000, 0x3f8ccccd, 0x40b00000, 0x411e6666, 0x3fc00000, 0x400ccccd, 0x40d33333, 0x3f99999a,
58550x3fcccccd, 0x40533333, 0x40f66666, 0x3fa66666, 0x3fd9999a, 0x408ccccd, 0x410ccccd, 0x3fb33333,
58560x3fe66666, 0xabab0066, 0x00030000, 0x00010001, 0x00000001, 0x00000000, 0x420551ec, 0x00000000,
58570x00000000, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820,
58580x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131,
58590x05000051, 0xa00f0003, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x0200001f, 0x80000000,
58600xe00f0000, 0x02000001, 0x80020000, 0xa0550001, 0x03000005, 0xe00b0000, 0x80550000, 0xa0240003,
58610x02000001, 0xe0040000, 0xa0000002, 0x0000ffff,
5862};
5863
5865{
5866 {"cf", {"cf", D3DXRS_FLOAT4, 0, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 4, 4, 1, 0, 64, NULL}, 0},
5867 {"f", {"f", D3DXRS_FLOAT4, 2, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 0},
5868};
5869
5871{
5872 {SetMatrix, 0, 0, 0, 8,
5873 {0x40000123, 0x40c00123, 0x41200123, 0x41600123, 0x00000000, 0x40e00123, 0x41300123, 0x41700123}},
5874};
5875
5876static const struct
5877{
5878 const char *name;
5879 const char *var;
5882 const DWORD *blob;
5887}
5889{
5890 /* scalar */
5891 {"float", "f", 0, D3DXRS_FLOAT4, registerset_blob_scalar,
5894 {"int", "n", 0, D3DXRS_INT4, registerset_blob_scalar,
5897 {"int float", "nf", 4, D3DXRS_FLOAT4, registerset_blob_scalar,
5900 {"bool float", "bf", 8, D3DXRS_FLOAT4, registerset_blob_scalar,
5903 {"bool", "b", 0, D3DXRS_BOOL, registerset_blob_scalar,
5906 /* scalar array */
5907 {"float [2]", "af", 0, D3DXRS_FLOAT4, registerset_blob_scalar_array,
5910 {"int [2]", "an", 0, D3DXRS_INT4, registerset_blob_scalar_array,
5913 {"bool [2]", "ab", 0, D3DXRS_BOOL, registerset_blob_scalar_array,
5916 {"int float [2]", "anf", 8, D3DXRS_FLOAT4, registerset_blob_scalar_array,
5919 {"bool float [2]", "abf", 16, D3DXRS_FLOAT4, registerset_blob_scalar_array,
5922 /* vector */
5923 {"float 3", "vf", 0, D3DXRS_FLOAT4, registerset_blob_vector,
5926 {"int 3", "vn", 0, D3DXRS_INT4, registerset_blob_vector,
5929 {"bool 3", "vb", 0, D3DXRS_BOOL, registerset_blob_vector,
5932 {"bool float 3", "vbf", 8, D3DXRS_FLOAT4, registerset_blob_vector,
5935 {"int float 3", "vnf", 4, D3DXRS_FLOAT4, registerset_blob_vector,
5938 /* vector array */
5939 {"float 3 [2]", "vaf", 0, D3DXRS_FLOAT4, registerset_blob_vector_array,
5942 {"int 3 [2]", "van", 0, D3DXRS_INT4, registerset_blob_vector_array,
5945 {"bool 3 [2]", "vab", 0, D3DXRS_BOOL, registerset_blob_vector_array,
5948 {"bool float 3 [2]", "vabf", 16, D3DXRS_FLOAT4, registerset_blob_vector_array,
5951 {"int float 3 [2]", "vanf", 8, D3DXRS_FLOAT4, registerset_blob_vector_array,
5954 /* matrix column */
5955 {"float c3x2", "cf", 0, D3DXRS_FLOAT4, registerset_blob_column,
5958 {"int c3x2", "cn", 0, D3DXRS_INT4, registerset_blob_column,
5961 {"bool c3x2", "cb", 0, D3DXRS_BOOL, registerset_blob_column,
5964 {"bool float c3x2", "cbf", 8, D3DXRS_FLOAT4, registerset_blob_column,
5967 {"int float c3x2", "cnf", 16, D3DXRS_FLOAT4, registerset_blob_column,
5970 /* matrix column array */
5971 {"float c3x2 [2]", "caf", 0, D3DXRS_FLOAT4, registerset_blob_column_array,
5974 {"int c3x2 [2]", "can", 0, D3DXRS_INT4, registerset_blob_column_array,
5977 {"bool c3x2 [2]", "cab", 0, D3DXRS_BOOL, registerset_blob_column_array,
5980 {"bool float c3x2 [2]", "cabf", 16, D3DXRS_FLOAT4, registerset_blob_column_array,
5983 {"int float c3x2 [2]", "canf", 32, D3DXRS_FLOAT4, registerset_blob_column_array,
5986 /* matrix row */
5987 {"float r3x2", "rf", 0, D3DXRS_FLOAT4, registerset_blob_row,
5990 {"int r3x2", "rn", 0, D3DXRS_INT4, registerset_blob_row,
5993 {"bool r3x2", "rb", 0, D3DXRS_BOOL, registerset_blob_row,
5996 {"bool float r3x2", "rbf", 12, D3DXRS_FLOAT4, registerset_blob_row,
5999 {"int float r3x2", "rnf", 24, D3DXRS_FLOAT4, registerset_blob_row,
6002 /* matrix row array */
6003 {"float 3x2 [2]", "raf", 0, D3DXRS_FLOAT4, registerset_blob_row_array,
6006 {"int 3x2 [2]", "ran", 0, D3DXRS_INT4, registerset_blob_row_array,
6009 {"bool 3x2 [2]", "rab", 0, D3DXRS_BOOL, registerset_blob_row_array,
6012 {"bool float 3x2 [2]", "rabf", 24, D3DXRS_FLOAT4, registerset_blob_row_array,
6015 {"int float 3x2 [2]", "ranf", 48, D3DXRS_FLOAT4, registerset_blob_row_array,
6018 /* struct */
6019 {"struct float", "sf", 0, D3DXRS_FLOAT4, registerset_blob_struct,
6022 {"struct int", "sn", 0, D3DXRS_INT4, registerset_blob_struct,
6025 {"struct bool", "sb", 0, D3DXRS_BOOL, registerset_blob_struct,
6028 {"struct bool float", "sbf", 16, D3DXRS_FLOAT4, registerset_blob_struct,
6031 {"struct int float", "snf", 8, D3DXRS_FLOAT4, registerset_blob_struct,
6034 /* struct array */
6035 {"struct float [2]", "saf", 0, D3DXRS_FLOAT4, registerset_blob_struct_array,
6038 {"struct int [2]", "san", 0, D3DXRS_INT4, registerset_blob_struct_array,
6041 {"struct bool [2]", "sab", 0, D3DXRS_BOOL, registerset_blob_struct_array,
6044 {"struct bool float [2]", "sabf", 32, D3DXRS_FLOAT4, registerset_blob_struct_array,
6047 {"struct int float [2]", "sanf", 16, D3DXRS_FLOAT4, registerset_blob_struct_array,
6050 /* struct struct */
6051 {"struct struct float", "ssf", 0, D3DXRS_FLOAT4, registerset_blob_struct_struct,
6054 {"struct struct int", "ssn", 0, D3DXRS_INT4, registerset_blob_struct_struct,
6057 {"struct struct bool", "ssb", 0, D3DXRS_BOOL, registerset_blob_struct_struct,
6060 {"struct struct bool float", "ssbf", 32, D3DXRS_FLOAT4, registerset_blob_struct_struct,
6063 {"struct struct int float", "ssnf", 16, D3DXRS_FLOAT4, registerset_blob_struct_struct,
6066 /* special */
6067 {"int ran", "ran", 0, D3DXRS_INT4, registerset_blob_special_int, NULL, 0,
6069 {"bigvec", "vaf", 0, D3DXRS_FLOAT4, registerset_blob_bigvec,
6076
6078{
6079 DWORD zero[1024];
6080 HRESULT hr;
6081
6082 memset(zero, 0xde, 4096);
6083
6085 ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
6086
6088 ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
6089
6091 ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
6092
6094 ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
6095
6097 ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
6098
6100 ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
6101}
6102
6104 UINT start, UINT in_count, const DWORD *expected)
6105{
6106 DWORD ret[1024] = {0};
6107 HRESULT hr;
6108 UINT count = 1024, i, err = 0;
6109
6110 memset(ret, 0xde, 4096);
6111
6112 /* get shader constants */
6113 switch (regset)
6114 {
6115 case D3DXRS_BOOL:
6116 count = 16;
6119 ok(hr == D3D_OK, "Get*ShaderConstantB failed, got %08lx\n", hr);
6120 break;
6121
6122 case D3DXRS_INT4:
6123 count = 256;
6126 ok(hr == D3D_OK, "Get*ShaderConstantI failed, got %08lx\n", hr);
6127 break;
6128
6129 case D3DXRS_FLOAT4:
6131 else
6132 {
6133 count = 896;
6135 }
6136 ok(hr == D3D_OK, "Get*ShaderConstantF failed, got %08lx\n", hr);
6137 break;
6138
6139 default:
6140 ok(0, "This should not happen!\n");
6141 break;
6142 }
6143
6144 /* compare shader constants */
6145 for (i = 0; i < count; ++i)
6146 {
6147 DWORD value = 0xdededede;
6148 if (i >= start && i < start + in_count) value = expected[i - start];
6149
6150 ok(ret[i] == value, "Get*ShaderConstant failed, %u got 0x%lx(%f) expected 0x%lx(%f)\n", i,
6151 ret[i], ((FLOAT *)ret)[i], value, *((FLOAT *)&value));
6152 if (ret[i] != value) err++;
6153 }
6154
6155 return err;
6156}
6157
6159 UINT start, UINT in_count, const DWORD *expected)
6160{
6162 UINT err = 0, i;
6163
6164 for (i = 0; i < ARRAY_SIZE(regsets); i++)
6165 {
6166 if (regset == regsets[i])
6167 err += registerset_compare(device, is_vs, regset, start, in_count, expected);
6168 else
6169 err += registerset_compare(device, is_vs, regsets[i], 0, 0, NULL);
6170
6171 err += registerset_compare(device, !is_vs, regsets[i], 0, 0, NULL);
6172 }
6173
6174 return err;
6175}
6176
6178 UINT index, DWORD count, enum Type type)
6179{
6181 const D3DXMATRIX *inp[REGISTER_OUTPUT_SIZE / 16];
6182 unsigned int i;
6183
6184 /* overlap, to see the difference between Array and PointerArray */
6185 for (i = 0; i < REGISTER_OUTPUT_SIZE / 16; i++)
6186 {
6187 inp[i] = (D3DXMATRIX *)&in[i * 15];
6188 }
6189
6190 switch (type)
6191 {
6192 case SetInt:
6194 case SetFloat:
6196 case SetBool:
6198 case SetIntArray:
6200 case SetBoolArray:
6202 case SetFloatArray:
6204 case SetMatrix:
6206 case SetMatrixTranspose:
6208 case SetMatrixArray:
6212 case SetVector:
6214 case SetVectorArray:
6216 case SetValue:
6222 }
6223
6224 ok(0, "This should not happen!\n");
6225 return D3D_OK;
6226}
6227
6228static void test_registerset(void)
6229{
6230 UINT k;
6231 HWND wnd;
6232 IDirect3D9 *d3d;
6235 HRESULT hr;
6236 ULONG count;
6237 D3DCAPS9 caps;
6238
6239 if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0,
6240 640, 480, NULL, NULL, NULL, NULL)))
6241 {
6242 skip("Couldn't create application window\n");
6243 return;
6244 }
6245 if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
6246 {
6247 skip("Couldn't create IDirect3D9 object\n");
6248 DestroyWindow(wnd);
6249 return;
6250 }
6251
6252 ZeroMemory(&d3dpp, sizeof(d3dpp));
6253 d3dpp.Windowed = TRUE;
6256 if (FAILED(hr))
6257 {
6258 skip("Failed to create IDirect3DDevice9 object %#lx\n", hr);
6259 IDirect3D9_Release(d3d);
6260 DestroyWindow(wnd);
6261 return;
6262 }
6263
6265 ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr);
6266 if (caps.VertexShaderVersion < D3DVS_VERSION(3, 0)
6267 || caps.PixelShaderVersion < D3DPS_VERSION(3, 0))
6268 {
6269 skip("Skipping: Test requires VS >= 3 and PS >= 3.\n");
6271 IDirect3D9_Release(d3d);
6272 DestroyWindow(wnd);
6273 return;
6274 }
6275
6276 for (k = 0; k < ARRAY_SIZE(registerset_data); ++k)
6277 {
6278 const char *tablename = registerset_data[k].name;
6279 const char *name = registerset_data[k].var;
6280 ID3DXConstantTable *ctable;
6283 UINT i;
6284 BOOL is_vs;
6285 DWORD *ctab;
6286
6288 ok(hr == D3D_OK, "D3DXGetShaderConstantTable \"%s\" failed, got %08lx, expected %08lx\n", tablename, hr, D3D_OK);
6289
6291 ok(hr == D3D_OK, "GetDesc \"%s\" failed, got %08lx, expected %08lx\n", tablename, hr, D3D_OK);
6292
6294 ok(ctab[0] == registerset_data[k].blob[3], "ID3DXConstantTable_GetBufferPointer failed\n");
6295
6296 is_vs = (tdesc.Version & 0xFFFF0000) == 0xFFFE0000;
6297
6298 for (i = 0; i < registerset_data[k].constant_count; ++i)
6299 {
6300 const char *fullname = registerset_data[k].constants[i].fullname;
6301 const D3DXCONSTANT_DESC *expected_desc = &registerset_data[k].constants[i].desc;
6303 UINT nr = 0;
6304 UINT ctaboffset = registerset_data[k].constants[i].ctaboffset;
6305
6307 ok(constant != NULL, "GetConstantByName \"%s\" failed\n", fullname);
6308
6310 ok(hr == D3D_OK, "GetConstantDesc \"%s\" failed, got %08lx, expected %08lx\n", fullname, hr, D3D_OK);
6311
6312 ok(!strcmp(expected_desc->Name, desc.Name), "GetConstantDesc \"%s\" failed, got \"%s\", expected \"%s\"\n",
6313 fullname, desc.Name, expected_desc->Name);
6314 ok(expected_desc->RegisterSet == desc.RegisterSet, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
6315 fullname, desc.RegisterSet, expected_desc->RegisterSet);
6316 ok(expected_desc->RegisterIndex == desc.RegisterIndex,
6317 "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6318 fullname, desc.RegisterIndex, expected_desc->RegisterIndex);
6319 ok(expected_desc->RegisterCount == desc.RegisterCount,
6320 "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6321 fullname, desc.RegisterCount, expected_desc->RegisterCount);
6322 ok(expected_desc->Class == desc.Class, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6323 fullname, desc.Class, expected_desc->Class);
6324 ok(expected_desc->Type == desc.Type, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
6325 fullname, desc.Type, expected_desc->Type);
6326 ok(expected_desc->Rows == desc.Rows, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
6327 fullname, desc.Rows, expected_desc->Rows);
6328 ok(expected_desc->Columns == desc.Columns, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6329 fullname, desc.Columns, expected_desc->Columns);
6330 ok(expected_desc->Elements == desc.Elements, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6331 fullname, desc.Elements, expected_desc->Elements);
6332 ok(expected_desc->StructMembers == desc.StructMembers,
6333 "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6334 fullname, desc.StructMembers, expected_desc->StructMembers);
6335 ok(expected_desc->Bytes == desc.Bytes, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6336 fullname, desc.Bytes, expected_desc->Bytes);
6337 if (ctaboffset)
6338 {
6339 ok(ctaboffset == (DWORD *)desc.DefaultValue - ctab,
6340 "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6342 }
6343 }
6344
6346 ok(constant != NULL, "GetConstantByName \"%s\" \"%s\" failed\n", tablename, name);
6347
6348 for (i = 0; i < registerset_data[k].test_count; ++i)
6349 {
6350 const struct registerset_test *test = &registerset_data[k].tests[i];
6351 UINT ret;
6352
6354
6355 hr = registerset_apply(ctable, device, constant, test->in_index, test->in_count_min, test->type);
6356 ok(hr == D3D_OK, "Set* \"%s\" index %u, count %u failed, got %lx, expected %lx\n", tablename, i,
6357 test->in_count_min, hr, D3D_OK);
6358
6360 registerset_data[k].start, test->out_count, test->out);
6361 ok(ret == 0, "Get*ShaderConstant \"%s\" index %u, count %u failed\n", tablename, i, test->in_count_min);
6362
6363 if (test->in_count_max > test->in_count_min)
6364 {
6366
6367 hr = registerset_apply(ctable, device, constant, test->in_index, test->in_count_max, test->type);
6368 ok(hr == D3D_OK, "Set* \"%s\" index %u, count %u failed, got %lx, expected %lx\n", tablename, i,
6369 test->in_count_max, hr, D3D_OK);
6370
6372 registerset_data[k].start, test->out_count, test->out);
6373 ok(ret == 0, "Get*ShaderConstant \"%s\" index %u, count %u failed\n", tablename, i, test->in_count_max);
6374 }
6375 }
6376
6378 ok(count == 0, "Release \"%s\" failed, got %lu, expected %u\n", tablename, count, 0);
6379 }
6380
6381 /* Release resources */
6383 ok(count == 0, "The Direct3D device reference count was %lu, should be 0\n", count);
6384
6386 ok(count == 0, "The Direct3D object reference count was %lu, should be 0\n", count);
6387
6388 if (wnd) DestroyWindow(wnd);
6389}
6390
6391/*
6392 * For D3DXRS_INT4 (int_count, ints[]):
6393 * Native seems to just set the following shader blob up to the register count, which in bad cases is up
6394 * to 4 times larger than the actual correct value. This explanes where the "bogus" values for these cases
6395 * come from. Somehow they forgot that the registers are INT4 and not INT.
6396 */
6397static const struct
6398{
6399 const char *name;
6400 const DWORD *blob;
6401 unsigned int float_count;
6402 unsigned int int_count;
6403 unsigned int bool_count;
6404 const DWORD floats[1024];
6405 const DWORD ints[256];
6406 const DWORD bools[16];
6407}
6409{
6410 {"scalar", registerset_blob_scalar, 12, 4, 1,
6411 {0x40a33333, 0x00000000, 0x00000000, 0x00000000, 0x41300000, 0x00000000, 0x00000000, 0x00000000,
6412 0x3f800000, 0x00000000, 0x00000000, 0x00000000},
6413 {0x00000008, 0x00000000, 0x00000001},
6414 {0xffffffff}},
6415 {"scalar array", registerset_blob_scalar_array, 24, 8, 2,
6416 {0x40466666, 0x00000000, 0x00000000, 0x00000000, 0x404ccccd, 0x00000000, 0x00000000, 0x00000000,
6417 0x41600000, 0x00000000, 0x00000000, 0x00000000, 0x41700000, 0x00000000, 0x00000000, 0x00000000,
6418 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000},
6419 {0x00000020, 0x00000000, 0x00000001, 0x00000000, 0x00000021, 0x00000000, 0x00000001, 0x00000000},
6420 {0xffffffff, 0x00000000}},
6421 {"vector", registerset_blob_vector, 12, 12, 3,
6422 {0x40a33333, 0x40a66666, 0x40a9999a, 0x00000000, 0x41300000, 0x42aa0000, 0x42780000, 0x00000000,
6423 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000},
6424 {0x00000007, 0x00000008, 0x00000009, 0x00000000, 0x00666e76, 0x41300000, 0x42aa0000, 0x42780000,
6425 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369},
6426 {0xffffffff, 0x00000000, 0xffffffff}},
6427 {"vector array", registerset_blob_vector_array, 24, 24, 6,
6428 {0x425c6666, 0x425ccccd, 0x425d3333, 0x00000000, 0x425d999a, 0x425e0000, 0x425e6666, 0x00000000,
6429 0x43020000, 0x430c0000, 0x43160000, 0x00000000, 0x43200000, 0x432a0000, 0x43340000, 0x00000000,
6430 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000},
6431 {0x00000046, 0x00000050, 0x0000005a, 0x00000000, 0x00000064, 0x0000006e, 0x00000078, 0x00000000,
6432 0x666e6176, 0xababab00, 0x00020001, 0x00030001, 0x00000002, 0x00000000, 0x43020000, 0x430c0000,
6433 0x43160000, 0x00000000, 0x43200000, 0x432a0000, 0x43340000, 0x00000000, 0x335f7376, 0x4d00305f},
6434 {0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff}},
6435 {"column", registerset_blob_column, 24, 24, 6,
6436 {0x4171999a, 0x4174cccd, 0x41780000, 0x00000000, 0x41733333, 0x41766666, 0x4179999a, 0x00000000,
6437 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000,
6438 0x41f00000, 0x42040000, 0x42080000, 0x00000000, 0x41f80000, 0x42000000, 0x42100000, 0x00000000},
6439 {0x00000004, 0x00000006, 0x00000008, 0x00000000, 0x00000005, 0x00000007, 0x00000009, 0x00000000,
6440 0x00666e63, 0x41f00000, 0x42040000, 0x42080000, 0x00000000, 0x41f80000, 0x42000000, 0x42100000,
6441 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c},
6442 {0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff}},
6443 {"column array", registerset_blob_column_array, 48, 48, 12,
6444 {0x3f8ccccd, 0x40533333, 0x40b00000, 0x00000000, 0x400ccccd, 0x408ccccd, 0x40d33333, 0x00000000,
6445 0x40f66666, 0x411e6666, 0x3fa66666, 0x00000000, 0x410ccccd, 0x3f99999a, 0x3fb33333, 0x00000000,
6446 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000,
6447 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000,
6448 0x43960000, 0x43978000, 0x43980000, 0x00000000, 0x43968000, 0x43970000, 0x43990000, 0x00000000,
6449 0x43af0000, 0x44238000, 0x43a30000, 0x00000000, 0x43b68000, 0x44190000, 0x4479c000, 0x00000000},
6450 {0x0000000e, 0x00000010, 0x00000012, 0x00000000, 0x0000000f, 0x00000047, 0x00000013, 0x00000000,
6451 0x00000037, 0x00000060, 0x00000061, 0x00000000, 0x0000003f, 0x00000060, 0x0000000d, 0x00000000,
6452 0x666e6163, 0xababab00, 0x00020003, 0x00020003, 0x00000002, 0x00000000, 0x43960000, 0x43978000,
6453 0x43980000, 0x00000000, 0x43968000, 0x43970000, 0x43990000, 0x00000000, 0x43af0000, 0x44238000,
6454 0x43a30000, 0x00000000, 0x43b68000, 0x44190000, 0x4479c000, 0x00000000, 0x335f7376, 0x4d00305f,
6455 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970},
6456 {0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000,
6457 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff}},
6458 {"row", registerset_blob_row, 36, 24, 6,
6459 {0x42be3333, 0x42be6666, 0x00000000, 0x00000000, 0x42be999a, 0x42becccd, 0x00000000, 0x00000000,
6460 0x42bf0000, 0x42bf3333, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
6461 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000,
6462 0x42140000, 0x41500000, 0x00000000, 0x00000000, 0x42c40000, 0x42580000, 0x00000000, 0x00000000,
6463 0x429a0000, 0x42100000, 0x00000000, 0x00000000},
6464 {0x00000050, 0x00000051, 0x00000001, 0x00000000, 0x00000052, 0x00000053, 0x00000001, 0x00000000,
6465 0x00000054, 0x00000055, 0x00000001, 0x00000000, 0x00666e72, 0x42140000, 0x41500000, 0x00000000,
6466 0x00000000, 0x42c40000, 0x42580000, 0x00000000, 0x00000000, 0x429a0000, 0x42100000, 0x00000000},
6467 {0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff}},
6468 {"row array", registerset_blob_row_array, 72, 48, 12,
6469 {0x3fc00000, 0x40333333, 0x00000000, 0x00000000, 0x40533333, 0x409ccccd, 0x00000000, 0x00000000,
6470 0x40bccccd, 0x40d9999a, 0x00000000, 0x00000000, 0x40fccccd, 0x41080000, 0x00000000, 0x00000000,
6471 0x41166666, 0x3fa66666, 0x00000000, 0x00000000, 0x3f99999a, 0x3f8ccccd, 0x00000000, 0x00000000,
6472 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
6473 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
6474 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000,
6475 0x420c0000, 0x42200000, 0x00000000, 0x00000000, 0x42700000, 0x42a00000, 0x00000000, 0x00000000,
6476 0x428c0000, 0x42600000, 0x00000000, 0x00000000, 0x42140000, 0x41500000, 0x00000000, 0x00000000,
6477 0x42c40000, 0x42580000, 0x00000000, 0x00000000, 0x429a0000, 0x42100000, 0x00000000, 0x00000000},
6478 {0x00000004, 0x00000005, 0x00000001, 0x00000000, 0x00000006, 0x00000001, 0x00000001, 0x00000000,
6479 0x00000008, 0x00000001, 0x00000001, 0x00000000, 0x00000005, 0x00000003, 0x00000001, 0x00000000,
6480 0x00000009, 0x00000006, 0x00000001, 0x00000000, 0x00000007, 0x00000003, 0x00000001, 0x00000000,
6481 0x666e6172, 0xababab00, 0x00020002, 0x00020003, 0x00000002, 0x00000000, 0x420c0000, 0x42200000,
6482 0x00000000, 0x00000000, 0x42700000, 0x42a00000, 0x00000000, 0x00000000, 0x428c0000, 0x42600000,
6483 0x00000000, 0x00000000, 0x42140000, 0x41500000, 0x00000000, 0x00000000, 0x42c40000, 0x42580000},
6484 {0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0xffffffff, 0x00000000, 0x00000000,
6485 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff}},
6486 {"struct", registerset_blob_struct, 24, 16, 4,
6487 {0x3f8ccccd, 0x00000000, 0x00000000, 0x00000000, 0x400ccccd, 0x40533333, 0x408ccccd, 0x00000000,
6488 0x41f80000, 0x00000000, 0x00000000, 0x00000000, 0x42000000, 0x42040000, 0x42080000, 0x00000000,
6489 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000},
6490 {0x0000000b, 0x00000000, 0x00000001, 0x00000000, 0x0000000c, 0x0000000d, 0x0000000e, 0x00000000,
6491 0x00666e73, 0x7600666e, 0xab00666e, 0x00000204, 0x0000019c, 0x00000207, 0x000001b0, 0x00000005},
6492 {0xffffffff, 0xffffffff, 0x00000000, 0xffffffff}},
6493 {"struct array", registerset_blob_struct_array, 48, 32, 8,
6494 {0x3f8ccccd, 0x00000000, 0x00000000, 0x00000000, 0x40066666, 0x40466666, 0x40833333, 0x00000000,
6495 0x40a33333, 0x00000000, 0x00000000, 0x00000000, 0x40c33333, 0x40e33333, 0x4101999a, 0x00000000,
6496 0x42240000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x422c0000, 0x42300000, 0x00000000,
6497 0x42240000, 0x00000000, 0x00000000, 0x00000000, 0x42280000, 0x422c0000, 0x42300000, 0x00000000,
6498 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000,
6499 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000, 0x00000000},
6500 {0x00000015, 0x00000000, 0x00000001, 0x00000000, 0x00000016, 0x00000017, 0x00000018, 0x00000000,
6501 0x00000019, 0x00000000, 0x00000001, 0x00000000, 0x0000001a, 0x0000001b, 0x0000001c, 0x00000000,
6502 0x666e6173, 0x00666e00, 0x00666e76, 0x00000275, 0x000001ec, 0x00000278, 0x00000200, 0x00000005,
6503 0x00040001, 0x00020002, 0x0000027c, 0x42240000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
6504 {0xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0x00000000, 0xffffffff, 0x00000000, 0xffffffff}},
6505 {"struct struct", registerset_blob_struct_struct, 48, 24, 6,
6506 {0x3f8ccccd, 0x00000000, 0x00000000, 0x00000000, 0x40066666, 0x00000000, 0x00000000, 0x00000000,
6507 0x40466666, 0x40833333, 0x40a33333, 0x00000000, 0x40c33333, 0x00000000, 0x00000000, 0x00000000,
6508 0x42240000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
6509 0x422c0000, 0x42300000, 0x42240000, 0x00000000, 0x42280000, 0x00000000, 0x00000000, 0x00000000,
6510 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
6511 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
6512 {0x00000047, 0x00000000, 0x00000001, 0x00000000, 0x00000048, 0x00000000, 0x00000001, 0x00000000,
6513 0x00000049, 0x0000004a, 0x0000004b, 0x00000000, 0x0000004c, 0x00000000, 0x00000001, 0x00000000,
6514 0x666e7373, 0x00666e00, 0x00666e76, 0x00000321, 0x0000026c, 0x00000324, 0x00000280, 0x00000005},
6515 {0xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000}},
6516 {"int ran", registerset_blob_special_int, 0, 36, 0,
6517 {0x00000000},
6518 {0x00000004, 0x00000005, 0x00000001, 0x00000000, 0x00000006, 0x00000001, 0x00000001, 0x00000000,
6519 0x00000008, 0x00000001, 0x00000001, 0x00000000, 0x00000002, 0x00000003, 0x00000001, 0x00000000,
6520 0x00000004, 0x00000007, 0x00000001, 0x00000000, 0x00000009, 0x00000001, 0x00000001, 0x00000000,
6521 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461,
6522 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932},
6523 {0x00000000}},
6524 /* DefaultValue = NULL */
6525 {"big vector", registerset_blob_bigvec},
6526 {"matrix column clamp", registerset_blob_matrix_column_clamp, 12, 0, 0,
6527 {0x3f8ccccd, 0x40b00000, 0x411e6666, 0x3fc00000, 0x400ccccd, 0x40d33333, 0x3f99999a, 0x3fcccccd,
6528 0x420551ec, 0x00000000, 0x00000000, 0x00000000},
6529 {0x00000000},
6530 {0x00000000}},
6532
6534{
6535 UINT k;
6536 HWND wnd;
6537 IDirect3D9 *d3d;
6540 HRESULT hr;
6541 ULONG count;
6542 D3DCAPS9 caps;
6543
6544 if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0,
6545 640, 480, NULL, NULL, NULL, NULL)))
6546 {
6547 skip("Couldn't create application window\n");
6548 return;
6549 }
6550 if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
6551 {
6552 skip("Couldn't create IDirect3D9 object\n");
6553 DestroyWindow(wnd);
6554 return;
6555 }
6556
6557 ZeroMemory(&d3dpp, sizeof(d3dpp));
6558 d3dpp.Windowed = TRUE;
6561 if (FAILED(hr))
6562 {
6563 skip("Failed to create IDirect3DDevice9 object %#lx\n", hr);
6564 IDirect3D9_Release(d3d);
6565 DestroyWindow(wnd);
6566 return;
6567 }
6568
6570 ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr);
6571 if (caps.VertexShaderVersion < D3DVS_VERSION(3, 0)
6572 || caps.PixelShaderVersion < D3DPS_VERSION(3, 0))
6573 {
6574 skip("Skipping: Test requires VS >= 3 and PS >= 3.\n");
6576 IDirect3D9_Release(d3d);
6577 DestroyWindow(wnd);
6578 return;
6579 }
6580
6581 for (k = 0; k < ARRAY_SIZE(registerset_defaults_data); ++k)
6582 {
6583 const char *tablename = registerset_defaults_data[k].name;
6584 ID3DXConstantTable *ctable;
6586 BOOL is_vs;
6587 UINT ret;
6588
6590 ok(hr == D3D_OK, "D3DXGetShaderConstantTable \"%s\" failed, got %08lx, expected %08lx\n", tablename, hr, D3D_OK);
6591
6593 ok(hr == D3D_OK, "GetDesc \"%s\" failed, got %08lx, expected %08lx\n", tablename, hr, D3D_OK);
6594
6595 is_vs = (tdesc.Version & 0xFFFF0000) == 0xFFFE0000;
6596
6598
6600 ok(hr == D3D_OK, "SetDefaults \"%s\" failed, got %08lx, expected %08lx\n", tablename, hr, D3D_OK);
6601
6604 ok(ret == 0, "Get*ShaderConstantF \"%s\" failed\n", tablename);
6605
6608 ok(ret == 0, "Get*ShaderConstantI \"%s\" failed\n", tablename);
6609
6612 ok(ret == 0, "Get*ShaderConstantB \"%s\" failed\n", tablename);
6613
6615 ok(count == 0, "Release \"%s\" failed, got %lu, expected %u\n", tablename, count, 0);
6616 }
6617
6618 /* Release resources */
6620 ok(count == 0, "The Direct3D device reference count was %lu, should be 0\n", count);
6621
6623 ok(count == 0, "The Direct3D object reference count was %lu, should be 0\n", count);
6624
6625 if (wnd) DestroyWindow(wnd);
6626}
6627
6628static void test_shader_semantics(void)
6629{
6630 static const DWORD invalid_1[] =
6631 {
6632 0x00000200
6633 },
6634 invalid_2[] =
6635 {
6636 0xfffe0400
6637 },
6638 invalid_3[] =
6639 {
6640 0xfffe0000
6641 },
6642 vs_1_1[] =
6643 {
6644 0xfffe0101, /* vs_1_1 */
6645 0x0000001f, 0x80000000, 0x900f0000, /* dcl_position v0 */
6646 0x0000001f, 0x80000003, 0x900f0001, /* dcl_normal v1 */
6647 0x0000001f, 0x8001000a, 0x900f0002, /* dcl_color1 v2 */
6648 0x0000001f, 0x80000005, 0x900f0003, /* dcl_texcoord0 v3 */
6649 0x00000001, 0xc00f0000, 0x90e40000, /* mov oPos, v0 */
6650 0x00000001, 0xd00f0001, 0x90e40002, /* mov oD1, v2 */
6651 0x00000001, 0xe0070000, 0x90e40001, /* mov oT0.xyz, v1 */
6652 0x00000001, 0xc00f0001, 0x90ff0002, /* mov oFog, v2.w */
6653 0x00000001, 0xc00f0002, 0x90ff0001, /* mov oPts, v1.w */
6654 0x0000ffff
6655 },
6656 vs_2_0[] =
6657 {
6658 0xfffe0200, /* vs_2_0 */
6659 0x0200001f, 0x80000000, 0x900f0000, /* dcl_position v0 */
6660 0x0200001f, 0x80000003, 0x900f0001, /* dcl_normal v1 */
6661 0x0200001f, 0x8001000a, 0x900f0002, /* dcl_color1 v2 */
6662 0x0200001f, 0x80000005, 0x900f0003, /* dcl_texcoord0 v3 */
6663 0x02000001, 0xc00f0000, 0x90e40000, /* mov oPos, v0 */
6664 0x02000001, 0xd00f0001, 0x90e40002, /* mov oD1, v2 */
6665 0x02000001, 0xe0070000, 0x90e40003, /* mov oT0.xyz, v3 */
6666 0x02000001, 0xc00f0001, 0x90ff0002, /* mov oFog, v2.w */
6667 0x02000001, 0xc00f0002, 0x90ff0001, /* mov oPts, v1.w */
6668 0x0000ffff
6669 },
6670 vs_3_0[] =
6671 {
6672 0xfffe0300, /* vs_3_0 */
6673 0x0002fffe, 0x0200000f, 0x00000000, /* comment */
6674 0x0200001f, 0x80000000, 0x900f0000, /* dcl_position v0 */
6675 0x0200001f, 0x80000003, 0x900f0001, /* dcl_normal v1 */
6676 0x0200001f, 0x8001000a, 0x900f0002, /* dcl_color1 v2 */
6677 0x0200001f, 0x80000005, 0x900f0003, /* dcl_texcoord0 v3 */
6678 0x0200001f, 0x80000000, 0xe00f0000, /* dcl_position o0 */
6679 0x0200001f, 0x8001000a, 0xe00f0001, /* dcl_color1 o1 */
6680 0x0200001f, 0x80000005, 0xe00f0002, /* dcl_texcoord0 o2 */
6681 0x0200001f, 0x8000000b, 0xe00f0003, /* dcl_fog o3 */
6682 0x0200001f, 0x80000004, 0xe00f0004, /* dcl_psize o4 */
6683 0x02000001, 0xe00f0000, 0x90e40000, /* mov o0, v0 */
6684 0x02000001, 0xe00f0001, 0x90e40002, /* mov o1, v2 */
6685 0x02000001, 0xe0070002, 0x90e40003, /* mov o2.xyz, v3 */
6686 0x02000001, 0xe00f0003, 0x90ff0002, /* mov o3, v2.w */
6687 0x02000001, 0xe00f0004, 0x90ff0001, /* mov o4, v1.w */
6688 0x0000ffff
6689 },
6690 ps_1_1[] =
6691 {
6692 0xffff0101, /* ps_1_1 */
6693 0x00000042, 0xb00f0000, /* tex t0 */
6694 0x00000002, 0x800f0000, 0x90e40000, 0xb0e40000, /* add r0, v0, t0 */
6695 0x0000ffff
6696 },
6697 ps_2_0[] =
6698 {
6699 0xffff0200, /* ps_2_0 */
6700 0x0200001f, 0x80000000, 0x900f0000, /* dcl v0 */
6701 0x0200001f, 0x80000000, 0xb00f0000, /* dcl t0 */
6702 0x02000001, 0x800f0800, 0x90e40000, /* mov oC0, v0 */
6703 0x0000ffff
6704 },
6705 ps_3_0[] =
6706 {
6707 0xffff0300, /* ps_3_0 */
6708 0x0200001f, 0x8001000a, 0x900f0000, /* dcl_color1 v0 */
6709 0x0200001f, 0x80000003, 0x900f0001, /* dcl_normal v1 */
6710 0x0200001f, 0x80000005, 0x900f0002, /* dcl_texcoord0 v2 */
6711 0x0200001f, 0x8000000b, 0x900f0003, /* dcl_fog v3 */
6712 0x0200001f, 0x80000000, 0x90031000, /* dcl vPos.xy */
6713 0x0200001f, 0x80000000, 0x900f1001, /* dcl vFace */
6714 0x05000051, 0xa00f0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* def c0, 0.0, 0.0, 0.0, 0.0 */
6715 0x02000001, 0x800f0000, 0x90e40000, /* mov r0, v0 */
6716 0x03000002, 0x800f0800, 0x80e40000, 0x90e40003, /* add oC0, r0, v3 */
6717 0x02000001, 0x800f0001, 0x90e40001, /* mov r1, v1 */
6718 0x03000005, 0x800f0801, 0x80e40001, 0x90e40002, /* mul oC1, r1, v2 */
6719 0x02000001, 0x800f0802, 0x90441000, /* mov oC2, vPos.xyxy */
6720 0x04000058, 0x800f0803, 0x90e41001, 0x90e40000, 0xa0e40000, /* cmp oC3, vFace, v0, c0 */
6721 0x02000001, 0x900f0800, 0x90ff0001, /* mov oDepth, v1.w */
6722 0x0000ffff
6723 };
6724 static const struct
6725 {
6726 const DWORD *shader;
6727 D3DXSEMANTIC expected_input[MAXD3DDECLLENGTH];
6729 }
6730 tests[] =
6731 {
6732 {vs_1_1, {{0, 0}, {3, 0}, {10, 1}, {5, 0}, {~0, ~0}}, {{5, 0}, {10, 1}, {0, 0}, {11, 0}, {4, 0}, {~0, ~0}}},
6733 {vs_2_0, {{0, 0}, {3, 0}, {10, 1}, {5, 0}, {~0, ~0}}, {{5, 0}, {10, 1}, {0, 0}, {11, 0}, {4, 0}, {~0, ~0}}},
6734 {vs_3_0, {{0, 0}, {3, 0}, {10, 1}, {5, 0}, {~0, ~0}}, {{0, 0}, {10, 1}, {5, 0}, {11, 0}, {4, 0}, {~0, ~0}}},
6735 {ps_1_1, {{5, 0}, {10, 0}, {~0, ~0}}, {{10, 0}, {~0, ~0}}},
6736 {ps_2_0, {{10, 0}, {5, 0}, {~0, ~0}}, {{10, 0}, {~0, ~0}}},
6737 {ps_3_0, {{10, 1}, {3,0}, {5, 0}, {11, 0}, {~0, ~0}}, {{10, 0}, {10, 1}, {10, 2}, {10, 3}, {12, 0}, {~0, ~0}}},
6738 };
6739 D3DXSEMANTIC semantics[MAXD3DDECLLENGTH];
6740 unsigned int count, count2;
6741 unsigned int i, j;
6742 HRESULT hr;
6743
6744 hr = D3DXGetShaderInputSemantics(invalid_1, NULL, NULL);
6745 ok(hr == D3DXERR_INVALIDDATA, "Unexpected hr %#lx.\n", hr);
6746 hr = D3DXGetShaderInputSemantics(invalid_2, NULL, NULL);
6747 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6748 hr = D3DXGetShaderInputSemantics(invalid_3, NULL, NULL);
6749 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6750
6752 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6753 hr = D3DXGetShaderInputSemantics(vs_1_1, semantics, NULL);
6754 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6755
6756 for (i = 0; i < ARRAY_SIZE(tests); ++i)
6757 {
6758 const DWORD *shader = tests[i].shader;
6759
6761 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6762 hr = D3DXGetShaderInputSemantics(shader, semantics, &count2);
6763 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6764 ok(count == count2, "Semantics count %u differs from previous count %u.\n", count2, count);
6765 for (j = 0; j < count; ++j)
6766 {
6767 ok(semantics[j].Usage == tests[i].expected_input[j].Usage
6768 && semantics[j].UsageIndex == tests[i].expected_input[j].UsageIndex,
6769 "Unexpected semantic %u, %u, test %u, idx %u.\n",
6770 semantics[j].Usage, semantics[j].UsageIndex, i, j);
6771 }
6772 ok(tests[i].expected_input[j].Usage == ~0 && tests[i].expected_input[j].UsageIndex == ~0,
6773 "Unexpected semantics count %u.\n", count);
6775 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6776 hr = D3DXGetShaderOutputSemantics(shader, semantics, &count2);
6777 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6778 ok(count == count2, "Semantics count %u differs from previous count %u.\n", count2, count);
6779 for (j = 0; j < count; ++j)
6780 {
6781 ok(semantics[j].Usage == tests[i].expected_output[j].Usage
6782 && semantics[j].UsageIndex == tests[i].expected_output[j].UsageIndex,
6783 "Unexpected semantic %u, %u, test %u, idx %u.\n",
6784 semantics[j].Usage, semantics[j].UsageIndex, i, j);
6785 }
6786 ok(tests[i].expected_output[j].Usage == ~0 && tests[i].expected_output[j].UsageIndex == ~0,
6787 "Unexpected semantics count %u.\n", count);
6788 }
6789}
6790
6791#if D3DX_SDK_VERSION <= 41
6792static void test_fragment_linker(void)
6793{
6794 ID3DXFragmentLinker *linker;
6797 IDirect3D9 *d3d;
6798 ULONG refcount;
6799 HWND window;
6800 HRESULT hr;
6801
6802 window = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0, 640, 480, NULL, NULL, NULL, NULL);
6803 if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
6804 {
6805 skip("Failed to create a D3D object.\n");
6807 return;
6808 }
6809
6810 ZeroMemory(&d3dpp, sizeof(d3dpp));
6811 d3dpp.Windowed = TRUE;
6815 if (FAILED(hr))
6816 {
6817 skip("Failed to create a D3D device, hr %#lx.\n", hr);
6818 IDirect3D9_Release(d3d);
6820 return;
6821 }
6822
6823 hr = D3DXCreateFragmentLinker(device, 1024, &linker);
6824 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6825 ok(!!linker, "Unexpected linker %p.\n", linker);
6826 linker->lpVtbl->Release(linker);
6827
6828 hr = D3DXCreateFragmentLinkerEx(device, 1024, 0, &linker);
6829 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6830 ok(!!linker, "Unexpected linker %p.\n", linker);
6831 linker->lpVtbl->Release(linker);
6832
6833 refcount = IDirect3DDevice9_Release(device);
6834 ok(!refcount, "Device has %lu references left.\n", refcount);
6835 refcount = IDirect3D9_Release(d3d);
6836 ok(!refcount, "The D3D object has %lu references left.\n", refcount);
6838}
6839#endif
6840
6841static void test_hlsl_double(void)
6842{
6843 static const char vs_hlsl[] =
6844 "float4 main(in float4 pos : POSITION) : POSITION\n"
6845 "{\n"
6846 " return pos;\n"
6847 "}\n";
6848 static const char ps_hlsl[] =
6849 "float func(float x){return 0.1;}\n"
6850 "float func(half x){return 0.2;}\n"
6851 "float func(double x){return 0.3;}\n"
6852 "\n"
6853 "float4 main(uniform double u) : COLOR\n"
6854 "{\n"
6855 " return func(u);\n"
6856 "}\n";
6857 ID3DXBuffer *vs_bytecode, *ps_bytecode, *errors;
6859 struct surface_readback rb;
6860 IDirect3DVertexShader9 *vs;
6861 IDirect3DPixelShader9 *ps;
6863 HRESULT hr;
6864
6866 return;
6867
6868 hr = D3DXCompileShader(vs_hlsl, sizeof(vs_hlsl), NULL, NULL, "main", "vs_2_0", 0, &vs_bytecode, &errors, NULL);
6869 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6870
6871 hr = D3DXCompileShader(ps_hlsl, sizeof(ps_hlsl), NULL, NULL, "main", "ps_2_0", 0, &ps_bytecode, &errors, NULL);
6872 todo_wine ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6873 if (FAILED(hr))
6874 {
6875 if (errors)
6876 trace("%s", (char *)ID3DXBuffer_GetBufferPointer(errors));
6878 return;
6879 }
6880
6882 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6884 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6886 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6888 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6890
6891 get_surface_readback(context.device, context.backbuffer, &rb);
6892 color = get_readback_color(&rb, 320, 240);
6893 ok(color_match(color, 0x4c4c4c4c, 0), "Unexpected color %#x.\n", color);
6898}
6899
6901{
6914#if D3DX_SDK_VERSION <= 41
6916#endif
6918}
Type
Definition: Type.h:7
#define trace
Definition: atltest.h:70
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define broken(x)
Definition: atltest.h:178
#define START_TEST(x)
Definition: atltest.h:75
#define index(s, c)
Definition: various.h:29
#define ARRAY_SIZE(A)
Definition: main.h:20
#define int3
Definition: btrfs_drv.h:1745
static _Locale_mask_t ctable[256]
RECT rect
Definition: combotst.c:67
#define D3DERR_INVALIDCALL
Definition: d3d10_private.h:42
@ D3DRS_ZENABLE
Definition: d3d8types.h:729
#define D3DFVF_XYZ
Definition: d3d8types.h:113
#define D3DPS_VERSION(major, minor)
Definition: d3d8types.h:474
@ D3DFMT_A8R8G8B8
Definition: d3d8types.h:604
@ D3DFMT_D24S8
Definition: d3d8types.h:643
@ D3DSWAPEFFECT_DISCARD
Definition: d3d8types.h:851
@ D3DPT_TRIANGLESTRIP
Definition: d3d8types.h:722
#define D3DVS_VERSION(major, minor)
Definition: d3d8types.h:475
@ D3DDEVTYPE_HAL
Definition: d3d8types.h:576
@ D3DPOOL_SYSTEMMEM
Definition: d3d8types.h:711
#define D3DLOCK_READONLY
Definition: d3d8types.h:69
IDirect3D9 *WINAPI Direct3DCreate9(UINT SDKVersion)
Definition: d3d9.c:57
#define IDirect3DDevice9_EndScene(p)
Definition: d3d9.h:1377
#define IDirect3DDevice9_BeginScene(p)
Definition: d3d9.h:1376
#define IDirect3DDevice9_SetFVF(p, a)
Definition: d3d9.h:1424
#define IDirect3DDevice9_CreatePixelShader(p, a, b)
Definition: d3d9.h:1441
#define IDirect3DDevice9_GetPixelShaderConstantB(p, a, b, c)
Definition: d3d9.h:1449
#define IDirect3DDevice9_GetPixelShaderConstantI(p, a, b, c)
Definition: d3d9.h:1447
#define IDirect3DSurface9_LockRect(p, a, b, c)
Definition: d3d9.h:463
#define IDirect3DDevice9_GetVertexShaderConstantI(p, a, b, c)
Definition: d3d9.h:1432
#define IDirect3D9_CreateDevice(p, a, b, c, d, e, f)
Definition: d3d9.h:224
#define IDirect3DDevice9_DrawPrimitiveUP(p, a, b, c, d)
Definition: d3d9.h:1418
#define IDirect3DDevice9_SetRenderState(p, a, b)
Definition: d3d9.h:1392
#define IDirect3DDevice9_SetPixelShader(p, a)
Definition: d3d9.h:1442
#define IDirect3DDevice9_GetPixelShaderConstantF(p, a, b, c)
Definition: d3d9.h:1445
#define IDirect3DDevice9_GetDeviceCaps(p, a)
Definition: d3d9.h:1342
#define IDirect3DDevice9_SetPixelShaderConstantI(p, a, b, c)
Definition: d3d9.h:1446
#define IDirect3DDevice9_SetVertexShaderConstantF(p, a, b, c)
Definition: d3d9.h:1429
#define IDirect3DPixelShader9_Release(p)
Definition: d3d9.h:1089
#define IDirect3D9_Release(p)
Definition: d3d9.h:209
#define IDirect3DVertexShader9_Release(p)
Definition: d3d9.h:1051
#define IDirect3DDevice9_SetPixelShaderConstantF(p, a, b, c)
Definition: d3d9.h:1444
#define IDirect3DDevice9_GetVertexShaderConstantB(p, a, b, c)
Definition: d3d9.h:1434
#define IDirect3DDevice9_SetVertexShader(p, a)
Definition: d3d9.h:1427
#define IDirect3DSurface9_GetDesc(p, a)
Definition: d3d9.h:462
#define IDirect3DDevice9_Release(p)
Definition: d3d9.h:1336
#define IDirect3DDevice9_SetVertexShaderConstantI(p, a, b, c)
Definition: d3d9.h:1431
#define IDirect3DDevice9_SetPixelShaderConstantB(p, a, b, c)
Definition: d3d9.h:1448
#define IDirect3DSurface9_UnlockRect(p)
Definition: d3d9.h:464
#define IDirect3DDevice9_GetVertexShaderConstantF(p, a, b, c)
Definition: d3d9.h:1430
#define IDirect3DSurface9_Release(p)
Definition: d3d9.h:450
#define IDirect3DDevice9_SetVertexShaderConstantB(p, a, b, c)
Definition: d3d9.h:1433
#define IDirect3DDevice9_CreateVertexShader(p, a, b)
Definition: d3d9.h:1426
#define IDirect3DDevice9_CreateOffscreenPlainSurface(p, a, b, c, d, e, f)
Definition: d3d9.h:1371
#define IDirect3DDevice9_GetRenderTarget(p, a, b)
Definition: d3d9.h:1373
#define MAXD3DDECLLENGTH
Definition: d3d9types.h:195
#define D3D_OK
Definition: d3d.h:106
static const DWORD vs_2_0[]
Definition: asm.c:1726
#define D3DXERR_INVALIDDATA
Definition: compiler.c:53
struct ID3DXBuffer ID3DXBuffer
Definition: d3dx8core.h:51
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
UINT32 uint32_t
Definition: types.h:75
HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags, ID3DXConstantTable **constant_table)
Definition: shader.c:1977
HRESULT WINAPI D3DXCreateFragmentLinkerEx(IDirect3DDevice9 *device, UINT size, DWORD flags, ID3DXFragmentLinker **linker)
Definition: shader.c:2288
UINT WINAPI D3DXGetShaderSize(const DWORD *byte_code)
Definition: shader.c:82
HRESULT WINAPI D3DXGetShaderOutputSemantics(const DWORD *byte_code, D3DXSEMANTIC *semantics, UINT *count)
Definition: shader.c:2999
HRESULT WINAPI D3DXFindShaderComment(const DWORD *byte_code, DWORD fourcc, const void **data, UINT *size)
Definition: shader.c:141
DWORD WINAPI D3DXGetShaderVersion(const DWORD *byte_code)
Definition: shader.c:105
HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **samplers, UINT *count)
Definition: shader.c:2318
HRESULT WINAPI D3DXCompileShader(const char *data, UINT length, const D3DXMACRO *defines, ID3DXInclude *include, const char *function, const char *profile, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_msgs, ID3DXConstantTable **constant_table)
Definition: shader.c:434
HRESULT WINAPI D3DXGetShaderInputSemantics(const DWORD *byte_code, D3DXSEMANTIC *semantics, UINT *count)
Definition: shader.c:2992
HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantTable **constant_table)
Definition: shader.c:2097
HRESULT WINAPI D3DXCreateFragmentLinker(IDirect3DDevice9 *device, UINT size, ID3DXFragmentLinker **linker)
Definition: shader.c:2311
HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface, const PALETTEENTRY *dst_palette, const RECT *dst_rect, IDirect3DSurface9 *src_surface, const PALETTEENTRY *src_palette, const RECT *src_rect, DWORD filter, D3DCOLOR color_key)
Definition: surface.c:2765
static MonoProfilerRuntimeShutdownBeginCallback cb
Definition: metahost.c:118
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
_ACRTIMP int __cdecl strcmp(const char *, const char *)
Definition: string.c:3324
#define MAKEFOURCC(ch0, ch1, ch2, ch3)
Definition: ddsformat.c:45
return ret
Definition: mutex.c:147
superblock * sb
Definition: btrfs.c:4261
int main()
Definition: test.c:6
#define ID3DXBuffer_GetBufferPointer(p)
Definition: d3dx9core.h:85
@ D3DXPC_SCALAR
Definition: d3dx9shader.h:62
@ D3DXPC_MATRIX_COLUMNS
Definition: d3dx9shader.h:65
@ D3DXPC_STRUCT
Definition: d3dx9shader.h:67
@ D3DXPC_MATRIX_ROWS
Definition: d3dx9shader.h:64
@ D3DXPC_VECTOR
Definition: d3dx9shader.h:63
@ D3DXPC_OBJECT
Definition: d3dx9shader.h:66
#define ID3DXConstantTable_GetBufferPointer(p)
Definition: d3dx9shader.h:179
#define ID3DXConstantTable_SetMatrixTransposeArray(p, a, b, c, d)
Definition: d3dx9shader.h:202
#define ID3DXConstantTable_SetBool(p, a, b, c)
Definition: d3dx9shader.h:190
#define ID3DXConstantTable_SetIntArray(p, a, b, c, d)
Definition: d3dx9shader.h:193
#define ID3DXConstantTable_GetBufferSize(p)
Definition: d3dx9shader.h:180
#define ID3DXConstantTable_GetDesc(p, a)
Definition: d3dx9shader.h:182
#define ID3DXConstantTable_GetSamplerIndex(p, a)
Definition: d3dx9shader.h:184
@ D3DXRS_FLOAT4
Definition: d3dx9shader.h:55
@ D3DXRS_BOOL
Definition: d3dx9shader.h:53
@ D3DXRS_INT4
Definition: d3dx9shader.h:54
@ D3DXRS_SAMPLER
Definition: d3dx9shader.h:56
#define ID3DXConstantTable_GetConstantElement(p, a, b)
Definition: d3dx9shader.h:187
#define ID3DXConstantTable_SetVectorArray(p, a, b, c, d)
Definition: d3dx9shader.h:197
#define ID3DXConstantTable_Release(p)
Definition: d3dx9shader.h:177
const char * D3DXHANDLE
Definition: d3dx9shader.h:48
#define ID3DXConstantTable_SetMatrixPointerArray(p, a, b, c, d)
Definition: d3dx9shader.h:200
#define ID3DXConstantTable_SetMatrixArray(p, a, b, c, d)
Definition: d3dx9shader.h:199
#define ID3DXConstantTable_GetConstantDesc(p, a, b, c)
Definition: d3dx9shader.h:183
#define ID3DXConstantTable_SetValue(p, a, b, c, d)
Definition: d3dx9shader.h:189
#define ID3DXConstantTable_SetMatrixTranspose(p, a, b, c)
Definition: d3dx9shader.h:201
#define ID3DXConstantTable_SetBoolArray(p, a, b, c, d)
Definition: d3dx9shader.h:191
#define D3DXCONSTTABLE_LARGEADDRESSAWARE
Definition: d3dx9shader.h:46
enum _D3DXREGISTER_SET D3DXREGISTER_SET
#define ID3DXConstantTable_SetDefaults(p, a)
Definition: d3dx9shader.h:188
#define ID3DXConstantTable_SetMatrixTransposePointerArray(p, a, b, c, d)
Definition: d3dx9shader.h:203
#define ID3DXConstantTable_SetVector(p, a, b, c)
Definition: d3dx9shader.h:196
#define ID3DXConstantTable_SetFloat(p, a, b, c)
Definition: d3dx9shader.h:194
#define ID3DXConstantTable_SetFloatArray(p, a, b, c, d)
Definition: d3dx9shader.h:195
#define ID3DXConstantTable_SetMatrix(p, a, b, c)
Definition: d3dx9shader.h:198
@ D3DXPT_SAMPLER3D
Definition: d3dx9shader.h:86
@ D3DXPT_FLOAT
Definition: d3dx9shader.h:76
@ D3DXPT_BOOL
Definition: d3dx9shader.h:74
@ D3DXPT_INT
Definition: d3dx9shader.h:75
@ D3DXPT_VOID
Definition: d3dx9shader.h:73
@ D3DXPT_SAMPLER2D
Definition: d3dx9shader.h:85
#define ID3DXConstantTable_GetConstant(p, a, b)
Definition: d3dx9shader.h:185
#define ID3DXConstantTable_SetInt(p, a, b, c)
Definition: d3dx9shader.h:192
#define ID3DXConstantTable_GetConstantByName(p, a, b)
Definition: d3dx9shader.h:186
#define D3DX_FILTER_NONE
Definition: d3dx9tex.h:27
DWORD IDirect3DSurface9
Definition: dxva2api.idl:23
DWORD IDirect3DDevice9
Definition: dxva2api.idl:22
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint start
Definition: gl.h:1545
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
const GLdouble * v
Definition: gl.h:2040
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLdouble s
Definition: gl.h:2039
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLdouble n
Definition: glext.h:7729
GLuint res
Definition: glext.h:9613
GLuint * samplers
Definition: glext.h:7280
GLsizeiptr size
Definition: glext.h:5919
GLuint color
Definition: glext.h:6243
GLuint sampler
Definition: glext.h:7283
GLuint shader
Definition: glext.h:6030
GLuint index
Definition: glext.h:6031
GLfloat f
Definition: glext.h:7540
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLuint in
Definition: glext.h:9616
GLfloat GLfloat p
Definition: glext.h:8902
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
GLdouble GLdouble z
Definition: glext.h:5874
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint vn
Definition: glfuncs.h:238
unsigned int UINT
Definition: sysinfo.c:13
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:384
#define init_test_context(a)
Definition: hlsl_d3d11.c:166
static ID3D11Device * create_device(void)
Definition: hlsl_d3d11.c:102
#define draw_quad(context, ps_code)
Definition: hlsl_d3d11.c:263
static void test_constant_table(void)
Definition: hlsl_d3d9.c:1203
static ID3DXConstantTable ** constant_table
Definition: hlsl_d3d9.c:32
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define f
Definition: ke_i.h:83
#define _11
Definition: ke_i.h:85
#define b
Definition: ke_i.h:79
#define debugstr_a
Definition: kernel32.h:31
#define todo_wine
Definition: minitest.h:80
#define ZeroMemory
Definition: minwinbase.h:31
ULONG nr
Definition: thread.c:7
UCHAR ab[sizeof("Hello World!") -1]
Definition: fdi.c:106
static BYTE cn[]
Definition: cert.c:2987
static CRYPT_DATA_BLOB b1[]
Definition: msg.c:529
BOOL expected
Definition: store.c:2000
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683
static const struct registerset_test registerset_test_vector_float[]
Definition: shader.c:2781
static const struct registerset_constants registerset_constants_matrix_column_clamp[]
Definition: shader.c:5864
static const DWORD registerset_blob_vector_array[]
Definition: shader.c:2959
static const struct registerset_constants registerset_constants_scalar_bool_float[]
Definition: shader.c:2384
static const struct registerset_test registerset_test_vector_array_float[]
Definition: shader.c:2992
static const DWORD registerset_blob_scalar_array[]
Definition: shader.c:2468
static const DWORD shader_with_ctab_constants[]
Definition: shader.c:76
static const struct registerset_test registerset_test_row_array_bool[]
Definition: shader.c:4473
static const struct registerset_constants registerset_constants_special_int[]
Definition: shader.c:5720
static const float mat3_default_value[]
Definition: shader.c:251
static const struct registerset_constants registerset_constants_struct_bool[]
Definition: shader.c:4869
static const struct registerset_test registerset_test_row_array_bool_float[]
Definition: shader.c:4639
const DWORD floats[1024]
Definition: shader.c:6404
static const struct registerset_constants registerset_constants_scalar_array_bool_float[]
Definition: shader.c:2634
static const struct registerset_constants registerset_constants_row_int_float[]
Definition: shader.c:4117
static const DWORD shader_invalid[]
Definition: shader.c:31
unsigned int float_count
Definition: shader.c:6401
static const struct registerset_constants registerset_constants_struct_struct_bool_float[]
Definition: shader.c:5639
static const struct registerset_constants registerset_constants_column_array_int[]
Definition: shader.c:3626
static void test_shader_semantics(void)
Definition: shader.c:6628
static const struct registerset_test registerset_test_struct_int_float[]
Definition: shader.c:4923
static UINT registerset_compare(IDirect3DDevice9 *device, BOOL is_vs, D3DXREGISTER_SET regset, UINT start, UINT in_count, const DWORD *expected)
Definition: shader.c:6103
static const struct registerset_test registerset_test_scalar_int[]
Definition: shader.c:2308
static const struct registerset_test registerset_test_matrix_column_clamp[]
Definition: shader.c:5870
static const struct registerset_test registerset_test_row_float[]
Definition: shader.c:3968
static void test_get_shader_size(void)
Definition: shader.c:494
const char * var
Definition: shader.c:5879
static const DWORD registerset_blob_special_int[]
Definition: shader.c:5705
static const struct registerset_constants registerset_constants_scalar_float[]
Definition: shader.c:2270
static const struct registerset_test registerset_test_vector_int_float[]
Definition: shader.c:2913
static const DWORD registerset_blob_row[]
Definition: shader.c:3936
Type
Definition: shader.c:2179
@ SetMatrixTransposePointerArray
Definition: shader.c:2181
@ SetMatrixArray
Definition: shader.c:2180
@ SetIntArray
Definition: shader.c:2179
@ SetVectorArray
Definition: shader.c:2180
@ SetMatrixPointerArray
Definition: shader.c:2181
@ SetBoolArray
Definition: shader.c:2179
@ SetBool
Definition: shader.c:2179
@ SetVector
Definition: shader.c:2180
@ SetMatrixTransposeArray
Definition: shader.c:2180
@ SetMatrix
Definition: shader.c:2179
@ SetValue
Definition: shader.c:2181
@ SetFloat
Definition: shader.c:2179
@ SetFloatArray
Definition: shader.c:2179
@ SetInt
Definition: shader.c:2179
@ SetMatrixTranspose
Definition: shader.c:2180
static const DWORD simple_7ffe[]
Definition: shader.c:39
static const struct registerset_constants registerset_constants_vector_array_bool_float[]
Definition: shader.c:3138
static const struct registerset_test registerset_test_struct_array_int_float[]
Definition: shader.c:5257
static void test_SetValue(IDirect3DDevice9 *device)
Definition: shader.c:1488
static const DWORD registerset_blob_column[]
Definition: shader.c:3258
static const DWORD registerset_blob_struct[]
Definition: shader.c:4743
static const struct registerset_test registerset_test_scalar_bool[]
Definition: shader.c:2422
static const struct registerset_test registerset_test_vector_array_bool[]
Definition: shader.c:3094
const struct registerset_constants * constants
Definition: shader.c:5885
static const DWORD test_get_shader_constant_variables_blob[]
Definition: shader.c:1913
static const struct registerset_constants registerset_constants_row_array_int_float[]
Definition: shader.c:4539
#define FCC_TEXT
Definition: shader.c:26
static const struct registerset_constants registerset_constants_column_array_bool_float[]
Definition: shader.c:3845
static const struct registerset_constants registerset_constants_vector_array_bool[]
Definition: shader.c:3087
static const struct registerset_constants registerset_constants_struct_struct_int_float[]
Definition: shader.c:5587
static const DWORD simple_vs[]
Definition: shader.c:43
static void test_get_sampler_index(void)
Definition: shader.c:1712
static void test_find_shader_comment(void)
Definition: shader.c:526
static const struct registerset_test registerset_test_struct_struct_bool[]
Definition: shader.c:5548
static const DWORD registerset_blob_vector[]
Definition: shader.c:2754
static const struct registerset_constants registerset_constants_row_float[]
Definition: shader.c:3963
static const struct registerset_constants registerset_constants_row_array_bool_float[]
Definition: shader.c:4632
UINT constant_count
Definition: shader.c:5886
static const struct registerset_test registerset_test_struct_int[]
Definition: shader.c:4829
static const DWORD fx_shader_with_ctab[]
Definition: shader.c:286
static const DWORD shader_empty[]
Definition: shader.c:33
static const DWORD ctab_samplers[]
Definition: shader.c:263
static const struct registerset_constants registerset_constants_struct_int[]
Definition: shader.c:4822
static void test_get_shader_samplers(void)
Definition: shader.c:1805
static const struct registerset_test registerset_test_struct_array_int[]
Definition: shader.c:5135
static const D3DXCONSTANT_DESC ctab_samplers_expected[]
Definition: shader.c:281
static const DWORD registerset_blob_row_array[]
Definition: shader.c:4245
static const struct registerset_constants registerset_constants_vector_array_int_float[]
Definition: shader.c:3189
static const struct registerset_test registerset_test_scalar_bool_float[]
Definition: shader.c:2389
static void test_registerset_defaults(void)
Definition: shader.c:6533
static const struct registerset_test registerset_test_vector_array_int_float[]
Definition: shader.c:3196
static const struct registerset_test registerset_test_column_array_bool[]
Definition: shader.c:3706
static const float flt_default_value[]
Definition: shader.c:254
static const DWORD shader_with_ctab[]
Definition: shader.c:61
static const struct registerset_constants registerset_constants_column_int_float[]
Definition: shader.c:3415
static const DWORD simple_ps[]
Definition: shader.c:52
static const float vec4_default_value[]
Definition: shader.c:253
static const struct registerset_constants registerset_constants_row_bool[]
Definition: shader.c:4073
static const struct registerset_test registerset_test_column_int[]
Definition: shader.c:3332
static const DWORD simple_7fff[]
Definition: shader.c:41
static const struct registerset_test registerset_test_struct_struct_float[]
Definition: shader.c:5436
static void registerset_clear(IDirect3DDevice9 *device)
Definition: shader.c:6077
static void test_registerset(void)
Definition: shader.c:6228
static const struct registerset_test registerset_test_struct_bool[]
Definition: shader.c:4876
static const struct registerset_constants registerset_constants_struct_struct_int[]
Definition: shader.c:5478
static const struct registerset_constants registerset_constants_column_array_int_float[]
Definition: shader.c:3772
static void test_setting_matrices_table(IDirect3DDevice9 *device)
Definition: shader.c:1078
static const struct registerset_constants registerset_constants_struct_bool_float[]
Definition: shader.c:4963
static const float arr_default_value[]
Definition: shader.c:252
static const struct registerset_test registerset_test_scalar_array_bool_float[]
Definition: shader.c:2641
static void test_get_shader_constant_variables(void)
Definition: shader.c:2043
static const struct registerset_constants registerset_constants_row_int[]
Definition: shader.c:4018
static const struct registerset_test registerset_test_struct_struct_bool_float[]
Definition: shader.c:5649
static UINT registerset_compare_all(IDirect3DDevice9 *device, BOOL is_vs, D3DXREGISTER_SET regset, UINT start, UINT in_count, const DWORD *expected)
Definition: shader.c:6158
static const struct registerset_constants registerset_constants_struct_array_bool_float[]
Definition: shader.c:5305
static const struct registerset_test registerset_test_struct_array_bool[]
Definition: shader.c:5196
static const DWORD get_shader_samplers_blob[]
Definition: shader.c:1764
static const DWORD registerset_blob_column_array[]
Definition: shader.c:3522
UINT test_count
Definition: shader.c:5884
static const DWORD registerset_blob_matrix_column_clamp[]
Definition: shader.c:5849
static const struct registerset_test registerset_test_column_bool_float[]
Definition: shader.c:3465
static const DWORD registerset_blob_scalar[]
Definition: shader.c:2248
static const struct registerset_test registerset_test_vector_bool[]
Definition: shader.c:2847
static const struct registerset_constants registerset_constants_column_array_bool[]
Definition: shader.c:3699
static const DWORD ctab_matrices[]
Definition: shader.c:119
static const DWORD registerset_blob_struct_struct[]
Definition: shader.c:5382
static const struct registerset_constants registerset_constants_row_array_float[]
Definition: shader.c:4280
static void release_surface_readback(struct surface_readback *rb)
Definition: shader.c:428
static const struct registerset_constants registerset_constants_column_int[]
Definition: shader.c:3327
static const struct registerset_constants registerset_constants_scalar_array_int_float[]
Definition: shader.c:2685
static const struct registerset_test registerset_test_vector_bool_float[]
Definition: shader.c:2880
static const struct registerset_test registerset_test_row_array_int_float[]
Definition: shader.c:4546
static const struct registerset_test registerset_test_vector_int[]
Definition: shader.c:2814
static void test_constant_tables(void)
Definition: shader.c:862
static const DWORD ctab_matrices2[]
Definition: shader.c:143
unsigned int bool_count
Definition: shader.c:6403
static const struct registerset_test registerset_test_row_array_float[]
Definition: shader.c:4287
static const struct registerset_test registerset_test_struct_float[]
Definition: shader.c:4782
static const struct registerset_test registerset_test_scalar_array_float[]
Definition: shader.c:2500
static const struct registerset_constants registerset_constants_bigvec_float[]
Definition: shader.c:5750
static const struct registerset_test registerset_test_scalar_array_int_float[]
Definition: shader.c:2692
static const struct registerset_test registerset_test_row_int[]
Definition: shader.c:4023
const char * name
Definition: shader.c:5878
static const struct registerset_test registerset_test_column_array_bool_float[]
Definition: shader.c:3852
static uint32_t get_readback_color(struct surface_readback *rb, uint32_t x, uint32_t y)
Definition: shader.c:422
static const struct registerset_constants registerset_constants_struct_struct_bool[]
Definition: shader.c:5538
static const DWORD ctab_basic[]
Definition: shader.c:93
static const struct registerset_constants registerset_constants_scalar_int[]
Definition: shader.c:2303
static const struct registerset_constants registerset_constants_column_bool_float[]
Definition: shader.c:3460
static const struct registerset_constants registerset_constants_vector_bool[]
Definition: shader.c:2842
static const struct registerset_constants registerset_constants_scalar_int_float[]
Definition: shader.c:2351
static const struct registerset_constants registerset_constants_vector_bool_float[]
Definition: shader.c:2875
static bool compare_uint(unsigned int x, unsigned int y, unsigned int max_diff)
Definition: shader.c:479
static const struct registerset_test registerset_test_vector_array_int[]
Definition: shader.c:3043
static const struct registerset_test registerset_test_column_array_int_float[]
Definition: shader.c:3779
static const struct registerset_test registerset_test_struct_array_float[]
Definition: shader.c:5076
static const D3DXCONSTANT_DESC ctab_matrices_expected[]
Definition: shader.c:137
UINT ctaboffset
Definition: shader.c:1981
static const struct registerset_test registerset_test_struct_struct_int[]
Definition: shader.c:5488
static const struct registerset_constants registerset_constants_scalar_bool[]
Definition: shader.c:2417
static const DWORD simple_tx[]
Definition: shader.c:37
static const struct registerset_test registerset_test_vector_array_bool_float[]
Definition: shader.c:3145
static const D3DXCONSTANT_DESC ctab_basic_expected[]
Definition: shader.c:112
static void test_setting_basic_table(IDirect3DDevice9 *device)
Definition: shader.c:878
static const struct registerset_constants registerset_constants_vector_array_float[]
Definition: shader.c:2985
static const struct registerset_test registerset_test_scalar_array_int[]
Definition: shader.c:2551
static const struct registerset_constants registerset_constants_vector_int_float[]
Definition: shader.c:2908
const DWORD * blob
Definition: shader.c:5882
static const struct registerset_test registerset_test_scalar_float[]
Definition: shader.c:2275
D3DXREGISTER_SET regset
Definition: shader.c:5881
static const struct registerset_test registerset_test_column_float[]
Definition: shader.c:3288
const DWORD bools[16]
Definition: shader.c:6406
static const struct registerset_test registerset_test_scalar_int_float[]
Definition: shader.c:2356
static const struct registerset_test registerset_test_struct_bool_float[]
Definition: shader.c:4970
static const D3DXCONSTANT_DESC ctab_with_default_values_expected[]
Definition: shader.c:256
unsigned int int_count
Definition: shader.c:6402
static const struct registerset_test registerset_test_row_bool_float[]
Definition: shader.c:4177
static const struct registerset_constants registerset_constants_row_bool_float[]
Definition: shader.c:4172
static const struct registerset_constants registerset_constants_struct_struct_float[]
Definition: shader.c:5426
static void test_get_shader_version(void)
Definition: shader.c:510
static const struct registerset_test registerset_test_column_array_float[]
Definition: shader.c:3560
static const DWORD ctab_arrays[]
Definition: shader.c:177
static const DWORD registerset_blob_bigvec[]
Definition: shader.c:5739
static bool color_match(uint32_t c1, uint32_t c2, unsigned int max_diff)
Definition: shader.c:486
static const struct registerset_constants registerset_constants_column_array_float[]
Definition: shader.c:3553
static void test_setting_constants(void)
Definition: shader.c:1662
static const struct registerset_test registerset_test_column_int_float[]
Definition: shader.c:3420
static const struct registerset_test registerset_test_bigvec_float[]
Definition: shader.c:5765
static const struct registerset_test registerset_test_struct_array_bool_float[]
Definition: shader.c:5316
static const struct registerset_constants registerset_constants_row_array_int[]
Definition: shader.c:4373
static const struct registerset_constants registerset_constants_struct_array_int_float[]
Definition: shader.c:5246
static const struct registerset_constants registerset_constants_vector_int[]
Definition: shader.c:2809
static void test_hlsl_double(void)
Definition: shader.c:6841
static const struct @1917 registerset_defaults_data[]
static void test_setting_arrays_table(IDirect3DDevice9 *device)
Definition: shader.c:1299
static void test_get_shader_constant_table_ex(void)
Definition: shader.c:596
static const struct registerset_constants registerset_constants_scalar_array_bool[]
Definition: shader.c:2595
static HRESULT registerset_apply(ID3DXConstantTable *ctable, IDirect3DDevice9 *device, D3DXHANDLE constant, UINT index, DWORD count, enum Type type)
Definition: shader.c:6177
static const struct registerset_constants registerset_constants_column_bool[]
Definition: shader.c:3371
static const DWORD shader_zero[]
Definition: shader.c:29
static const struct registerset_test registerset_test_scalar_array_bool[]
Definition: shader.c:2602
static const struct registerset_constants registerset_constants_vector_array_int[]
Definition: shader.c:3036
static const DWORD registerset_blob_struct_array[]
Definition: shader.c:5028
#define FCC_CTAB
Definition: shader.c:27
static const DWORD simple_fx[]
Definition: shader.c:35
static const struct @1916 registerset_data[]
static const struct registerset_constants registerset_constants_struct_array_float[]
Definition: shader.c:5065
static const struct registerset_constants registerset_constants_column_float[]
Definition: shader.c:3283
static const struct registerset_constants registerset_constants_struct_array_int[]
Definition: shader.c:5124
static const struct registerset_constants registerset_constants_struct_array_bool[]
Definition: shader.c:5185
const DWORD ints[256]
Definition: shader.c:6405
const char * fullname
Definition: shader.c:1979
static const D3DXCONSTANT_DESC ctab_matrices2_expected[]
Definition: shader.c:169
const struct @1915 test_get_shader_constant_variables_data[]
static const D3DXCONSTANT_DESC ctab_arrays_expected[]
Definition: shader.c:204
static const struct registerset_test registerset_test_row_array_int[]
Definition: shader.c:4380
static const struct registerset_constants registerset_constants_struct_float[]
Definition: shader.c:4775
static const DWORD registerset_test_input[][REGISTER_OUTPUT_SIZE]
Definition: shader.c:2200
static const struct registerset_test registerset_test_row_int_float[]
Definition: shader.c:4122
static void test_fragment_linker(void)
Definition: shader.c:6792
const struct registerset_test * tests
Definition: shader.c:5883
static const struct registerset_test registerset_test_column_array_int[]
Definition: shader.c:3633
static const struct registerset_constants registerset_constants_scalar_array_int[]
Definition: shader.c:2544
#define release_test_context(a)
Definition: shader.c:369
static void release_test_context_(unsigned int line, struct d3d9_test_context *context)
Definition: shader.c:370
#define REGISTER_OUTPUT_SIZE
Definition: shader.c:2177
static const struct registerset_constants registerset_constants_struct_int_float[]
Definition: shader.c:4916
static HWND create_window(void)
Definition: shader.c:313
static const DWORD ctab_with_default_values[]
Definition: shader.c:212
static const DWORD shader_with_invalid_ctab[]
Definition: shader.c:69
static const struct registerset_constants registerset_constants_vector_float[]
Definition: shader.c:2776
static const struct registerset_constants registerset_constants_row_array_bool[]
Definition: shader.c:4466
static const struct registerset_test registerset_test_column_bool[]
Definition: shader.c:3376
static const struct registerset_test registerset_test_struct_struct_int_float[]
Definition: shader.c:5597
static const float mat4_default_value[]
Definition: shader.c:250
static const struct registerset_test registerset_test_row_bool[]
Definition: shader.c:4078
static void test_SetDefaults(IDirect3DDevice9 *device)
Definition: shader.c:1411
static void get_surface_readback(IDirect3DDevice9 *device, IDirect3DSurface9 *surface, struct surface_readback *rb)
Definition: shader.c:439
static const struct registerset_constants registerset_constants_scalar_array_float[]
Definition: shader.c:2493
static const char * test_name
Definition: run.c:194
static IHTMLWindow2 * window
Definition: events.c:77
static vector_t * vs
Definition: server.c:146
int k
Definition: mpi.c:3369
static const struct stream_output expected_output[]
Definition: msacm.c:1056
#define uint32_t
Definition: nsiface.idl:61
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define WS_VISIBLE
Definition: pedump.c:620
BOOL WINAPI AdjustWindowRect(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4469
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
for(i=0;i< sizeof(testsuite)/sizeof(testsuite[0]);++i) ok(call_test(testsuite[i].func)
static void quad(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3, GLuint pv)
Definition: quads.c:63
#define err(...)
#define test
Definition: rosglue.h:37
int n1
Definition: dwarfget.c:147
#define D3DADAPTER_DEFAULT
Definition: d3d8.h:53
#define D3DCREATE_HARDWARE_VERTEXPROCESSING
Definition: d3d8.h:41
#define D3D_SDK_VERSION
Definition: d3d8.h:52
#define D3DCREATE_SOFTWARE_VERTEXPROCESSING
Definition: d3d8.h:40
#define D3DCREATE_MIXED_VERTEXPROCESSING
Definition: d3d8.h:42
#define exit(n)
Definition: config.h:202
#define f1(x, y, z)
Definition: sha1.c:30
#define f4(x, y, z)
Definition: sha1.c:33
#define memset(x, y, z)
Definition: compat.h:39
int zero
Definition: sehframes.cpp:29
Definition: dcommon.idl:28
long bottom
Definition: dcommon.idl:29
long right
Definition: dcommon.idl:29
long left
Definition: dcommon.idl:29
long top
Definition: dcommon.idl:29
DWORD PixelShaderVersion
Definition: d3d9caps.h:315
DWORD VertexShaderVersion
Definition: d3d9caps.h:313
float _32
Definition: d3d8types.h:1113
float _42
Definition: d3d8types.h:1114
float _13
Definition: d3d8types.h:1111
float _44
Definition: d3d8types.h:1114
float _14
Definition: d3d8types.h:1111
float _11
Definition: d3d8types.h:1111
float _33
Definition: d3d8types.h:1113
float _24
Definition: d3d8types.h:1112
float _31
Definition: d3d8types.h:1113
float _34
Definition: d3d8types.h:1113
float _12
Definition: d3d8types.h:1111
float _21
Definition: d3d8types.h:1112
float _41
Definition: d3d8types.h:1114
float _23
Definition: d3d8types.h:1112
float _43
Definition: d3d8types.h:1114
float _22
Definition: d3d8types.h:1112
D3DSWAPEFFECT SwapEffect
Definition: d3d8types.h:1128
D3DFORMAT BackBufferFormat
Definition: d3d8types.h:1123
D3DFORMAT AutoDepthStencilFormat
Definition: d3d8types.h:1132
const char * Name
Definition: d3dx9shader.h:105
D3DXPARAMETER_CLASS Class
Definition: d3dx9shader.h:109
D3DXREGISTER_SET RegisterSet
Definition: d3dx9shader.h:106
D3DXPARAMETER_TYPE Type
Definition: d3dx9shader.h:110
const void * DefaultValue
Definition: d3dx9shader.h:116
Definition: image.c:229
Definition: http.c:7252
IDirect3DDevice9 * device
Definition: shader.c:309
IDirect3DSurface9 * backbuffer
Definition: shader.c:310
IDirect3D9 * d3d
Definition: shader.c:308
Definition: devices.h:37
Definition: parser.c:49
Definition: name.c:39
D3DXCONSTANT_DESC desc
Definition: shader.c:2196
const char * fullname
Definition: shader.c:2195
UINT in_count_min
Definition: shader.c:2187
UINT in_count_max
Definition: shader.c:2188
enum Type type
Definition: shader.c:2185
DWORD out[REGISTER_OUTPUT_SIZE]
Definition: shader.c:2190
D3DLOCKED_RECT locked_rect
Definition: shader.c:419
IDirect3DSurface9 * surface
Definition: shader.c:418
Definition: shader.c:383
float x
Definition: shader.c:384
float y
Definition: shader.c:384
float z
Definition: shader.c:384
float FLOAT
Definition: typedefs.h:69
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
Definition: icm.h:105
Definition: pdh_main.c:64
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define S_FALSE
Definition: winerror.h:3451
static int init
Definition: wintirpc.c:33