https://bugs.winehq.org/show_bug.cgi?id=46733
Bug ID: 46733 Summary: IDirect3DTexture9_LockRect failed inside ID3DXFontImpl_DrawTextW with OblivionReloaded Product: Wine-staging Version: 4.2 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: lorenzofer@live.it CC: leslie_alistair@hotmail.com, z.figura12@gmail.com Distribution: ---
Created attachment 63724 --> https://bugs.winehq.org/attachment.cgi?id=63724 +d3dx,+d3d9,+d3d log
Hi,
While testing OblivionReloaded (a patcher/extender for TES4:Oblivion), I discovered that in some place where there was supposed to be a rendered text, wasn't. One of these place is the options menu (by default it came up with the key O).
Digging inside OR sourcecode, I saw that it use DrawTextA from ID3DXFont. However the functions was silently failing and there wasn't any message from the log.
I put some TRACE messages inside the functions and discovered that was failing in IDirect3DTexture9_LockRect.
After getting a +d3dx,+d3d9,+d3d log I got: 0046:warn:d3d:wined3d_resource_map Resource does not have MAP_W access.
on a Texture created by the DrawTextW function.
Now, I don't have aviable other games that use the DrawText functions,and were reported working. But considering where is failing, it's possible that a change (in wine or another staging patch) broke this patch en passant?
The attachment uploader is crying when trying to upload the compressed log. Will retry tomorrow.
https://bugs.winehq.org/show_bug.cgi?id=46733
--- Comment #1 from Lorenzo Ferrillo lorenzofer@live.it --- It seems that the log was updated, even if the interface give me an error.
GG bugzilla, GG.
BTW the code of OBlivionReloaded is here.
https://github.com/Alenett/TES-Reloaded-Source
The file that contain the offended instructions is https://github.com/Alenett/TES-Reloaded-Source/blob/master/TESReloaded/GameM...
https://bugs.winehq.org/show_bug.cgi?id=46733
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |joseph.kucia@gmail.com Component|-unknown |directx-d3d Product|Wine-staging |Wine
https://bugs.winehq.org/show_bug.cgi?id=46733
Sergey Isakov isakov-sl@bk.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |isakov-sl@bk.ru
--- Comment #2 from Sergey Isakov isakov-sl@bk.ru --- Do the staging patch from bug 24754 make a difference?
https://bugs.winehq.org/show_bug.cgi?id=46733
--- Comment #3 from Lorenzo Ferrillo lorenzofer@live.it --- (In reply to Sergey Isakov from comment #2)
Do the staging patch from bug 24754 make a difference?
I specified I was using wine-staging. This bug target wine-staging, and the attached log clearly show TRACEs from that specific patch.
Clearly it doesn't.
Also using native d3dx9_43.dll isn't a complete workaround, as it allow the text to be printed, but the text size and alignment is wrong.
https://bugs.winehq.org/show_bug.cgi?id=46733
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Product|Wine |Wine-staging Ever confirmed|0 |1 Component|directx-d3d |-unknown Status|UNCONFIRMED |NEW
--- Comment #4 from Józef Kucia joseph.kucia@gmail.com --- The staging patch should probably pass D3DUSAGE_DYNAMIC to D3DXCreateTexture().
https://bugs.winehq.org/show_bug.cgi?id=46733
--- Comment #5 from Lorenzo Ferrillo lorenzofer@live.it --- I tryed to modify some parameter of D3DXCreateTexture, as adding D3DUSAGE_DYNAMIC but it didn't work. Also I tryed to avoid using D3DLOCK_DISCARD on LockRect, but also this didn't work.
Still failing on 0046:warn:d3d:wined3d_resource_map Resource does not have MAP_W access.
https://bugs.winehq.org/show_bug.cgi?id=46733
--- Comment #6 from Lorenzo Ferrillo lorenzofer@live.it --- If this may be of help wine-staging 3.21 is the first version in which text isn't rendered.
With wine-staging 3.20 all is good.
https://bugs.winehq.org/show_bug.cgi?id=46733
--- Comment #7 from Lorenzo Ferrillo lorenzofer@live.it --- Argh, I made a mistake.
When adding D3DUSAGE_DYNAMIC, the buffer is mapped the first time, but is never unmapped, failing with an error:
004d:warn:d3d:texture_resource_sub_resource_map Sub-resource is already mapped.
https://bugs.winehq.org/show_bug.cgi?id=46733
--- Comment #8 from Lorenzo Ferrillo lorenzofer@live.it --- Again forget my last two posts. Unluckly when I added some more TRACE, I botched a if block (this is why I hate no {} block for oneliners)
So yes, adding D3DUSAGE_DYNAMIC, restore the correct functionality for DrawText patch
https://bugs.winehq.org/show_bug.cgi?id=46733
--- Comment #9 from Lorenzo Ferrillo lorenzofer@live.it --- Can be marked as fixed.
https://bugs.winehq.org/show_bug.cgi?id=46733
Lorenzo Ferrillo lorenzofer@live.it changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #10 from Lorenzo Ferrillo lorenzofer@live.it --- Fixed by c043d43772aa403aa17f59e3efe381dc09168c85
https://bugs.winehq.org/show_bug.cgi?id=46733
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |c043d43772aa403aa17f59e3efe | |381dc09168c85
https://bugs.winehq.org/show_bug.cgi?id=46733
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing Fixed Staging bugs.