Commit Graph

2343 Commits

Author SHA1 Message Date
Gregory Hainaut 399ddbd74a gsdx hack: reduce complexity of alpha* function
It will help the compiler to make a couple of optimizations (and it will help
a futur porting to GSVector)
2015-04-13 22:14:36 +02:00
Gregory Hainaut 1d0deb5ffe gsdx hack: move round sprite offset into a separate function
Use a boolean template to separate the linear case. I'm afraid it will
cost extra computation but 90% of sprites use nearest.
2015-04-13 22:14:36 +02:00
Gregory Hainaut 1aebca3740 gsdx hack: m_userhacks_round_sprite_offset take precedence over m_userhacks_stretch_sprite
m_userhacks_stretch_sprite is only kept for debugging. Let's avoid bad mixing by users
2015-04-12 11:05:23 +02:00
Gregory Hainaut c4fef0256e gsdx hack: Better rounding fix letter in ace combat and line in tekken
Tekken is broken with setting UserHacks_round_sprite_offset = 2 use 1 instead.
=> game use upscaling internaly so my rounding of coordinate break everything

Yakuza uses float coordinate but this hack only correct the integer coordinate
=> the solution will be to add a dedicated hack for this game.

Colin3 got a regression but I don't know when...
2015-04-12 10:31:04 +02:00
Gregory Hainaut 7e89247bf4 gsdx hack: don't add extra correct for zero length texture
Otherwise t1-t0 is 16 instead of 0
2015-04-11 10:54:30 +02:00
Gregory Hainaut d2156c86eb gsdx: improve previous hack for bilinear sprite
PS2 uses a -0.5 offset before sampling so texels must be rounded to half-pixel boundary

If fixes glitches on Venus and taisho-mononoke

Note: I didn't fixed yet texture render in reverse because I don't have any test for it.
2015-04-10 09:42:39 +02:00
Gregory Hainaut f5eeb2024e gsdx: anti-glitches v3: Tester wanted
UserHacks_round_sprite_offset = 1 <= enable correction of flat sprites
UserHacks_round_sprite_offset = 2 <= enable correction of all sprites (better on a couple of dump but not sure of the consequence)

I completely redo the algorithm. This time I do the projection and
interpolation of the 2 extrem vertex. This way I can compute the min/max
valid texture coordinate.

It gives stronger guarantee that texture sampling will be done inside the texture.

However it might have a performance impact, likely reasonable because it
is limited to sprite vertex.

A big thanks you to all people that provide me GS dump and test reports.
2015-04-09 19:51:50 +02:00
Gregory Hainaut 05eb1641f2 gsdx: add glsl debug capabilities
Useful to debug bad texture sampling
2015-04-08 10:15:25 +02:00
Gregory Hainaut 98d8ad7484 gsdx: new anti-glitches upscaling hack: UserHacks_round_sprite_offset
It is replacement of the previous hack (UserHacks_stretch_sprite). Don't enable both in the same time!

The idea of the hack is to move the sprite to the pixel boundary. It
avoids most of rounding issue. It also rescales verticaly the sprite (avoid horizontal line on ace combat).
I don't like this rescaling maybe we can limit it to only 1 pixels.

On my limited testcase, results are much better with any upscaling factor.

I still have a bad line in Kingdom heart. If you have issue with others
game please provide us a GS dump.
2015-04-07 19:18:24 +02:00
avih 3077de3637 Merge pull request #496 from 3descx9/master
crc hack for Ponkotsu Roman Daikatsugeki: Bumpy Trot ( Steambot Chronicles JP)
2015-04-07 12:04:25 +03:00
ssakash defb57178f crc hack for Ponkotsu Roman Daikatsugeki: Bumpy Trot ( Steambot Chronicles JP) 2015-04-07 14:14:26 +05:30
Blyss Sarania 506648bd6b GSdx: Hacks UI: Add missing BREAK that I left out 2015-04-06 14:39:51 -05:00
Blyss Sarania c6fb098703 Add two new tick boxes and associated description
For Gregory's two new awesome hacks

Also make new hacks obey "Enable HW Hacks"
2015-04-06 13:48:59 -05:00
Gregory Hainaut 3c84e6848b gsdx: don't enable previous hack if m_upscale_multiplier <= 1 2015-04-04 01:21:46 +02:00
Gregory Hainaut 183b5d4def gsdx: improve UserHacks_align_sprite_X hack for ace combat
Game uses 1x1 texture sampling. In this condition we don't care
if texture is correctly aligned.
2015-04-03 23:00:54 +02:00
Gregory Hainaut 53ab390e72 gsdx linux: add a nice gui option for previous hack
I also added two nice tooltips :)
2015-04-03 21:25:34 +02:00
Gregory Hainaut fbaa84e691 gsdx: anti-vertical-line hack UserHacks_align_sprite_X
This ack realign sprite to full pixel coordinate

It solves vertical line in ace combat/tekken/colin mac rally
2015-04-03 21:02:25 +02:00
Gregory Hainaut e40a26be19 gsdx: add some helper to debug openGL renderer 2015-04-03 20:28:44 +02:00
Gregory Hainaut 5269e54f02 gsdx: tune previous hack
Only disable bilinear on the sprite that were forced by the user.
If the PS2 requires a bilinear filtering, there is likely a big enough texture
2015-04-03 20:09:02 +02:00
Gregory Hainaut bb728ea186 gsdx linux: filtering label was in wrong oder
The standard mode is 2
2015-04-03 20:07:50 +02:00
Gregory Hainaut d4b7410e3e gsdx linux: add a checkbox to enable easily previous hack 2015-04-03 18:33:05 +02:00
Gregory Hainaut e1a5736583 gsdx: anti-upscale-glitch hack UserHacks_SkipDraw
2x upscaling is pixel perfects. Bigger upscaling is better but not yet perfect

Feedbacks are welcomes (note it doesn't solve all upscaling issue, only wrong texture sampling)

For the history:
If you have a texture of [0;16[ texels and draws a primitive [0;16[

The formulae to sample last pixels of texture is
0.5 + (16*s-1)/(16*s) * 16
Native (s==1): 15.5 (good)
2x     (s==2): 16 (bad, outside of the texture)
4x     (s==4): 16.25 (bad, really outside of the texure))
2015-04-03 18:33:05 +02:00
Gregory Hainaut 22710d9b44 lilyPad: fix the linux crash if ini doesn't exist
All credits go to Arcum42
2015-04-03 18:33:05 +02:00
Avi Halachmi (:avih) 45e2fd9204 crc hack for Raw Danger! (Zettai Zetsumei Toshi 2 US)
thanks to ssakash for the patch
2015-03-29 15:41:06 +03:00
Gregory Hainaut 3b5367c5b7 Merge pull request #452 from turtleli/fix-linux-build-avx2-with-tsx-disabled
GSdx: Linux: Fix build failure on AVX2 processor with disabled TSX, enable SSE4.2, SSE4.1, SSSE3 builds
2015-03-01 17:53:21 +01:00
Jonathan Li 1222bcbf6e GSdx: Comment out TransactionScope code
The TransactionScope class is compiled but never used. Comment it out
for now.
2015-03-01 16:40:48 +00:00
Gregory Hainaut c1604c4b38 gsdx🧵 only keep std::mutex/std::condition_variable
Keep pthread for thread until std::thread is really working
2015-03-01 17:29:40 +01:00
3kinox 7f1e907616 + Correct faulty behaviour of std thread by using native posix handle.
+ This is not yet perfect. Really, this standard seems like a load of crap to me in fact...
At least it works now. Should test again when gcc 5 & new c++ libs gets out.. Until then, it will do.
2015-03-01 17:29:39 +01:00
Gregory Hainaut b68270ded1 Merge pull request #448 from PCSX2/lilypad-linux-port
Lilypad linux port
Basic support of Keyboard and Joystick

No gui to configure anything. Not well tested yet.
2015-03-01 16:52:23 +01:00
Jonathan Li 13c0e6f5ef GSdx: Explain TransactionScope changes 2015-02-28 14:21:44 +00:00
3kinox 4211d51f07 64 bits: solve various of type problems 2015-02-27 22:07:13 +01:00
Gregory Hainaut f254d44030 CDVDlinuz: fix gtk header include
It doesn't fix GTK3 build but it allows to see the real error now.
2015-02-27 10:11:38 +01:00
Jonathan Li 329953ebc3 GSdx: Linux: Enable SSE4.2, SSE4.1 and SSE3 builds 2015-02-22 11:18:23 +00:00
turtleli 9b572d2d47 GSdx: Linux: Fix AVX2 CPU build with TSX disabled
On Linux, CPUs with AVX2 instruction sets that have TSX disabled (by
microcode update or otherwise) fail to build GSdx. The __RTM__ macro is
undefined, with leads to the TSX RTM instruction set (_xbegin, _xend,
_xabort, etc.) being unavailable.

Modify the preprocessor check so that the RTM instructions are only used
if available.
2015-02-22 11:18:23 +00:00
Gregory Hainaut 330d14941f gsdx-linux: support dump mode on linux
It could be useful to analyze GS dump. Warning it consumes a lot of
disk space.
2015-02-21 13:51:06 +01:00
Gregory Hainaut 8d76586dec lilypad: fix windows build
I think lilypad used libc instead of libc++
2015-02-21 11:08:45 +01:00
Gregory Hainaut 642371996a lilypad: add joy support based on linux evdev
I wanted to play with linux interface :)

It is far from perfect but joysticks are detected. The biggest issue is the correct generation of the config file!
2015-02-21 11:08:45 +01:00
Gregory Hainaut 3a2e8f38df lilypad: removed old linux/LilyPad.cpp file 2015-02-20 23:05:21 +01:00
Gregory Hainaut 8350dc2c68 lilypad: remove debug printf 2015-02-20 23:05:21 +01:00
Gregory Hainaut 13bb1ae028 lilypad: Keep original KeyboardQueue (more ifdef)
It would be nice if windows support basic std::mutex

The reverse fifo queue is kept in Linux/KeyboardQueue.cpp
2015-02-20 23:05:21 +01:00
Gregory Hainaut 349bb810f0 lilypad: merge LilyPad.cpp (ifdef, ifdef)
Avoid duplication for linux
2015-02-20 23:05:21 +01:00
Gregory Hainaut 42b9932bd0 lilypad: add code to bind key 2015-02-20 23:05:21 +01:00
Gregory Hainaut 3096e94616 lilypad : plug a basic keyboard device
Add a reverse fifo to transfer event from core to plugin

Long story short, on linux there is only one event queue in core
2015-02-20 23:05:21 +01:00
Gregory Hainaut aec43f0bee lilypad: add x11 display pointer
If we move all window management hack into the core it would be useless (for input)
2015-02-20 23:05:21 +01:00
Gregory Hainaut 087f252909 lilypad: add plumbering config
Note: it miss interaction with any dialog
2015-02-20 23:05:21 +01:00
Gregory Hainaut 4f013a2960 lilypad: import common utility to manage config
Based work on spu2x equivalent file. Only convert the file to a CfgHelper object
2015-02-20 23:05:21 +01:00
Gregory Hainaut 156f66ef62 lilypad: make it compile on linux
* Ifdef windows code
* Add a windows crap to linux crap translation layer
2015-02-20 23:05:21 +01:00
Gregory Hainaut 3661f51bcb lilypad: minor c++ fixes
Must be checked on windows
2015-02-20 23:05:21 +01:00
Gregory Hainaut 147353a177 lilypad: add cmake file 2015-02-20 23:05:21 +01:00
Gregory Hainaut 76ff56a4e3 lilypad: add a linux fork
Yes it is bad!
2015-02-20 23:05:21 +01:00