28 0x44,0x44,0x53,0x20,0x7c,0x00,0x00,0x00,0x07,0x10,0x8a,0x00,0x04,0x00,0x00,0x00,
29 0x04,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
30 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
31 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
32 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
33 0x04,0x00,0x00,0x00,0x44,0x58,0x54,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
34 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0x40,0x00,
35 0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
36 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x87,0x0f,0x78,0x05,0x05,0x50,0x50,
37 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x87,0x0f,0x78,0x05,0x05,0x50,0x50,
38 0xff,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x2f,0x7e,0xcf,0x79,0x01,0x54,0x5c,0x5c,
39 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x84,0xef,0x7b,0xaa,0xab,0xab,0xab
42#define check_pixel_4bpp(box, x, y, z, color) _check_pixel_4bpp(__LINE__, box, x, y, z, color)
46 ok_(__FILE__,
line)(
color == expected_color,
"Got color 0x%08x, expected 0x%08x\n",
color, expected_color);
66 IDirect3DVolumeTexture9 *volume_texture;
67 const DWORD pixels[] = { 0xc3394cf0, 0x235ae892, 0x09b197fd, 0x8dc32bf6,
68 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
69 0x00000000, 0x00000000, 0x00000000, 0xffffffff,
70 0xffffffff, 0x00000000, 0xffffffff, 0x00000000 };
73 &volume_texture,
NULL);
76 skip(
"Failed to create volume texture.\n");
82 set_box(&src_box, 0, 0, 4, 1, 0, 4);
83 set_box(&dst_box, 0, 0, 4, 1, 0, 4);
85 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL, &dst_box,
pixels,
D3DFMT_A8R8G8B8, 16, 16,
NULL, &src_box,
D3DX_DEFAULT, 0);
88 win_skip(
"D3DXLoadVolumeFromMemory failed with error %#x, skipping some tests.\n",
hr);
96 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL, &dst_box,
pixels,
D3DFMT_UNKNOWN, 16, 16,
NULL, &src_box,
D3DX_DEFAULT, 0);
99 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL,
NULL,
pixels,
D3DFMT_A8R8G8B8, 16, 16,
NULL, &src_box,
D3DX_DEFAULT, 0);
100 ok(
hr ==
D3D_OK,
"D3DXLoadVolumeFromMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
102 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL, &dst_box,
NULL,
D3DFMT_A8R8G8B8, 16, 16,
NULL, &src_box,
D3DX_DEFAULT, 0);
105 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL, &dst_box,
pixels,
D3DFMT_A8R8G8B8, 16, 16,
NULL,
NULL,
D3DX_DEFAULT, 0);
108 set_box(&src_box, 0, 0, 4, 4, 0, 1);
109 set_box(&dst_box, 0, 0, 4, 4, 0, 1);
110 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL, &dst_box,
pixels,
D3DFMT_A8R8G8B8, 16,
sizeof(
pixels),
NULL, &src_box,
D3DX_DEFAULT, 0);
111 ok(
hr ==
D3D_OK,
"D3DXLoadVolumeFromMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
117 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL,
NULL,
pixels,
D3DFMT_A8R8G8B8, 16,
sizeof(
pixels),
NULL, &src_box,
D3DX_FILTER_NONE, 0);
118 ok(
hr ==
D3D_OK,
"D3DXLoadVolumeFromMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
122 for (
z = 0;
z < 4;
z++)
124 for (
y = 0;
y < 256;
y++)
126 for (
x = 0;
x < 256;
x++)
132 set_box(&src_box, 0, 0, 2, 2, 1, 2);
133 set_box(&dst_box, 0, 0, 2, 2, 0, 1);
134 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL, &dst_box,
pixels,
D3DFMT_A8R8G8B8, 8, 16,
NULL, &src_box,
D3DX_DEFAULT, 0);
135 ok(
hr ==
D3D_OK,
"D3DXLoadVolumeFromMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
141 set_box(&src_box, 0, 0, 2, 2, 2, 3);
142 set_box(&dst_box, 0, 0, 2, 2, 1, 2);
143 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL, &dst_box,
pixels,
D3DFMT_A8R8G8B8, 8, 16,
NULL, &src_box,
D3DX_DEFAULT, 0);
144 ok(
hr ==
D3D_OK,
"D3DXLoadVolumeFromMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
150 set_box(&src_box, 0, 0, 4, 1, 0, 4);
152 set_box(&dst_box, -1, -1, 3, 0, 0, 4);
153 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL, &dst_box,
pixels,
D3DFMT_A8R8G8B8, 16, 16,
NULL, &src_box,
D3DX_DEFAULT, 0);
156 set_box(&dst_box, 254, 254, 258, 255, 0, 4);
157 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL, &dst_box,
pixels,
D3DFMT_A8R8G8B8, 16, 16,
NULL, &src_box,
D3DX_DEFAULT, 0);
160 set_box(&dst_box, 4, 1, 0, 0, 0, 4);
161 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL, &dst_box,
pixels,
D3DFMT_A8R8G8B8, 16, 16,
NULL, &src_box,
D3DX_DEFAULT, 0);
164 set_box(&dst_box, 0, 0, 0, 0, 0, 0);
165 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL, &dst_box,
pixels,
D3DFMT_A8R8G8B8, 16, 16,
NULL, &src_box,
D3DX_DEFAULT, 0);
168 set_box(&dst_box, 0, 0, 0, 0, 0, 1);
169 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL, &dst_box,
pixels,
D3DFMT_A8R8G8B8, 16, 16,
NULL, &src_box,
D3DX_DEFAULT, 0);
172 set_box(&dst_box, 300, 300, 300, 300, 0, 0);
173 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL, &dst_box,
pixels,
D3DFMT_A8R8G8B8, 16, 16,
NULL, &src_box,
D3DX_DEFAULT, 0);
182 skip(
"Failed to create volume texture\n");
188 set_box(&src_box, 0, 0, 4, 1, 0, 4);
189 set_box(&dst_box, 0, 0, 4, 1, 0, 4);
190 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL, &dst_box,
pixels,
D3DFMT_A8R8G8B8, 16, 16,
NULL, &src_box,
D3DX_DEFAULT, 0);
199 skip(
"Failed to create volume texture\n");
205 set_box(&src_box, 1, 1, 7, 7, 0, 1);
206 set_box(&dst_box, 1, 1, 7, 7, 0, 1);
207 hr =
D3DXLoadVolumeFromMemory(
volume,
NULL, &dst_box,
pixels,
D3DFMT_A8R8G8B8, 16, 32,
NULL, &src_box,
D3DX_DEFAULT, 0);
219 IDirect3DVolumeTexture9 *volume_texture;
222 &volume_texture,
NULL);
225 skip(
"Failed to create volume texture\n");
232 ok(
hr ==
D3D_OK,
"D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
246 set_box(&src_box, 0, 0, 4, 4, 0, 2);
248 ok(
hr ==
D3D_OK,
"D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n",
hr,
D3D_OK);
250 set_box(&src_box, 0, 0, 0, 0, 0, 0);
252 ok(
hr ==
E_FAIL,
"D3DXLoadVolumeFromFileInMemory returned %#x, expected %#x\n",
hr,
E_FAIL);
254 set_box(&src_box, 0, 0, 5, 4, 0, 2);
258 set_box(&src_box, 0, 0, 4, 4, 0, 3);
277 skip(
"Couldn't create application window\n");
283 skip(
"Couldn't create IDirect3D9 object\n");
294 skip(
"Failed to create IDirect3DDevice9 object %#x\n",
hr);
IDirect3D9 *WINAPI Direct3DCreate9(UINT SDKVersion)
#define IDirect3DVolumeTexture9_Release(p)
#define IDirect3DVolume9_UnlockBox(p)
#define IDirect3DVolume9_LockBox(p, a, b, c)
#define IDirect3D9_CreateDevice(p, a, b, c, d, e, f)
#define IDirect3DVolume9_Release(p)
#define IDirect3DDevice9_CreateVolumeTexture(p, a, b, c, d, e, f, g, h, i)
#define IDirect3DVolumeTexture9_GetVolumeLevel(p, a, b)
#define IDirect3D9_Release(p)
#define IDirect3DDevice9_Release(p)
#define D3DERR_INVALIDCALL
HRESULT WINAPI D3DXLoadVolumeFromMemory(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette, const D3DBOX *dst_box, const void *src_memory, D3DFORMAT src_format, UINT src_row_pitch, UINT src_slice_pitch, const PALETTEENTRY *src_palette, const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key)
HRESULT WINAPI D3DXLoadVolumeFromFileInMemory(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette, const D3DBOX *dst_box, const void *src_data, UINT src_data_size, const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key, D3DXIMAGE_INFO *src_info)
GLint GLint GLint GLint GLint x
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble GLdouble top
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
static void set_box(D3DBOX *box, UINT left, UINT top, UINT right, UINT bottom, UINT front, UINT back)
static const unsigned char dds_volume_map[]
static void test_D3DXLoadVolumeFromMemory(IDirect3DDevice9 *device)
#define check_pixel_4bpp(box, x, y, z, color)
static void _check_pixel_4bpp(unsigned int line, const D3DLOCKED_BOX *box, int x, int y, int z, DWORD expected_color)
static void test_D3DXLoadVolumeFromFileInMemory(IDirect3DDevice9 *device)
#define WS_OVERLAPPEDWINDOW
static struct address_cache * front
#define D3DADAPTER_DEFAULT
#define D3DCREATE_SOFTWARE_VERTEXPROCESSING
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI DestroyWindow(_In_ HWND)