Merge branch 'mr3' into 'master'

include: Convert d3d8.h and d3d9.h to IDLs.

See merge request wine/wine!6032
This commit is contained in:
Elizabeth Figura 2024-11-19 22:27:39 +00:00
commit d3e38603dd
15 changed files with 1017 additions and 3447 deletions

View file

@ -1143,7 +1143,7 @@ static HRESULT WINAPI d3d8_device_CreateTexture(IDirect3DDevice8 *iface,
{ {
if (!d3d8_surface_create(object->wined3d_texture, i, (IUnknown *)&object->IDirect3DBaseTexture8_iface)) if (!d3d8_surface_create(object->wined3d_texture, i, (IUnknown *)&object->IDirect3DBaseTexture8_iface))
{ {
IDirect3DTexture8_Release(&object->IDirect3DBaseTexture8_iface); IDirect3DBaseTexture8_Release(&object->IDirect3DBaseTexture8_iface);
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
} }
@ -1217,7 +1217,7 @@ static HRESULT WINAPI d3d8_device_CreateCubeTexture(IDirect3DDevice8 *iface, UIN
{ {
if (!d3d8_surface_create(object->wined3d_texture, i, (IUnknown *)&object->IDirect3DBaseTexture8_iface)) if (!d3d8_surface_create(object->wined3d_texture, i, (IUnknown *)&object->IDirect3DBaseTexture8_iface))
{ {
IDirect3DTexture8_Release(&object->IDirect3DBaseTexture8_iface); IDirect3DBaseTexture8_Release(&object->IDirect3DBaseTexture8_iface);
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
} }

View file

@ -5959,7 +5959,7 @@ static void test_lockrect_invalid(void)
hr = IDirect3DCubeTexture8_UnlockRect(cube_texture, D3DCUBEMAP_FACE_NEGATIVE_X, 0); hr = IDirect3DCubeTexture8_UnlockRect(cube_texture, D3DCUBEMAP_FACE_NEGATIVE_X, 0);
ok(SUCCEEDED(hr), "Failed to unlock texture, hr %#lx, type %s.\n", hr, resources[r].name); ok(SUCCEEDED(hr), "Failed to unlock texture, hr %#lx, type %s.\n", hr, resources[r].name);
IDirect3DTexture8_Release(cube_texture); IDirect3DCubeTexture8_Release(cube_texture);
hr = IDirect3DDevice8_CreateCubeTexture(device, 128, 1, D3DUSAGE_WRITEONLY, D3DFMT_A8R8G8B8, hr = IDirect3DDevice8_CreateCubeTexture(device, 128, 1, D3DUSAGE_WRITEONLY, D3DFMT_A8R8G8B8,
resources[r].pool, &cube_texture); resources[r].pool, &cube_texture);

View file

@ -1565,7 +1565,7 @@ static void resource_check_data(IDirect3DDevice8 *device, const struct state_tes
chain_stage, i, d->vb[i], ptr); chain_stage, i, d->vb[i], ptr);
if (SUCCEEDED(hr) && ptr) if (SUCCEEDED(hr) && ptr)
{ {
IDirect3DIndexBuffer8_Release((IDirect3DVertexBuffer8 *)ptr); IDirect3DVertexBuffer8_Release((IDirect3DVertexBuffer8 *)ptr);
} }
} }
@ -1744,7 +1744,7 @@ static void resource_test_cleanup(IDirect3DDevice8 *device, struct state_test *t
for (i = 0; i < arg->tex_count; ++i) for (i = 0; i < arg->tex_count; ++i)
{ {
IDirect3DBaseTexture8_Release(ctx->test_data_all.tex[i]); IDirect3DTexture8_Release(ctx->test_data_all.tex[i]);
} }
free(ctx->default_data.vb); free(ctx->default_data.vb);

View file

@ -12149,7 +12149,7 @@ static void test_mipmap_upload(void)
D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture); D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture);
ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(hr == S_OK, "Got hr %#lx.\n", hr);
level_count = IDirect3DBaseTexture8_GetLevelCount(texture); level_count = IDirect3DTexture8_GetLevelCount(texture);
hr = IDirect3DTexture8_LockRect(texture, 0, &locked_rect, NULL, 0); hr = IDirect3DTexture8_LockRect(texture, 0, &locked_rect, NULL, 0);
ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(hr == S_OK, "Got hr %#lx.\n", hr);

View file

@ -835,7 +835,7 @@ static HRESULT WINAPI d3d9_device_SetCursorProperties(IDirect3DDevice9Ex *iface,
return hr; return hr;
} }
if (FAILED(hr = IDirect3D9_GetAdapterDisplayMode(&device->d3d_parent->IDirect3D9Ex_iface, if (FAILED(hr = IDirect3D9Ex_GetAdapterDisplayMode(&device->d3d_parent->IDirect3D9Ex_iface,
device->adapter_ordinal, &mode))) device->adapter_ordinal, &mode)))
{ {
WARN("Failed to get device display mode, hr %#lx.\n", hr); WARN("Failed to get device display mode, hr %#lx.\n", hr);
@ -951,7 +951,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_GetSwapChain(IDirect3DDevice
{ {
d3d9_swapchain = wined3d_swapchain_get_parent(device->implicit_swapchains[swapchain_idx]); d3d9_swapchain = wined3d_swapchain_get_parent(device->implicit_swapchains[swapchain_idx]);
*swapchain = (IDirect3DSwapChain9 *)&d3d9_swapchain->IDirect3DSwapChain9Ex_iface; *swapchain = (IDirect3DSwapChain9 *)&d3d9_swapchain->IDirect3DSwapChain9Ex_iface;
IDirect3DSwapChain9Ex_AddRef(*swapchain); IDirect3DSwapChain9_AddRef(*swapchain);
hr = D3D_OK; hr = D3D_OK;
} }
else else
@ -1429,7 +1429,7 @@ static HRESULT WINAPI d3d9_device_CreateTexture(IDirect3DDevice9Ex *iface,
{ {
if (!d3d9_surface_create(object->wined3d_texture, i, (IUnknown *)&object->IDirect3DBaseTexture9_iface)) if (!d3d9_surface_create(object->wined3d_texture, i, (IUnknown *)&object->IDirect3DBaseTexture9_iface))
{ {
IDirect3DTexture9_Release(&object->IDirect3DBaseTexture9_iface); IDirect3DBaseTexture9_Release(&object->IDirect3DBaseTexture9_iface);
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
} }
@ -1532,7 +1532,7 @@ static HRESULT WINAPI d3d9_device_CreateCubeTexture(IDirect3DDevice9Ex *iface,
{ {
if (!d3d9_surface_create(object->wined3d_texture, i, (IUnknown *)&object->IDirect3DBaseTexture9_iface)) if (!d3d9_surface_create(object->wined3d_texture, i, (IUnknown *)&object->IDirect3DBaseTexture9_iface))
{ {
IDirect3DTexture9_Release(&object->IDirect3DBaseTexture9_iface); IDirect3DBaseTexture9_Release(&object->IDirect3DBaseTexture9_iface);
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
} }

View file

@ -229,7 +229,7 @@ static HRESULT reset_device(IDirect3DDevice9Ex *device, const struct device_desc
present_parameters.Windowed = !(desc->flags & CREATE_DEVICE_FULLSCREEN); present_parameters.Windowed = !(desc->flags & CREATE_DEVICE_FULLSCREEN);
} }
return IDirect3DDevice9_Reset(device, &present_parameters); return IDirect3DDevice9Ex_Reset(device, &present_parameters);
} }
static ULONG getref(IUnknown *obj) { static ULONG getref(IUnknown *obj) {
@ -749,7 +749,7 @@ static void test_user_memory(void)
goto done; goto done;
} }
hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); hr = IDirect3DDevice9Ex_GetDeviceCaps(device, &caps);
ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to get caps, hr %#lx.\n", hr);
mem = calloc(128 * 128, 4); mem = calloc(128 * 128, 4);
@ -847,7 +847,7 @@ static void test_user_memory(void)
hr = IDirect3DDevice9Ex_CreateTexture(device, 33, 33, 1, 0, D3DFMT_L8, hr = IDirect3DDevice9Ex_CreateTexture(device, 33, 33, 1, 0, D3DFMT_L8,
D3DPOOL_DEFAULT, &texture2, NULL); D3DPOOL_DEFAULT, &texture2, NULL);
ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr);
hr = IDirect3DDevice9_UpdateTexture(device, (IDirect3DBaseTexture9 *)texture, hr = IDirect3DDevice9Ex_UpdateTexture(device, (IDirect3DBaseTexture9 *)texture,
(IDirect3DBaseTexture9 *)texture2); (IDirect3DBaseTexture9 *)texture2);
ok(SUCCEEDED(hr), "Failed to update texture, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to update texture, hr %#lx.\n", hr);
@ -873,7 +873,7 @@ static void test_user_memory(void)
hr = IDirect3DDevice9Ex_Present(device, NULL, NULL, NULL, NULL); hr = IDirect3DDevice9Ex_Present(device, NULL, NULL, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to present, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to present, hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetTexture(device, 0, NULL); hr = IDirect3DDevice9Ex_SetTexture(device, 0, NULL);
ok(SUCCEEDED(hr), "Failed to set texture, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to set texture, hr %#lx.\n", hr);
IDirect3DTexture9_Release(texture2); IDirect3DTexture9_Release(texture2);
IDirect3DTexture9_Release(texture); IDirect3DTexture9_Release(texture);
@ -1026,10 +1026,10 @@ static void test_reset(void)
hr = IDirect3DDevice9Ex_SetScissorRect(device, &rect); hr = IDirect3DDevice9Ex_SetScissorRect(device, &rect);
ok(SUCCEEDED(hr), "Failed to set scissor rect, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to set scissor rect, hr %#lx.\n", hr);
hr = IDirect3DDevice9_GetRenderState(device, D3DRS_LIGHTING, &value); hr = IDirect3DDevice9Ex_GetRenderState(device, D3DRS_LIGHTING, &value);
ok(SUCCEEDED(hr), "Failed to get render state, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to get render state, hr %#lx.\n", hr);
ok(!!value, "Got unexpected value %#lx for D3DRS_LIGHTING.\n", value); ok(!!value, "Got unexpected value %#lx for D3DRS_LIGHTING.\n", value);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); hr = IDirect3DDevice9Ex_SetRenderState(device, D3DRS_LIGHTING, FALSE);
ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
memset(&d3dpp, 0, sizeof(d3dpp)); memset(&d3dpp, 0, sizeof(d3dpp));
@ -1044,7 +1044,7 @@ static void test_reset(void)
ok(hr == D3D_OK, "Got hr %#lx.\n", hr); ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
/* Render states are preserved in d3d9ex. */ /* Render states are preserved in d3d9ex. */
hr = IDirect3DDevice9_GetRenderState(device, D3DRS_LIGHTING, &value); hr = IDirect3DDevice9Ex_GetRenderState(device, D3DRS_LIGHTING, &value);
ok(SUCCEEDED(hr), "Failed to get render state, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to get render state, hr %#lx.\n", hr);
ok(!value, "Got unexpected value %#lx for D3DRS_LIGHTING.\n", value); ok(!value, "Got unexpected value %#lx for D3DRS_LIGHTING.\n", value);
@ -1536,10 +1536,10 @@ static void test_reset_ex(void)
hr = IDirect3DDevice9Ex_SetScissorRect(device, &rect); hr = IDirect3DDevice9Ex_SetScissorRect(device, &rect);
ok(SUCCEEDED(hr), "Failed to set scissor rect, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to set scissor rect, hr %#lx.\n", hr);
hr = IDirect3DDevice9_GetRenderState(device, D3DRS_LIGHTING, &value); hr = IDirect3DDevice9Ex_GetRenderState(device, D3DRS_LIGHTING, &value);
ok(SUCCEEDED(hr), "Failed to get render state, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to get render state, hr %#lx.\n", hr);
ok(!!value, "Got unexpected value %#lx for D3DRS_LIGHTING.\n", value); ok(!!value, "Got unexpected value %#lx for D3DRS_LIGHTING.\n", value);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); hr = IDirect3DDevice9Ex_SetRenderState(device, D3DRS_LIGHTING, FALSE);
ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to set render state, hr %#lx.\n", hr);
memset(&d3dpp, 0, sizeof(d3dpp)); memset(&d3dpp, 0, sizeof(d3dpp));
@ -1556,7 +1556,7 @@ static void test_reset_ex(void)
ok(hr == D3D_OK, "Got hr %#lx.\n", hr); ok(hr == D3D_OK, "Got hr %#lx.\n", hr);
/* Render states are preserved in d3d9ex. */ /* Render states are preserved in d3d9ex. */
hr = IDirect3DDevice9_GetRenderState(device, D3DRS_LIGHTING, &value); hr = IDirect3DDevice9Ex_GetRenderState(device, D3DRS_LIGHTING, &value);
ok(SUCCEEDED(hr), "Failed to get render state, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to get render state, hr %#lx.\n", hr);
ok(!value, "Got unexpected value %#lx for D3DRS_LIGHTING.\n", value); ok(!value, "Got unexpected value %#lx for D3DRS_LIGHTING.\n", value);
@ -1859,25 +1859,25 @@ static void test_reset_resources(void)
goto done; goto done;
} }
hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); hr = IDirect3DDevice9Ex_GetDeviceCaps(device, &caps);
ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr);
hr = IDirect3DDevice9_CreateDepthStencilSurface(device, 128, 128, D3DFMT_D24S8, hr = IDirect3DDevice9Ex_CreateDepthStencilSurface(device, 128, 128, D3DFMT_D24S8,
D3DMULTISAMPLE_NONE, 0, TRUE, &surface, NULL); D3DMULTISAMPLE_NONE, 0, TRUE, &surface, NULL);
ok(SUCCEEDED(hr), "Failed to create depth/stencil surface, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to create depth/stencil surface, hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetDepthStencilSurface(device, surface); hr = IDirect3DDevice9Ex_SetDepthStencilSurface(device, surface);
ok(SUCCEEDED(hr), "Failed to set depth/stencil surface, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to set depth/stencil surface, hr %#lx.\n", hr);
IDirect3DSurface9_Release(surface); IDirect3DSurface9_Release(surface);
for (i = 0; i < caps.NumSimultaneousRTs; ++i) for (i = 0; i < caps.NumSimultaneousRTs; ++i)
{ {
hr = IDirect3DDevice9_CreateTexture(device, 128, 128, 1, D3DUSAGE_RENDERTARGET, hr = IDirect3DDevice9Ex_CreateTexture(device, 128, 128, 1, D3DUSAGE_RENDERTARGET,
D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &texture, NULL); D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &texture, NULL);
ok(SUCCEEDED(hr), "Failed to create render target texture %u, hr %#lx.\n", i, hr); ok(SUCCEEDED(hr), "Failed to create render target texture %u, hr %#lx.\n", i, hr);
hr = IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); hr = IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface);
ok(SUCCEEDED(hr), "Failed to get surface %u, hr %#lx.\n", i, hr); ok(SUCCEEDED(hr), "Failed to get surface %u, hr %#lx.\n", i, hr);
IDirect3DTexture9_Release(texture); IDirect3DTexture9_Release(texture);
hr = IDirect3DDevice9_SetRenderTarget(device, i, surface); hr = IDirect3DDevice9Ex_SetRenderTarget(device, i, surface);
ok(SUCCEEDED(hr), "Failed to set render target surface %u, hr %#lx.\n", i, hr); ok(SUCCEEDED(hr), "Failed to set render target surface %u, hr %#lx.\n", i, hr);
IDirect3DSurface9_Release(surface); IDirect3DSurface9_Release(surface);
} }
@ -1885,9 +1885,9 @@ static void test_reset_resources(void)
hr = reset_device(device, NULL); hr = reset_device(device, NULL);
ok(SUCCEEDED(hr), "Failed to reset device.\n"); ok(SUCCEEDED(hr), "Failed to reset device.\n");
hr = IDirect3DDevice9_GetBackBuffer(device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &rt); hr = IDirect3DDevice9Ex_GetBackBuffer(device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &rt);
ok(SUCCEEDED(hr), "Failed to get back buffer, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to get back buffer, hr %#lx.\n", hr);
hr = IDirect3DDevice9_GetRenderTarget(device, 0, &surface); hr = IDirect3DDevice9Ex_GetRenderTarget(device, 0, &surface);
ok(SUCCEEDED(hr), "Failed to get render target surface, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to get render target surface, hr %#lx.\n", hr);
ok(surface == rt, "Got unexpected surface %p for render target.\n", surface); ok(surface == rt, "Got unexpected surface %p for render target.\n", surface);
IDirect3DSurface9_Release(surface); IDirect3DSurface9_Release(surface);
@ -1895,11 +1895,11 @@ static void test_reset_resources(void)
for (i = 1; i < caps.NumSimultaneousRTs; ++i) for (i = 1; i < caps.NumSimultaneousRTs; ++i)
{ {
hr = IDirect3DDevice9_GetRenderTarget(device, i, &surface); hr = IDirect3DDevice9Ex_GetRenderTarget(device, i, &surface);
ok(hr == D3DERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr); ok(hr == D3DERR_NOTFOUND, "Got unexpected hr %#lx.\n", hr);
} }
ref = IDirect3DDevice9_Release(device); ref = IDirect3DDevice9Ex_Release(device);
ok(!ref, "Unexpected refcount %lu.\n", ref); ok(!ref, "Unexpected refcount %lu.\n", ref);
done: done:
@ -1925,16 +1925,16 @@ static void test_vidmem_accounting(void)
goto done; goto done;
} }
vidmem_start = IDirect3DDevice9_GetAvailableTextureMem(device); vidmem_start = IDirect3DDevice9Ex_GetAvailableTextureMem(device);
memset(textures, 0, sizeof(textures)); memset(textures, 0, sizeof(textures));
for (i = 0; i < 20 && SUCCEEDED(hr); i++) for (i = 0; i < 20 && SUCCEEDED(hr); i++)
{ {
hr = IDirect3DDevice9_CreateTexture(device, 1024, 1024, 1, D3DUSAGE_RENDERTARGET, hr = IDirect3DDevice9Ex_CreateTexture(device, 1024, 1024, 1, D3DUSAGE_RENDERTARGET,
D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &textures[i], NULL); D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &textures[i], NULL);
/* No D3DERR_OUTOFVIDEOMEMORY in d3d9ex */ /* No D3DERR_OUTOFVIDEOMEMORY in d3d9ex */
ok(SUCCEEDED(hr) || hr == E_OUTOFMEMORY, "Failed to create texture, hr %#lx.\n", hr); ok(SUCCEEDED(hr) || hr == E_OUTOFMEMORY, "Failed to create texture, hr %#lx.\n", hr);
} }
vidmem_end = IDirect3DDevice9_GetAvailableTextureMem(device); vidmem_end = IDirect3DDevice9Ex_GetAvailableTextureMem(device);
diff = vidmem_start - vidmem_end; diff = vidmem_start - vidmem_end;
diff = abs(diff); diff = abs(diff);
@ -1947,7 +1947,7 @@ static void test_vidmem_accounting(void)
IDirect3DTexture9_Release(textures[i]); IDirect3DTexture9_Release(textures[i]);
} }
ref = IDirect3DDevice9_Release(device); ref = IDirect3DDevice9Ex_Release(device);
ok(!ref, "Unexpected refcount %lu.\n", ref); ok(!ref, "Unexpected refcount %lu.\n", ref);
done: done:
@ -1999,7 +1999,7 @@ static void test_user_memory_getdc(void)
IDirect3DSurface9_Release(surface); IDirect3DSurface9_Release(surface);
free(data); free(data);
ref = IDirect3DDevice9_Release(device); ref = IDirect3DDevice9Ex_Release(device);
ok(!ref, "Unexpected refcount %lu.\n", ref); ok(!ref, "Unexpected refcount %lu.\n", ref);
done: done:
@ -3879,26 +3879,26 @@ static void test_backbuffer_resize(void)
return; return;
} }
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CLIPPING, FALSE); hr = IDirect3DDevice9Ex_SetRenderState(device, D3DRS_CLIPPING, FALSE);
ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, FALSE); hr = IDirect3DDevice9Ex_SetRenderState(device, D3DRS_ZENABLE, FALSE);
ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); hr = IDirect3DDevice9Ex_SetRenderState(device, D3DRS_LIGHTING, FALSE);
ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); hr = IDirect3DDevice9Ex_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE);
ok(SUCCEEDED(hr), "Failed to set FVF, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to set FVF, hr %#lx.\n", hr);
hr = IDirect3DDevice9_GetBackBuffer(device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer); hr = IDirect3DDevice9Ex_GetBackBuffer(device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer);
ok(SUCCEEDED(hr), "Failed to get backbuffer, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to get backbuffer, hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetRenderTarget(device, 0, backbuffer); hr = IDirect3DDevice9Ex_SetRenderTarget(device, 0, backbuffer);
ok(SUCCEEDED(hr), "Failed to set render target, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to set render target, hr %#lx.\n", hr);
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 1.0f, 0); hr = IDirect3DDevice9Ex_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 1.0f, 0);
ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
color = get_pixel_color(device, 1, 1); color = get_pixel_color(device, 1, 1);
ok(color == 0x00ff0000, "Got unexpected color 0x%08x.\n", color); ok(color == 0x00ff0000, "Got unexpected color 0x%08x.\n", color);
hr = IDirect3DDevice9_GetSwapChain(device, 0, &old_swapchain); hr = IDirect3DDevice9Ex_GetSwapChain(device, 0, &old_swapchain);
ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DSurface9_GetContainer(backbuffer, &IID_IDirect3DSwapChain9, (void **)&swapchain); hr = IDirect3DSurface9_GetContainer(backbuffer, &IID_IDirect3DSwapChain9, (void **)&swapchain);
@ -3916,7 +3916,7 @@ static void test_backbuffer_resize(void)
present_parameters.Windowed = TRUE; present_parameters.Windowed = TRUE;
present_parameters.EnableAutoDepthStencil = TRUE; present_parameters.EnableAutoDepthStencil = TRUE;
present_parameters.AutoDepthStencilFormat = D3DFMT_D24S8; present_parameters.AutoDepthStencilFormat = D3DFMT_D24S8;
hr = IDirect3DDevice9_Reset(device, &present_parameters); hr = IDirect3DDevice9Ex_Reset(device, &present_parameters);
ok(SUCCEEDED(hr), "Failed to reset, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to reset, hr %#lx.\n", hr);
old_backbuffer = backbuffer; old_backbuffer = backbuffer;
@ -3925,7 +3925,7 @@ static void test_backbuffer_resize(void)
ok(surface_desc.Width == 640, "Got unexpected width %u.\n", surface_desc.Width); ok(surface_desc.Width == 640, "Got unexpected width %u.\n", surface_desc.Width);
ok(surface_desc.Height == 480, "Got unexpected height %u.\n", surface_desc.Height); ok(surface_desc.Height == 480, "Got unexpected height %u.\n", surface_desc.Height);
hr = IDirect3DDevice9_GetSwapChain(device, 0, &swapchain); hr = IDirect3DDevice9Ex_GetSwapChain(device, 0, &swapchain);
ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(swapchain == old_swapchain, "Swapchains didn't match.\n"); ok(swapchain == old_swapchain, "Swapchains didn't match.\n");
IDirect3DSwapChain9_Release(swapchain); IDirect3DSwapChain9_Release(swapchain);
@ -3938,30 +3938,30 @@ static void test_backbuffer_resize(void)
hr = IDirect3DSurface9_GetContainer(old_backbuffer, &IID_IDirect3DDevice9, (void **)&device2); hr = IDirect3DSurface9_GetContainer(old_backbuffer, &IID_IDirect3DDevice9, (void **)&device2);
ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(device2 == device, "Devices didn't match.\n"); ok(device2 == device, "Devices didn't match.\n");
IDirect3DDevice9_Release(device2); IDirect3DDevice9Ex_Release(device2);
refcount = IDirect3DSurface9_Release(old_backbuffer); refcount = IDirect3DSurface9_Release(old_backbuffer);
ok(!refcount, "Surface has %lu references left.\n", refcount); ok(!refcount, "Surface has %lu references left.\n", refcount);
hr = IDirect3DDevice9_GetBackBuffer(device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer); hr = IDirect3DDevice9Ex_GetBackBuffer(device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer);
ok(SUCCEEDED(hr), "Failed to get backbuffer, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to get backbuffer, hr %#lx.\n", hr);
ok(backbuffer != old_backbuffer, "Expected new backbuffer surface.\n"); ok(backbuffer != old_backbuffer, "Expected new backbuffer surface.\n");
hr = IDirect3DDevice9_SetRenderTarget(device, 0, backbuffer); hr = IDirect3DDevice9Ex_SetRenderTarget(device, 0, backbuffer);
ok(SUCCEEDED(hr), "Failed to set render target, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to set render target, hr %#lx.\n", hr);
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffff00, 1.0f, 0); hr = IDirect3DDevice9Ex_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffff00, 1.0f, 0);
ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
color = get_pixel_color(device, 1, 1); color = get_pixel_color(device, 1, 1);
ok(color == 0x00ffff00, "Got unexpected color 0x%08x.\n", color); ok(color == 0x00ffff00, "Got unexpected color 0x%08x.\n", color);
color = get_pixel_color(device, 700, 500); color = get_pixel_color(device, 700, 500);
ok(color == 0x00ffff00, "Got unexpected color 0x%08x.\n", color); ok(color == 0x00ffff00, "Got unexpected color 0x%08x.\n", color);
hr = IDirect3DDevice9_BeginScene(device); hr = IDirect3DDevice9Ex_BeginScene(device);
ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to begin scene, hr %#lx.\n", hr);
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad)); hr = IDirect3DDevice9Ex_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad));
ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to draw, hr %#lx.\n", hr);
hr = IDirect3DDevice9_EndScene(device); hr = IDirect3DDevice9Ex_EndScene(device);
ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr);
color = get_pixel_color(device, 1, 1); color = get_pixel_color(device, 1, 1);
ok(color == 0x0000ff00, "Got unexpected color 0x%08x.\n", color); ok(color == 0x0000ff00, "Got unexpected color 0x%08x.\n", color);
@ -3969,7 +3969,7 @@ static void test_backbuffer_resize(void)
ok(color == 0x0000ff00, "Got unexpected color 0x%08x.\n", color); ok(color == 0x0000ff00, "Got unexpected color 0x%08x.\n", color);
IDirect3DSurface9_Release(backbuffer); IDirect3DSurface9_Release(backbuffer);
refcount = IDirect3DDevice9_Release(device); refcount = IDirect3DDevice9Ex_Release(device);
ok(!refcount, "Device has %lu references left.\n", refcount); ok(!refcount, "Device has %lu references left.\n", refcount);
DestroyWindow(window); DestroyWindow(window);
} }

View file

@ -2851,7 +2851,7 @@ static void test_limits(void)
* (approximately sampler 40) causes memory corruption in Windows, so * (approximately sampler 40) causes memory corruption in Windows, so
* there is no bounds checking. */ * there is no bounds checking. */
IDirect3DTexture9_Release(texture); IDirect3DTexture9_Release(texture);
refcount = IDirect3D9_Release(device); refcount = IDirect3DDevice9_Release(device);
ok(!refcount, "Device has %lu references left.\n", refcount); ok(!refcount, "Device has %lu references left.\n", refcount);
cleanup: cleanup:
IDirect3D9_Release(d3d); IDirect3D9_Release(d3d);
@ -2945,7 +2945,7 @@ static void test_depthstenciltest(void)
ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(hr == S_OK, "Got hr %#lx.\n", hr);
if(pDepthStencil) IDirect3DSurface9_Release(pDepthStencil); if(pDepthStencil) IDirect3DSurface9_Release(pDepthStencil);
IDirect3D9_Release(pDevice); IDirect3DDevice9_Release(pDevice);
/* Now see if autodepthstencil disable is honored. First, without a format set */ /* Now see if autodepthstencil disable is honored. First, without a format set */
ZeroMemory( &d3dpp, sizeof(d3dpp) ); ZeroMemory( &d3dpp, sizeof(d3dpp) );
@ -2980,7 +2980,7 @@ static void test_depthstenciltest(void)
ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(state == D3DZB_FALSE, "D3DRS_ZENABLE is %s\n", state == D3DZB_FALSE ? "D3DZB_FALSE" : (state == D3DZB_TRUE ? "D3DZB_TRUE" : "D3DZB_USEW")); ok(state == D3DZB_FALSE, "D3DRS_ZENABLE is %s\n", state == D3DZB_FALSE ? "D3DZB_FALSE" : (state == D3DZB_TRUE ? "D3DZB_TRUE" : "D3DZB_USEW"));
IDirect3D9_Release(pDevice); IDirect3DDevice9_Release(pDevice);
/* Next, try EnableAutoDepthStencil FALSE with a depth stencil format set */ /* Next, try EnableAutoDepthStencil FALSE with a depth stencil format set */
ZeroMemory( &d3dpp, sizeof(d3dpp) ); ZeroMemory( &d3dpp, sizeof(d3dpp) );
@ -3018,7 +3018,7 @@ cleanup:
if(pDepthStencil) IDirect3DSurface9_Release(pDepthStencil); if(pDepthStencil) IDirect3DSurface9_Release(pDepthStencil);
if (pDevice) if (pDevice)
{ {
ULONG refcount = IDirect3D9_Release(pDevice); ULONG refcount = IDirect3DDevice9_Release(pDevice);
ok(!refcount, "Device has %lu references left.\n", refcount); ok(!refcount, "Device has %lu references left.\n", refcount);
} }
IDirect3D9_Release(d3d); IDirect3D9_Release(d3d);
@ -8389,7 +8389,7 @@ static void test_surface_alignment(void)
continue; continue;
} }
level_count = IDirect3DBaseTexture9_GetLevelCount(texture); level_count = IDirect3DTexture9_GetLevelCount(texture);
for (j = 0; j < level_count; ++j) for (j = 0; j < level_count; ++j)
{ {
IDirect3DTexture9_GetLevelDesc(texture, j, &desc); IDirect3DTexture9_GetLevelDesc(texture, j, &desc);

View file

@ -1813,7 +1813,7 @@ static void resource_check_data(IDirect3DDevice9 *device, const struct state_tes
ok(w == d->stream_stride, "Stream source stride %u, expected %u.\n", w, d->stream_stride); ok(w == d->stream_stride, "Stream source stride %u, expected %u.\n", w, d->stream_stride);
if (SUCCEEDED(hr) && ptr) if (SUCCEEDED(hr) && ptr)
{ {
IDirect3DIndexBuffer9_Release((IDirect3DVertexBuffer9 *)ptr); IDirect3DVertexBuffer9_Release((IDirect3DVertexBuffer9 *)ptr);
} }
} }
@ -2002,7 +2002,7 @@ static void resource_test_cleanup(IDirect3DDevice9 *device, struct state_test *t
for (i = 0; i < arg->tex_count; ++i) for (i = 0; i < arg->tex_count; ++i)
{ {
IDirect3DBaseTexture9_Release(ctx->test_data_all.tex[i]); IDirect3DTexture9_Release(ctx->test_data_all.tex[i]);
} }
free(ctx->default_data.vb); free(ctx->default_data.vb);

View file

@ -12444,7 +12444,7 @@ stop:
if (vs) if (vs)
IDirect3DVertexShader9_Release(vs); IDirect3DVertexShader9_Release(vs);
if (ps) if (ps)
IDirect3DVertexShader9_Release(ps); IDirect3DPixelShader9_Release(ps);
winetest_pop_context(); winetest_pop_context();
} }
@ -23210,7 +23210,7 @@ static void test_uninitialized_varyings(void)
if (vs) if (vs)
IDirect3DVertexShader9_Release(vs); IDirect3DVertexShader9_Release(vs);
if (ps) if (ps)
IDirect3DVertexShader9_Release(ps); IDirect3DPixelShader9_Release(ps);
} }
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
@ -24406,7 +24406,7 @@ static void test_color_clamping(void)
if (vs) if (vs)
IDirect3DVertexShader9_Release(vs); IDirect3DVertexShader9_Release(vs);
if (ps) if (ps)
IDirect3DVertexShader9_Release(ps); IDirect3DPixelShader9_Release(ps);
} }
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
@ -28302,7 +28302,7 @@ static void test_mipmap_upload(void)
D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture, NULL); D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture, NULL);
ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(hr == S_OK, "Got hr %#lx.\n", hr);
level_count = IDirect3DBaseTexture9_GetLevelCount(texture); level_count = IDirect3DTexture9_GetLevelCount(texture);
hr = IDirect3DTexture9_LockRect(texture, 0, &locked_rect, NULL, 0); hr = IDirect3DTexture9_LockRect(texture, 0, &locked_rect, NULL, 0);
ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(hr == S_OK, "Got hr %#lx.\n", hr);
@ -28535,7 +28535,7 @@ static void test_default_diffuse(void)
winetest_pop_context(); winetest_pop_context();
} }
IDirect3DVertexShader9_Release(vb); IDirect3DVertexBuffer9_Release(vb);
release_test_context(&context); release_test_context(&context);
} }

View file

@ -134,10 +134,10 @@ SOURCES = \
d3d12sdklayers.idl \ d3d12sdklayers.idl \
d3d12shader.idl \ d3d12shader.idl \
d3d12video.idl \ d3d12video.idl \
d3d8.h \ d3d8.idl \
d3d8caps.h \ d3d8caps.h \
d3d8types.h \ d3d8types.h \
d3d9.h \ d3d9.idl \
d3d9caps.h \ d3d9caps.h \
d3d9types.h \ d3d9types.h \
d3dcaps.h \ d3dcaps.h \

File diff suppressed because it is too large Load diff

373
include/d3d8.idl Normal file
View file

@ -0,0 +1,373 @@
/*
* Copyright (C) 2002 Jason Edmeades
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
cpp_quote("#ifndef DIRECT3D_VERSION")
cpp_quote("#define DIRECT3D_VERSION 0x0800")
cpp_quote("#endif")
import "unknwn.idl";
import "d3d8types.h";
import "d3d8caps.h";
cpp_quote("#if 0")
typedef struct _LUID LUID;
typedef struct _RGNDATA RGNDATA;
cpp_quote("#endif")
#ifndef __MSABI_LONG
#if !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES)
# define __MSABI_LONG(x) x ## l
# else
# define __MSABI_LONG(x) x
# endif
#endif
const long D3DCREATE_FPU_PRESERVE = __MSABI_LONG(0x00000002);
const long D3DCREATE_MULTITHREADED = __MSABI_LONG(0x00000004);
const long D3DCREATE_PUREDEVICE = __MSABI_LONG(0x00000010);
const long D3DCREATE_SOFTWARE_VERTEXPROCESSING = __MSABI_LONG(0x00000020);
const long D3DCREATE_HARDWARE_VERTEXPROCESSING = __MSABI_LONG(0x00000040);
const long D3DCREATE_MIXED_VERTEXPROCESSING = __MSABI_LONG(0x00000080);
const long D3DSPD_IUNKNOWN = __MSABI_LONG(0x00000001);
const unsigned int D3D_SDK_VERSION = 220;
const unsigned int D3DADAPTER_DEFAULT = 0;
const unsigned int D3DENUM_NO_WHQL_LEVEL = __MSABI_LONG(0x00000002);
cpp_quote("#define _FACD3D 0x876")
cpp_quote("#define MAKE_D3DHRESULT(code) MAKE_HRESULT(1, _FACD3D, code)")
const HRESULT D3D_OK = __MSABI_LONG(0);
const HRESULT D3DERR_OUTOFVIDEOMEMORY = __MSABI_LONG(0x8876017c);
const HRESULT D3DERR_WRONGTEXTUREFORMAT = __MSABI_LONG(0x88760818);
const HRESULT D3DERR_UNSUPPORTEDCOLOROPERATION = __MSABI_LONG(0x88760819);
const HRESULT D3DERR_UNSUPPORTEDCOLORARG = __MSABI_LONG(0x8876081a);
const HRESULT D3DERR_UNSUPPORTEDALPHAOPERATION = __MSABI_LONG(0x8876081b);
const HRESULT D3DERR_UNSUPPORTEDALPHAARG = __MSABI_LONG(0x8876081c);
const HRESULT D3DERR_TOOMANYOPERATIONS = __MSABI_LONG(0x8876081d);
const HRESULT D3DERR_CONFLICTINGTEXTUREFILTER = __MSABI_LONG(0x8876081e);
const HRESULT D3DERR_UNSUPPORTEDFACTORVALUE = __MSABI_LONG(0x8876081f);
const HRESULT D3DERR_CONFLICTINGRENDERSTATE = __MSABI_LONG(0x88760821);
const HRESULT D3DERR_UNSUPPORTEDTEXTUREFILTER = __MSABI_LONG(0x88760822);
const HRESULT D3DERR_CONFLICTINGTEXTUREPALETTE = __MSABI_LONG(0x88760826);
const HRESULT D3DERR_DRIVERINTERNALERROR = __MSABI_LONG(0x88760827);
const HRESULT D3DERR_NOTFOUND = __MSABI_LONG(0x88760866);
const HRESULT D3DERR_MOREDATA = __MSABI_LONG(0x88760867);
const HRESULT D3DERR_DEVICELOST = __MSABI_LONG(0x88760868);
const HRESULT D3DERR_DEVICENOTRESET = __MSABI_LONG(0x88760869);
const HRESULT D3DERR_NOTAVAILABLE = __MSABI_LONG(0x8876086a);
const HRESULT D3DERR_INVALIDDEVICE = __MSABI_LONG(0x8876086b);
const HRESULT D3DERR_INVALIDCALL = __MSABI_LONG(0x8876086c);
const HRESULT D3DERR_DRIVERINVALIDCALL = __MSABI_LONG(0x8876086d);
typedef struct IDirect3D8 *LPDIRECT3D8;
typedef struct IDirect3DDevice8 *LPDIRECT3DDEVICE8;
typedef struct IDirect3DResource8 *LPDIRECT3DRESOURCE8, *PDIRECT3DRESOURCE8;
typedef struct IDirect3DVertexBuffer8 *LPDIRECT3DVERTEXBUFFER8, *PDIRECT3DVERTEXBUFFER8;
typedef struct IDirect3DVolume8 *LPDIRECT3DVOLUME8, *PDIRECT3DVOLUME8;
typedef struct IDirect3DSwapChain8 *LPDIRECT3DSWAPCHAIN8, *PDIRECT3DSWAPCHAIN8;
typedef struct IDirect3DSurface8 *LPDIRECT3DSURFACE8, *PDIRECT3DSURFACE8;
typedef struct IDirect3DIndexBuffer8 *LPDIRECT3DINDEXBUFFER8, *PDIRECT3DINDEXBUFFER8;
typedef struct IDirect3DBaseTexture8 *LPDIRECT3DBASETEXTURE8, *PDIRECT3DBASETEXTURE8;
typedef struct IDirect3DTexture8 *LPDIRECT3DTEXTURE8, *PDIRECT3DTEXTURE8;
typedef struct IDirect3DCubeTexture8 *LPDIRECT3DCUBETEXTURE8, *PDIRECT3DCUBETEXTURE8;
typedef struct IDirect3DVolumeTexture8 *LPDIRECT3DVOLUMETEXTURE8, *PDIRECT3DVOLUMETEXTURE8;
[
local,
object,
uuid(1dd9e8da-1c77-4d40-b0cf-98fefdff9512),
]
interface IDirect3D8 : IUnknown
{
HRESULT RegisterSoftwareDevice(void *init_function);
UINT GetAdapterCount();
HRESULT GetAdapterIdentifier(UINT adapter_index, DWORD flags, D3DADAPTER_IDENTIFIER8 *identifier);
UINT GetAdapterModeCount(UINT adapter_index);
HRESULT EnumAdapterModes(UINT adapter_index, UINT mode_index, D3DDISPLAYMODE *mode);
HRESULT GetAdapterDisplayMode(UINT adapter_index, D3DDISPLAYMODE *mode);
HRESULT CheckDeviceType(UINT adapter_index, D3DDEVTYPE device_type,
D3DFORMAT display_format, D3DFORMAT backbuffer_format, BOOL windowed);
HRESULT CheckDeviceFormat(UINT adapter_index, D3DDEVTYPE device_type,
D3DFORMAT adapter_format, DWORD usage, D3DRESOURCETYPE resource_type, D3DFORMAT format);
HRESULT CheckDeviceMultiSampleType(UINT adapter_index, D3DDEVTYPE device_type, D3DFORMAT format,
BOOL windowed, D3DMULTISAMPLE_TYPE multisample_type);
HRESULT CheckDepthStencilMatch(UINT adapter_index, D3DDEVTYPE device_type,
D3DFORMAT adapter_format, D3DFORMAT render_target_format, D3DFORMAT depth_stencil_format);
HRESULT GetDeviceCaps(UINT adapter_index, D3DDEVTYPE device_type, D3DCAPS8 *caps);
HMONITOR GetAdapterMonitor(UINT adapter_index);
HRESULT CreateDevice(UINT adapter_index, D3DDEVTYPE device_type, HWND focus_window,
DWORD flags, D3DPRESENT_PARAMETERS *parameters, struct IDirect3DDevice8 **device);
}
[
local,
object,
uuid(bd7349f5-14f1-42e4-9c79-972380db40c0),
]
interface IDirect3DVolume8 : IUnknown
{
HRESULT GetDevice(struct IDirect3DDevice8 **device);
HRESULT SetPrivateData(REFGUID guid, const void *data, DWORD data_size, DWORD flags);
HRESULT GetPrivateData(REFGUID guid, void *data, DWORD *size);
HRESULT FreePrivateData(REFGUID guid);
HRESULT GetContainer(REFIID iid, void **container);
HRESULT GetDesc(D3DVOLUME_DESC *desc);
HRESULT LockBox(D3DLOCKED_BOX *locked_box, const D3DBOX *box, DWORD flags);
HRESULT UnlockBox();
}
[
local,
object,
uuid(928c088b-76b9-4c6b-a536-a590853876cd),
]
interface IDirect3DSwapChain8 : IUnknown
{
HRESULT Present(const RECT *src_rect, const RECT *dst_rect,
HWND dst_window_override, const RGNDATA *dirty_region);
HRESULT GetBackBuffer(UINT backbuffer_idx, D3DBACKBUFFER_TYPE type, struct IDirect3DSurface8 **backbuffer);
}
[
local,
object,
uuid(1b36bb7b-09b7-410a-b445-7d1430d7b33f),
]
interface IDirect3DResource8 : IUnknown
{
HRESULT GetDevice(struct IDirect3DDevice8 **device);
HRESULT SetPrivateData(REFGUID guid, const void *data, DWORD data_size, DWORD flags);
HRESULT GetPrivateData(REFGUID guid, void *data, DWORD *size);
HRESULT FreePrivateData(REFGUID guid);
DWORD SetPriority(DWORD priority);
DWORD GetPriority();
void PreLoad();
D3DRESOURCETYPE GetType();
}
[
local,
object,
uuid(b96eebca-b326-4ea5-882f-2ff5bae021dd),
]
interface IDirect3DSurface8 : IUnknown
{
HRESULT GetDevice(struct IDirect3DDevice8 **device);
HRESULT SetPrivateData(REFGUID guid, const void *data, DWORD data_size, DWORD flags);
HRESULT GetPrivateData(REFGUID guid, void *data, DWORD *size);
HRESULT FreePrivateData(REFGUID guid);
HRESULT GetContainer(REFIID iid, void **container);
HRESULT GetDesc(D3DSURFACE_DESC *desc);
HRESULT LockRect(D3DLOCKED_RECT *locked_rect, const RECT *rect, DWORD flags);
HRESULT UnlockRect();
}
[
local,
object,
uuid(8aeeeac7-05f9-44d4-b591-000b0df1cb95),
]
interface IDirect3DVertexBuffer8 : IDirect3DResource8
{
HRESULT Lock(UINT offset, UINT size, BYTE **data, DWORD flags);
HRESULT Unlock();
HRESULT GetDesc(D3DVERTEXBUFFER_DESC *desc);
}
[
local,
object,
uuid(0e689c9a-053d-44a0-9d92-db0e3d750f86),
]
interface IDirect3DIndexBuffer8 : IDirect3DResource8
{
HRESULT Lock(UINT offset, UINT size, BYTE **data, DWORD flags);
HRESULT Unlock();
HRESULT GetDesc(D3DINDEXBUFFER_DESC *desc);
}
[
local,
object,
uuid(b4211cfa-51b9-4a9f-ab78-db99b2bb678e),
]
interface IDirect3DBaseTexture8 : IDirect3DResource8
{
DWORD SetLOD(DWORD lod);
DWORD GetLOD();
DWORD GetLevelCount();
}
[
local,
object,
uuid(3ee5b968-2aca-4c34-8bb5-7e0c3d19b750),
]
interface IDirect3DCubeTexture8 : IDirect3DBaseTexture8
{
HRESULT GetLevelDesc(UINT level, D3DSURFACE_DESC *desc);
HRESULT GetCubeMapSurface(D3DCUBEMAP_FACES face, UINT level, IDirect3DSurface8 **surface);
HRESULT LockRect(D3DCUBEMAP_FACES face, UINT level, D3DLOCKED_RECT *locked_rect, const RECT *rect, DWORD flags);
HRESULT UnlockRect(D3DCUBEMAP_FACES face, UINT level);
HRESULT AddDirtyRect(D3DCUBEMAP_FACES face, const RECT *dirty_rect);
}
[
local,
object,
uuid(e4cdd575-2866-4f01-b12e-7eece1ec9358),
]
interface IDirect3DTexture8 : IDirect3DBaseTexture8
{
HRESULT GetLevelDesc(UINT level, D3DSURFACE_DESC *desc);
HRESULT GetSurfaceLevel(UINT level, IDirect3DSurface8 **surface);
HRESULT LockRect(UINT level, D3DLOCKED_RECT *locked_rect, const RECT *rect, DWORD flags);
HRESULT UnlockRect(UINT level);
HRESULT AddDirtyRect(const RECT *dirty_rect);
}
[
local,
object,
uuid(4b8aaafa-140f-42ba-9131-597eafaa2ead),
]
interface IDirect3DVolumeTexture8 : IDirect3DBaseTexture8
{
HRESULT GetLevelDesc(UINT level, D3DVOLUME_DESC *desc);
HRESULT GetVolumeLevel(UINT level, IDirect3DVolume8 **volume);
HRESULT LockBox(UINT level, D3DLOCKED_BOX *locked_box, const D3DBOX *box, DWORD flags);
HRESULT UnlockBox(UINT level);
HRESULT AddDirtyBox(const D3DBOX *dirty_box);
}
[
local,
object,
uuid(7385e5df-8fe8-41d5-86b6-d7b48547b6cf),
]
interface IDirect3DDevice8 : IUnknown
{
HRESULT TestCooperativeLevel();
UINT GetAvailableTextureMem();
HRESULT ResourceManagerDiscardBytes(DWORD size);
HRESULT GetDirect3D(IDirect3D8 **d3d);
HRESULT GetDeviceCaps(D3DCAPS8 *caps);
HRESULT GetDisplayMode(D3DDISPLAYMODE *mode);
HRESULT GetCreationParameters(D3DDEVICE_CREATION_PARAMETERS *parameters);
HRESULT SetCursorProperties(UINT x_hotspot, UINT y_hotspot, IDirect3DSurface8 *bitmap);
void SetCursorPosition(UINT x, UINT y, DWORD flags);
BOOL ShowCursor(BOOL show);
HRESULT CreateAdditionalSwapChain(D3DPRESENT_PARAMETERS *parameters, IDirect3DSwapChain8 **swapchain);
HRESULT Reset(D3DPRESENT_PARAMETERS *parameters);
HRESULT Present(const RECT *src_rect, const RECT *dst_rect,
HWND dst_window_override, const RGNDATA *dirty_region);
HRESULT GetBackBuffer(UINT backbuffer_idx, D3DBACKBUFFER_TYPE type, IDirect3DSurface8 **backbuffer);
HRESULT GetRasterStatus(D3DRASTER_STATUS *status);
void SetGammaRamp(DWORD flags, const D3DGAMMARAMP *ramp);
void GetGammaRamp(D3DGAMMARAMP *ramp);
HRESULT CreateTexture(UINT width, UINT height, UINT levels, DWORD usage, D3DFORMAT format,
D3DPOOL pool, IDirect3DTexture8 **texture);
HRESULT CreateVolumeTexture(UINT width, UINT height, UINT depth, UINT levels, DWORD usage, D3DFORMAT format,
D3DPOOL pool, IDirect3DVolumeTexture8 **texture);
HRESULT CreateCubeTexture(UINT width, UINT levels, DWORD usage, D3DFORMAT format,
D3DPOOL pool, IDirect3DCubeTexture8 **texture);
HRESULT CreateVertexBuffer(UINT size, DWORD usage, DWORD fvf, D3DPOOL pool, IDirect3DVertexBuffer8 **buffer);
HRESULT CreateIndexBuffer(UINT size, DWORD usage, D3DFORMAT format, D3DPOOL pool, IDirect3DIndexBuffer8 **buffer);
HRESULT CreateRenderTarget(UINT width, UINT height, D3DFORMAT format,
D3DMULTISAMPLE_TYPE multisample_type, BOOL lockable, IDirect3DSurface8 **surface);
HRESULT CreateDepthStencilSurface(UINT width, UINT height, D3DFORMAT format,
D3DMULTISAMPLE_TYPE multisample_type, IDirect3DSurface8 **surface);
HRESULT CreateImageSurface(UINT width, UINT height, D3DFORMAT format, IDirect3DSurface8 **surface);
HRESULT CopyRects(IDirect3DSurface8 *src_surface, const RECT *src_rects, UINT rect_count,
IDirect3DSurface8 *dst_surface, const POINT *dst_points);
HRESULT UpdateTexture(IDirect3DBaseTexture8 *src_texture, IDirect3DBaseTexture8 *dst_texture);
HRESULT GetFrontBuffer(IDirect3DSurface8 *dst_surface);
HRESULT SetRenderTarget(IDirect3DSurface8 *render_target, IDirect3DSurface8 *depth_stencil);
HRESULT GetRenderTarget(IDirect3DSurface8 **surface);
HRESULT GetDepthStencilSurface(IDirect3DSurface8 **surface);
HRESULT BeginScene();
HRESULT EndScene();
HRESULT Clear(DWORD rect_count, const D3DRECT *rects, DWORD flags, D3DCOLOR color, float z, DWORD stencil);
HRESULT SetTransform(D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix);
HRESULT GetTransform(D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix);
HRESULT MultiplyTransform(D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix);
HRESULT SetViewport(const D3DVIEWPORT8 *viewport);
HRESULT GetViewport(D3DVIEWPORT8 *viewport);
HRESULT SetMaterial(const D3DMATERIAL8 *material);
HRESULT GetMaterial(D3DMATERIAL8 *material);
HRESULT SetLight(DWORD index, const D3DLIGHT8 *light);
HRESULT GetLight(DWORD index, D3DLIGHT8 *light);
HRESULT LightEnable(DWORD index, BOOL enable);
HRESULT GetLightEnable(DWORD index, BOOL *enable);
HRESULT SetClipPlane(DWORD index, const float *plane);
HRESULT GetClipPlane(DWORD index, float *plane);
HRESULT SetRenderState(D3DRENDERSTATETYPE state, DWORD value);
HRESULT GetRenderState(D3DRENDERSTATETYPE state, DWORD *value);
HRESULT BeginStateBlock();
HRESULT EndStateBlock(DWORD *stateblock);
HRESULT ApplyStateBlock(DWORD stateblock);
HRESULT CaptureStateBlock(DWORD stateblock);
HRESULT DeleteStateBlock(DWORD stateblock);
HRESULT CreateStateBlock(D3DSTATEBLOCKTYPE type, DWORD *stateblock);
HRESULT SetClipStatus(const D3DCLIPSTATUS8 *clip_status);
HRESULT GetClipStatus(D3DCLIPSTATUS8 *clip_status);
HRESULT GetTexture(DWORD index, IDirect3DBaseTexture8 **texture);
HRESULT SetTexture(DWORD index, IDirect3DBaseTexture8 *texture);
HRESULT GetTextureStageState(DWORD index, D3DTEXTURESTAGESTATETYPE type, DWORD *value);
HRESULT SetTextureStageState(DWORD index, D3DTEXTURESTAGESTATETYPE type, DWORD value);
HRESULT ValidateDevice(DWORD *pass_count);
HRESULT GetInfo(DWORD id, void *info, DWORD size);
HRESULT SetPaletteEntries(UINT index, const PALETTEENTRY *entries);
HRESULT GetPaletteEntries(UINT index, PALETTEENTRY *entries);
HRESULT SetCurrentTexturePalette(UINT index);
HRESULT GetCurrentTexturePalette(UINT *index);
HRESULT DrawPrimitive(D3DPRIMITIVETYPE primitive_type, UINT start_vertex, UINT primitive_count);
HRESULT DrawIndexedPrimitive(D3DPRIMITIVETYPE primitive_type, UINT min_vertex_idx,
UINT vertex_count, UINT start_index, UINT primitive_count);
HRESULT DrawPrimitiveUP(D3DPRIMITIVETYPE primitive_type, UINT primitive_count, const void *data, UINT stride);
HRESULT DrawIndexedPrimitiveUP(D3DPRIMITIVETYPE primitive_type, UINT min_vertex_idx, UINT vertex_count,
UINT primitive_count, const void *index_data, D3DFORMAT index_format, const void *data, UINT stride);
HRESULT ProcessVertices(UINT src_start_idx, UINT dst_idx, UINT vertex_count,
IDirect3DVertexBuffer8 *dst_buffer, DWORD flags);
HRESULT CreateVertexShader(const DWORD *declaration, const DWORD *byte_code, DWORD *shader, DWORD usage);
HRESULT SetVertexShader(DWORD shader);
HRESULT GetVertexShader(DWORD *shader);
HRESULT DeleteVertexShader(DWORD shader);
HRESULT SetVertexShaderConstant(DWORD start_idx, const void *data, DWORD count);
HRESULT GetVertexShaderConstant(DWORD start_idx, void *data, DWORD count);
HRESULT GetVertexShaderDeclaration(DWORD shader, void *data, DWORD *size);
HRESULT GetVertexShaderFunction(DWORD shader, void *data, DWORD *size);
HRESULT SetStreamSource(UINT stream_idx, IDirect3DVertexBuffer8 *buffer, UINT stride);
HRESULT GetStreamSource(UINT stream_idx, IDirect3DVertexBuffer8 **buffer, UINT *stride);
HRESULT SetIndices(IDirect3DIndexBuffer8 *buffer, UINT base_vertex_idx);
HRESULT GetIndices(IDirect3DIndexBuffer8 **buffer, UINT *base_vertex_idx);
HRESULT CreatePixelShader(const DWORD *byte_code, DWORD *shader);
HRESULT SetPixelShader(DWORD shader);
HRESULT GetPixelShader(DWORD *shader);
HRESULT DeletePixelShader(DWORD shader);
HRESULT SetPixelShaderConstant(DWORD start_idx, const void *data, DWORD count);
HRESULT GetPixelShaderConstant(DWORD start_idx, void *data, DWORD count);
HRESULT GetPixelShaderFunction(DWORD shader, void *data, DWORD *size);
HRESULT DrawRectPatch(UINT handle, const float *segment_count, const D3DRECTPATCH_INFO *patch_info);
HRESULT DrawTriPatch(UINT handle, const float *segment_count, const D3DTRIPATCH_INFO *patch_info);
HRESULT DeletePatch(UINT handle);
}
IDirect3D8 * __stdcall Direct3DCreate8(UINT sdk_version);

File diff suppressed because it is too large Load diff

576
include/d3d9.idl Normal file
View file

@ -0,0 +1,576 @@
/*
* Copyright (C) 2002-2003 Jason Edmeades
* Copyright (C) 2002-2003 Raphael Junqueira
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
cpp_quote("#ifndef _D3D9_H_")
cpp_quote("#define _D3D9_H_")
cpp_quote("#ifndef DIRECT3D_VERSION")
cpp_quote("#define DIRECT3D_VERSION 0x0900")
cpp_quote("#endif")
import "unknwn.idl";
import "d3d9types.h";
import "d3d9caps.h";
cpp_quote("#if 0")
typedef struct _LUID LUID;
typedef struct _RGNDATA RGNDATA;
cpp_quote("#endif")
#ifndef __MSABI_LONG
#if !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES)
# define __MSABI_LONG(x) x ## l
# else
# define __MSABI_LONG(x) x
# endif
#endif
const long D3DCREATE_FPU_PRESERVE = __MSABI_LONG(0x00000002);
const long D3DCREATE_MULTITHREADED = __MSABI_LONG(0x00000004);
const long D3DCREATE_PUREDEVICE = __MSABI_LONG(0x00000010);
const long D3DCREATE_SOFTWARE_VERTEXPROCESSING = __MSABI_LONG(0x00000020);
const long D3DCREATE_HARDWARE_VERTEXPROCESSING = __MSABI_LONG(0x00000040);
const long D3DCREATE_MIXED_VERTEXPROCESSING = __MSABI_LONG(0x00000080);
const long D3DCREATE_DISABLE_DRIVER_MANAGEMENT = __MSABI_LONG(0x00000100);
const long D3DCREATE_ADAPTERGROUP_DEVICE = __MSABI_LONG(0x00000200);
const long D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX = __MSABI_LONG(0x00000400);
const long D3DCREATE_NOWINDOWCHANGES = __MSABI_LONG(0x00000800);
const long D3DCREATE_DISABLE_PSGP_THREADING = __MSABI_LONG(0x00002000);
const long D3DCREATE_ENABLE_PRESENTSTATS = __MSABI_LONG(0x00004000);
const long D3DCREATE_DISABLE_PRINTSCREEN = __MSABI_LONG(0x00008000);
const long D3DCREATE_SCREENSAVER = __MSABI_LONG(0x10000000);
const long D3DSPD_IUNKNOWN = __MSABI_LONG(0x00000001);
const unsigned int D3D_SDK_VERSION = 32;
const unsigned int D3DADAPTER_DEFAULT = 0;
const long D3DENUM_WHQL_LEVEL = __MSABI_LONG(0x00000002);
const long D3DPRESENT_DONOTWAIT = __MSABI_LONG(1);
const long D3DPRESENT_LINEAR_CONTENT = __MSABI_LONG(2);
const long D3DPRESENT_BACK_BUFFERS_MAX = __MSABI_LONG(3);
const long D3DPRESENT_BACK_BUFFERS_MAX_EX = __MSABI_LONG(30);
const long D3DSGR_NO_CALIBRATION = __MSABI_LONG(0x00000000);
const long D3DSGR_CALIBRATE = __MSABI_LONG(0x00000001);
const long D3DCURSOR_IMMEDIATE_UPDATE = __MSABI_LONG(0x00000001);
cpp_quote("#define _FACD3D 0x876")
cpp_quote("#define MAKE_D3DHRESULT(code) MAKE_HRESULT(1, _FACD3D, code)")
cpp_quote("#define MAKE_D3DSTATUS(code) MAKE_HRESULT(0, _FACD3D, code)")
const HRESULT D3D_OK = __MSABI_LONG(0);
const HRESULT D3DERR_OUTOFVIDEOMEMORY = __MSABI_LONG(0x8876017c);
const HRESULT D3DERR_WASSTILLDRAWING = __MSABI_LONG(0x8876021c);
const HRESULT D3DERR_WRONGTEXTUREFORMAT = __MSABI_LONG(0x88760818);
const HRESULT D3DERR_UNSUPPORTEDCOLOROPERATION = __MSABI_LONG(0x88760819);
const HRESULT D3DERR_UNSUPPORTEDCOLORARG = __MSABI_LONG(0x8876081a);
const HRESULT D3DERR_UNSUPPORTEDALPHAOPERATION = __MSABI_LONG(0x8876081b);
const HRESULT D3DERR_UNSUPPORTEDALPHAARG = __MSABI_LONG(0x8876081c);
const HRESULT D3DERR_TOOMANYOPERATIONS = __MSABI_LONG(0x8876081d);
const HRESULT D3DERR_CONFLICTINGTEXTUREFILTER = __MSABI_LONG(0x8876081e);
const HRESULT D3DERR_UNSUPPORTEDFACTORVALUE = __MSABI_LONG(0x8876081f);
const HRESULT D3DERR_CONFLICTINGRENDERSTATE = __MSABI_LONG(0x88760821);
const HRESULT D3DERR_UNSUPPORTEDTEXTUREFILTER = __MSABI_LONG(0x88760822);
const HRESULT D3DERR_CONFLICTINGTEXTUREPALETTE = __MSABI_LONG(0x88760826);
const HRESULT D3DERR_DRIVERINTERNALERROR = __MSABI_LONG(0x88760827);
const HRESULT D3DERR_NOTFOUND = __MSABI_LONG(0x88760866);
const HRESULT D3DERR_MOREDATA = __MSABI_LONG(0x88760867);
const HRESULT D3DERR_DEVICELOST = __MSABI_LONG(0x88760868);
const HRESULT D3DERR_DEVICENOTRESET = __MSABI_LONG(0x88760869);
const HRESULT D3DERR_NOTAVAILABLE = __MSABI_LONG(0x8876086a);
const HRESULT D3DERR_INVALIDDEVICE = __MSABI_LONG(0x8876086b);
const HRESULT D3DERR_INVALIDCALL = __MSABI_LONG(0x8876086c);
const HRESULT D3DERR_DRIVERINVALIDCALL = __MSABI_LONG(0x8876086d);
const HRESULT D3DOK_NOAUTOGEN = __MSABI_LONG(0x0876086f);
const HRESULT D3DERR_DEVICEREMOVED = __MSABI_LONG(0x88760870);
const HRESULT D3DERR_DEVICEHUNG = __MSABI_LONG(0x88760874);
const HRESULT S_NOT_RESIDENT = __MSABI_LONG(0x08760875);
const HRESULT S_RESIDENT_IN_SHARED_MEMORY = __MSABI_LONG(0x08760876);
const HRESULT S_PRESENT_MODE_CHANGED = __MSABI_LONG(0x08760877);
const HRESULT S_PRESENT_OCCLUDED = __MSABI_LONG(0x08760878);
const HRESULT D3DERR_UNSUPPORTEDOVERLAY = __MSABI_LONG(0x8876087b);
const HRESULT D3DERR_UNSUPPORTEDOVERLAYFORMAT = __MSABI_LONG(0x8876087c);
const HRESULT D3DERR_CANNOTPROTECTCONTENT = __MSABI_LONG(0x8876087d);
const HRESULT D3DERR_UNSUPPORTEDCRYPTO = __MSABI_LONG(0x8876087e);
const HRESULT D3DERR_PRESENT_STATISTICS_DISJOINT = __MSABI_LONG(0x88760884);
typedef struct IDirect3D9 *LPDIRECT3D9, *PDIRECT3D9;
typedef struct IDirect3DDevice9 *LPDIRECT3DDEVICE9;
typedef struct IDirect3DResource9 *LPDIRECT3DRESOURCE9, *PDIRECT3DRESOURCE9;
typedef struct IDirect3DVertexBuffer9 *LPDIRECT3DVERTEXBUFFER9, *PDIRECT3DVERTEXBUFFER9;
typedef struct IDirect3DVolume9 *LPDIRECT3DVOLUME9, *PDIRECT3DVOLUME9;
typedef struct IDirect3DSwapChain9 *LPDIRECT3DSWAPCHAIN9, *PDIRECT3DSWAPCHAIN9;
typedef struct IDirect3DSurface9 *LPDIRECT3DSURFACE9, *PDIRECT3DSURFACE9;
typedef struct IDirect3DIndexBuffer9 *LPDIRECT3DINDEXBUFFER9, *PDIRECT3DINDEXBUFFER9;
typedef struct IDirect3DBaseTexture9 *LPDIRECT3DBASETEXTURE9, *PDIRECT3DBASETEXTURE9;
typedef struct IDirect3DTexture9 *LPDIRECT3DTEXTURE9, *PDIRECT3DTEXTURE9;
typedef struct IDirect3DCubeTexture9 *LPDIRECT3DCUBETEXTURE9, *PDIRECT3DCUBETEXTURE9;
typedef struct IDirect3DVolumeTexture9 *LPDIRECT3DVOLUMETEXTURE9, *PDIRECT3DVOLUMETEXTURE9;
typedef struct IDirect3DVertexDeclaration9 *LPDIRECT3DVERTEXDECLARATION9;
typedef struct IDirect3DVertexShader9 *LPDIRECT3DVERTEXSHADER9;
typedef struct IDirect3DPixelShader9 *LPDIRECT3DPIXELSHADER9;
typedef struct IDirect3DStateBlock9 *LPDIRECT3DSTATEBLOCK9;
typedef struct IDirect3DQuery9 *LPDIRECT3DQUERY9, *PDIRECT3DQUERY9;
[
local,
object,
uuid(81bdcbca-64d4-426d-ae8d-ad0147f4275c),
]
interface IDirect3D9 : IUnknown
{
HRESULT RegisterSoftwareDevice(void *init_function);
UINT GetAdapterCount();
HRESULT GetAdapterIdentifier(UINT adapter_index, DWORD flags, D3DADAPTER_IDENTIFIER9 *identifier);
UINT GetAdapterModeCount(UINT adapter_index, D3DFORMAT format);
HRESULT EnumAdapterModes(UINT adapter_index, D3DFORMAT format, UINT mode_index, D3DDISPLAYMODE *mode);
HRESULT GetAdapterDisplayMode(UINT adapter_index, D3DDISPLAYMODE *mode);
HRESULT CheckDeviceType(UINT adapter_index, D3DDEVTYPE device_type,
D3DFORMAT display_format, D3DFORMAT backbuffer_format, BOOL windowed);
HRESULT CheckDeviceFormat(UINT adapter_index, D3DDEVTYPE device_type,
D3DFORMAT adapter_format, DWORD usage, D3DRESOURCETYPE resource_type, D3DFORMAT format);
HRESULT CheckDeviceMultiSampleType(UINT adapter_index, D3DDEVTYPE device_type, D3DFORMAT format,
BOOL windowed, D3DMULTISAMPLE_TYPE multisample_type, DWORD *quality_levels);
HRESULT CheckDepthStencilMatch(UINT adapter_index, D3DDEVTYPE device_type,
D3DFORMAT adapter_format, D3DFORMAT render_target_format, D3DFORMAT depth_stencil_format);
HRESULT CheckDeviceFormatConversion(UINT adapter_index,
D3DDEVTYPE device_type, D3DFORMAT src_format, D3DFORMAT dst_format);
HRESULT GetDeviceCaps(UINT adapter_index, D3DDEVTYPE device_type, D3DCAPS9 *caps);
HMONITOR GetAdapterMonitor(UINT adapter_index);
HRESULT CreateDevice(UINT adapter_index, D3DDEVTYPE device_type, HWND focus_window,
DWORD flags, D3DPRESENT_PARAMETERS *parameters, struct IDirect3DDevice9 **device);
}
[
local,
object,
uuid(24f416e6-1f67-4aa7-b88e-d33f6f3128a1),
]
interface IDirect3DVolume9 : IUnknown
{
HRESULT GetDevice(struct IDirect3DDevice9 **device);
HRESULT SetPrivateData(REFGUID guid, const void *data, DWORD data_size, DWORD flags);
HRESULT GetPrivateData(REFGUID guid, void *data, DWORD *size);
HRESULT FreePrivateData(REFGUID guid);
HRESULT GetContainer(REFIID iid, void **container);
HRESULT GetDesc(D3DVOLUME_DESC *desc);
HRESULT LockBox(D3DLOCKED_BOX *locked_box, const D3DBOX *box, DWORD flags);
HRESULT UnlockBox();
}
[
local,
object,
uuid(794950f2-adfc-458a-905e-10a10b0b503b),
]
interface IDirect3DSwapChain9 : IUnknown
{
HRESULT Present(const RECT *src_rect, const RECT *dst_rect,
HWND dst_window_override, const RGNDATA *dirty_region, DWORD flags);
HRESULT GetFrontBufferData(struct IDirect3DSurface9 *dst_surface);
HRESULT GetBackBuffer(UINT backbuffer_idx, D3DBACKBUFFER_TYPE type, struct IDirect3DSurface9 **backbuffer);
HRESULT GetRasterStatus(D3DRASTER_STATUS *status);
HRESULT GetDisplayMode(D3DDISPLAYMODE *mode);
HRESULT GetDevice(struct IDirect3DDevice9 **device);
HRESULT GetPresentParameters(D3DPRESENT_PARAMETERS *parameters);
}
[
local,
object,
uuid(05eec05d-8f7d-4362-b999-d1baf357c704),
]
interface IDirect3DResource9 : IUnknown
{
HRESULT GetDevice(struct IDirect3DDevice9 **device);
HRESULT SetPrivateData(REFGUID guid, const void *data, DWORD data_size, DWORD flags);
HRESULT GetPrivateData(REFGUID guid, void *data, DWORD *size);
HRESULT FreePrivateData(REFGUID guid);
DWORD SetPriority(DWORD priority);
DWORD GetPriority();
void PreLoad();
D3DRESOURCETYPE GetType();
}
[
local,
object,
uuid(0cfbaf3a-9ff6-429a-99b3-a2796af8b89b),
]
interface IDirect3DSurface9 : IDirect3DResource9
{
HRESULT GetContainer(REFIID iid, void **container);
HRESULT GetDesc(D3DSURFACE_DESC *desc);
HRESULT LockRect(D3DLOCKED_RECT *locked_rect, const RECT *rect, DWORD flags);
HRESULT UnlockRect();
HRESULT GetDC(HDC *hdc);
HRESULT ReleaseDC(HDC hdc);
}
[
local,
object,
uuid(b64bb1b5-fd70-4df6-bf91-19d0a12455e3),
]
interface IDirect3DVertexBuffer9 : IDirect3DResource9
{
HRESULT Lock(UINT offset, UINT size, void **data, DWORD flags);
HRESULT Unlock();
HRESULT GetDesc(D3DVERTEXBUFFER_DESC *desc);
}
[
local,
object,
uuid(7c9dd65e-d3f7-4529-acee-785830acde35),
]
interface IDirect3DIndexBuffer9 : IDirect3DResource9
{
HRESULT Lock(UINT offset, UINT size, void **data, DWORD flags);
HRESULT Unlock();
HRESULT GetDesc(D3DINDEXBUFFER_DESC *desc);
}
[
local,
object,
uuid(580ca87e-1d3c-4d54-991d-b7d3e3c298ce),
]
interface IDirect3DBaseTexture9 : IDirect3DResource9
{
DWORD SetLOD(DWORD lod);
DWORD GetLOD();
DWORD GetLevelCount();
HRESULT SetAutoGenFilterType(D3DTEXTUREFILTERTYPE type);
D3DTEXTUREFILTERTYPE GetAutoGenFilterType();
void GenerateMipSubLevels();
}
[
local,
object,
uuid(fff32f81-d953-473a-9223-93d652aba93f),
]
interface IDirect3DCubeTexture9 : IDirect3DBaseTexture9
{
HRESULT GetLevelDesc(UINT level, D3DSURFACE_DESC *desc);
HRESULT GetCubeMapSurface(D3DCUBEMAP_FACES face, UINT level, IDirect3DSurface9 **surface);
HRESULT LockRect(D3DCUBEMAP_FACES face, UINT level, D3DLOCKED_RECT *locked_rect, const RECT *rect, DWORD flags);
HRESULT UnlockRect(D3DCUBEMAP_FACES face, UINT level);
HRESULT AddDirtyRect(D3DCUBEMAP_FACES face, const RECT *dirty_rect);
}
[
local,
object,
uuid(85c31227-3de5-4f00-9b3a-f11ac38c18b5),
]
interface IDirect3DTexture9 : IDirect3DBaseTexture9
{
HRESULT GetLevelDesc(UINT level, D3DSURFACE_DESC *desc);
HRESULT GetSurfaceLevel(UINT level, IDirect3DSurface9 **surface);
HRESULT LockRect(UINT level, D3DLOCKED_RECT *locked_rect, const RECT *rect, DWORD flags);
HRESULT UnlockRect(UINT level);
HRESULT AddDirtyRect(const RECT *dirty_rect);
}
[
local,
object,
uuid(2518526c-e789-4111-a7b9-47ef328d13e6),
]
interface IDirect3DVolumeTexture9 : IDirect3DBaseTexture9
{
HRESULT GetLevelDesc(UINT level, D3DVOLUME_DESC *desc);
HRESULT GetVolumeLevel(UINT level, IDirect3DVolume9 **volume);
HRESULT LockBox(UINT level, D3DLOCKED_BOX *locked_box, const D3DBOX *box, DWORD flags);
HRESULT UnlockBox(UINT level);
HRESULT AddDirtyBox(const D3DBOX *dirty_box);
}
[
local,
object,
uuid(dd13c59c-36fa-4098-a8fb-c7ed39dc8546),
]
interface IDirect3DVertexDeclaration9 : IUnknown
{
HRESULT GetDevice(struct IDirect3DDevice9 **device);
HRESULT GetDeclaration(D3DVERTEXELEMENT9 *elements, UINT *count);
}
[
local,
object,
uuid(efc5557e-6265-4613-8a94-43857889eb36),
]
interface IDirect3DVertexShader9 : IUnknown
{
HRESULT GetDevice(struct IDirect3DDevice9 **device);
HRESULT GetFunction(void *data, UINT *size);
}
[
local,
object,
uuid(6d3bdbdc-5b02-4415-b852-ce5e8bccb289),
]
interface IDirect3DPixelShader9 : IUnknown
{
HRESULT GetDevice(struct IDirect3DDevice9 **device);
HRESULT GetFunction(void *data, UINT *size);
}
[
local,
object,
uuid(b07c4fe5-310d-4ba8-a23c-4f0f206f218b),
]
interface IDirect3DStateBlock9 : IUnknown
{
HRESULT GetDevice(struct IDirect3DDevice9 **device);
HRESULT Capture();
HRESULT Apply();
}
[
local,
object,
uuid(d9771460-a695-4f26-bbd3-27b840b541cc),
]
interface IDirect3DQuery9 : IUnknown
{
HRESULT GetDevice(struct IDirect3DDevice9 **device);
D3DQUERYTYPE GetType();
DWORD GetDataSize();
HRESULT Issue(DWORD flags);
HRESULT GetData(void *data, DWORD size, DWORD flags);
}
[
local,
object,
uuid(d0223b96-bf7a-43fd-92bd-a43b0d82b9eb),
]
interface IDirect3DDevice9 : IUnknown
{
HRESULT TestCooperativeLevel();
UINT GetAvailableTextureMem();
HRESULT EvictManagedResources();
HRESULT GetDirect3D(IDirect3D9 **d3d);
HRESULT GetDeviceCaps(D3DCAPS9 *caps);
HRESULT GetDisplayMode(UINT swapchain_idx, D3DDISPLAYMODE *mode);
HRESULT GetCreationParameters(D3DDEVICE_CREATION_PARAMETERS *parameters);
HRESULT SetCursorProperties(UINT x_hotspot, UINT y_hotspot, IDirect3DSurface9 *bitmap);
void SetCursorPosition(int x, int y, DWORD flags);
BOOL ShowCursor(BOOL show);
HRESULT CreateAdditionalSwapChain(D3DPRESENT_PARAMETERS *parameters, IDirect3DSwapChain9 **swapchain);
HRESULT GetSwapChain(UINT index, IDirect3DSwapChain9 **swapchain);
UINT GetNumberOfSwapChains();
HRESULT Reset(D3DPRESENT_PARAMETERS *parameters);
HRESULT Present(const RECT *src_rect, const RECT *dst_rect,
HWND dst_window_override, const RGNDATA *dirty_region);
HRESULT GetBackBuffer(UINT swapchain_idx, UINT backbuffer_idx,
D3DBACKBUFFER_TYPE type, IDirect3DSurface9 **backbuffer);
HRESULT GetRasterStatus(UINT swapchain_idx, D3DRASTER_STATUS *status);
HRESULT SetDialogBoxMode(BOOL enable_dialogs);
void SetGammaRamp(UINT swapchain_idx, DWORD flags, const D3DGAMMARAMP *ramp);
void GetGammaRamp(UINT swapchain_idx, D3DGAMMARAMP *ramp);
HRESULT CreateTexture(UINT width, UINT height, UINT levels, DWORD usage, D3DFORMAT format,
D3DPOOL pool, IDirect3DTexture9 **texture, HANDLE *shared_handle);
HRESULT CreateVolumeTexture(UINT width, UINT height, UINT depth, UINT levels, DWORD usage, D3DFORMAT format,
D3DPOOL pool, IDirect3DVolumeTexture9 **texture, HANDLE *shared_handle);
HRESULT CreateCubeTexture(UINT width, UINT levels, DWORD usage, D3DFORMAT format,
D3DPOOL pool, IDirect3DCubeTexture9 **texture, HANDLE *shared_handle);
HRESULT CreateVertexBuffer(UINT size, DWORD usage, DWORD fvf,
D3DPOOL pool, IDirect3DVertexBuffer9 **buffer, HANDLE *shared_handle);
HRESULT CreateIndexBuffer(UINT size, DWORD usage, D3DFORMAT format,
D3DPOOL pool, IDirect3DIndexBuffer9 **buffer, HANDLE *shared_handle);
HRESULT CreateRenderTarget(UINT width, UINT height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multisample_type,
DWORD multisample_quality, BOOL lockable, IDirect3DSurface9 **surface, HANDLE *shared_handle);
HRESULT CreateDepthStencilSurface(UINT width, UINT height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multisample_type,
DWORD multisample_quality, BOOL discard, IDirect3DSurface9 **surface, HANDLE *shared_handle);
HRESULT UpdateSurface(IDirect3DSurface9 *src_surface, const RECT *src_rect,
IDirect3DSurface9 *dst_surface, const POINT *dst_point);
HRESULT UpdateTexture(IDirect3DBaseTexture9 *src_texture, IDirect3DBaseTexture9 *dst_texture);
HRESULT GetRenderTargetData(IDirect3DSurface9 *src_surface, IDirect3DSurface9 *dst_surface);
HRESULT GetFrontBufferData(UINT swapchain_idx, IDirect3DSurface9 *dst_surface);
HRESULT StretchRect(IDirect3DSurface9 *src_surface, const RECT *src_rect,
IDirect3DSurface9 *dst_surface, const RECT *dst_rect, D3DTEXTUREFILTERTYPE filter);
HRESULT ColorFill(IDirect3DSurface9 *surface, const RECT *rect, D3DCOLOR color);
HRESULT CreateOffscreenPlainSurface(UINT width, UINT height, D3DFORMAT format,
D3DPOOL pool, IDirect3DSurface9 **surface, HANDLE *shared_handle);
HRESULT SetRenderTarget(DWORD index, IDirect3DSurface9 *surface);
HRESULT GetRenderTarget(DWORD index, IDirect3DSurface9 **surface);
HRESULT SetDepthStencilSurface(IDirect3DSurface9 *surface);
HRESULT GetDepthStencilSurface(IDirect3DSurface9 **surface);
HRESULT BeginScene();
HRESULT EndScene();
HRESULT Clear(DWORD rect_count, const D3DRECT *rects, DWORD flags, D3DCOLOR color, float z, DWORD stencil);
HRESULT SetTransform(D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix);
HRESULT GetTransform(D3DTRANSFORMSTATETYPE state, D3DMATRIX *matrix);
HRESULT MultiplyTransform(D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix);
HRESULT SetViewport(const D3DVIEWPORT9 *viewport);
HRESULT GetViewport(D3DVIEWPORT9 *viewport);
HRESULT SetMaterial(const D3DMATERIAL9 *material);
HRESULT GetMaterial(D3DMATERIAL9 *material);
HRESULT SetLight(DWORD index, const D3DLIGHT9 *light);
HRESULT GetLight(DWORD index, D3DLIGHT9 *light);
HRESULT LightEnable(DWORD index, BOOL enable);
HRESULT GetLightEnable(DWORD index, BOOL *enable);
HRESULT SetClipPlane(DWORD index, const float *plane);
HRESULT GetClipPlane(DWORD index, float *plane);
HRESULT SetRenderState(D3DRENDERSTATETYPE state, DWORD value);
HRESULT GetRenderState(D3DRENDERSTATETYPE state, DWORD *value);
HRESULT CreateStateBlock(D3DSTATEBLOCKTYPE type, IDirect3DStateBlock9 **stateblock);
HRESULT BeginStateBlock();
HRESULT EndStateBlock(IDirect3DStateBlock9 **stateblock);
HRESULT SetClipStatus(const D3DCLIPSTATUS9 *clip_status);
HRESULT GetClipStatus(D3DCLIPSTATUS9 *clip_status);
HRESULT GetTexture(DWORD index, IDirect3DBaseTexture9 **texture);
HRESULT SetTexture(DWORD index, IDirect3DBaseTexture9 *texture);
HRESULT GetTextureStageState(DWORD index, D3DTEXTURESTAGESTATETYPE type, DWORD *value);
HRESULT SetTextureStageState(DWORD index, D3DTEXTURESTAGESTATETYPE type, DWORD value);
HRESULT GetSamplerState(DWORD index, D3DSAMPLERSTATETYPE type, DWORD *value);
HRESULT SetSamplerState(DWORD index, D3DSAMPLERSTATETYPE type, DWORD value);
HRESULT ValidateDevice(DWORD *pass_count);
HRESULT SetPaletteEntries(UINT index, const PALETTEENTRY *entries);
HRESULT GetPaletteEntries(UINT index, PALETTEENTRY *entries);
HRESULT SetCurrentTexturePalette(UINT index);
HRESULT GetCurrentTexturePalette(UINT *index);
HRESULT SetScissorRect(const RECT *rect);
HRESULT GetScissorRect(RECT *rect);
HRESULT SetSoftwareVertexProcessing(BOOL software);
BOOL GetSoftwareVertexProcessing();
HRESULT SetNPatchMode(float segment_count);
float GetNPatchMode();
HRESULT DrawPrimitive(D3DPRIMITIVETYPE primitive_type, UINT start_vertex, UINT primitive_count);
HRESULT DrawIndexedPrimitive(D3DPRIMITIVETYPE primitive_type, INT base_vertex_idx,
UINT min_vertex_idx, UINT vertex_count, UINT start_index, UINT primitive_count);
HRESULT DrawPrimitiveUP(D3DPRIMITIVETYPE primitive_type, UINT primitive_count, const void *data, UINT stride);
HRESULT DrawIndexedPrimitiveUP(D3DPRIMITIVETYPE primitive_type, UINT min_vertex_idx, UINT vertex_count,
UINT primitive_count, const void *index_data, D3DFORMAT index_format, const void *data, UINT stride);
HRESULT ProcessVertices(UINT src_start_idx, UINT dst_idx, UINT vertex_count,
IDirect3DVertexBuffer9 *dst_buffer, IDirect3DVertexDeclaration9 *declaration, DWORD flags);
HRESULT CreateVertexDeclaration(const D3DVERTEXELEMENT9 *elements, IDirect3DVertexDeclaration9 **declaration);
HRESULT SetVertexDeclaration(IDirect3DVertexDeclaration9 *declaration);
HRESULT GetVertexDeclaration(IDirect3DVertexDeclaration9 **declaration);
HRESULT SetFVF(DWORD fvf);
HRESULT GetFVF(DWORD *fvf);
HRESULT CreateVertexShader(const DWORD *byte_code, IDirect3DVertexShader9 **shader);
HRESULT SetVertexShader(IDirect3DVertexShader9 *shader);
HRESULT GetVertexShader(IDirect3DVertexShader9 **shader);
HRESULT SetVertexShaderConstantF(UINT start_idx, const float *data, UINT count);
HRESULT GetVertexShaderConstantF(UINT start_idx, float *data, UINT count);
HRESULT SetVertexShaderConstantI(UINT start_idx, const int *data, UINT count);
HRESULT GetVertexShaderConstantI(UINT start_idx, int *data, UINT count);
HRESULT SetVertexShaderConstantB(UINT start_idx, const BOOL *data, UINT count);
HRESULT GetVertexShaderConstantB(UINT start_idx, BOOL *data, UINT count);
HRESULT SetStreamSource(UINT stream_idx, IDirect3DVertexBuffer9 *buffer, UINT offset, UINT stride);
HRESULT GetStreamSource(UINT stream_idx, IDirect3DVertexBuffer9 **buffer, UINT *offset, UINT *stride);
HRESULT SetStreamSourceFreq(UINT stream_idx, UINT divisor);
HRESULT GetStreamSourceFreq(UINT stream_idx, UINT *divisor);
HRESULT SetIndices(IDirect3DIndexBuffer9 *buffer);
HRESULT GetIndices(IDirect3DIndexBuffer9 **buffer);
HRESULT CreatePixelShader(const DWORD *byte_code, IDirect3DPixelShader9 **shader);
HRESULT SetPixelShader(IDirect3DPixelShader9 *shader);
HRESULT GetPixelShader(IDirect3DPixelShader9 **shader);
HRESULT SetPixelShaderConstantF(UINT start_idx, const float *data, UINT count);
HRESULT GetPixelShaderConstantF(UINT start_idx, float *data, UINT count);
HRESULT SetPixelShaderConstantI(UINT start_idx, const int *data, UINT count);
HRESULT GetPixelShaderConstantI(UINT start_idx, int *data, UINT count);
HRESULT SetPixelShaderConstantB(UINT start_idx, const BOOL *data, UINT count);
HRESULT GetPixelShaderConstantB(UINT start_idx, BOOL *data, UINT count);
HRESULT DrawRectPatch(UINT handle, const float *segment_count, const D3DRECTPATCH_INFO *patch_info);
HRESULT DrawTriPatch(UINT handle, const float *segment_count, const D3DTRIPATCH_INFO *patch_info);
HRESULT DeletePatch(UINT handle);
HRESULT CreateQuery(D3DQUERYTYPE type, IDirect3DQuery9 **query);
}
[
local,
object,
uuid(02177241-69fc-400c-8ff1-9ea44df6861d),
]
interface IDirect3D9Ex : IDirect3D9
{
UINT GetAdapterModeCountEx(UINT adapter_idx, const D3DDISPLAYMODEFILTER *filter);
HRESULT EnumAdapterModesEx(UINT adapter_idx, const D3DDISPLAYMODEFILTER *filter,
UINT mode_idx, D3DDISPLAYMODEEX *mode);
HRESULT GetAdapterDisplayModeEx(UINT adapter_idx, D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation);
HRESULT CreateDeviceEx(UINT adapter_idx, D3DDEVTYPE device_type, HWND focus_window, DWORD flags,
D3DPRESENT_PARAMETERS *parameters, D3DDISPLAYMODEEX *mode, struct IDirect3DDevice9Ex **device);
HRESULT GetAdapterLUID(UINT adapter_idx, LUID *luid);
}
[
local,
object,
uuid(91886caf-1c3d-4d2e-a0ab-3e4c7d8d3303),
]
interface IDirect3DSwapChain9Ex : IDirect3DSwapChain9
{
HRESULT GetLastPresentCount(UINT *last_present_count);
HRESULT GetPresentStats(D3DPRESENTSTATS *stats);
HRESULT GetDisplayModeEx(D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation);
}
[
local,
object,
uuid(b18b10ce-2649-405a-870f-95f777d4313a),
]
interface IDirect3DDevice9Ex : IDirect3DDevice9
{
HRESULT SetConvolutionMonoKernel(UINT width, UINT height, float *rows, float *columns);
HRESULT ComposeRects(IDirect3DSurface9 *src_surface, IDirect3DSurface9 *dst_surface,
IDirect3DVertexBuffer9 *src_descs, UINT rect_count, IDirect3DVertexBuffer9 *dst_descs,
D3DCOMPOSERECTSOP operation, INT offset_x, INT offset_y);
HRESULT PresentEx(const RECT *src_rect, const RECT *dst_rect,
HWND dst_window_override, const RGNDATA *dirty_region, DWORD flags);
HRESULT GetGPUThreadPriority(INT *priority);
HRESULT SetGPUThreadPriority(INT priority);
HRESULT WaitForVBlank(UINT swapchain_idx);
HRESULT CheckResourceResidency(IDirect3DResource9 **resources, UINT32 resource_count);
HRESULT SetMaximumFrameLatency(UINT max_latency);
HRESULT GetMaximumFrameLatency(UINT *max_latency);
HRESULT CheckDeviceState(HWND dst_window);
HRESULT CreateRenderTargetEx(UINT width, UINT height, D3DFORMAT format,
D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable,
IDirect3DSurface9 **surface, HANDLE *shared_handle, DWORD usage);
HRESULT CreateOffscreenPlainSurfaceEx(UINT width, UINT Height, D3DFORMAT format,
D3DPOOL pool, IDirect3DSurface9 **surface, HANDLE *shared_handle, DWORD usage);
HRESULT CreateDepthStencilSurfaceEx(UINT width, UINT height, D3DFORMAT format,
D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL discard,
IDirect3DSurface9 **surface, HANDLE *shared_handle, DWORD usage);
HRESULT ResetEx(D3DPRESENT_PARAMETERS *parameters, D3DDISPLAYMODEEX *mode);
HRESULT GetDisplayModeEx(UINT swapchain_idx, D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation);
}
int __stdcall D3DPERF_BeginEvent(D3DCOLOR color, const WCHAR *name);
int __stdcall D3DPERF_EndEvent(void);
DWORD __stdcall D3DPERF_GetStatus(void);
BOOL __stdcall D3DPERF_QueryRepeatFrame(void);
void __stdcall D3DPERF_SetMarker(D3DCOLOR color, const WCHAR *name);
void __stdcall D3DPERF_SetOptions(DWORD options);
void __stdcall D3DPERF_SetRegion(D3DCOLOR color, const WCHAR *name);
IDirect3D9 * __stdcall Direct3DCreate9(UINT sdk_version);
HRESULT __stdcall Direct3DCreate9Ex(UINT sdk_version, IDirect3D9Ex **d3d9ex);
cpp_quote("#endif /* _D3D9_H_ */")

View file

@ -441,10 +441,12 @@ typedef struct _D3DCONTENTPROTECTIONCAPS {
ULONGLONG ProtectedMemorySize; ULONGLONG ProtectedMemorySize;
} D3DCONTENTPROTECTIONCAPS; } D3DCONTENTPROTECTIONCAPS;
#ifndef __WIDL__
DEFINE_GUID(D3DCRYPTOTYPE_AES128_CTR, 0x9b6bd711, 0x4f74, 0x41c9, 0x9e, 0x7b, 0xb, 0xe2, 0xd7, 0xd9, 0x3b, 0x4f); DEFINE_GUID(D3DCRYPTOTYPE_AES128_CTR, 0x9b6bd711, 0x4f74, 0x41c9, 0x9e, 0x7b, 0xb, 0xe2, 0xd7, 0xd9, 0x3b, 0x4f);
DEFINE_GUID(D3DCRYPTOTYPE_PROPRIETARY, 0xab4e9afd, 0x1d1c, 0x46e6, 0xa7, 0x2f, 0x8, 0x69, 0x91, 0x7b, 0xd, 0xe8); DEFINE_GUID(D3DCRYPTOTYPE_PROPRIETARY, 0xab4e9afd, 0x1d1c, 0x46e6, 0xa7, 0x2f, 0x8, 0x69, 0x91, 0x7b, 0xd, 0xe8);
DEFINE_GUID(D3DKEYEXCHANGE_RSAES_OAEP, 0xc1949895, 0xd72a, 0x4a1d, 0x8e, 0x5d, 0xed, 0x85, 0x7d, 0x17, 0x15, 0x20); DEFINE_GUID(D3DKEYEXCHANGE_RSAES_OAEP, 0xc1949895, 0xd72a, 0x4a1d, 0x8e, 0x5d, 0xed, 0x85, 0x7d, 0x17, 0x15, 0x20);
DEFINE_GUID(D3DKEYEXCHANGE_DXVA, 0x43d3775c, 0x38e5, 0x4924, 0x8d, 0x86, 0xd3, 0xfc, 0xcf, 0x15, 0x3e, 0x9b); DEFINE_GUID(D3DKEYEXCHANGE_DXVA, 0x43d3775c, 0x38e5, 0x4924, 0x8d, 0x86, 0xd3, 0xfc, 0xcf, 0x15, 0x3e, 0x9b);
#endif
#endif #endif