Commit 3d2fb4c9 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Get the texture format from the texture in d3d_device3_SetTexture().

parent 3c54eefa
......@@ -4723,17 +4723,13 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface,
if ((tex = wined3d_device_get_texture(device->wined3d_device, 0)))
{
struct wined3d_resource *sub_resource;
struct wined3d_resource_desc desc;
if ((sub_resource = wined3d_texture_get_sub_resource(tex, 0)))
{
struct wined3d_resource_desc desc;
wined3d_resource_get_desc(sub_resource, &desc);
ddfmt.dwSize = sizeof(ddfmt);
ddrawformat_from_wined3dformat(&ddfmt, desc.format);
if (ddfmt.u5.dwRGBAlphaBitMask) tex_alpha = TRUE;
}
wined3d_resource_get_desc(wined3d_texture_get_resource(tex), &desc);
ddfmt.dwSize = sizeof(ddfmt);
ddrawformat_from_wined3dformat(&ddfmt, desc.format);
if (ddfmt.u5.dwRGBAlphaBitMask)
tex_alpha = TRUE;
}
/* Args 1 and 2 are already set to WINED3DTA_TEXTURE/WINED3DTA_CURRENT in case of D3DTBLEND_MODULATE */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment