Commit 352667d4 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d9: Use wined3d_texture_get_sub_resource_desc() in d3d9_volume_GetDesc().

parent 7fad350c
......@@ -116,18 +116,16 @@ static HRESULT WINAPI d3d9_volume_GetContainer(IDirect3DVolume9 *iface, REFIID r
static HRESULT WINAPI d3d9_volume_GetDesc(IDirect3DVolume9 *iface, D3DVOLUME_DESC *desc)
{
struct d3d9_volume *volume = impl_from_IDirect3DVolume9(iface);
struct wined3d_resource_desc wined3d_desc;
struct wined3d_resource *sub_resource;
struct wined3d_sub_resource_desc wined3d_desc;
TRACE("iface %p, desc %p.\n", iface, desc);
wined3d_mutex_lock();
sub_resource = wined3d_texture_get_sub_resource(volume->wined3d_texture, volume->sub_resource_idx);
wined3d_resource_get_desc(sub_resource, &wined3d_desc);
wined3d_texture_get_sub_resource_desc(volume->wined3d_texture, volume->sub_resource_idx, &wined3d_desc);
wined3d_mutex_unlock();
desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format);
desc->Type = wined3d_desc.resource_type;
desc->Type = D3DRTYPE_VOLUME;
desc->Usage = wined3d_desc.usage & WINED3DUSAGE_MASK;
desc->Pool = wined3d_desc.pool;
desc->Width = wined3d_desc.width;
......
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