wined3d: Also update the container in wined3d_surface_update_desc().
This fixes a bug exposed by commit 415b803720
.
In particular, wined3d_resource_update_draw_binding() uses the multisample
type to determine to appropriate draw binding, and since we never updated that
for the container, we could end up with an incorrect draw binding after a
device reset.
This commit is contained in:
parent
ea1689e7b0
commit
9f9731410b
|
@ -2372,6 +2372,7 @@ HRESULT CDECL wined3d_surface_update_desc(struct wined3d_surface *surface,
|
|||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
const struct wined3d_format *format = wined3d_get_format(gl_info, format_id);
|
||||
UINT resource_size = wined3d_format_calculate_size(format, device->surface_alignment, width, height, 1);
|
||||
struct wined3d_texture *texture;
|
||||
BOOL create_dib = FALSE;
|
||||
HRESULT hr;
|
||||
DWORD valid_location = 0;
|
||||
|
@ -2448,6 +2449,13 @@ HRESULT CDECL wined3d_surface_update_desc(struct wined3d_surface *surface,
|
|||
if (surface->resource.map_binding == WINED3D_LOCATION_BUFFER && !surface_use_pbo(surface))
|
||||
surface->resource.map_binding = create_dib ? WINED3D_LOCATION_DIB : WINED3D_LOCATION_SYSMEM;
|
||||
|
||||
texture = surface->container;
|
||||
texture->resource.format = format;
|
||||
texture->resource.multisample_type = multisample_type;
|
||||
texture->resource.multisample_quality = multisample_quality;
|
||||
texture->resource.width = width;
|
||||
texture->resource.height = height;
|
||||
|
||||
if (create_dib)
|
||||
{
|
||||
if (FAILED(hr = surface_create_dib_section(surface)))
|
||||
|
|
Loading…
Reference in New Issue