Commit Graph

247 Commits

Author SHA1 Message Date
lightningterror 6dca3656ed GSdx: Add Harry Potter and the Half-Blood Prince to automatic mipmapping. 2018-10-19 22:16:00 +02:00
Jonathan Li 3fe9ff7ac8 gsdx: Split TC offset hack into X and Y components 2018-09-20 01:01:49 +01:00
Jonathan Li 2f5ba10e6b gsdx:hw: Move TC offset variables to GSRendererHW
Also rename them for consistency.
2018-09-20 01:01:49 +01:00
lightningterror cf222d1ccf GSdx: Add Ape Escape 2 to automatic mipmapping. 2018-08-21 17:28:14 +02:00
FlatOutPS2 1498f538dd gsdx:hw: Enable skipdraw hack to skip a range of draw calls
Enhance the skipdraw hack by allowing skipdraw to skip a range of draw
calls.

For example: When the broken effects are at frames 90-100, the default
skipdraw always skips 0-100, possibly skipping several functioning
effects as well. By enhancing the skipdraw feature, it is now possible
to skip just frames 90-100.

For the example given above set the first box to 90 and the second box
to 100 to skip frames 90-100.

coauthor:turtleli (Linux GUI + tidy/simplify Windows GUI code)
2018-08-20 23:35:01 +01:00
lightningterror 59ec48a120 GSdx: Add games to automatic mipmapping, add some crc ids.
Automatic mipmapping: Harry Potter (Chamber Of Secrets,
Prisoner of Azkaban,  Order Of The Phoenix), The Incredible Hulk:
Ultimate Destruction.

Add some missing crc ids for GT4 demo discs.
2018-07-31 02:43:21 +02:00
lightningterror 387db6d4ba GSdx: Add Nicktoons Unite to Automatic Mipmapping.
Game is still broken but a bit better now.
2018-06-26 20:23:12 +02:00
lightningterror f244706cc2 GSdx: Purge Spyro NB /EN hw hack fixes.
Purge Hw hack fixes for Spyro New Beginning and Eternal Night that fixed
HUD and menu display.
They will be replaced with EE patches in GameDB that work for both
software and hardware mode. A much better alternative and less GSdx
hacks.
2018-06-02 12:38:49 +02:00
lightningterror c5f94fbced GSdx: Adjust Spyro New Beginning crc hack.
The hack should now work on the PAL version as well.
2018-05-21 02:33:46 +02:00
lightningterror c4068e5188 GSdx: Update Spyro Hw fix/hack.
Revert merge of Spyro Eternal Night / New Beginning hw hack.
Update Spyro New Beginning hack - fixes menu/hud flicker in HW mode.

SW mode still has issues with the menu/hud elements.

Improve #1490
2018-05-20 16:30:32 +02:00
lightningterror 014e27bc20 GSdx: Add Quak3 Revolution to Automatic mipmapping. 2018-03-27 15:11:08 +02:00
lightningterror 0e83b89dbd GSdx-D3D: Texture and channel shuffle improvements.
Texture Shuffle changes:
Always Enable Texture shuffle on D3D10/11.
Previously Texture shuffle was enabled if CRC hack
level was below Full, this was kinda not good since
D3D also relies on CRC hacks on Full so you could either
stick with texture shuffle or crc hacks.

Texture shuffle is not supported on D3D9, however we can do a partial
port where instead of vertical lines with the effect we get the effect
on the entire screen. Better than nothing I suppose.

Ported some of the code from OpenGL to D3D
( just a copy - paste job :) ),
part of the code misses a dedicated shader but we can still
use it to fix various issues on many games.

List of affected games tested so far:
The Godfather, Final Fight Streetwise, The Suffering Ties that Bind,
Urban Chaos have their vertical lines issues fixed
(highly possible for other games as well), MGS and Stolen see an improvement
but they are still broken without crc hacks. Other games that suffered
similar issues are probably affected as well.

Channel Shuffle changes:
Update Channel Shuffle detection. A lot of games should see an improvement,
MGS, Urban Chaos, Stolen have their top left corner issues resolved.
Other games should be affected as well that use similar logic.
They still miss a shader so some effects are still broken/show glitches
but it's a nice improvement for D3D users.

Shared changes:
Texture Shuffle and Channel shuffle have been moved to their
own dedicated functions. Should make things a bit cleaner.

Move part of the code for Texture Shuffle to GSRendererHW to be shared
across all HW renderers, should aboid copy paste/duplicate code.
2018-03-23 13:38:34 +01:00
Christian Kenny 40f7d6c95b GSdx: Add Shox to Automatic Mipmapping 2018-03-19 01:00:26 +05:30
lightningterror 6aaae6970e GSdx: Cleanup hacks in GSRendererHW.
Merge identical code for Spyro Games in to one to avoid duplicate code.

Rename hacks name for Jak series from OO_Jak to OO_JakGames since there
are multiple games added.
2018-03-13 18:56:30 +05:30
refractionpcsx2 084530eeca
Merge pull request #2122 from PCSX2/target_load
GSdx-TC: Fix load size calculation in target update Fixes #1972 Fixes #2110 Fixes #2138
2018-03-03 03:31:25 +00:00
Akash b10c357065 GSdx-TC: Fix load size calculation in target update
Previously, the calculation for the size of data to be loaded was done
based on the rendering target buffer size and scaling multiplier, which
was totally wrong. This led to different resolutions having different
load sizes while the size of the real GS memory is common regardless of
the scaling variancies.

Hence use the default rendering target buffer size for the load size
independent of the scaling values. I've also removed a buffer height saturation
code which seemed unreliable.

Note: The accurate version of the code can be enabled using the macro
provided in config.h (which is more intensive on resources), the current
code goes along with the approach of maintaining a decent performance
level along with a formidable accuracy.
2018-02-06 18:00:22 +05:30
lightningterror 4aa25c4971 GSdx: Disable Merge Sprite on native resolution.
Previously if HW hacks were enabled Merge Sprite was active(if checked) on
native resolution even if the GUI option was disabled, which in result
caused glitches in games on native resolution.

This should address that issue.
2018-01-13 23:18:57 +05:30
FlatOutPS2 fe27d3b25a GSdx: Add Dark Cloud CRCs to automatic mipmapping 2018-01-12 13:28:43 +05:30
lightningterror 6d49bf6fc6 GSdx: Automatic HW Mipmapping option
Adds automatic HW mipmapping support.
It relies on CRC ids so if a game does
not have their CRC id but needs mipmapping
it will not work until the id is added.

Add GUI menu and tooltip for Automatic mipmap
"Automatic (Default)"
This option will be default option from now on.

Rename "Very Slow" text option to "Slow" for full mipmap
as it caused the text not to fit properly in the menu.

Credits also go to @RedPanda4552 and @ssakash for helping
with the code.
2017-11-20 09:54:56 +01:00
Jonathan Li 0cde534e30 gsdx: Prefix std:: to min and max 2017-09-08 09:56:28 +02:00
Jonathan Li d57b812f36 gsdx: Prefix std:: to string and to_string 2017-09-08 09:56:28 +02:00
Akash 23fa0657a7 GSdx-HW: Move scaling code to separate subroutine
Move the custom resolution scaling code to a separate subroutine and
allow future RT buffer resize calls when the buffer size isn't enough.

(Example: when a game's CRTC/Framebuffer size changes. The older code
didn't consider such cases)
2017-06-04 17:10:25 +02:00
Akash a04d9fa388 GSdx-HW: Revamp buffer size calculation
Added a more robust buffer size calculation mechanism for custom
resolutions. Improves performance in higher resolutions for games
which don't need a big buffer. There's a great boost in performance
at GS limited scenarios.

I don't even feel there's a need for the large framebuffer option right
now, For future - I plan on making the large framebuffer enabled version
as the default as the overhead is there only at situations when it's
necessary. Until then keeping the original code just to be on the safe
side in case any issue pops up.
2017-06-04 17:10:25 +02:00
FlatOutPS2 82405982f7 GSdx: Add merge sprite hack to GSdx hacks dialog
Adds merge sprite hack to GSDx hacks dialog

And ports merge sprite hack to Direct3D renderers.
Special thanks to my keyboards Ctrl, c and v buttons for all their hard
work in porting this hack.
2017-04-01 11:16:25 +02:00
FlatOutPS2 557b672232 GSdx: Unscale Point and Line Direct3D11 port
Ports the "Unscale Point and Line" hack to the Direct3D11 Hardware renderer.

And enables the "Unscale Point and Line" hack for Custom Resolutions with Direct3D11 and OpenGL.
2017-04-01 11:16:25 +02:00
FlatOutPS2 975441dfe9 GSdx: Direct3D port of HPO special/V2
Adds a port of the new Half-pixel Offset options for the Direct3D
Hardware renderers.
2017-04-01 11:16:25 +02:00
Jonathan Li 85ddf69042 gsdx: Improve OpenGL HW renderer checks
If OpenGL software is the saved ini renderer and F9 is pressed to toggle
to the hardware renderer, depth emulation will be disabled. This fixes
that issue.
2017-03-28 23:05:24 +02:00
FlatOutPS2 3acac3203b GSdx: Remove/move CRC hacks
Removes Alpine Racer 3 hack. Issue has been resolved.

Moves NanoBreaker hack. Issue has been resolved for OpenGL and hack has
been moved to DX only.

Moves Tri-Ace games hacks. Hacks are also necessary for OpenGL with "Partial" CRC Hack Level to prevent massive slowdown.

Move Tales Of Legendia hack back as it's also necessary for OpenGL with "Partial" CRC Hack Level to prevent graphical issues.
Close: https://github.com/PCSX2/pcsx2/issues/1698

Added PAL and NTSC-U CRC's for Ar tonelico II.
2017-01-15 20:07:10 +01:00
Akash 09c72375ab GSDX: Pass total height of framebuffer on GetOutput()
Some PSX games seem to store image data of the drawing results in an undeterminate area out of range from the current context buffer. At such cases, calculate the height of both the frame memory rectangles combined.

What happens on "Crash bash" -

* At first draw, scissoring is limited to SCAY0- 0 & SCAY1- 255
* At second draw, scissoring is limited to SCAY0- 255 & SCAY0-511

Previously, we limited the height to the value of one single output texture, so instead of that let's calculate the total height of both the two buffers combined to prevent such issues.
2017-01-04 22:17:26 +05:30
FlatOutPS2 048b657c8f GSdx: Prevent FMV crash
Fixes FMV crashing PCSX2 in The Simpsons: Road Rage.
2017-01-03 00:46:38 +01:00
Akash 07d7905896 GSDX: Fix output texture height calculation
Previously, the height of the frame offset was also considered for the total height of the texture which was obviously wrong as the portion before the offset value isn't part of the frame memory.
2016-12-08 22:14:05 +01:00
Gregory Hainaut 49d5c4260f gsdx state: post fix depth tracing
The main FindMinMax methods is perf critical so instead I created a separate function
to ensure the constness of the depth

Fix letter regression on Xenosaga3
2016-11-11 23:39:34 +01:00
Akash 1547dd4215 GSDX-UI: Add Mipmap combobox
Mipmapping is now supported on hardware renderers thanks to Gregory. Please report any observed hardware mipmapping issues on the forums (http://forums.pcsx2.net/Thread-New-feature-Needs-testing-GSdx-HW-mode-Experimental-mipmap-support) as potentially the HW mipmap code might still have some bugs.
2016-11-05 22:19:32 +05:30
Akash 58ed49f3c9 GSDX: Clean up warnings on MSVC
* Explicitly cast w_pages and h_pages into uint32.
* Prevent signed/unsigned comparison by converting lod into unsigned integer, honestly how coud a mipmapping level be negative?
2016-11-05 10:28:04 +01:00
Gregory Hainaut 3d65312999 gsdx hw: remove old assert
Code is working fine with all formats
2016-11-04 23:02:49 +01:00
Gregory Hainaut 2c0a4ac906 gsdx ogl: add an extra debug log level
Avoid too much log
2016-10-14 20:46:58 +02:00
Gregory Hainaut a4658eac24 gsdx hw: allow overlapping of texture (alpha) and framebuffer (RGB)
Fix HUD on Berserk

v2: use fbmask instead of hacking the target format to 24 bits.
2016-10-14 19:26:27 +02:00
Gregory Hainaut 06055add5c gsdx merge: get a new buffer for the feedback write 2016-10-14 18:13:20 +02:00
Gregory Hainaut 5ced9c1f19 gsdx mipmap:ogl: plug trilinear/mipmap2 option
mipmap option 3. Actually maybe a separate tri-linear option will be better

m_mipmap == 2 => use manual PS2 trilinear/mipmap
Otherwise
m_filter == 3 => always use full automatic trilinear interpolation
m_filter == 4 => use automatic trilinear interpolation when PS2 uses mipmap
m_filter == 5 => like 4 but force bilinear interpolation inside layer
2016-10-13 20:16:38 +02:00
Gregory Hainaut ae441e6a2c gsdx mipmap:HW: Update all valid texture layers 2016-10-13 20:16:38 +02:00
Gregory Hainaut 5d593dd948 gsdx mipmap:HW: save state of both min&max lod values 2016-10-13 20:16:38 +02:00
Gregory Hainaut b695e0065a gsdx mipmap: use a 3 state option 2016-10-13 20:16:38 +02:00
Gregory Hainaut 1cc696ab31 gsdx hw: update TEST.ATE field after ATE optimization
Otherwise DoFirstPass/DoSecondPass will give you result based on pre-ATE optimization

Close #1607
2016-10-05 09:43:24 +02:00
Gregory Hainaut 3be055a366 gsdx hw: remove code to detect an effect
It was a tentative to emulate GTA radiosity but the new hack is more generic
2016-10-02 18:29:23 +02:00
Gregory Hainaut 7f4791fa85 gsdx hw: improve no_ds detection
Support ZTST_NEVER as no depth read => psx mode speed boost
Use zm/fm to reduce further depth lookup
2016-10-02 18:21:52 +02:00
Gregory Hainaut c3ac3ecbe7 gsdx hw: move try alpha test at the beginning
Will allow to use alpha test optimization to better optimize depth lookup

Require to do clut handling before
2016-10-02 18:21:52 +02:00
Gregory Hainaut dc365e066d gsdx tc: remove old plain TEXA hack
It must work fine without it now.

From the google code comments:

It would be nice to test those games
* Ar Tonelico 2 (line in sprite regression?)
* breath of fire dragon quarter (overlayed user interface in the game)

v2: update Dx code to use the good format
2016-10-02 18:21:52 +02:00
Gregory Hainaut c7c6566bca gsdx hw: of course the full Jak series will kill me 2016-10-02 11:57:09 +02:00
Gregory Hainaut b6638d4eec gsdx hw: forgot to comment an unused variable
Keep the code in case, we better solution is found to validate the depth/frame format
2016-10-02 10:18:15 +02:00
Gregory Hainaut 3996fbe365 gsdx hw: reduce conplexity around TryAlphaTest
* As sw renderer, don't bother to bypass it when it is ATST_ALWAYS
* Don't update the ATE register value
=> It is a really bad idea. Next draw call will be wrong if TEST register isn't written.
The TryAlphaTest context could have been updated
2016-10-01 19:20:49 +02:00