[Bug 38048] Unigine Heaven 4.0 Benchmark Basic renders lots of black textures

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Apr 25 06:11:24 CDT 2015


https://bugs.winehq.org/show_bug.cgi?id=38048

--- Comment #5 from Sergey Isakov <isakov-sl at bk.ru> ---
(In reply to Matteo Bruni from comment #2)
> Created attachment 50699 [details]
> Hack
> 
> Thanks Béla for the bug report.
> 
> I can reproduce the issue. It turns out that Heaven is doing an
> UpdateTexture from a 10-levels to a 8-levels 512x512 ATI2N texture (i.e. the
> latter is missing the 2x2 and 1x1 levels). That's currently rejected by
> wined3d_device_update_texture but it seems to work just fine on Windows,
> notwithstanding MSDN mentioning such case as invalid. I haven't checked it
> but probably the application was using a different codepath without ATI1N
> and ATI2N textures before the regression patch thus not triggering this bug.
> 
> The attached patch drops the check and fixes the issue for me. It needs more
> work for Wine (i.e. it might break other games as it is).

MSDN says that
" If the destination texture has fewer levels than the source, only the
matching levels are copied. If the source texture has fewer levels than the
destination, the method will fail." 
https://msdn.microsoft.com/en-us/library/windows/desktop/bb205858(v=vs.85).aspx
So src_level > dst_level is normal according to MSDN.
The sources must be corrected as follow
----
    level_count = wined3d_texture_get_level_count(dst_texture);
    if (wined3d_texture_get_level_count(src_texture) < level_count)
    {
        WARN("Source has fewer level counts then destination, returning
WINED3DERR_INVALIDCALL.\n");
        return WINED3DERR_INVALIDCALL;
    }
----

Best wishes!

-- 
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.


More information about the wine-bugs mailing list