Module: wine Branch: master Commit: 774cb21a4d0985e7f66d1ff8ba05160fc56bd6f5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=774cb21a4d0985e7f66d1ff8ba...
Author: Stefan Dösinger stefan@codeweavers.com Date: Thu May 12 21:23:51 2011 +0200
wined3d: Heightscaled surfaces still have an integer size.
---
dlls/wined3d/utils.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 20b6001..c34060d 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; }