From 774cb21a4d0985e7f66d1ff8ba05160fc56bd6f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20D=C3=B6singer?= Date: Thu, 12 May 2011 21:23:51 +0200 Subject: [PATCH] wined3d: Heightscaled surfaces still have an integer size. --- dlls/wined3d/utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 20b600182ec..c34060d4d60 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1615,7 +1615,11 @@ UINT wined3d_format_calculate_size(const struct wined3d_format *format, UINT ali size = height * (((width * format->byte_count) + alignment - 1) & ~(alignment - 1)); } - if (format->heightscale != 0.0f) size *= format->heightscale; + if (format->heightscale != 0.0f) + { + /* The D3D format requirements make sure that the resulting format is an integer again */ + size = (UINT) (size * format->heightscale); + } return size; } -- 2.11.4.GIT