On 8 February 2017 at 09:26, Nikolay Sivov nsivov@codeweavers.com wrote:
@@ -5275,7 +5275,7 @@ static HRESULT CDECL device_parent_sub_resource_created(struct wined3d_device_pa }
static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_device_parent *device_parent,
void *container_parent, const struct wined3d_resource_desc *wined3d_desc,
void *container_parent, const struct wined3d_resource_desc *wined3d_desc, DWORD texture_flags, struct wined3d_texture **wined3d_texture)
{ struct d3d_device *device = device_from_wined3d_device_parent(device_parent); @@ -5299,7 +5299,7 @@ static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_devic desc.Usage = D3D10_USAGE_DEFAULT; desc.BindFlags = D3D10_BIND_RENDER_TARGET; desc.CPUAccessFlags = 0;
- desc.MiscFlags = 0;
- desc.MiscFlags = texture_flags & WINED3D_TEXTURE_CREATE_GET_DC ? D3D10_RESOURCE_MISC_GDI_COMPATIBLE: 0;
Please also print a FIXME for other flags.
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 805694b853..bf6653a42b 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -3036,7 +3036,8 @@ static HRESULT CDECL device_parent_volume_created(struct wined3d_device_parent * }
static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_device_parent *device_parent,
void *container_parent, const struct wined3d_resource_desc *desc, struct wined3d_texture **texture)
void *container_parent, const struct wined3d_resource_desc *desc, DWORD texture_flags,
struct wined3d_texture **texture)
{ struct d3d8_device *device = device_from_device_parent(device_parent); struct d3d8_surface *d3d_surface;
Likewise, I think we should do a little more here. Either passing the texture flags along to wined3d_texture_create(), or just printing a FIXME in case they're non-zero.
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index e646cb76c7..923ced55b4 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -3746,7 +3746,8 @@ static HRESULT CDECL device_parent_volume_created(struct wined3d_device_parent * }
static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_device_parent *device_parent,
void *container_parent, const struct wined3d_resource_desc *desc, struct wined3d_texture **texture)
void *container_parent, const struct wined3d_resource_desc *desc, DWORD texture_flags,
struct wined3d_texture **texture)
{ struct d3d9_device *device = device_from_device_parent(device_parent); DWORD flags = WINED3D_TEXTURE_CREATE_MAPPABLE;
I could live with adding WINED3D_TEXTURE_CREATE_GET_DC in device_parent_create_swapchain_texture() in d3d9, but ideally we'd set the appropriate flag on swapchain creation.