32 0x44,0x44,0x53,0x20,0x7c,0x00,0x00,0x00,0x07,0x10,0x08,0x00,0x02,0x00,0x00,0x00,
33 0x02,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
34 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
35 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
36 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
37 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,
38 0xe0,0x03,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,
39 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
40 0xff,0x7f,0xff,0x7f,0xff,0x7f,0xff,0x7f
45 0x44,0x44,0x53,0x20,0x7c,0x00,0x00,0x00,0x07,0x10,0x0a,0x00,0x02,0x00,0x00,0x00,
46 0x02,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
47 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
48 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
49 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
50 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0xff,0x00,
51 0x00,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0x40,0x00,
52 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
53 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
58 0x44,0x44,0x53,0x20,0x7c,0x00,0x00,0x00,0x07,0x10,0x08,0x00,0x04,0x00,0x00,0x00,
59 0x04,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
60 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
61 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
62 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
63 0x04,0x00,0x00,0x00,0x44,0x58,0x54,0x35,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
64 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0x00,0x00,
65 0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
66 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xef,0x87,0x0f,0x78,0x05,0x05,0x50,0x50,
67 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xef,0x87,0x0f,0x78,0x05,0x05,0x50,0x51,
68 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xef,0x87,0x0f,0x78,0x05,0x05,0x50,0x52,
69 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xef,0x87,0x0f,0x78,0x05,0x05,0x50,0x53,
70 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xef,0x87,0x0f,0x78,0x05,0x05,0x50,0x54,
71 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xef,0x87,0x0f,0x78,0x05,0x05,0x50,0x55
76 0x44,0x44,0x53,0x20,0x7c,0x00,0x00,0x00,0x07,0x10,0x8a,0x00,0x04,0x00,0x00,0x00,
77 0x04,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
78 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
79 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
80 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
81 0x04,0x00,0x00,0x00,0x44,0x58,0x54,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
82 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0x40,0x00,
83 0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
84 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x87,0x0f,0x78,0x05,0x05,0x50,0x50,
85 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x87,0x0f,0x78,0x05,0x05,0x50,0x50,
86 0xff,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x2f,0x7e,0xcf,0x79,0x01,0x54,0x5c,0x5c,
87 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x84,0xef,0x7b,0xaa,0xab,0xab,0xab
92 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49,
93 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00,
94 0x00, 0x00, 0x00, 0x3a, 0x7e, 0x9b, 0x55, 0x00, 0x00, 0x00, 0x0a, 0x49, 0x44,
95 0x41, 0x54, 0x08, 0xd7, 0x63, 0xf8, 0x0f, 0x00, 0x01, 0x01, 0x01, 0x00, 0x1b,
96 0xb6, 0xee, 0x56, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42,
100 #define ADMITTED_ERROR 0.0001f 107 #define expect_vec4(expected, got) expect_vec4_(__LINE__, expected, got) 114 "Expected (%f, %f, %f, %f), got (%f, %f, %f, %f)\n",
116 got->
x, got->
y, got->
z, got->
w);
121 if (
abs((c1 & 0xff) - (c2 & 0xff)) > max_diff)
124 if (
abs((c1 & 0xff) - (c2 & 0xff)) > max_diff)
127 if (
abs((c1 & 0xff) - (c2 & 0xff)) > max_diff)
130 if (
abs((c1 & 0xff) - (c2 & 0xff)) > max_diff)
172 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
175 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
183 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
184 ok(
width == 256,
"Returned width %d, expected %d\n",
width, 256);
185 ok(
height == 256,
"Returned height %d, expected %d\n",
height, 256);
189 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
190 ok(
width == 256,
"Returned width %d, expected %d\n",
width, 256);
193 skip(
"Hardware only supports pow2 textures\n");
198 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
199 ok(
width == 62,
"Returned width %d, expected %d\n",
width, 62);
203 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
205 ok(
height == 63,
"Returned height %d, expected %d\n",
height, 63);
210 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
211 ok(
width == 1,
"Returned width %d, expected %d\n",
width, 1);
216 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
217 ok(
width == 1,
"Returned width %d, expected %d\n",
width, 1);
222 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
223 ok(
width == 1,
"Returned width %d, expected %d\n",
width, 1);
227 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
232 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
242 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
243 ok(mipmaps == 7,
"Returned mipmaps %d, expected %d\n", mipmaps, 7);
250 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
251 ok(mipmaps == 9,
"Returned mipmaps %d, expected %d\n", mipmaps, 9);
256 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
257 ok(mipmaps == 6,
"Returned mipmaps %d, expected %d\n", mipmaps, 6);
260 skip(
"Skipping some tests, npot2 textures unsupported\n");
264 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
265 ok(mipmaps == 9,
"Returned mipmaps %d, expected %d\n", mipmaps, 9);
269 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
270 ok(mipmaps == 9,
"Returned mipmaps %d, expected %d\n", mipmaps, 9);
277 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
278 ok(mipmaps == 0,
"Returned mipmaps %d, expected %d\n", mipmaps, 0);
281 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
282 ok(mipmaps == 1,
"Returned mipmaps %d, expected %d\n", mipmaps, 1);
285 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
286 ok(mipmaps == 0,
"Returned mipmaps %d, expected %d\n", mipmaps, 0);
289 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
290 ok(mipmaps == 0,
"Returned mipmaps %d, expected %d\n", mipmaps, 0);
293 skip(
"No D3DUSAGE_AUTOGENMIPMAP support for textures\n");
309 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
313 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
318 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
323 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
344 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
355 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
366 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
377 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
388 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
398 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
399 ok(
width == 4,
"Returned width %d, expected %d\n",
width, 4);
401 ok(mipmaps == 1,
"Returned mipmaps %d, expected %d\n", mipmaps, 1);
408 ok(
hr ==
D3D_OK,
"D3DXCheckTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
409 ok(
width == 8,
"Returned width %d, expected %d\n",
width, 8);
411 ok(mipmaps == 1,
"Returned mipmaps %d, expected %d\n", mipmaps, 1);
416 skip(
"D3DFMT_DXT5 textures are not supported, skipping a test.\n");
433 skip(
"No cube textures support\n");
439 ok(
hr ==
D3D_OK,
"D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
442 ok(
hr ==
D3D_OK,
"D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
450 ok(
hr ==
D3D_OK,
"D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
451 ok(
size == 256,
"Returned size %d, expected %d\n",
size, 256);
457 ok(
hr ==
D3D_OK,
"D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
458 ok(mipmaps == 7,
"Returned mipmaps %d, expected %d\n", mipmaps, 7);
465 ok(
hr ==
D3D_OK,
"D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
473 ok(
hr ==
D3D_OK,
"D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
478 ok(
hr ==
D3D_OK,
"D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
479 ok(mipmaps == 9,
"Returned mipmaps %d, expected %d\n", mipmaps, 9);
485 ok(
hr ==
D3D_OK,
"D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
486 ok(mipmaps == 0,
"Returned mipmaps %d, expected %d\n", mipmaps, 0);
489 skip(
"No D3DUSAGE_AUTOGENMIPMAP support for cube textures\n");
505 ok(
hr ==
D3D_OK,
"D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
509 ok(
hr ==
D3D_OK,
"D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
514 ok(
hr ==
D3D_OK,
"D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
519 ok(
hr ==
D3D_OK,
"D3DXCheckCubeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
534 skip(
"Limited or no volume textures support.\n");
540 ok(
hr ==
D3D_OK,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
543 ok(
hr ==
D3D_OK,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
551 ok(
hr ==
D3D_OK,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
552 ok(
width == 256,
"Returned width %d, expected %d\n",
width, 256);
553 ok(
height == 256,
"Returned height %d, expected %d\n",
height, 256);
554 ok(
depth == 1,
"Returned depth %d, expected %d\n",
depth, 1);
558 ok(
hr ==
D3D_OK,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
559 ok(
width == 256,
"Returned width %d, expected %d\n",
width, 256);
563 ok(
hr ==
D3D_OK,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
564 ok(
width == 1,
"Returned width %d, expected %d\n",
width, 1);
566 ok(
depth == 1,
"Returned height %d, expected %d\n",
depth, 1);
570 ok(
hr ==
D3D_OK,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
571 ok(
width == 1,
"Returned width %d, expected %d\n",
width, 1);
573 ok(
depth == 1,
"Returned height %d, expected %d\n",
depth, 1);
577 ok(
hr ==
D3D_OK,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
578 ok(
width == 1,
"Returned width %d, expected %d\n",
width, 1);
582 ok(
hr ==
D3D_OK,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
587 ok(
hr ==
D3D_OK,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
591 ok(
hr ==
D3D_OK,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
596 ok(
hr ==
D3D_OK,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
601 ok(
hr ==
D3D_OK,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
606 ok(
hr ==
D3D_OK,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
615 skip(
"No volume textures mipmapping support\n");
622 ok(
hr ==
D3D_OK,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
623 ok(mipmaps == 7,
"Returned mipmaps %d, expected %d\n", mipmaps, 7);
631 ok(
hr ==
D3D_OK,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
636 ok(
hr ==
D3D_OK,
"D3DXCheckVolumeTextureRequirements returned %#x, expected %#x\n",
hr,
D3D_OK);
637 ok(mipmaps == 9,
"Returned mipmaps %d, expected %d\n", mipmaps, 9);
641 "D3DUSAGE_AUTOGENMIPMAP is unexpectedly supported on volume textures.\n");
668 ok(
desc.Width == 256,
"Returned width %d, expected %d\n",
desc.Width, 256);
669 ok(
desc.Height == 256,
"Returned height %d, expected %d\n",
desc.Height, 256);
684 ok(
desc.Width == 1,
"Returned width %d, expected %d\n",
desc.Width, 1);
685 ok(
desc.Height == 1,
"Returned height %d, expected %d\n",
desc.Height, 1);
692 skip(
"Hardware only supports pow2 textures\n");
699 "D3DXCreateTexture returned %#x, expected %#x\n",
hr,
D3D_OK);
712 "Returned width %d, expected %d\n",
desc.Width, 63);
716 "Returned height %d, expected %d\n",
desc.Height, 63);
730 ok(mipmaps == 7,
"Returned mipmaps %d, expected %d\n", mipmaps, 7);
742 ok(mipmaps == 9,
"Returned mipmaps %d, expected %d\n", mipmaps, 9);
754 ok(mipmaps == 1,
"Returned mipmaps %d, expected %d\n", mipmaps, 1);
766 ok(mipmaps == 1,
"Returned mipmaps %d, expected %d\n", mipmaps, 1);
813 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromResource returned %#x, expected %#x\n",
hr,
D3D_OK);
817 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromResource returned %#x, expected %#x\n",
hr,
D3D_OK);
834 hr =
D3DXCreateTextureFromResourceExA(
device,
NULL,
MAKEINTRESOURCEA(
IDD_BITMAPDATA_1x1),
D3DX_DEFAULT,
D3DX_DEFAULT,
D3DX_DEFAULT, 0,
D3DFMT_UNKNOWN,
D3DPOOL_MANAGED,
D3DX_DEFAULT,
D3DX_DEFAULT, 0,
NULL,
NULL, &
texture);
835 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromResourceEx returned %#x, expected %#x\n",
hr,
D3D_OK);
838 hr =
D3DXCreateTextureFromResourceExA(
device,
NULL,
MAKEINTRESOURCEA(
IDS_STRING),
D3DX_DEFAULT,
D3DX_DEFAULT,
D3DX_DEFAULT, 0,
D3DFMT_UNKNOWN,
D3DPOOL_MANAGED,
D3DX_DEFAULT,
D3DX_DEFAULT, 0,
NULL,
NULL, &
texture);
841 hr =
D3DXCreateTextureFromResourceExA(
NULL,
NULL,
MAKEINTRESOURCEA(
IDD_BITMAPDATA_1x1),
D3DX_DEFAULT,
D3DX_DEFAULT,
D3DX_DEFAULT, 0,
D3DFMT_UNKNOWN,
D3DPOOL_MANAGED,
D3DX_DEFAULT,
D3DX_DEFAULT, 0,
NULL,
NULL, &
texture);
844 hr =
D3DXCreateTextureFromResourceExA(
device,
NULL,
NULL,
D3DX_DEFAULT,
D3DX_DEFAULT,
D3DX_DEFAULT, 0,
D3DFMT_UNKNOWN,
D3DPOOL_MANAGED,
D3DX_DEFAULT,
D3DX_DEFAULT, 0,
NULL,
NULL, &
texture);
847 hr =
D3DXCreateTextureFromResourceExA(
device,
NULL,
MAKEINTRESOURCEA(
IDD_BITMAPDATA_1x1),
D3DX_DEFAULT,
D3DX_DEFAULT,
D3DX_DEFAULT, 0,
D3DFMT_UNKNOWN,
D3DPOOL_MANAGED,
D3DX_DEFAULT,
D3DX_DEFAULT, 0,
NULL,
NULL,
NULL);
853 IDirect3DTexture9 *tex;
854 IDirect3DCubeTexture9 *cubetex;
855 IDirect3DVolumeTexture9 *voltex;
877 skip(
"Failed to create texture\n");
892 skip(
"Failed to create texture\n");
903 skip(
"Failed to create texture\n");
913 skip(
"Failed to create texture\n");
923 skip(
"Failed to create texture\n");
941 skip(
"Failed to create texture\n");
967 skip(
"Failed to create volume texture\n");
972 skip(
"No D3DUSAGE_AUTOGENMIPMAP supported for textures\n");
984 skip(
"Failed to create texture\n");
994 skip(
"Failed to create texture\n");
1001 for (
i = 0;
i < 4;
i++)
1004 if (diff > 1)
return FALSE;
1025 test_access_types[] =
1032 IDirect3DTexture9 *tex;
1050 for (
m = 0;
m < 3;
m++)
1052 IDirect3DSurface9 *src_surface, *temp_surface;
1056 temp_surface = src_surface;
1075 v[0] = (
value >> 24) & 0xff;
1076 v[1] = (
value >> 16) & 0xff;
1077 v[2] = (
value >> 8) & 0xff;
1081 e[1] = (
x + 0.5f) /
size * 255.0
f + 0.5
f;
1082 e[2] = (
y + 0.5f) /
size * 255.0
f + 0.5
f;
1083 e[3] = 255.0f /
size + 0.5f;
1087 "Texel at (%u, %u) doesn't match: %#x, expected %#x, i %u, m %u.\n",
1092 if (temp_surface != src_surface)
1127 ok(
hr ==
D3D_OK,
"Couldn't lock the texture, error %#x\n",
hr);
1131 for (
y = 0;
y < 4;
y++)
1133 for (
x = 0;
x < 4;
x++)
1137 v[1] =
value >> 10 & 0x1f;
1138 v[2] =
value >> 5 & 0x1f;
1142 e[1] = (
x + 0.5f) / 4.0
f * 31.0
f + 0.5
f;
1143 e[2] = (
y + 0.5f) / 4.0
f * 31.0
f + 0.5
f;
1148 "Texel at (%u, %u) doesn't match: %#x, expected %#x\n",
1158 skip(
"Failed to create texture\n");
1173 for (
y = 0;
y < 4;
y++)
1195 skip(
"Failed to lock texture\n");
1200 skip(
"Failed to create D3DFMT_A16B16G16R16F texture\n");
1214 for (
y = 0;
y < 4;
y++)
1216 float *
ptr = (
float *)lock_rect.
pBits +
y * pitch;
1238 skip(
"Failed to lock texture\n");
1243 skip(
"Failed to create D3DFMT_A32B32G32R32F texture\n");
1257 skip(
"Failed to create D3DFMT_DXT1 texture\n");
1263 value->x = (texcoord->
x + 1.0f) / 2.0
f;
1264 value->y = (texcoord->
y + 1.0f) / 2.0
f;
1265 value->z = (texcoord->
z + 1.0f) / 2.0
f;
1286 return size -
x - 0.5f;
1290 return size -
y - 0.5f;
1296 trace(
"Unexpected coordinate value\n");
1303 IDirect3DCubeTexture9 *tex;
1328 for (
m = 0;
m < 3;
m++)
1330 for (
f = 0;
f < 6;
f++)
1333 ok(
hr ==
D3D_OK,
"Couldn't lock the texture, error %#x\n",
hr);
1342 v[0] = (
value >> 24) & 0xff;
1343 v[1] = (
value >> 16) & 0xff;
1344 v[2] = (
value >> 8) & 0xff;
1347 e[0] = (
f == 0) || (
f == 1) ?
1355 "Texel at face %u (%u, %u) doesn't match: %#x, expected %#x\n",
1368 skip(
"Failed to create texture\n");
1377 for (
f = 0;
f < 6;
f++)
1380 ok(
hr ==
D3D_OK,
"Couldn't lock the texture, error %#x\n",
hr);
1384 for (
y = 0;
y < 4;
y++)
1386 for (
x = 0;
x < 4;
x++)
1390 v[1] =
value >> 10 & 0x1f;
1391 v[2] =
value >> 5 & 0x1f;
1394 e[0] = (
f == 0) || (
f == 1) ?
1402 "Texel at face %u (%u, %u) doesn't match: %#x, expected %#x\n",
1413 skip(
"Failed to create texture\n");
1427 IDirect3DVolumeTexture9 *tex;
1449 for (
m = 0;
m < 3;
m++)
1452 ok(
hr ==
D3D_OK,
"Couldn't lock the texture, error %#x\n",
hr);
1464 v[0] = (
value >> 24) & 0xff;
1465 v[1] = (
value >> 16) & 0xff;
1466 v[2] = (
value >> 8) & 0xff;
1469 e[0] = 255.0f /
size + 0.5f;
1470 e[1] = (
x + 0.5f) /
size * 255.0
f + 0.5
f;
1471 e[2] = (
y + 0.5f) /
size * 255.0
f + 0.5
f;
1472 e[3] = (
z + 0.5f) /
size * 255.0
f + 0.5
f;
1476 "Texel at (%u, %u, %u) doesn't match: %#x, expected %#x\n",
1489 skip(
"Failed to create texture\n");
1499 ok(
hr ==
D3D_OK,
"Couldn't lock the texture, error %#x\n",
hr);
1504 for (
z = 0;
z < 4;
z++)
1506 for (
y = 0;
y < 4;
y++)
1508 for (
x = 0;
x < 4;
x++)
1512 v[1] =
value >> 10 & 0x1f;
1513 v[2] =
value >> 5 & 0x1f;
1517 e[1] = (
x + 0.5f) / 4 * 31.0
f + 0.5
f;
1518 e[2] = (
y + 0.5f) / 4 * 31.0
f + 0.5
f;
1519 e[3] = (
z + 0.5f) / 4 * 31.0
f + 0.5
f;
1523 "Texel at (%u, %u, %u) doesn't match: %#x, expected %#x\n",
1534 skip(
"Failed to create texture\n");
1548 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
1552 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
1561 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemory returned %#x, expected %#x.\n",
hr,
D3D_OK);
1567 ok(
hr ==
D3D_OK,
"IDirect3DTexture9_GetLevelDesc returned %#x, expected %#x\n",
hr,
D3D_OK);
1568 ok(
desc.Width == 4,
"Width is %u, expected 4\n",
desc.Width);
1569 ok(
desc.Height == 4,
"Height is %u, expected 4\n",
desc.Height);
1571 ok(
hr ==
D3D_OK,
"IDirect3DTexture9_LockRect returned %#x, expected %#x\n",
hr,
D3D_OK);
1574 for (
i = 0;
i < 16;
i++)
1576 "Byte at index %u is 0x%02x, expected 0x%02x.\n",
1587 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemory returned %#x, expected %#x.\n",
hr,
D3D_OK);
1593 todo_wine ok(level_count == 3,
"Texture has %u mip levels, 3 expected.\n", level_count);
1595 ok(
hr ==
D3D_OK,
"IDirect3DTexture9_GetLevelDesc returned %#x, expected %#x.\n",
hr,
D3D_OK);
1596 ok(
desc.Width == 4,
"Width is %u, expected 4.\n",
desc.Width);
1597 ok(
desc.Height == 4,
"Height is %u, expected 4.\n",
desc.Height);
1600 ok(
hr ==
D3D_OK,
"IDirect3DTexture9_LockRect returned %#x, expected %#x.\n",
hr,
D3D_OK);
1603 for (
i = 0;
i < 16; ++
i)
1605 "Byte at index %u is 0x%02x, expected 0x%02x.\n",
1619 unsigned int miplevels;
1620 IDirect3DSurface9 *surface;
1625 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x\n",
hr,
D3D_OK);
1630 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x\n",
hr,
D3D_OK);
1636 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x\n",
hr,
D3D_OK);
1638 ok(miplevels == 1,
"Got miplevels %u, expected %u.\n", miplevels, 1);
1642 "Surface dimensions are %ux%u, expected 1x1.\n",
desc.Width,
desc.Height);
1648 skip(
"No D3DUSAGE_AUTOGENMIPMAP support for textures\n");
1654 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x\n",
hr,
D3D_OK);
1661 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n",
hr,
D3D_OK);
1670 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n",
hr,
D3D_OK);
1679 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n",
hr,
D3D_OK);
1689 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n",
hr,
D3D_OK);
1698 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n",
hr,
D3D_OK);
1707 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n",
hr,
D3D_OK);
1717 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n",
hr,
D3D_OK);
1726 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n",
hr,
D3D_OK);
1735 ok(
hr ==
D3D_OK,
"D3DXCreateTextureFromFileInMemoryEx returned %#x, expected %#x.\n",
hr,
D3D_OK);
1748 IDirect3DCubeTexture9 *cube_texture;
1767 todo_wine ok(levelcount == 3,
"GetLevelCount returned %u, expected 3\n", levelcount);
1771 ok(surface_desc.
Width == 4,
"Got width %u, expected 4\n", surface_desc.
Width);
1772 ok(surface_desc.
Height == 4,
"Got height %u, expected 4\n", surface_desc.
Height);
1775 ok(
ref == 0,
"Invalid reference count. Got %u, expected 0\n",
ref);
1776 }
else skip(
"Couldn't create cube texture\n");
1782 IDirect3DCubeTexture9 *cube_texture;
1786 skip(
"No D3DUSAGE_AUTOGENMIPMAP support for cube textures\n");
1793 ok(
hr ==
D3D_OK,
"D3DXCreateCubeTextureFromFileInMemoryEx returned %#x, expected %#x.\n",
hr,
D3D_OK);
1802 IDirect3DVolumeTexture9 *volume_texture;
1819 ok(
hr ==
D3D_OK,
"D3DXCreateVolumeTextureFromFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
1823 ok(levelcount == 3,
"GetLevelCount returned %u, expected 3\n", levelcount);
1827 ok(volume_desc.
Width == 4,
"Got width %u, expected 4\n", volume_desc.
Width);
1828 ok(volume_desc.
Height == 4,
"Got height %u, expected 4\n", volume_desc.
Height);
1829 ok(volume_desc.
Depth == 2,
"Got depth %u, expected 2\n", volume_desc.
Depth);
1834 ok(volume_desc.
Width == 2,
"Got width %u, expected 2\n", volume_desc.
Width);
1835 ok(volume_desc.
Height == 2,
"Got height %u, expected 2\n", volume_desc.
Height);
1836 ok(volume_desc.
Depth == 1,
"Got depth %u, expected 1\n", volume_desc.
Depth);
1839 ok(
ref == 0,
"Invalid reference count. Got %u, expected 0\n",
ref);
1847 if (tex_coord->
x > 0 &&
fabs(tex_coord->
x) >
fabs(tex_coord->
y) &&
fabs(tex_coord->
x) >
fabs(tex_coord->
z))
1855 IDirect3DCubeTexture9 *cube_texture;
1856 IDirect3DVolumeTexture9 *volume_texture;
1858 void *buffer_pointer;
1867 skip(
"Failed to create texture\n");
1874 ok(
hr ==
D3D_OK,
"D3DXSaveTextureToFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
1880 ok(
hr ==
D3D_OK,
"D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
1882 ok(
info.Width == 256,
"Got width %u, expected %u\n",
info.Width, 256);
1883 ok(
info.Height == 256,
"Got height %u, expected %u\n",
info.Height, 256);
1884 ok(
info.MipLevels == 1,
"Got miplevels %u, expected %u\n",
info.MipLevels, 1);
1886 ok(
info.ImageFileFormat == file_format,
"Got file format %#x, expected %#x\n",
info.ImageFileFormat, file_format);
1893 ok(
hr ==
D3D_OK,
"D3DXSaveTextureToFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
1899 ok(
hr ==
D3D_OK,
"D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
1901 ok(
info.Width == 256,
"Got width %u, expected %u\n",
info.Width, 256);
1902 ok(
info.Height == 256,
"Got height %u, expected %u\n",
info.Height, 256);
1903 ok(
info.MipLevels == 9,
"Got miplevels %u, expected %u\n",
info.MipLevels, 9);
1916 skip(
"Failed to create cube texture\n");
1924 ok(
hr ==
D3D_OK,
"D3DXSaveTextureToFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
1927 IDirect3DSurface9 *surface;
1932 ok(
hr ==
D3D_OK,
"D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
1934 ok(
info.Width == 256,
"Got width %u, expected %u\n",
info.Width, 256);
1935 ok(
info.Height == 256,
"Got height %u, expected %u\n",
info.Height, 256);
1936 ok(
info.MipLevels == 1,
"Got miplevels %u, expected %u\n",
info.MipLevels, 1);
1947 ok(
hr ==
D3D_OK,
"D3DXLoadSurfaceFromFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
1953 ok(*
color == 0x00ff0000,
"Got color %#x, expected %#x\n", *
color, 0x00ff0000);
1958 }
else skip(
"Failed to create surface\n");
1965 ok(
hr ==
D3D_OK,
"D3DXSaveTextureToFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
1971 ok(
hr ==
D3D_OK,
"D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
1973 ok(
info.Width == 256,
"Got width %u, expected %u\n",
info.Width, 256);
1974 ok(
info.Height == 256,
"Got height %u, expected %u\n",
info.Height, 256);
1975 ok(
info.MipLevels == 9,
"Got miplevels %u, expected %u\n",
info.MipLevels, 9);
1988 skip(
"Failed to create volume texture\n");
1994 ok(
hr ==
D3D_OK,
"D3DXSaveTextureToFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
2000 ok(
hr ==
D3D_OK,
"D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
2002 ok(
info.Width == 256,
"Got width %u, expected %u\n",
info.Width, 256);
2003 ok(
info.Height == 256,
"Got height %u, expected %u\n",
info.Height, 256);
2004 ok(
info.Depth == 1,
"Got depth %u, expected %u\n",
info.Depth, 1);
2005 ok(
info.MipLevels == 1,
"Got miplevels %u, expected %u\n",
info.MipLevels, 1);
2012 ok(
hr ==
D3D_OK,
"D3DXSaveTextureToFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
2018 ok(
hr ==
D3D_OK,
"D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
2020 ok(
info.Width == 256,
"Got width %u, expected %u\n",
info.Width, 256);
2021 ok(
info.Height == 256,
"Got height %u, expected %u\n",
info.Height, 256);
2022 ok(
info.Depth == 256,
"Got depth %u, expected %u\n",
info.Depth, 256);
2023 ok(
info.MipLevels == 9,
"Got miplevels %u, expected %u\n",
info.MipLevels, 9);
2041 return float4(
pos, 1.0);
2044 static const DWORD shader_code[] =
2046 0x54580100, 0x0015fffe, 0x42415443, 0x0000001c, 0x0000001f, 0x54580100, 0x00000000, 0x00000000,
2047 0x00000100, 0x0000001c, 0x4d007874, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c,
2048 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x000afffe,
2049 0x54494c43, 0x00000004, 0x00000000, 0x3ff00000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2050 0x00000000, 0x00000000, 0x0014fffe, 0x434c5846, 0x00000002, 0x10000003, 0x00000001, 0x00000000,
2051 0x00000003, 0x00000000, 0x00000000, 0x00000004, 0x00000000, 0x10000001, 0x00000001, 0x00000000,
2052 0x00000001, 0x00000000, 0x00000000, 0x00000004, 0x00000003, 0xf0f0f0f0, 0x0f0f0f0f, 0x0000ffff,
2054 IDirect3DVolumeTexture9 *volume_texture;
2055 IDirect3DCubeTexture9 *cube_texture;
2058 IDirect3DDevice9 *
device;
2059 ID3DXTextureShader *tx;
2060 unsigned int x,
y,
z;
2088 hr = tx->lpVtbl->GetFunction(tx, &
buffer);
2092 skip(
"Texture shaders not supported, skipping further tests.\n");
2093 IUnknown_Release(tx);
2101 skip(
"Couldn't create application window.\n");
2102 IUnknown_Release(tx);
2108 skip(
"Couldn't create IDirect3D9 object.\n");
2110 IUnknown_Release(tx);
2121 skip(
"Failed to create IDirect3DDevice9 object, hr %#x.\n",
hr);
2124 IUnknown_Release(tx);
2140 for (
y = 0;
y < 256; ++
y)
2142 for (
x = 0;
x < 256; ++
x)
2144 unsigned int expected = 0xff000000 |
x << 16 |
y << 8;
2158 skip(
"Cube textures not supported, skipping tests.\n");
2163 &cube_texture,
NULL);
2169 for (
z = 0;
z < 6; ++
z)
2171 static const char *
const mapping[6][3] =
2184 for (
y = 0;
y < 256; ++
y)
2186 for (
x = 0;
x < 256; ++
x)
2189 unsigned int expected = 0xff000000;
2192 for (
i = 0;
i < 3; ++
i)
2201 component =
mapping[
z][
i][1] ==
'x' ?
x * 2 - 255 :
y * 2 - 255;
2203 component = -component;
2218 skip(
"Volume textures not supported, skipping test.\n");
2231 for (
z = 0;
z < 64; ++
z)
2233 for (
y = 0;
y < 64; ++
y)
2235 for (
x = 0;
x < 64; ++
x)
2237 unsigned int expected = 0xff000000 | ((
x * 4 + 2) << 16) | ((
y * 4 + 2) << 8) | (
z * 4 + 2);
2254 IUnknown_Release(tx);
2261 IDirect3DDevice9 *
device;
2269 skip(
"Couldn't create application window\n");
2274 skip(
"Couldn't create IDirect3D9 object\n");
2284 skip(
"Failed to create IDirect3DDevice9 object %#x\n",
hr);
2318 ok(!
ref,
"Device has %u references left.\n",
ref);
#define IDirect3D9_CreateDevice(p, a, b, c, d, e, f)
#define D3DADAPTER_DEFAULT
static void test_D3DXCheckCubeTextureRequirements(IDirect3DDevice9 *device)
#define IDirect3DTexture9_UnlockRect(p, a)
#define IDirect3DSurface9_Release(p)
static void test_D3DXSaveTextureToFileInMemory(IDirect3DDevice9 *device)
HRESULT WINAPI D3DXCheckCubeTextureRequirements(struct IDirect3DDevice9 *device, UINT *size, UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool)
#define IDirect3D9_CheckDeviceFormat(p, a, b, c, d, e, f)
GLint GLint GLsizei width
#define D3DPTEXTURECAPS_POW2
HRESULT WINAPI D3DXCreateTextureShader(const DWORD *function, ID3DXTextureShader **texture_shader)
#define IDirect3DDevice9_CreateVolumeTexture(p, a, b, c, d, e, f, g, h, i)
HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemory(struct IDirect3DDevice9 *device, const void *data, UINT datasize, struct IDirect3DCubeTexture9 **texture)
#define D3DCREATE_SOFTWARE_VERTEXPROCESSING
#define IDirect3DVolumeTexture9_GetLevelDesc(p, a, b)
#define IDirect3DCubeTexture9_GetLevelDesc(p, a, b)
#define IDirect3DDevice9_GetCreationParameters(p, a)
static const unsigned char dds_volume_map[]
static const DWORD shader_zero[]
#define IDirect3DCubeTexture9_GetLevelCount(p)
#define IDirect3DTexture9_GetSurfaceLevel(p, a, b)
HRESULT WINAPI D3DXCreateTexture(struct IDirect3DDevice9 *device, UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, struct IDirect3DTexture9 **texture)
int main(int argc, char *argv[])
#define D3DUSAGE_AUTOGENMIPMAP
static BOOL color_match(const DWORD *value, const DWORD *expected)
#define IDirect3DVolumeTexture9_GetLevelCount(p)
#define D3DPTEXTURECAPS_CUBEMAP_POW2
#define IDirect3DTexture9_Release(p)
HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx(struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatasize, UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, PALETTEENTRY *palette, struct IDirect3DTexture9 **texture)
#define D3DUSAGE_DONOTCLIP
#define D3DERR_INVALIDCALL
static void test_D3DXCreateTextureFromFileInMemory(IDirect3DDevice9 *device)
FLOAT *WINAPI D3DXFloat16To32Array(FLOAT *pout, const D3DXFLOAT16 *pin, UINT n)
GLint GLint GLint GLint GLint x
#define IDirect3DVolumeTexture9_Release(p)
#define MAKEINTRESOURCEA(i)
static void WINAPI fillfunc_volume(D3DXVECTOR4 *value, const D3DXVECTOR3 *texcoord, const D3DXVECTOR3 *texelsize, void *data)
#define IDirect3DDevice9_CreateRenderTarget(p, a, b, c, d, e, f, g, h)
#define IDirect3DTexture9_GetLevelCount(p)
#define D3DUSAGE_WRITEONLY
#define D3DPTEXTURECAPS_MIPVOLUMEMAP
#define IDirect3DCubeTexture9_Release(p)
enum _D3DXIMAGE_FILEFORMAT D3DXIMAGE_FILEFORMAT
BOOL WINAPI DestroyWindow(_In_ HWND)
HRESULT WINAPI D3DXFillVolumeTextureTX(struct IDirect3DVolumeTexture9 *texture, ID3DXTextureShader *texture_shader)
static const unsigned char dds_16bit[]
IDirect3D9 *WINAPI Direct3DCreate9(UINT SDKVersion)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
static void test_D3DXFillTexture(IDirect3DDevice9 *device)
#define IDirect3DTexture9_GetLevelDesc(p, a, b)
#define IDirect3DVolumeTexture9_UnlockBox(p, a)
static const DWORD shader_invalid[]
#define IDirect3DDevice9_CreateOffscreenPlainSurface(p, a, b, c, d, e, f)
#define IDirect3D9_Release(p)
#define D3DUSAGE_DEPTHSTENCIL
static void test_texture_shader(void)
HRESULT WINAPI D3DXCreateTextureFromResourceExA(struct IDirect3DDevice9 *device, HMODULE srcmodule, const char *resource, UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, PALETTEENTRY *palette, struct IDirect3DTexture9 **texture)
static void test_D3DXCreateTexture(IDirect3DDevice9 *device)
GLenum const GLfloat * params
#define IDirect3DCubeTexture9_LockRect(p, a, b, c, d, e)
static const WCHAR desc[]
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
static const unsigned char dds_24bit[]
static void buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)
#define IDirect3DDevice9_Release(p)
static void expect_vec4_(unsigned int line, const D3DXVECTOR4 *expected, const D3DXVECTOR4 *got)
static const unsigned char dds_cube_map[]
static void test_D3DXCreateCubeTextureFromFileInMemory(IDirect3DDevice9 *device)
HRESULT WINAPI D3DXFilterTexture(IDirect3DBaseTexture9 *texture, const PALETTEENTRY *palette, UINT srclevel, DWORD filter)
struct ID3DXBuffer ID3DXBuffer
static void test_D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *device)
enum _D3DFORMAT D3DFORMAT
static float relative_error(float expected, float got)
#define IDirect3DDevice9_GetDisplayMode(p, a, b)
static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
static void test_D3DXFilterTexture(IDirect3DDevice9 *device)
#define D3DUSAGE_NPATCHES
#define D3DPTEXTURECAPS_CUBEMAP
#define IDirect3DDevice9_GetDirect3D(p, a)
#define todo_wine_if(is_todo)
HRESULT WINAPI D3DXFillCubeTextureTX(struct IDirect3DCubeTexture9 *texture, ID3DXTextureShader *texture_shader)
#define ID3DXBuffer_GetBufferSize(p)
HRESULT WINAPI D3DXFillTextureTX(struct IDirect3DTexture9 *texture, ID3DXTextureShader *texture_shader)
#define D3DUSAGE_RENDERTARGET
HRESULT WINAPI D3DXCreateTextureFromFileInMemory(struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatasize, struct IDirect3DTexture9 **texture)
GLenum GLenum GLenum GLenum mapping
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL
static void test_D3DXFillVolumeTexture(IDirect3DDevice9 *device)
GLint GLint GLsizei GLsizei GLsizei depth
#define D3DUSAGE_RTPATCHES
static const unsigned char png_grayscale[]
static void test_D3DXCreateTextureFromFileInMemoryEx(IDirect3DDevice9 *device)
GLsizeiptr const GLvoid GLenum usage
GLsizei const GLfloat * value
HRESULT WINAPI D3DXCheckVolumeTextureRequirements(struct IDirect3DDevice9 *device, UINT *width, UINT *height, UINT *depth, UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool)
static void test_D3DXFillCubeTexture(IDirect3DDevice9 *device)
#define IDirect3DSurface9_GetDesc(p, a)
GLint GLint GLsizei GLsizei height
#define D3DCAPS2_CANAUTOGENMIPMAP
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
HRESULT WINAPI D3DXCreateTextureFromResourceA(struct IDirect3DDevice9 *device, HMODULE srcmodule, const char *resource, struct IDirect3DTexture9 **texture)
#define IDirect3DVolumeTexture9_LockBox(p, a, b, c, d)
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 IDirect3DDevice9_CreateTexture(p, a, b, c, d, e, f, g, h)
static float(__cdecl *square_half_float)(float x
#define ID3DXBuffer_Release(p)
#define IDirect3DDevice9_GetDeviceCaps(p, a)
#define D3DX_SKIP_DDS_MIP_LEVELS(l, f)
HRESULT WINAPI D3DXFillVolumeTexture(struct IDirect3DVolumeTexture9 *texture, LPD3DXFILL3D function, void *funcdata)
HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemory(IDirect3DDevice9 *device, const void *data, UINT data_size, IDirect3DVolumeTexture9 **volume_texture)
GLint GLint GLint GLint GLint GLint y
static float get_cube_coord(enum cube_coord coord, unsigned int x, unsigned int y, unsigned int size)
static BOOL is_autogenmipmap_supported(IDirect3DDevice9 *device, D3DRESOURCETYPE resource_type)
#define expect_vec4(expected, got)
#define IDD_BITMAPDATA_1x1
static const DWORD shader_empty[]
#define IDirect3DCubeTexture9_UnlockRect(p, a, b)
static void test_D3DXCheckVolumeTextureRequirements(IDirect3DDevice9 *device)
#define IDirect3DSurface9_UnlockRect(p)
HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UINT *width, UINT *height, UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool)
#define D3DPTEXTURECAPS_MIPCUBEMAP
#define IDirect3DTexture9_LockRect(p, a, b, c, d)
#define WS_OVERLAPPEDWINDOW
static void WINAPI fillfunc_cube(D3DXVECTOR4 *value, const D3DXVECTOR3 *texcoord, const D3DXVECTOR3 *texelsize, void *data)
#define IDirect3DTexture9_GetType(p)
#define D3DX_FILTER_POINT
HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize, D3DXIMAGE_INFO *info)
static void test_D3DXCreateVolumeTextureFromFileInMemory(IDirect3DDevice9 *device)
char * cleanup(char *str)
#define D3DPTEXTURECAPS_VOLUMEMAP_POW2
HRESULT WINAPI D3DXFillCubeTexture(struct IDirect3DCubeTexture9 *texture, LPD3DXFILL3D function, void *funcdata)
GLuint GLuint GLsizei GLenum type
#define IDirect3DSurface9_LockRect(p, a, b, c)
static void WINAPI fillfunc(D3DXVECTOR4 *value, const D3DXVECTOR2 *texcoord, const D3DXVECTOR2 *texelsize, void *data)
HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *device, const void *src_data, UINT src_data_size, UINT size, UINT mip_levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, DWORD filter, DWORD mip_filter, D3DCOLOR color_key, D3DXIMAGE_INFO *src_info, PALETTEENTRY *palette, IDirect3DCubeTexture9 **cube_texture)
#define IDirect3DBaseTexture9_GetLevelCount(p)
#define D3DPTEXTURECAPS_VOLUMEMAP
#define IDirect3DDevice9_StretchRect(p, a, b, c, d, e)
#define IDirect3DDevice9_CreateCubeTexture(p, a, b, c, d, e, f, g)
static BOOL compare_color(DWORD c1, DWORD c2, BYTE max_diff)
#define ID3DXBuffer_GetBufferPointer(p)
enum _D3DRESOURCETYPE D3DRESOURCETYPE
HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(IDirect3DSurface9 *pDestSurface, const PALETTEENTRY *pDestPalette, const RECT *pDestRect, const void *pSrcData, UINT SrcDataSize, const RECT *pSrcRect, DWORD dwFilter, D3DCOLOR Colorkey, D3DXIMAGE_INFO *pSrcInfo)
static void WINAPI fill_cube_positive_x(D3DXVECTOR4 *out, const D3DXVECTOR3 *tex_coord, const D3DXVECTOR3 *texel_size, void *data)
HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D function, void *funcdata)
HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE_FILEFORMAT file_format, IDirect3DBaseTexture9 *src_texture, const PALETTEENTRY *src_palette)