Henri Verbeet : ddraw: Get the texture format from the texture in d3d_device3_SetRenderState().
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Feb 29 10:59:12 CST 2016
Module: wine
Branch: master
Commit: 3c54eefaca85ae422e98c3f18c62018b7f57a81c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3c54eefaca85ae422e98c3f18c62018b7f57a81c
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Feb 29 11:38:23 2016 +0100
ddraw: Get the texture format from the texture in d3d_device3_SetRenderState().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ddraw/device.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 9c88d43..a5b8445 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -2797,17 +2797,13 @@ static HRESULT WINAPI d3d_device3_SetRenderState(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;
}
if (tex_alpha)
More information about the wine-cvs
mailing list