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";
198 {
199 "DEF1", "10 + 15"
200 },
201 {
202 "DEF2", "r0"
203 },
204 {
206 }
207 };
213
214
224 }
226
227
234
235
244 }
245
246
247 for (
i = 0;
i < 2; ++
i)
248 {
258 {
261 }
264
265
272 {
275 }
278
279
286 {
289 }
292
293
300 {
303 }
307 }
308
309 if (
create_file(
"shader.vsh", testshader,
sizeof(testshader) - 1, shader_vsh_path))
310 {
312
313
323 }
325
326
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);
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
355 }
357 }
else skip(
"Couldn't create \"include\" directory\n");
358
366
367
374 {
377 }
380
387 {
390 }
393 }
else skip(
"Couldn't create \"shader.vsh\"\n");
394
395
405 }
407
414 "Unexpected hr %#lx.\n",
hr);
418 }
420
421
431 }
433
434
444 }
446}
static SIZE_T const char const D3D_SHADER_MACRO ID3DInclude * include
#define D3DXERR_INVALIDDATA
static SIZE_T const char const D3D_SHADER_MACRO * defines
static SIZE_T const char const D3D_SHADER_MACRO ID3DInclude UINT ID3DBlob ** shader
struct ID3DXBuffer ID3DXBuffer
static BOOL create_directory(const char *name)
static const struct ID3DXIncludeVtbl test_include_vtbl
static void delete_directory(const char *name)
HRESULT WINAPI D3DXAssembleShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
HRESULT WINAPI D3DXAssembleShader(const char *data, UINT data_len, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
HRESULT WINAPI D3DXAssembleShaderFromFileA(const char *filename, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
HRESULT WINAPI D3DXAssembleShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages)
_ACRTIMP size_t __cdecl strlen(const char *)
#define ID3DXBuffer_GetBufferPointer(p)
#define ID3DXBuffer_Release(p)
#define D3DXSHADER_SKIPVALIDATION
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
#define todo_wine_if(is_todo)
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
#define create_file(name, size)
#define MAKEINTRESOURCEA(i)