[Bug 14745] New: wined3d BltOverride - blits from non-pow2 surfaces cause issues without GL_ARB_texture_non_power_of_two

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Aug 3 16:23:33 CDT 2008


           Summary: wined3d BltOverride - blits from non-pow2 surfaces cause
                    issues without GL_ARB_texture_non_power_of_two
           Product: Wine
           Version: CVS/GIT
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: testcase
          Severity: normal
          Priority: P2
         Component: directx-ddraw
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: alexd4 at inbox.lv

Created an attachment (id=15241)
 --> (http://bugs.winehq.org/attachment.cgi?id=15241)
testcase in form of a patch to ddraw visual test

If there is a blit from non-pow2 surface (e.g. 128x72) to screen which is
followed by a blit from pow2 surface (e.g. 128x128) to screen, then second blit
is rendered incorrectly. Presumably in the second blit the first texture is
used somehow, instead of second. So, for example, in the testcase instead of
red and green quads, both quads will be red. Also happens in a real game
(forsaken), where there are also blits from surfaces 128x72 and 128x128.

This only appears when there is no GL_ARB_texture_non_power_of_two. Probably
related to GL_TEXTURE_RECTANGLE_ARB. Affects cards like geforce 2 mx, and also
reproduced on geforce 6100 by disabling GL_ARB_texture_non_power_of_two in
directx.c. Tobias Jakobi kindly tested this on geforce fx with positive result
(bug observed).

This is as if somehow GL_TEXTURE_RECTANGLE_ARB stays selected, which may be
possible because blits do not apply states and so (afaict)
texture_activate_dimensions isn't called and GL_TEXTURE_RECTANGLE_ARB may stay
enabled in such case (again afaict, so far i couldn't find a place where it
would be disabled in case of consecutive blits). Yet, strangely, adding
glDisable(GL_TEXTURE_RECTANGLE_ARB) in BltOverride doesn't seem to help.

On geforce fx and geforce 6100 this is worked around by using orm=fbo (on
geforce 2 there is no fbo). Didn't verify that myself but Stefan said on irc in
fbo mode  GL_TEXTURE_RECTANGLE_ARB is always used so this could explain why it
works (if it indeed is related to failure to "switch" from

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
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