ReactOS 0.4.17-dev-966-gf06eace
asm.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2008 Stefan Dösinger
3 * Copyright (C) 2009 Matteo Bruni
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#define COBJMACROS
20#define CONST_VTABLE
21#include "wine/test.h"
22
23#include <d3dx9.h>
24
25#include "resources.h"
26
27static char temp_path[MAX_PATH];
28
29static BOOL create_file(const char *filename, const char *data, const unsigned int size, char *out_path)
30{
31 DWORD written;
32 HANDLE hfile;
33 char path[MAX_PATH];
34
35 if (!*temp_path)
37
41 if (hfile == INVALID_HANDLE_VALUE)
42 return FALSE;
43
44 if (WriteFile(hfile, data, size, &written, NULL))
45 {
46 CloseHandle(hfile);
47
48 if (out_path)
49 strcpy(out_path, path);
50 return TRUE;
51 }
52
53 CloseHandle(hfile);
54 return FALSE;
55}
56
57static void delete_file(const char *filename)
58{
59 char path[MAX_PATH];
60
64}
65
66static BOOL create_directory(const char *name)
67{
68 char path[MAX_PATH];
69
72 return CreateDirectoryA(path, NULL);
73}
74
75static void delete_directory(const char *name)
76{
77 char path[MAX_PATH];
78
82}
83
85{
86 ID3DXInclude ID3DXInclude_iface;
88};
89
90static inline struct test_include *impl_from_ID3DXInclude(ID3DXInclude *iface)
91{
93}
94
95static HRESULT WINAPI testD3DXInclude_open(ID3DXInclude *iface, D3DXINCLUDE_TYPE include_type,
96 const char *filename, const void *parent_data, const void **data, UINT *bytes)
97{
98 static const char shader[] =
99 "#include \"incl.vsh\"\n"
100 "mov REGISTER, v0\n";
101 static const char include[] = "#define REGISTER r0\nvs.1.1\n";
102 static const char include2[] = "#include \"incl3.vsh\"\n";
103 static const char include3[] = "vs.1.1\n";
105 unsigned int size;
106 char *buffer;
107
108 trace("filename %s.\n", filename);
109 trace("parent_data %p.\n", parent_data);
110
111 if (!strcmp(filename, "shader.vsh"))
112 {
113 size = test_include->terminated_data ? sizeof(shader) : sizeof(shader) - 1;
114 buffer = malloc(size);
116 *bytes = size;
117 }
118 else if (!strcmp(filename, "incl.vsh"))
119 {
120 size = test_include->terminated_data ? sizeof(include) : sizeof(include) - 1;
121 buffer = malloc(size);
123 *bytes = size;
124 /* This is included from the first D3DXAssembleShader with non-null ID3DXInclude test
125 * (parent_data == NULL) and from shader.vsh / shader[] (with matching parent_data).
126 * Allow both cases. */
127 ok(parent_data == NULL || !strncmp(shader, parent_data, strlen(shader)), "wrong parent_data value\n");
128 }
129 else if (!strcmp(filename, "incl2.vsh"))
130 {
131 size = test_include->terminated_data ? sizeof(include2) : sizeof(include2) - 1;
132 buffer = malloc(size);
133 memcpy(buffer, include2, size);
134 *bytes = size;
135 }
136 else if (!strcmp(filename, "incl3.vsh"))
137 {
138 size = test_include->terminated_data ? sizeof(include3) : sizeof(include3) - 1;
139 buffer = malloc(size);
140 memcpy(buffer, include3, size);
141 *bytes = size;
142 ok(parent_data != NULL && !strncmp(include2, parent_data, strlen(include2)), "wrong parent_data value.\n");
143 }
144 else if (!strcmp(filename, "include/incl3.vsh"))
145 {
146 size = test_include->terminated_data ? sizeof(include) : sizeof(include) - 1;
147 buffer = malloc(size);
149 *bytes = size;
150 ok(!parent_data, "wrong parent_data value.\n");
151 }
152 else
153 {
154 ok(0, "Unexpected #include for file %s.\n", filename);
155 return D3DERR_INVALIDCALL;
156 }
157 *data = buffer;
158 return S_OK;
159}
160
161static HRESULT WINAPI testD3DXInclude_close(ID3DXInclude *iface, const void *data)
162{
163 free((void *)data);
164 return S_OK;
165}
166
167static const struct ID3DXIncludeVtbl test_include_vtbl =
168{
171};
172
173static void assembleshader_test(void)
174{
175 static const char test1[] =
176 "vs.1.1\n"
177 "mov DEF2, v0\n";
178 static const char testincl[] =
179 "#define REGISTER r0\n"
180 "vs.1.1\n";
181 static const char testshader[] =
182 "#include \"incl.vsh\"\n"
183 "mov REGISTER, v0\n";
184 static const char testshader2[] =
185 "#include \"incl2.vsh\"\n"
186 "mov REGISTER, v0\n";
187 static const char testshader3[] =
188 "#include \"include/incl3.vsh\"\n"
189 "mov REGISTER, v0\n";
190 static const char testincl3[] =
191 "#include \"incl4.vsh\"\n";
192 static const char testincl4_ok[] =
193 "#define REGISTER r0\n"
194 "vs.1.1\n";
195 static const char testincl4_wrong[] =
196 "#error \"wrong include\"\n";
197 static const D3DXMACRO defines[] = {
198 {
199 "DEF1", "10 + 15"
200 },
201 {
202 "DEF2", "r0"
203 },
204 {
205 NULL, NULL
206 }
207 };
208 char shader_vsh_path[MAX_PATH], shader3_vsh_path[MAX_PATH];
210 struct test_include include;
211 unsigned int i;
212 HRESULT hr;
213
214 /* pDefines test */
215 shader = NULL;
216 messages = NULL;
219 &shader, &messages);
220 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
221 if(messages) {
222 trace("D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
224 }
226
227 /* NULL messages test */
228 shader = NULL;
231 &shader, NULL);
232 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
234
235 /* NULL shader test */
236 messages = NULL;
239 NULL, &messages);
240 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
241 if(messages) {
242 trace("D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
244 }
245
246 /* pInclude test */
247 for (i = 0; i < 2; ++i)
248 {
249 shader = NULL;
250 messages = NULL;
251 include.ID3DXInclude_iface.lpVtbl = &test_include_vtbl;
252 include.terminated_data = i;
253 winetest_push_context(i ? "terminated include data" : "nonterminated include data");
254 hr = D3DXAssembleShader(testshader, strlen(testshader), NULL, &include.ID3DXInclude_iface,
256 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
257 if (messages)
258 {
259 trace("D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
261 }
262 if (shader)
264
265 /* "unexpected #include file from memory" test */
266 shader = NULL;
267 messages = NULL;
268 hr = D3DXAssembleShader(testshader, strlen(testshader), NULL, NULL, D3DXSHADER_SKIPVALIDATION,
269 &shader, &messages);
270 ok(hr == D3DXERR_INVALIDDATA, "Unexpected hr %#lx.\n", hr);
271 if (messages)
272 {
273 trace("D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
275 }
276 if (shader)
278
279 /* recursive #include test */
280 shader = NULL;
281 messages = NULL;
282 hr = D3DXAssembleShader(testshader2, strlen(testshader2), NULL, &include.ID3DXInclude_iface,
284 todo_wine_if(i) ok(hr == (i ? D3D_OK : D3DXERR_INVALIDDATA), "Unexpected hr %#lx.\n", hr);
285 if (messages)
286 {
287 trace("Recursive D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
289 }
290 if (shader)
292
293 /* #include with a path. */
294 shader = NULL;
295 messages = NULL;
296 hr = D3DXAssembleShader(testshader3, strlen(testshader3), NULL, &include.ID3DXInclude_iface,
298 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
299 if (messages)
300 {
301 trace("Path search D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
303 }
304 if (shader)
307 }
308
309 if (create_file("shader.vsh", testshader, sizeof(testshader) - 1, shader_vsh_path))
310 {
311 create_file("incl.vsh", testincl, sizeof(testincl) - 1, NULL);
312
313 /* D3DXAssembleShaderFromFile + #include test */
314 shader = NULL;
315 messages = NULL;
316 hr = D3DXAssembleShaderFromFileA(shader_vsh_path,
318 &shader, &messages);
319 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
320 if(messages) {
321 trace("D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
323 }
325
326 /* D3DXAssembleShaderFromFile + pInclude test */
327 shader = NULL;
328 messages = NULL;
329 hr = D3DXAssembleShaderFromFileA("shader.vsh", NULL, &include.ID3DXInclude_iface,
331 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
332 if(messages) {
333 trace("D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
335 }
337
338 create_file("shader3.vsh", testshader3, sizeof(testshader3) - 1, shader3_vsh_path);
339 create_file("incl4.vsh", testincl4_wrong, sizeof(testincl4_wrong) - 1, NULL);
340 if (create_directory("include"))
341 {
342 create_file("include\\incl3.vsh", testincl3, sizeof(testincl3) - 1, NULL);
343 create_file("include\\incl4.vsh", testincl4_ok, sizeof(testincl4_ok) - 1, NULL);
344
345 /* path search #include test */
346 shader = NULL;
347 messages = NULL;
348 hr = D3DXAssembleShaderFromFileA(shader3_vsh_path, NULL, NULL,
350 &shader, &messages);
351 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
352 if(messages) {
353 trace("D3DXAssembleShaderFromFile path search messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
355 }
357 } else skip("Couldn't create \"include\" directory\n");
358
359 delete_file("shader.vsh");
360 delete_file("incl.vsh");
361 delete_file("shader3.vsh");
362 delete_file("incl4.vsh");
363 delete_file("include\\incl3.vsh");
364 delete_file("include\\incl4.vsh");
365 delete_directory("include");
366
367 /* The main shader is also to be loaded through the ID3DXInclude object. */
368 shader = NULL;
369 messages = NULL;
370 hr = D3DXAssembleShaderFromFileA("shader.vsh", NULL, &include.ID3DXInclude_iface,
372 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
373 if (messages)
374 {
375 trace("D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
377 }
378 if (shader)
380
381 shader = NULL;
382 messages = NULL;
383 hr = D3DXAssembleShaderFromFileW(L"shader.vsh", NULL, &include.ID3DXInclude_iface,
385 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
386 if (messages)
387 {
388 trace("D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
390 }
391 if (shader)
393 } else skip("Couldn't create \"shader.vsh\"\n");
394
395 /* NULL shader tests */
396 shader = NULL;
397 messages = NULL;
400 &shader, &messages);
401 ok(hr == D3DXERR_INVALIDDATA, "Unexpected hr %#lx.\n", hr);
402 if(messages) {
403 trace("D3DXAssembleShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
405 }
407
408 shader = NULL;
409 messages = NULL;
410 hr = D3DXAssembleShaderFromFileA("nonexistent.vsh",
412 &shader, &messages);
413 ok(hr == D3DXERR_INVALIDDATA || hr == E_FAIL, /* I get this on WinXP */
414 "Unexpected hr %#lx.\n", hr);
415 if(messages) {
416 trace("D3DXAssembleShaderFromFile messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
418 }
420
421 /* D3DXAssembleShaderFromResource test */
422 shader = NULL;
423 messages = NULL;
426 &shader, &messages);
427 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
428 if(messages) {
429 trace("D3DXAssembleShaderFromResource messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
431 }
433
434 /* D3DXAssembleShaderFromResource with missing shader resource test */
435 shader = NULL;
436 messages = NULL;
437 hr = D3DXAssembleShaderFromResourceA(NULL, "notexisting",
439 &shader, &messages);
440 ok(hr == D3DXERR_INVALIDDATA, "Unexpected hr %#lx.\n", hr);
441 if(messages) {
442 trace("D3DXAssembleShaderFromResource messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
444 }
446}
447
448static void d3dxpreprocess_test(void)
449{
450 static const char testincl[] =
451 "#define REGISTER r0\n"
452 "vs.1.1\n";
453 static const char testshader[] =
454 "#include \"incl.vsh\"\n"
455 "mov REGISTER, v0\n";
456 static const char testshader3[] =
457 "#include \"include/incl3.vsh\"\n"
458 "mov REGISTER, v0\n";
459 static const char testincl3[] =
460 "#include \"incl4.vsh\"\n";
461 static const char testincl4_ok[] =
462 "#define REGISTER r0\n"
463 "vs.1.1\n";
464 static const char testincl4_wrong[] =
465 "#error \"wrong include\"\n";
466 HRESULT hr;
468 char shader_vsh_path[MAX_PATH], shader3_vsh_path[MAX_PATH];
469 static struct test_include include = {{&test_include_vtbl}, TRUE};
470
471 if (create_file("shader.vsh", testshader, sizeof(testshader) - 1, shader_vsh_path))
472 {
473 create_file("incl.vsh", testincl, sizeof(testincl) - 1, NULL);
474 create_file("shader3.vsh", testshader3, sizeof(testshader3) - 1, shader3_vsh_path);
475 create_file("incl4.vsh", testincl4_wrong, sizeof(testincl4_wrong) - 1, NULL);
476 if (create_directory("include"))
477 {
478 create_file("include\\incl3.vsh", testincl3, sizeof(testincl3) - 1, NULL);
479 create_file("include\\incl4.vsh", testincl4_ok, sizeof(testincl4_ok) - 1, NULL);
480
481 /* path search #include test */
482 shader = NULL;
483 messages = NULL;
484 hr = D3DXPreprocessShaderFromFileA(shader3_vsh_path, NULL, NULL,
485 &shader, &messages);
486 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
487 if(messages) {
488 trace("D3DXPreprocessShaderFromFile path search messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
490 }
492 } else skip("Couldn't create \"include\" directory\n");
493
494 /* D3DXPreprocessShaderFromFile + #include test */
495 shader = NULL;
496 messages = NULL;
497 hr = D3DXPreprocessShaderFromFileA(shader_vsh_path,
498 NULL, NULL,
499 &shader, &messages);
500 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
501 if(messages) {
502 trace("D3DXPreprocessShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
504 }
506
507 /* D3DXPreprocessShaderFromFile + pInclude test */
508 shader = NULL;
509 messages = NULL;
510 hr = D3DXPreprocessShaderFromFileA("shader.vsh", NULL, &include.ID3DXInclude_iface,
511 &shader, &messages);
512 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
513 if(messages) {
514 trace("D3DXPreprocessShader messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
516 }
518
519 delete_file("shader.vsh");
520 delete_file("incl.vsh");
521 delete_file("shader3.vsh");
522 delete_file("incl4.vsh");
523 delete_file("include\\incl3.vsh");
524 delete_file("include\\incl4.vsh");
525 delete_directory("include");
526
527 /* The main shader is also to be loaded through the ID3DXInclude object. */
528 shader = NULL;
529 messages = NULL;
530 hr = D3DXPreprocessShaderFromFileA("shader.vsh", NULL, &include.ID3DXInclude_iface,
531 &shader, &messages);
532 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
533 if (messages)
534 {
535 trace("D3DXPreprocessShaderFromFile messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
537 }
538 if (shader)
540
541 shader = NULL;
542 messages = NULL;
543 hr = D3DXPreprocessShaderFromFileW(L"shader.vsh", NULL, &include.ID3DXInclude_iface,
544 &shader, &messages);
545 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
546 if (messages)
547 {
548 trace("D3DXPreprocessShaderFromFile messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
550 }
551 if (shader)
553 } else skip("Couldn't create \"shader.vsh\"\n");
554
555 /* NULL shader tests */
556 shader = NULL;
557 messages = NULL;
558 hr = D3DXPreprocessShaderFromFileA("nonexistent.vsh",
559 NULL, NULL,
560 &shader, &messages);
561 ok(hr == D3DXERR_INVALIDDATA || hr == E_FAIL, /* I get this on WinXP */
562 "Unexpected hr %#lx.\n", hr);
563 if(messages) {
564 trace("D3DXPreprocessShaderFromFile messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
566 }
568
569 /* D3DXPreprocessShaderFromResource test */
570 shader = NULL;
571 messages = NULL;
573 NULL, NULL,
574 &shader, &messages);
575 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
576 if(messages) {
577 trace("D3DXPreprocessShaderFromResource messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
579 }
581
582 /* D3DXPreprocessShaderFromResource with missing shader resource test */
583 shader = NULL;
584 messages = NULL;
586 NULL, NULL,
587 &shader, &messages);
588 ok(hr == D3DXERR_INVALIDDATA, "Unexpected hr %#lx.\n", hr);
589 if(messages) {
590 trace("D3DXPreprocessShaderFromResource messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
592 }
594}
595
597{
599
601}
static unsigned char bytes[4]
Definition: adnsresfilter.c:74
#define trace
Definition: atltest.h:70
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define START_TEST(x)
Definition: atltest.h:75
#define D3DERR_INVALIDCALL
Definition: d3d10_private.h:42
#define D3D_OK
Definition: d3d.h:106
static SIZE_T const char const D3D_SHADER_MACRO ID3DInclude * include
Definition: asm.c:31
#define D3DXERR_INVALIDDATA
Definition: asm.c:28
static void assembleshader_test(void)
Definition: asm.c:1524
static SIZE_T const char const D3D_SHADER_MACRO * defines
Definition: asm.c:31
static SIZE_T const char const D3D_SHADER_MACRO ID3DInclude UINT ID3DBlob ** shader
Definition: asm.c:32
struct ID3DXBuffer ID3DXBuffer
Definition: d3dx8core.h:51
static void d3dxpreprocess_test(void)
Definition: asm.c:448
static BOOL create_directory(const char *name)
Definition: asm.c:66
static const struct ID3DXIncludeVtbl test_include_vtbl
Definition: asm.c:167
static char temp_path[MAX_PATH]
Definition: asm.c:27
static void delete_directory(const char *name)
Definition: asm.c:75
static struct test_include * impl_from_ID3DXInclude(ID3DXInclude *iface)
Definition: asm.c:90
static HRESULT WINAPI testD3DXInclude_close(ID3DXInclude *iface, const void *data)
Definition: asm.c:161
static HRESULT WINAPI testD3DXInclude_open(ID3DXInclude *iface, D3DXINCLUDE_TYPE include_type, const char *filename, const void *parent_data, const void **data, UINT *bytes)
Definition: asm.c:95
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HRESULT WINAPI D3DXAssembleShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:357
HRESULT WINAPI D3DXPreprocessShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines, ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:666
HRESULT WINAPI D3DXPreprocessShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines, ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:622
HRESULT WINAPI D3DXPreprocessShaderFromFileA(const char *filename, const D3DXMACRO *defines, ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:599
HRESULT WINAPI D3DXAssembleShader(const char *data, UINT data_len, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:207
HRESULT WINAPI D3DXAssembleShaderFromFileA(const char *filename, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:334
HRESULT WINAPI D3DXAssembleShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
Definition: shader.c:398
#define CloseHandle
Definition: compat.h:739
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:740
#define MAX_PATH
Definition: compat.h:34
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
Definition: delete.c:24
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
Definition: dir.c:682
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:37
BOOL WINAPI WriteFile(_In_ HANDLE hFile, _In_reads_bytes_opt_(nNumberOfBytesToWrite) LPCVOID lpBuffer, _In_ DWORD nNumberOfBytesToWrite, _Out_opt_ LPDWORD lpNumberOfBytesWritten, _Inout_opt_ LPOVERLAPPED lpOverlapped)
Definition: rw.c:25
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
Definition: path.c:2072
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1597
_ACRTIMP int __cdecl strcmp(const char *, const char *)
Definition: string.c:3324
_ACRTIMP int __cdecl strncmp(const char *, const char *, size_t)
Definition: string.c:3335
#define L(x)
Definition: resources.c:13
#define ID3DXBuffer_GetBufferPointer(p)
Definition: d3dx9core.h:85
#define ID3DXBuffer_Release(p)
Definition: d3dx9core.h:83
#define D3DXSHADER_SKIPVALIDATION
Definition: d3dx9shader.h:26
enum _D3DXINCLUDE_TYPE D3DXINCLUDE_TYPE
void test1()
Definition: ehthrow.cxx:277
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
GLuint shader
Definition: glext.h:6030
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
unsigned int UINT
Definition: sysinfo.c:13
#define S_OK
Definition: intsafe.h:52
const char * filename
Definition: ioapi.h:137
#define todo_wine_if(is_todo)
Definition: minitest.h:81
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
Definition: test.h:539
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define CREATE_ALWAYS
Definition: disk.h:72
#define IDB_ASMSHADER
Definition: resources.h:26
#define create_file(name, size)
Definition: asmcache.c:811
#define GENERIC_WRITE
Definition: nt_native.h:90
#define MAKEINTRESOURCEA(i)
Definition: winuser.h:581
#define delete_file(f)
Definition: reg_test.h:97
strcat
Definition: string.h:92
strcpy
Definition: string.h:131
Definition: name.c:39
BOOL terminated_data
Definition: asm.c:87
ID3DXInclude ID3DXInclude_iface
Definition: asm.c:86
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
#define WINAPI
Definition: msvc.h:6