Low FPS - Hit Escape - Come back - Fixes itself
Low FPS - Hit Escape - Come back - Fixes itself
-
- Posts: 124
- Joined: Wed Jun 12, 2019 4:47 am
Hello,
I've been experiencing low FPS at certain times during the game, especially when there's alot of lasers at the same time. I hit escape and go to menu and that seems to help, as soon as I come back the animation goes really fast for a split second and then it comes back to normal. Any way to fix?
Thanks!
I've been experiencing low FPS at certain times during the game, especially when there's alot of lasers at the same time. I hit escape and go to menu and that seems to help, as soon as I come back the animation goes really fast for a split second and then it comes back to normal. Any way to fix?
Thanks!
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
Something similar happens to me (low FPS) when I've got a browser running at the same time XWA is running. In my case, it stays low even after pressing Escape. If I reboot my machine this usually solves the problem.
- Darksaber
- Posts: 10931
- Joined: Mon Jan 10, 2000 12:01 am
- Contact:
With the lack of people responding to your post you can conclude for yourself that the answer is no
Though saying that a few details about your computer may be helpful, such as OS, Ram, CPU anything else you can think of
Though saying that a few details about your computer may be helpful, such as OS, Ram, CPU anything else you can think of
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
-
- Posts: 124
- Joined: Wed Jun 12, 2019 4:47 am
Well, maybe someone with an answer hasn't seen it yet?
OS: Win10
Ram: 16GB 4266 (PC 34100) (Max XMP Profile I got was to 4000)
CPU: Intel i9 9900k - 3.6 stock - OC to 5.2ghz
GPU: GTX 2080
I have several patches activated... including the one you gave me to resolve the target window out of range crash. 0x000d332d I think it was.
I have the latest craftpack and latest ddraw.dll
I have tried installing all the hooks. Nothing fixes it.
OS: Win10
Ram: 16GB 4266 (PC 34100) (Max XMP Profile I got was to 4000)
CPU: Intel i9 9900k - 3.6 stock - OC to 5.2ghz
GPU: GTX 2080
I have several patches activated... including the one you gave me to resolve the target window out of range crash. 0x000d332d I think it was.
I have the latest craftpack and latest ddraw.dll
I have tried installing all the hooks. Nothing fixes it.
- JeremyaFr
- Posts: 3921
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
There is not yet a patch to fix low FPS issues.
There is not yet a patch to fix low FPS issues.
- JeremyaFr
- Posts: 3921
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
Here is a WIP hook to improve a bit the fps.
EDIT: link removed
To enable it, set "IsHookD3DEnabled = 1" in "hook_d3d.cfg".
The hook requires a modified DDraw.dll (included in the zip).
Here is a WIP hook to improve a bit the fps.
EDIT: link removed
To enable it, set "IsHookD3DEnabled = 1" in "hook_d3d.cfg".
The hook requires a modified DDraw.dll (included in the zip).
Last edited by JeremyaFr on Mon Feb 24, 2020 5:30 pm, edited 2 times in total.
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
This is very interesting, Jeremy. I haven't tried it yet myself; but could you share a few details of what you did in the hook above?
- JeremyaFr
- Posts: 3921
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
The following functions are hooked:
Between begin and end scene, the tringles are not immediately drawn. The vertices and triangles are stored in a buffer. When the EndScene method is called, the triangles are rendered.
Doing that, the vertex and index buffers are mapped, written, and unmapped only one time per frame.
When the execute buffer is locked, the pointers to the execute buffer, the vertex buffer and the index buffer are stored in the D3DEXECUTEBUFFERDESC structure. Then the game writes the vertices and the indices directly to the vertex and index buffers, without an extra copy.
The DDraw dll is modified to not copy the vertices and indices to the vertex and index buffers when the execute buffer is executed.
Code: Select all
L00594E6C Xwa3dDeviceBeginScene
L00594EF8 Xwa3dDeviceEndScene
L00595006 XwaD3dExecuteBufferLock
L00595095 XwaD3dExecuteBufferAddVertices
L00595106 XwaD3dExecuteBufferProcessVertices
L00595191 XwaD3dExecuteBufferAddTriangles
L005954D6 XwaD3dExecuteBufferUnlockAndExecute
Doing that, the vertex and index buffers are mapped, written, and unmapped only one time per frame.
When the execute buffer is locked, the pointers to the execute buffer, the vertex buffer and the index buffer are stored in the D3DEXECUTEBUFFERDESC structure. Then the game writes the vertices and the indices directly to the vertex and index buffers, without an extra copy.
The DDraw dll is modified to not copy the vertices and indices to the vertex and index buffers when the execute buffer is executed.
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
So, in the current version of ddraw, the vertex/index buffers are mapped/copied/unmapped every time an execute buffer is executed. The execute buffers are executed several times per frame.
If I understood what you're saying, in the new version the vertex/index buffers are only mapped/copied/unmapped *once* per frame. So we get better performance. Have you ran a benchmark to see how big is the improvement in performance?
I'm looking forward to seeing the new ddraw code!
If I understood what you're saying, in the new version the vertex/index buffers are only mapped/copied/unmapped *once* per frame. So we get better performance. Have you ran a benchmark to see how big is the improvement in performance?
I'm looking forward to seeing the new ddraw code!
- keiranhalcyon7
- Posts: 599
- Joined: Tue Jan 02, 2018 6:41 am
Nice. Some additional questions: does this constitute draw call batching, or would that be a further optimization? (Is it even feasible/applicable to a game as old as XWA?)
- JeremyaFr
- Posts: 3921
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've uploaded the code of the d3d hook and the updated DDraw dll:
Hello,
I've uploaded the code of the d3d hook and the updated DDraw dll:
- xwa_ddraw_d3d11 v1.3.8
Download link: xwa_ddraw_d3d11.1.3.8.zip - xwa_hook_d3d
Download link: xwa_hook_d3d.zip
Last edited by JeremyaFr on Sun Mar 29, 2020 6:30 pm, edited 3 times in total.
-
- Posts: 124
- Joined: Wed Jun 12, 2019 4:47 am
Hey Jeremy, I couldn't find ddraw.dll in that zip.JeremyaFr wrote: ↑Mon Feb 24, 2020 5:24 pmUPDATE
Hello,
I've uploaded the code of the d3d hook and the updated DDraw dll:
- xwa_ddraw_d3d11 v1.3.8
Download link: xwa_ddraw_d3d11.1.3.8.zip- xwa_hook_d3d
Download link: xwa_hook_d3d.zip
- JeremyaFr
- Posts: 3921
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
I've done some changes and forgot to update the links.
I've updated the links in the above post.
- JeremyaFr
- Posts: 3921
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
The latest version of blue_max's DDraw dll is now compatible with the d3d hook.
Intall it and the effects will be back.
Intall it and the effects will be back.
- JeremyaFr
- Posts: 3921
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
There is now an installer for the new effects:
Installers for New Shaders, Effects (Bloom, SSAO, SSDO) and VR/TrackIR Support
There is now an installer for the new effects:
Installers for New Shaders, Effects (Bloom, SSAO, SSDO) and VR/TrackIR Support
-
- Posts: 124
- Joined: Wed Jun 12, 2019 4:47 am
Thanks Jeremy.JeremyaFr wrote: ↑Tue Mar 31, 2020 11:28 amHello,
There is now an installer for the new effects:
Installers for New Shaders, Effects (Bloom, SSAO, SSDO) and VR/TrackIR Support
FPS is better, the problem is with the new ddraw.dll the shadows are off, because light from the backdrop lightsource loses intensity. Is there anyway to make blue_max 's original ddraw.dll compatible with this hook? I like that ddraw so much more. Alot of my missions are very dependent on these lights for specific ambience in the mission, and that is all lost with the new ddraw.dll.
I really appreciate your help.
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
Just wanted to post that labc133 and I worked this out offline. The settings that fixed the visuals for the VR mod were "ssao_enabled = 0" and "disable_xwa_diffuse = 0".
-
- Posts: 124
- Joined: Wed Jun 12, 2019 4:47 am
Yes. Just to clarify:
Jeremy, I was able to use your hook with the Blue_Max's newest ddraw.dll and keep the older ddraw.dll settings by changing ssao_enabled to 0. The hooked worked fine with the new textures, I just preferred the old settings, basically because of the xwa light sources.
I will wait patiently for the new shaders to come out.
Blue_max was awesome help and so have you, Jeremy.