Commit Graph

73 Commits

Author SHA1 Message Date
refractionpcsx2 ee9b1caaa4 GSdx-hw: Custom res native mixup stuff, best fix this one too. 2015-06-23 19:43:04 +01:00
refractionpcsx2 ad71ca4cc8 GSdx-hw: Make sure custom resolution doesn't affect Native Resolution 2015-06-22 17:23:47 +01:00
Gregory Hainaut f765a195e2 gsdx: Don't set CRC function pointer when disabled
Less costly than an extra check for each draw calls
2015-06-14 10:27:02 +02:00
Gregory Hainaut 1be8d07f85 gsdx: auto CRC management
Old way various check boxes to configure the plugin

New way an unified drop down list

* Level 0 (dev only) => disable (mostly) all hacks and auto skip depth.
* Level 1 (dev only ) => enable oi/oo/cu hacks, others remains disabled
* Level 2 (GL) => enable most hacks except a couple of one that were fixed on openGL (speed impact)
* Level 3 (DX) => enable all hacks
* Level 4 => enable also aggresive CRC

Note: windows gui must be updated, and it will be nice to create a global tooltip
2015-06-14 10:27:02 +02:00
Gregory Hainaut c6220bf836 gsdx-debug: print an error on unsupported draw call
Typically GTA
2015-06-14 10:27:02 +02:00
refractionpcsx2 95c2622b7f Gsdx: Typo'd! 2015-06-07 18:31:51 +01:00
refractionpcsx2 b5171dfe5d Gsdx: De-crapify Native resolution, potential fix for custom resolutions. 2015-06-07 16:57:55 +01:00
refractionpcsx2 0946958acf Gsdx: Height change on Gregory's recommendation :) 2015-06-07 16:12:14 +01:00
Gregory Hainaut 5daf7aa98f gsdx-debug: keep s_n/pop in sync 2015-06-07 12:39:48 +02:00
refractionpcsx2 0a467291f9 Gsdx: Height thing didn't work so well, using old buffer width test again 2015-06-07 03:50:34 +01:00
refractionpcsx2 1fa13163e4 GSDX: Fix for games which change height but keep the same buffer width
- Fix for games that specify a double height, like Pool Paradise
2015-06-06 20:24:10 +01:00
refractionpcsx2 65b83a36a7 GSDX: Removed some printf's I left in. 2015-06-05 00:13:21 +01:00
refractionpcsx2 91f775f3f0 GSDX: Fixed up some of the scaling height settings
-Last commit broke Snowblind games again
-Width now based on output circuit
-Try to use the smallest possible while being at least the size of the screen
2015-06-05 00:12:15 +01:00
Gregory Hainaut 6f4ec98bc3 gsdx: try to reduce the size of target as much as possible
I suspect too consume too much memory (issue #576)
2015-06-04 22:15:52 +02:00
refraction 4914620178 GSDX: Fix for 6x Native, fixed GH3 in native mode taking up quarter of the screen after the snowblind changes 2015-06-01 19:04:39 +01:00
Gregory Hainaut f81cf360bc Merge pull request #545 from PCSX2/gsdx-half-screen-snow-engine
Gsdx half screen (most of) snow engine games
2015-06-01 11:47:40 +02:00
Gregory Hainaut 9d69ff1f91 gsdx-debug: create the savef option
The idea is to easily extract bad frame from gs dump and to compare them
with the sw renderer.

Here the summary of the options:
savet => dump all input textures
save  => dump the render target
savez => dump the depth buffer
savef => dump the frame
2015-05-31 17:38:52 +02:00
Gregory Hainaut 0cb6c37f14 gsdx-tc: add an explanation of the magic number 0x140 2015-05-29 12:27:05 +02:00
refraction 97b237712c gsdx: detect RT size based on fb size and gs output configuration
* It is required for snowbling games
* Targets of Texture cache are dropped.
2015-05-29 12:26:44 +02:00
Gregory Hainaut c82fd94c6c gsdx-debug: use GL_INS instead of printf 2015-05-24 13:43:36 +02:00
Gregory Hainaut b884e0c0c0 gsdx-debug: improve debug experience
* Dump context before the increase of s_n
  => aligned with the global call number
* Don't print colclip not supported when it is optimized away
* dettach the input texture when it is useless
  => avoid to show a wrong texture in the debugger
2015-05-23 12:23:05 +02:00
Gregory Hainaut d3d5a436ea gsdx-ogl: add code to read back depth texture 2015-05-20 08:07:40 +02:00
Gregory Hainaut b1ea081fc3 gsdx-debug: improve tracing interface
Basically move the format and c_str() in the macro
2015-05-17 13:05:08 +02:00
Gregory Hainaut a2d605be0b gsdx: copy past mistake
Let's always increment the s_n counter
2015-05-16 00:31:25 +02:00
Gregory Hainaut 1523b9534f gsdx-debug: compact the code 2015-05-11 11:19:00 +02:00
Gregory Hainaut 8e1db43431 gsdx-debug: debug stuff 2015-05-08 19:28:17 +02:00
Gregory Hainaut 3c66da4d82 gsdx: remove old code 2015-05-08 19:28:16 +02:00
Gregory Hainaut cc4713d379 gsdx-debug: extend ogl debug capabilities
Group opengl calls into a nice name.

Apitrace shows them in a tree format that support folding. Previously it
was a long flat list (10K-40K of lines by frame)

I align the call number with the internal s_n variable. This way it is
easy to map GSdx dump output with the GL debugger :)
2015-05-06 19:09:13 +02:00
Gregory Hainaut 6fca3b421d gsdx-debug: dump register context in a .txt file
+ Realign s_n number if frame is skipped

This way it is easier to understand current draw. It also eases
comparaison between SW/HW.
2015-05-06 19:09:12 +02:00
Gregory Hainaut 7bfee7e377 gsdx-debug: stop the dump after a limited number of draw call
Otherwise it fills your disk in a short time with useless data.
2015-05-03 16:46:48 +02:00
Gregory Hainaut c8a3db114c gsdx debug: create savet option
0: don't dump input texture
1: dump input texture

Now, you can do a first pass with only RT. When you find the wrong call, you can redump the input texture of the bad draw.
2015-05-01 13:35:21 +02:00
Gregory Hainaut 670bcc1818 gsdx hack: use a dumb implementation for UserHacks_round_sprite_offset = 2
It works as bad as a "clever" implementation.

It seems to be enough for games such as venus/taisho-monoke/FFX

Note: it might creates glitches. Code will never be nice, so it is just
a trade-off
2015-04-16 19:26:33 +02:00
Gregory Hainaut 41e5be0673 gsdx hack: limit range of UserHacks_align_sprite_X
Just an extra check to avoid an overlap (avoid white line in tekken)
2015-04-16 19:26:33 +02:00
Gregory Hainaut e8698a9c0c gsdx hack: hole in vertex position also appears in !FST projection
Fix various black vertical line regression with UserHacks_align_sprite_X
2015-04-15 09:40:06 +02:00
Gregory Hainaut 65a84b9f64 gsdx hack: drop previous filtering hack
superseeded by UserHacks_round_sprite_offset
2015-04-15 09:26:01 +02:00
Gregory Hainaut 2da4a5e6bc gsdx hack: use a 0 offset instead of -1
-1 is annoying because minimum value is 0. Instead to add more logic,
let's try to use 0 which seems to be good enough (fix regressions on DQ8/AT)

Unfortunately it causes a mini regression on taisho-mononoke. Rotation of sprite is done with 2 triangles.
Potentially previous value wrongly recover this section.
2015-04-14 18:39:26 +02:00
Gregory Hainaut cde72300a5 gsdx hack: Correct formulae for reversed texture
It fixes issues on Ace Combat UI
2015-04-13 22:14:36 +02:00
Gregory Hainaut 50bac01d89 gsdx hack: disable upscaling hack at native resolution 2015-04-13 22:14:36 +02:00
Gregory Hainaut 815c99b6e4 gsdx-hack: remove an extra offset + duplicate linear computing
Initially code aligned texture on pixel boundary + 1/16th. It seems to work without it.
2015-04-13 22:14:36 +02:00
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 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
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