http://bugs.winehq.org/show_bug.cgi?id=35205
Bug ID: 35205 Summary: WOLF RPG Editor 2.10 (Game.exe): Broken font rendering in GPU rendering mode Product: Wine Version: 1.7.9 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: kakurasan@gmail.com Classification: Unclassified
Created attachment 46956 --> http://bugs.winehq.org/attachment.cgi?id=46956 Screenshot (GPU rendering mode)
Font rendering is broken in GPU rendering mode since WOLF RPG Editor 2.10. It works fine in software rendering mode (and GPU rendering mode in previous version).
Notes: * GPU rendering mode (3D mode) is the default mode. To use software rendering mode (software mode), open Game.ini and set SoftModeFlag to 1. * WOLF RPG Editor uses a DirectX wrapper library called "DX Library" (open source).
Downloads (Japanese): * WOLF RPG Editor: http://www.silversecond.com/WolfRPGEditor/Download.html * DX Library: http://homepage2.nifty.com/natupaji/DxLib/dxdload.html
http://bugs.winehq.org/show_bug.cgi?id=35205
--- Comment #1 from kakurasan@gmail.com --- Created attachment 46957 --> http://bugs.winehq.org/attachment.cgi?id=46957 Screenshot (software rendering mode)
http://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
https://bugs.winehq.org/show_bug.cgi?id=35205
Sagawa sagawa.aki+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sagawa.aki+winebugs@gmail.c | |om
https://bugs.winehq.org/show_bug.cgi?id=35205
--- Comment #2 from Sagawa sagawa.aki+winebugs@gmail.com --- I can confirm the issue. And I can also reproduce this issue with a small demo using DxLibrary.
https://bugs.winehq.org/show_bug.cgi?id=35205
--- Comment #3 from Sagawa sagawa.aki+winebugs@gmail.com --- The issue was fixed in DX Library 3.11d. Unfortunately, Wolf RPG Editior 2.20 seems to use DX Library 3.10f. So, it suffers this bug if GPU rendering mode enabled. If available, please retest with upcoming version of Wolf RPG Editor which uses DX Library 3.11d or later.
https://bugs.winehq.org/show_bug.cgi?id=35205
--- Comment #4 from Sagawa sagawa.aki+winebugs@gmail.com --- Sorry, latest wolf editor version is 2.10 (not 2.20).
https://bugs.winehq.org/show_bug.cgi?id=35205
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|WOLF RPG Editor 2.10 |WOLF RPG Editor 2.10: |(Game.exe): Broken font |Updating the whole texture |rendering in GPU rendering |in |mode |IDirect3DDevice9::UpdateTex | |ture() breaks font caches Component|-unknown |directx-d3d
--- Comment #5 from kakurasan@gmail.com --- The bug is still present.
Sagawa investigated the problem and found the followings:
* DX Library 3.10f/3.11 (which is used in WOLF RPG Editor 2.10) expects that IDirect3DDevice9::UpdateTexture() updates **ONLY** the dirty portions (recorded in IDirect3DTexture9::LockRect()) of a texture in the font cache handling * d3d9.dll in Windows does it, but wined3d updates the whole texture and it breaks font caches
https://bugs.winehq.org/show_bug.cgi?id=35205
--- Comment #6 from kakurasan@gmail.com --- Created attachment 56378 --> https://bugs.winehq.org/attachment.cgi?id=56378 DX Library 3.11 source (partial) and a test program based on Sagawa's steps to reproduce
https://bugs.winehq.org/show_bug.cgi?id=35205
--- Comment #7 from kakurasan@gmail.com --- Created attachment 56379 --> https://bugs.winehq.org/attachment.cgi?id=56379 A hack for Wine 2.0-rc1 (to enable the hack, set string "DxLibFontHack" to "enabled" in HKCU\Software\Wine\Direct3D)
https://bugs.winehq.org/show_bug.cgi?id=35205
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #8 from Matteo Bruni matteo.mystral@gmail.com --- Very nice work, it's probably the first time we find something depending on correct dirty rects handling in UpdateTexture().
This shouldn't be a hack, it's behavior we want to replicate. We want to test how it works exactly (e.g. after multiple LockRect() calls should multiple dirty rects be stored or just the union of the rects?) and then write a proper implementation. Actually there seem to be some relevant tests in Wine already (see add_dirty_rect_test() in d3d9/tests/visual.c), hopefully they are a good starting point for further work.
Interested? :)
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #56379|0 |1 is obsolete| |
--- Comment #9 from kakurasan@gmail.com --- Created attachment 56432 --> https://bugs.winehq.org/attachment.cgi?id=56432 Experimental patch
This fixes the problem, but I'm not sure whether the implementation (dirty region handling) is correct. It seems this doesn't change the results ("todo", "failures", and "skipped" counts) of "visual" d3d9 tests (it seems we need to add a test for this bug).
https://bugs.winehq.org/show_bug.cgi?id=35205
--- Comment #10 from Matteo Bruni matteo.mystral@gmail.com --- You probably want to store a struct wined3d_box instead and in general handle dirty areas for 3D textures too (the latter can be a separate patch I guess). There is still the question about how multiple dirty areas are supposed to be handled and if the existing tests aren't affected by your patch, we clearly need more tests.
I'd start by extending the test, adding some interesting cases and running it on Windows. The testbot might help somewhat but you really want to test on actual Windows boxes with real GPUs.
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #56432|0 |1 is obsolete| |
--- Comment #11 from kakurasan@gmail.com --- Created attachment 56446 --> https://bugs.winehq.org/attachment.cgi?id=56446 Experimental patch v2 (wined3d_box, 3D textures, expand dirty region when needed)
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #56446|0 |1 is obsolete| |
--- Comment #12 from kakurasan@gmail.com --- Created attachment 56447 --> https://bugs.winehq.org/attachment.cgi?id=56447 Experimental patch v2try2
Sorry, I made a small mistake. The "Ignoring dirty_region" message in texture.c is removed bacause it's not ignored if 3D textures are used.
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #56447|0 |1 is obsolete| |
--- Comment #13 from kakurasan@gmail.com --- Created attachment 56470 --> https://bugs.winehq.org/attachment.cgi?id=56470 Experimental patch v3
This fixes 6 todos.
https://bugs.winehq.org/show_bug.cgi?id=35205
--- Comment #14 from kakurasan@gmail.com --- Created attachment 56471 --> https://bugs.winehq.org/attachment.cgi?id=56471 Todo fixes in d3d9 test
https://bugs.winehq.org/show_bug.cgi?id=35205
--- Comment #15 from kakurasan@gmail.com --- Created attachment 56472 --> https://bugs.winehq.org/attachment.cgi?id=56472 Additional testcase (d3d9 test) related to this bug
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #56472|0 |1 is obsolete| |
--- Comment #16 from kakurasan@gmail.com --- Created attachment 56494 --> https://bugs.winehq.org/attachment.cgi?id=56494 Additional testcase (d3d9 test) related to this bug v2 (more color tests)
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #56494|0 |1 is obsolete| |
--- Comment #17 from kakurasan@gmail.com --- Created attachment 56511 --> https://bugs.winehq.org/attachment.cgi?id=56511 Additional testcases (d3d9 test) related to this bug v3 (added some API tests)
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #56470|0 |1 is obsolete| |
--- Comment #18 from kakurasan@gmail.com --- Created attachment 56512 --> https://bugs.winehq.org/attachment.cgi?id=56512 Experimental patch v4
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #56512|0 |1 is obsolete| |
--- Comment #19 from kakurasan@gmail.com --- Created attachment 56527 --> https://bugs.winehq.org/attachment.cgi?id=56527 Experimental patch v5
Store multiple dirty regions (singly-linked list is used)
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #56527|0 |1 is obsolete| |
--- Comment #20 from kakurasan@gmail.com --- Created attachment 56564 --> https://bugs.winehq.org/attachment.cgi?id=56564 Experimental patch v6
https://bugs.winehq.org/show_bug.cgi?id=35205
Mokou mokouthrowaway@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mokouthrowaway@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=35205
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #21 from winetest@luukku.com --- (In reply to kakurasan from comment #20)
Created attachment 56564 [details] Experimental patch v6
Was some part of the patch upstreamed? The patch doesn't apply cleanly anymore against wine 2.8.
https://bugs.winehq.org/show_bug.cgi?id=35205
--- Comment #22 from kakurasan@gmail.com --- (In reply to winetest from comment #21)
Was some part of the patch upstreamed? The patch doesn't apply cleanly anymore against wine 2.8.
I sent a patchset for Wine 2.6+ last month (133167, 133168) and their statuses are "Assigned".
https://bugs.winehq.org/show_bug.cgi?id=35205
--- Comment #23 from Henri Verbeet hverbeet@gmail.com --- Yes. Unfortunately I'm not entirely sure about the best way forward at this point, which is most of the reason for nothing happening right now. It may be best to attach the patches to this bug for the time being, to prevent them getting lost.
For what it's worth, the main issue is that it isn't clear how dirty areas should interact with the resource location management. To some extent that's mostly a matter of picking something and applying it consistently, but there are a fair number of interactions with other code and cases to go through. E.g., should wined3d_texture_load_location() resolve dirty areas or not?
Aside from those, there's e.g. the issue that dirty areas are accessed from both the wined3d command stream thread and the application thread (e.g., wined3d_cs_exec_add_dirty_texture_region() and wined3d_device_update_texture()), although that's a comparatively minor issue.
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #56471|0 |1 is obsolete| | Attachment #56511|0 |1 is obsolete| | Attachment #56564|0 |1 is obsolete| |
--- Comment #24 from kakurasan@gmail.com --- Created attachment 58189 --> https://bugs.winehq.org/attachment.cgi?id=58189 Incomplete patchset for Wine 2.6+ (133167 and 133168)
https://bugs.winehq.org/show_bug.cgi?id=35205
--- Comment #25 from winetest@luukku.com --- (In reply to kakurasan from comment #24)
Created attachment 58189 [details] Incomplete patchset for Wine 2.6+ (133167 and 133168)
The patchs shows me as garbage. You may need to select the patch (checkbox) when doing an attachment.
https://bugs.winehq.org/show_bug.cgi?id=35205
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #58189|text/plain |application/zip mime type| | Attachment #58189|1 |0 is patch| |
https://bugs.winehq.org/show_bug.cgi?id=35205
Gijs Vermeulen acescopezz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |acescopezz@gmail.com
--- Comment #26 from Gijs Vermeulen acescopezz@gmail.com --- (In reply to winetest from comment #25)
(In reply to kakurasan from comment #24)
Created attachment 58189 [details] Incomplete patchset for Wine 2.6+ (133167 and 133168)
The patchs shows me as garbage. You may need to select the patch (checkbox) when doing an attachment.
The patches are inside a .zip.
https://bugs.winehq.org/show_bug.cgi?id=35205
Hugues Ross hugues.ross@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hugues.ross@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=35205
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
https://bugs.winehq.org/show_bug.cgi?id=35205
--- Comment #27 from Fabian Maurer dark.shadow4@web.de --- Patches don't apply to the current git tree anymore. Are you still working on this? If so, would you mind rebasing them?
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #58189|0 |1 is obsolete| |
--- Comment #28 from kakurasan@gmail.com --- Created attachment 59383 --> https://bugs.winehq.org/attachment.cgi?id=59383 Incomplete patchset for Wine 2.18
https://bugs.winehq.org/show_bug.cgi?id=35205
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #29 from Fabian Maurer dark.shadow4@web.de --- Thank you, works like a charm.
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #59383|0 |1 is obsolete| |
--- Comment #30 from kakurasan@gmail.com --- Created attachment 59894 --> https://bugs.winehq.org/attachment.cgi?id=59894 Incomplete patchset for Wine 3.0-rc1
https://bugs.winehq.org/show_bug.cgi?id=35205
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |chanksjoseph@gmail.com
--- Comment #31 from Fabian Maurer dark.shadow4@web.de --- *** Bug 44433 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #59894|0 |1 is obsolete| |
--- Comment #32 from kakurasan@gmail.com --- Created attachment 60769 --> https://bugs.winehq.org/attachment.cgi?id=60769 Incomplete patchset for Wine 3.4
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #60769|0 |1 is obsolete| |
--- Comment #33 from kakurasan@gmail.com --- Created attachment 62417 --> https://bugs.winehq.org/attachment.cgi?id=62417 Incomplete patchset for Wine 3.16
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #62417|0 |1 is obsolete| |
--- Comment #34 from kakurasan@gmail.com --- Created attachment 62961 --> https://bugs.winehq.org/attachment.cgi?id=62961 Incomplete patchset for Wine 4.0-rc1
https://bugs.winehq.org/show_bug.cgi?id=35205
--- Comment #35 from Sagawa sagawa.aki+winebugs@gmail.com --- I sent another patch set for this issue, see https://source.winehq.org/patches/data/175193 https://source.winehq.org/patches/data/175194 https://source.winehq.org/patches/data/175195
https://bugs.winehq.org/show_bug.cgi?id=35205
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED Fixed by SHA1| |54edd5b220116febe704ecef8b3 | |fb86621793ebe
--- Comment #36 from kakurasan@gmail.com --- Fixed by https://source.winehq.org/git/wine.git/commitdiff/54edd5b220116febe704ecef8b...
Thank you so much, Sagawa.
https://bugs.winehq.org/show_bug.cgi?id=35205
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #37 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.0-rc2.