Commit 8153674c authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Don't clear the alloc flags in wined3d_surface_set_format().

Changing the format is only allowed for surfaces with format WINED3DFMT_UNKNOWN, in which case there can't be a GL texture allocated.
parent c19c26e4
...@@ -3099,7 +3099,6 @@ HRESULT CDECL wined3d_surface_set_format(struct wined3d_surface *surface, enum w ...@@ -3099,7 +3099,6 @@ HRESULT CDECL wined3d_surface_set_format(struct wined3d_surface *surface, enum w
surface->resource.size = wined3d_format_calculate_size(format, surface->resource.device->surface_alignment, surface->resource.size = wined3d_format_calculate_size(format, surface->resource.device->surface_alignment,
surface->pow2Width, surface->pow2Height); surface->pow2Width, surface->pow2Height);
surface->flags |= (WINED3DFMT_D16_LOCKABLE == format_id) ? SFLAG_LOCKABLE : 0; surface->flags |= (WINED3DFMT_D16_LOCKABLE == format_id) ? SFLAG_LOCKABLE : 0;
surface->flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED);
surface->resource.format = format; surface->resource.format = format;
TRACE("size %u, byte_count %u\n", surface->resource.size, format->byte_count); TRACE("size %u, byte_count %u\n", surface->resource.size, format->byte_count);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment