[Bug 38545] New: Calculate surface size is wrong sometimes
https://bugs.winehq.org/show_bug.cgi?id=38545 Bug ID: 38545 Summary: Calculate surface size is wrong sometimes Product: Wine Version: 1.7.42 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3dx9 Assignee: wine-bugs(a)winehq.org Reporter: isakov-sl(a)bk.ru Distribution: --- Bug 38178 is closed resolved by prohibit DXTn texture. The real reason for the game crash is wrong sizes calculation in case of compressed textures. Even if we are not supporting DXTn compress/decompress we should allow the application do this by own libraries and we must correctly calculate sizes in those cases. First what I see is the procedure calculate_dds_surface_size(..) It adopted to block based textures but not to compressed textures According to MSDN https://msdn.microsoft.com/en-us/library/windows/desktop/bb205578(v=vs.85).a... the formula should be max(1, ( (width + 3) / 4 ) ) x max(1, ( (height + 3) / 4 ) ) x 8(DXT1) or 16(DXT2-5) But I see there are more caveats... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38545 Józef Kucia <joseph.kucia(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joseph.kucia(a)gmail.com --- Comment #1 from Józef Kucia <joseph.kucia(a)gmail.com> --- (In reply to Sergey Isakov from comment #0)
First what I see is the procedure calculate_dds_surface_size(..) It adopted to block based textures but not to compressed textures According to MSDN https://msdn.microsoft.com/en-us/library/windows/desktop/bb205578(v=vs.85). aspx the formula should be max(1, ( (width + 3) / 4 ) ) x max(1, ( (height + 3) / 4 ) ) x 8(DXT1) or 16(DXT2-5)
AFAIK calculate_dds_surface_size() and calculate_dds_file_size() should return the correct size for all D3DFMT formats. These functions also handle block compression formats, i.e. DXTn. Could you provide an example when the calculated size is wrong? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38545 --- Comment #2 from Sergey Isakov <isakov-sl(a)bk.ru> --- Agree, the procedures are correct. The formulae is different but the result is good. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38545 --- Comment #3 from Józef Kucia <joseph.kucia(a)gmail.com> --- (In reply to Sergey Isakov from comment #2)
Agree, the procedures are correct. The formulae is different but the result is good.
We should close this bug as invalid, then. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38545 Matteo Bruni <matteo.mystral(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #4 from Matteo Bruni <matteo.mystral(a)gmail.com> --- (In reply to Józef Kucia from comment #3)
(In reply to Sergey Isakov from comment #2)
Agree, the procedures are correct. The formulae is different but the result is good.
We should close this bug as invalid, then.
Resolving INVALID. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38545 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #5 from Bruno Jesus <00cpxxx(a)gmail.com> --- Closing invalid bugs. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org