d3d9: Replace wined3d_surface_get_resource with wined3d_texture_get_sub_resource in d3d9_device_ColorFill.

Signed-off-by: Riccardo Bortolato <rikyz619@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Riccardo Bortolato 2015-10-19 19:07:33 +02:00 committed by Alexandre Julliard
parent 8f03c4413b
commit f3c69e40dc

View file

@ -1378,7 +1378,11 @@ static HRESULT WINAPI d3d9_device_ColorFill(IDirect3DDevice9Ex *iface,
wined3d_mutex_lock();
wined3d_resource = wined3d_surface_get_resource(surface_impl->wined3d_surface);
if (!(wined3d_resource = wined3d_texture_get_sub_resource(surface_impl->wined3d_texture, surface_impl->sub_resource_idx)))
{
wined3d_mutex_unlock();
return D3DERR_INVALIDCALL;
}
wined3d_resource_get_desc(wined3d_resource, &desc);
if (desc.pool != WINED3D_POOL_DEFAULT)