On 7 January 2014 13:53, Stefan Dösinger stefan@codeweavers.com wrote:
dlls/wined3d/surface.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 2fca299..9155c6b 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2810,15 +2810,17 @@ HRESULT CDECL wined3d_surface_update_desc(struct wined3d_surface *surface, struct wined3d_device *device = surface->resource.device; 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); BOOL create_dib = FALSE; HRESULT hr;
TRACE("surface %p, width %u, height %u, format %s, multisample_type %#x, multisample_quality %u.\n", surface, width, height, debug_d3dformat(format_id), multisample_type, multisample_type);
if (!resource_size)
- if (!width || !height || !format)
That's not quite equivalent. For example, a format like WINED3DFMT_NVDB has a zero format->byte_count.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-01-07 15:45, schrieb Henri Verbeet:
That's not quite equivalent. For example, a format like WINED3DFMT_NVDB has a zero format->byte_count.
Good point. So I'll have to run wined3d_format_calculate_size even in cases where a custom pitch is used...