Henri Verbeet : wined3d: Add some warnings when resource_init() fails due to format restrictions.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Feb 11 10:28:10 CST 2015
Module: wine
Branch: master
Commit: 5045ca639d3053b4722976aa5fac0cda1def5f5e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5045ca639d3053b4722976aa5fac0cda1def5f5e
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed Feb 11 14:10:14 2015 +0100
wined3d: Add some warnings when resource_init() fails due to format restrictions.
---
dlls/wined3d/resource.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 0ab55dc..f4134e2 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -84,11 +84,20 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
if (pool != WINED3D_POOL_SCRATCH)
{
if ((usage & WINED3DUSAGE_RENDERTARGET) && !(format->flags & WINED3DFMT_FLAG_RENDERTARGET))
+ {
+ WARN("Format %s cannot be used for render targets.\n", debug_d3dformat(format->id));
return WINED3DERR_INVALIDCALL;
+ }
if ((usage & WINED3DUSAGE_DEPTHSTENCIL) && !(format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)))
+ {
+ WARN("Format %s cannot be used for depth/stencil buffers.\n", debug_d3dformat(format->id));
return WINED3DERR_INVALIDCALL;
+ }
if ((usage & WINED3DUSAGE_TEXTURE) && !(format->flags & WINED3DFMT_FLAG_TEXTURE))
+ {
+ WARN("Format %s cannot be used for texturing.\n", debug_d3dformat(format->id));
return WINED3DERR_INVALIDCALL;
+ }
}
resource->ref = 1;
More information about the wine-cvs
mailing list