GSdx
(01-04-2015, 06:44 PM)rama Wrote: Yea, that does help. Thanks Smile
So this looks like a hack to me. If anyone understands what it does, please explain.
We do have a hacks section in GSdx so if it's any useful (not breaking too much, etc), then
we can add it there.

Why do you think it's a hack?

According to the source code, it checks the value of FBP (Frame.Block()). If anybody knows what FBP is, please explain.

If FBP doesn't equal zero, the default behavior (DrawPrims()) is executed. If anybody knows what DrawPrims() does, please explain.

Else, it seems that it stretches the texture (StretchRect()) by 1024 x 256.

If we know what the following are/do, we'll understand this:
- FBP
- DrawPrims function
- StretchRect function
- rt->m_texture and tex->m_texture
Reply

Sponsored links

Hello, I made the patch originally,

From what I remember when making this,

DrawPrims() loads appropriate shaders and makes the D3D Draw calls onto the rendertarget (with a given texture and primitives buffer).
StretchRect() is just a native D3D function to resize and copy a texture.

rt is the rendertarget and tex is a working copy of the rendertarget from previous calls (in this case).

FBP I dont understand so well, but if you look at other game-specific hacks in GSdx, it is often used to target a specific render point.


With enthusia (probably all games), most of the Draw calls are made on a strange sized rendertarget before finally being resized to fit the window.

Now as to what is cause the vertical lines in DrawPrims(), this may not be true, but I believe it is a float to integer conversion error (eg; 126.5 converts to 126 instead of 127 somewhere) when the shader is resizing final rendertarget result to the correct size. The other possibility is a floating-point precision error. (due to the scale values being so small)

I avoided this by using StretchRect to stretch/resize the working copy to the rendertarget, in replacement of the shader doing the stretching.

1024/256 multiplied by the rt scale value seems to replicate what the shader was suppose to resize it to.


Basically the shader stretching function has a bug, not sure which shader or why.. but it seems to be the last draw call before the rendertarget is Present()'d to the backbuffer.



Also a quick tip, I used NVIDIA PerfHUD to track down the exact point the black lines were introduced. It allows you to view the rendertarget after each draw call.


Hope this clears things up and looking forward to seeing an official patch!
Reply
Thank you for the explanation. Rep+1.
Reply
@racer_s
did you use NVIDIA PerfHUD to clarify that the last draw call before the render target is Present()'d to the backbuffer.
We're supposed to be working as a team, if we aren't helping and suggesting things to each other, we aren't working as a team.
- Refraction
Reply
(12-28-2014, 04:56 PM)hellbringer616 Wrote: tried it with Soul Calibur 3, All it does it crash.
Shame too, was hoping to play this game with real scaling.

It make pcsx2 crash for me too. Any fix found? My setup is i7 2760qm and gtx 560m. Tested on builds from early Dec and early Jan

Nice work on the fix/hack btw. If you like racing games maybe you can look at R Racing Evolution, it doesn't even render the cars lol
Reply
Iirc this patch only works for avx instruction set.
We're supposed to be working as a team, if we aren't helping and suggesting things to each other, we aren't working as a team.
- Refraction
Reply
Both my 3570k and my 6800k have AVX, I am actually using the precompiled AVX plug-in from the latest GIT for Soul Calibur 3. Works great. So at least for me, that isn't the issue.
Intel Core i7-8700k @5ghz
G.Skill 16GB DDR4 @3600mhz
GeForce GTX 1080 8GB
Windows 10 x64
Reply
It should work with PCSX2 1.2.1.
Reply
Though, He mentioned it was for 1.0.0
We're supposed to be working as a team, if we aren't helping and suggesting things to each other, we aren't working as a team.
- Refraction
Reply
He said that it worked with the latest 1.2 release. I think he meant the stable release.
Reply




Users browsing this thread: 3 Guest(s)