wined3d: Use wined3d_rendertarget_view_create() in wined3d_device_init_3d().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8f1cf93b21
commit
f1898abd9c
|
@ -995,12 +995,20 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (swapchain_desc->backbuffer_count && FAILED(hr = wined3d_rendertarget_view_create_from_surface(
|
if (swapchain_desc->backbuffer_count)
|
||||||
surface_from_resource(wined3d_texture_get_sub_resource(swapchain->back_buffers[0], 0)),
|
|
||||||
NULL, &wined3d_null_parent_ops, &device->back_buffer_view)))
|
|
||||||
{
|
{
|
||||||
ERR("Failed to create rendertarget view, hr %#x.\n", hr);
|
struct wined3d_rendertarget_view_desc view_desc;
|
||||||
goto err_out;
|
|
||||||
|
view_desc.format_id = swapchain_desc->backbuffer_format;
|
||||||
|
view_desc.u.texture.level_idx = 0;
|
||||||
|
view_desc.u.texture.layer_idx = 0;
|
||||||
|
view_desc.u.texture.layer_count = 1;
|
||||||
|
if (FAILED(hr = wined3d_rendertarget_view_create(&view_desc, &swapchain->back_buffers[0]->resource,
|
||||||
|
NULL, &wined3d_null_parent_ops, &device->back_buffer_view)))
|
||||||
|
{
|
||||||
|
ERR("Failed to create rendertarget view, hr %#x.\n", hr);
|
||||||
|
goto err_out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
device->swapchain_count = 1;
|
device->swapchain_count = 1;
|
||||||
|
|
Loading…
Reference in New Issue