Commit Graph

3407 Commits

Author SHA1 Message Date
lightningterror 52bad3505c GSdx: Adjust GSC_GodOfWar 1 and 2 crc hacks a bit more.
GSC_GodOfWar moved to aggressive state.
GSC_GodOfWar2 some value swere corrected (should fix some regressions)
and hack was moved to partial state because we have an upscaling hack.
2019-01-13 16:26:09 +01:00
lightningterror f5b9965910 GSdx: Purge OI_GodOfWar2 hw hack. 2019-01-13 15:08:36 +01:00
lightningterror 6f01936943 GSdx: Remove depth crc hacks for god of war 1 and 2.
Effects rendered correctly with depth on all renderers.
2019-01-13 14:42:53 +01:00
lightningterror 9119e3110d GSdx-ogl: Correct DATE log. 2019-01-12 16:43:26 +01:00
lightningterror f73de4c59c GSdx-ogl: Add perf log for Slow DATE code on texture shuffle/no prim overlap. 2019-01-12 09:59:28 +01:00
lightningterror 7e6c325210 GSdx: Move BoundingBox to HW render and update d3d11 code to use the gl bounding box as well.
hdr colclip and date uses it.
2019-01-12 09:53:51 +01:00
lightningterror 86327b52a9 convert.fx: Update main4 shader to better support hdr colclip. 2019-01-12 09:53:51 +01:00
lightningterror d17e0eba9b GSdx-d3d11: Add/port HDR colclip support.
It helps render shadows a lot better compared to the old code.

Credits to Gregory and Kojin for helping with the code.
2019-01-12 09:53:51 +01:00
lightningterror 8a57d7f470 GSdx-d3d11: Remove colclip and negative blend algo.
Code was old and inefficient. HDR colclip will do a better job.
2019-01-12 09:53:51 +01:00
lightningterror f2f66c02d3 GSdx: Add option to Disable Safe Features.
Idea is to disable multiple features in 1 option to avoid gui clutter.

Unscale Point and Line:
This partially reverts PR #2710 restoring Unscale Point and Line but as a disable option.
It can help Xenosaga games.

GS Memory clearning:
This disables GS memory clearing to be done on the CPU, by default both gpu and cpu do memory clearing
which is more accurate.
It can help Kingdom Hearts games.
2019-01-09 15:44:41 +01:00
lightningterror 54f8aca7d5 GSdx-d3d11: Re enable shader code logging.
Log was disabled in #2760
2019-01-04 01:00:10 +01:00
lightningterror 4cf3328682 GSdx: Adjust some checks in the gui code.
Now that d3d9 has been removed we can ease up and reduce/remove some
render variable checks.
2019-01-02 03:11:47 +01:00
lightningterror ec6ac75b10 GSdx-gui: Update the crc hack level tooltip again.
Suggested by Gregory.
2018-12-31 18:03:15 +01:00
lightningterror 5d62e47229 GSdx-gui: Update crc hack level tooltip.
The tooltip was way too big so this should shrink it down a bit. Remove
the mentioned games on Aggressive state, it was a bit useless.
2018-12-30 23:59:59 +01:00
Kojin eddaf71d47 gsdx: remove dds parameter from texture save method 2018-12-30 20:13:59 +01:00
Kojin e847d94062 gsdx-d3d11: enable splitting of alpha in dumps 2018-12-30 20:13:59 +01:00
lightningterror 781323ff10 GSdx: Purge a crc hacks for GSC_Onimusha3.
Hack removed depth effects which are rendered properly. I wasn't able to
trigger a skip on the other hack draw calls, they need to be
investigated further what they actually did.
2018-12-29 01:35:44 +01:00
lightningterror 01c64f1b35 GSdx: Purge some crc hacks for GSC_BurnoutGames.
Purge hacks that removed texture shuffle effects only.
2018-12-28 20:21:02 +01:00
lightningterror 7577165a97 GSdx: Adjust Aggressive state crc level.
Create a Aggressive state function instead of adjusting the hacks
separate, move the aggressive only there.
It's more efficient this way.
2018-12-28 20:03:38 +01:00
Shanoah Alkire 0ff7ea3ccc Only use -Wno-class-memaccess on gcc 8.0 or higher, as it didn't exist previously. 2018-12-26 21:55:25 -08:00
lightningterror d1c8808797 GSdx-d3d: Add texture shuffle check in DATE selection.
It ensures the code cases are hit properly for all DATE selection cases.
Texture shuffle case with Slow DATE is not yet supported so keep using
the old DATE method.
2018-12-26 18:45:11 +01:00
lightningterror 6575fe7cce GSdx: Disable/uncheck "Large Framebuffer" option by default.
Some games don't play nice with the option and have huge amounts of
ram/vram spikes that can even lock up the system so it's better to have
the option disabled by default.
2018-12-26 13:43:37 +01:00
lightningterror d5bd5db072 GSdx: Fix OpenCL detection.
Fixes an issue when the plugin detects an opencl ini value for the
render. It used to throw a "GS plugin failed to load" error when opencl
was disabled but the ini value remained the same. The render will
fallback to D3D11 now.
2018-12-26 05:13:15 +01:00
lightningterror a020c98421 GSdx: Cleanup file includes.
Remove GSCrc.h include in GSRendererHW and GSRendererDX11, file is
already included in GSState.h.

Remove GSRenderer.h include from renderers except Null and CL, file already
included in TextureCache hw/sw.

Remove resource.h include from GSRendererDX11, already included in GSDevice11.

Remove GSOsdManager.h from GSDeviceOGL, already included in GSDevice
2018-12-25 20:12:29 +01:00
Kojin a5564896ea gsdx-d3d11: remove useless gs creation method 2018-12-25 13:38:19 +01:00
Kojin e0c598f38e gsdx-d3d11: Enable HLSL debugging on development builds
Enable HLSL compile flags that allow devs to use tools such as NSight or VS Graphics debugging for HLSL.
2018-12-25 13:38:19 +01:00
lightningterror 4076e3387e GSdx-osd: Change default font color to blue/cyan.
It matches the color theme of the emu better.
2018-12-25 02:35:49 +01:00
lightningterror 29941f3e0d GSdx: Partially re add Bully crc hack.
Game has upscaling issues so let's only add the hack for upscaling,
also merge the two regions together.
Hack will be disabled on native res if crc is below aggressive, upscaled
is set to partial level.
2018-12-24 15:25:06 +01:00
lightningterror e299ac1ffa GSdx: Update GSC_DBZBT2, GSC_DBZBT3 crc hacks.
Purge dbz bt3 crc hack that removed outlines, I don't want to mix it
with the depth effect hack that I also moved to aggressive.
Move depth hacks for ntsc region to aggressive state.
2018-12-23 18:48:17 +01:00
lightningterror 59ecfb23d7 GSdx: Purge GSC_Bully, GSC_BullyCC crc hacks. It's the same game.
Depth and texture shuffle render the effects correctly.

Dump shows the game look splending compared to before on d3d11.
2018-12-23 17:55:27 +01:00
lightningterror 154dea1557 GSdx: Purge OI_SMTNocturne hw hack.
The hack was used when depth emulation was not supported or when depth
is disabled.
It causes graphical glitches with the faces when depth is disabled.
2018-12-23 17:12:10 +01:00
lightningterror da76440c14 GSdx-TC: Get rid of nasty ZWriteMustNotClear hack.
d3d11 supports depth now.
2018-12-23 16:03:28 +01:00
Kojin dc2eed6ca1 gsdx-d3d11: Fix CopyOffscreen bug
Update CopyOffscreen to accept the ps_shader value when doing StretchRect.
This fixes an issue where it was selecting the wrong PS for depth cache read.

Should (hopefully) fix SMT.
2018-12-23 15:20:04 +01:00
lightningterror f6df6b350b GSdx-d3d: Disable MSAA unti it's properly fixed.
MSAA causes a lot of graphical issues when enabled with the recent
accuracy changes so better disable the feature until it's properly
fixed.
2018-12-23 14:21:44 +01:00
lightningterror 83da33e2ab GSdx: Remove d3d9.lib and d3d9.dll from common.props. 2018-12-22 22:53:09 +01:00
lightningterror cb59794b8d GSdx: Remove d3d9 header include from stdafx.h 2018-12-22 22:53:09 +01:00
lightningterror 1ae4b5d0ba GSdx-d3d: update blend table to use src1 blending and remove the nasty hack which we couldn't before because of d3d9. 2018-12-22 22:53:09 +01:00
Kojin 5e9ffc4a94 GSdx-d3d: Adjust D3D11Blend, get rid of some casts. 2018-12-22 22:53:09 +01:00
lightningterror bf4997b6a5 GSdx: Update/remove useless d3d9 comments. 2018-12-22 22:53:09 +01:00
lightningterror 48007350b6 GSdx-ogl: Update blend table and remove d3d9 code, remove useless defines and directly use gl code. 2018-12-22 22:53:09 +01:00
lightningterror 4644a16c5b GSdx-d3d: Update blend table enums from D3D9 to D3D11.
GSDeviceDX.
2018-12-22 22:53:09 +01:00
lightningterror 7e8360efbc GSdx-d3d: Rename d3d9 blendtable and variables to d3d11. 2018-12-22 22:53:09 +01:00
lightningterror 6a5bb5df83 GSdx: Remove support for D3D9 device on ps1 emu compatibility.
Note: Resolution scaling is unavailable right now so I disabled the
option, if someone feels like fixing it they can do so.
2018-12-22 22:53:09 +01:00
lightningterror e12447101f GSdx: Get rid of d3d9 adapter code from GSSettingsdlg and GSDevice. 2018-12-22 22:53:09 +01:00
lightningterror 48b8d78139 GSdx-osd: Lower default font size from 28 to 25. 2018-12-22 21:56:35 +01:00
Kojin a2f3b78bac gsdx-d3d11: Fix Depth FST
Texture scaling for x/y values wasn't being set in all cases.
This ensures that it is to fix a bug in finding nemo (and possibly others).
2018-12-22 15:53:20 +01:00
lightningterror 1957cf13c2 GSdx: Purge GSC_Black crc hacks.
Effects are rendered correctly with depth and texture shuffle on all
renders.
2018-12-21 07:32:20 +01:00
lightningterror eb000f0f41 GSdx: Move GSC_GTASanAndreas crc hack to aggressive state.
Can be used as an upscaling hack, but it removes some nice effect so
Aggressive only.
2018-12-21 05:03:45 +01:00
lightningterror f41b536682 GSdx: Adjust GSC_DemonStone crc hack.
Move back to partial level, half screen issue.
2018-12-21 02:28:59 +01:00
lightningterror 11f09d4944 GSdx: Purge GSC_SuikodenTactics crc hacks.
Depth effects are rendered properly on all renders.
2018-12-21 01:06:47 +01:00
lightningterror 691eae755f GSdx-gui: Might bea good idea to also change Auto to Automatic for interlacing option to keep it consistent with the other options. 2018-12-21 00:05:05 +01:00
lightningterror 02bde2f386 GSdx-gui: Add Default name tags to default options for Anisotropic Filtering and Interlacing. 2018-12-20 23:49:28 +01:00
lightningterror c23d256f02 GSdx: Purge GSC_LordOfTheRingsTwoTowers crc hacks.
Depth effects properly rendered on all renders.
2018-12-20 23:11:42 +01:00
lightningterror 526faf9193 GSdx: Move GSC_MetalGearSolid3 to Aggressive crc state.
Half screen bottom issue, hack needs to be updated to skip less effects.
2018-12-20 22:13:39 +01:00
lightningterror 606944a127 GSdx-gui: Update MSAA tooltip. 2018-12-20 22:05:50 +01:00
lightningterror 4a0697fda2 tfx.fx: Remove commented out code in clamp_wrap_uv function. 2018-12-20 18:41:30 +01:00
lightningterror 0901f0a848 GSdx: Remove some crc hacks for GSC_IkkiTousen.
Remove depth hacks that skipped shadow rendering, shadows work properly
on all renders.

Upscaling hack needs to be further tested.
2018-12-20 18:31:53 +01:00
Kojin e51eadaf16 gsdx-osd: Update m_font to use unique_ptr 2018-12-20 15:32:04 +01:00
Shanoah Alkire a4f794f3a6 GSdx: Add color to OSD, move it to its own tab, and change the widget defaults on the dialog box. 2018-12-20 15:32:04 +01:00
lightningterror 58be50d978 gsdx-osd: Update Linux dialog
Update linux dialog to match Windows.
Only color is missing.
2018-12-20 15:32:04 +01:00
Kojin f8ae0f7e19 gsdx-osd: Update osd gui
Add support for color picker, remove font selector, enable the menu for dx11 and some other tweaks.
2018-12-20 15:32:04 +01:00
Kojin 3819e22432 gsdx-osd: Add support for custom colors 2018-12-20 15:32:04 +01:00
Kojin 1b0112de22 gsdx-osd: Rename log speed to log timeout
Linux/Windows GUI to be updated in later commits.
2018-12-20 15:32:04 +01:00
Kojin 038ae8c7fc gsdx-osd: Switch to opacity
Switch to using opacity since this is how most software works.
Transparency is simply confusing to the average user.

Linux/Windows GUI to be updated in later commits.
2018-12-20 15:32:04 +01:00
Kojin d624927022 gsdx-osd: Scale based on window size
Switch to scaling on the window size instead of a hardcoded monitor res
2018-12-20 15:32:04 +01:00
Kojin 5e75a66f82 gsdx-d3d11: Port RenderOsd function from opengl to support osd on d3d11 2018-12-20 15:32:04 +01:00
KrossX 83d293d41c gsdx-d3d11: Port OSD shader from OGL 2018-12-20 15:32:04 +01:00
Kojin 5713993777 convert.fx: Add color support to IA
Support color input in vs and ps.
Skipping dx9.
2018-12-20 15:32:04 +01:00
Kojin e683ce2994 gsdx-osd: Update manager to support DX11
Fix an issue with w coordinate values being 0 which caused issues on DX11.
2018-12-20 15:32:04 +01:00
lightningterror 63bbf52219 GSdx-d3d11: Adjust DATE code, and remove rtCopy.
Remove DATE shader macro and bit.
Remove useless HasStencil case. If DATE is enabled stencil is also
enabled, this check is useless.
Remove leftover rt and rtCopy code case from d3d9.

Remove traces of rtCopy and sampler in slot 2.

rtcopy
2018-12-20 14:42:56 +01:00
lightningterror cdeacafd27 tfx.fx: Remove datst (DATE), and RTCopy.
Code was never hit on D3D11. D3D11 uses stencil operations.
Also Remove VS_RTCOPY which was used only by d3d9.

Remove RTCopy Sampler from the shader.

tfx rtcopy
2018-12-20 14:42:56 +01:00
lightningterror 8ec184d265 GSdx: Set some enum values correctly.
Previous commit broke the values with the removal on the d3d9 code.
2018-12-20 14:16:47 +01:00
lightningterror 824473a34b GSdx-gui: Remove some leftover D3D9 code in the gui. 2018-12-20 14:00:03 +01:00
lightningterror d4d95e2f10 GSdx: Adjust some of the crc hacks comments and what category they fall under. 2018-12-20 13:55:26 +01:00
lightningterror 697aa5e4b7 GSdx: Purge GSC_SpyroNewBeginning, GSC_SpyroEternalNight crc hacks.
Effect correctly emulated with texture shuffle on all renders.
2018-12-20 13:22:12 +01:00
lightningterror f0fec02eec GSdx: Purge GSC_StarWarsBattlefront and GSC_StarWarsBattlefront2 crc hacks.
Channel shuffle emulates the effects correctly on all renders.
2018-12-20 12:34:09 +01:00
lightningterror 6f6e5eb325 GSdx: Purge GSC_SoulCaliburGames crc hacks.
Depth emulation renders the background properly and the stage is no
longer dark.

Shadows are still missing on D3D11, colclip emulation perhaps.
2018-12-20 12:09:57 +01:00
lightningterror 6899fc74f9 GSdx: Purge GSC_HeavyMetalThunder crc hacks.
Depth renders effects properly on all renders.
2018-12-20 03:05:05 +01:00
lightningterror 415e27136e GSdx: Adjust/remove crc hacks GSC_FrontMission5, GSC_HauntingGround.
Remove one crc hack for GSC_HauntingGround. It skipped some depth
effects. Correctly rendered now

Remove all crc hacks for GSC_FrontMission5.
Texture shuffle, depth emulation and enabling Preload Frame Data
emulates the effects correctly.

Add a note for GSC_Tenchu for future testing.
2018-12-20 02:13:11 +01:00
lightningterror d9da9f4bc2 GSdx: Purge GSC_FinalFightStreetwise crc hacks.
Depth is emulated correctly on all renders.

Blending issues remains.
2018-12-20 02:01:57 +01:00
lightningterror fce3918562
GSdx: Purge Direct3D9 Render entirely. (#2762)
And the time has come to say good bye (good riddance?), this build removes Direct3D9 entirely from GSdx. D3D9 is/was holding us back in some D3D11 fixes that we want to further implement.
The last build that supports D3D9 is v1.5.0-dev-2779-g1a61148b0 for anyone still interested.

"Press F to pay respect.
2018-12-20 00:54:51 +01:00
lightningterror e091f4233a GSdx-d3d11: Remove commented out code for int_fst.
VS FST is already enabled, values are inverted on D3D11.
2018-12-19 19:59:23 +01:00
Kojin 0353273733 tfx.fx: Update Vertex and Geometry shaders to support the new
depth sample state.

Note this breaks D3D9 but we will be purging it shortly after
so there's nothing to worry about.
2018-12-19 19:59:23 +01:00
KrossX 3b11164637 tfx.fx: Add tfx shaders to support depth sampling.
Add clamp wrap uv depth,
Add sample depth.

Sample shaders depth fmt 1 and 2 are based on convert shaders.
2018-12-19 19:59:23 +01:00
lightningterror 1ad71a9b85 GSdx-gui: Remove Direct3D9 option from the gui.
D3D9 will be broken once #2756 is merged so let's disable it to avoid
any potential crashing if the render is selected.

Complete D3D9 purge will shortly follow afterwards.
2018-12-19 17:17:39 +01:00
lightningterror 1a61148b00 GSdx-d3d11: Redo destination format and alpha output.
Dfmt in texture shuffle function already picks the 16 format on slot 2
so it's better to let it call the shader instead of aout.

We can keep old aout code until FbMask emulation is added on d3d11. We
can purge aout along with alpha hack then.
Added fixme note.
2018-12-18 12:55:23 +01:00
lightningterror 0c0e0e9266 GSdx-d3d11: Add support for dfmt shader macro. 2018-12-18 12:55:23 +01:00
lightningterror 59752120d6 tfx.fx: Add support for dfmt to pick the shader for 16bit alpha output. 2018-12-18 12:55:23 +01:00
Kojin 5527bcb13e GSdx-debug: Do some casts and fix warnings. 2018-12-17 15:52:27 +01:00
lightningterror bf0106d2bc GSdx-d3d: Add remaining code for RGB channel.
Enable channel shuffle on GT3, GT4, Tourist Trophy and Tekken5.
And with that we reach OpenGL accuracy on this specific feature.
2018-12-17 11:50:16 +01:00
Kojin ef0ebd6517 gsdx-d3d11: Copy render target when it matches texture in slot 4
Needed for channel shuffle, this copies the render target when it's
the same as the resource texture bound on slot 4.
2018-12-17 11:43:15 +01:00
Kojin 554b797b92 gsdx-d3d11: Move shader/sample state set to it's own function 2018-12-17 11:43:15 +01:00
Kojin 84dbdd6b18 gsdx-d3d11: Add CopyRenderTarget function 2018-12-17 11:43:15 +01:00
Kojin 1427d55b08 gsdx-d3d11: Store shader resource textures on GSDevice11 2018-12-17 11:43:15 +01:00
Kojin a743707728 gsdx-d3d11: Store render target texture in GSDevice11 2018-12-17 11:43:15 +01:00
Kojin 07989a0a17 gsdx-d3d11: Add equality check for GSTexture11 2018-12-17 11:43:15 +01:00
lightningterror c2fd67b1cb GSdx-d3d11: Add remaining psm.depth code.
Fixes recent regression on Soul Calibur.
It helps isolate psm.depth when it should and shouldn't run even if
sampling isn't supported yet.

Finding Nemo depth issue remains.
People can use the option to disable depth for now on that game.
2018-12-17 07:17:17 +01:00
lightningterror 93f1dc2804 GSdx-d3d: Remove psm.depth skip on d3d.
I'm seeing better results with this skip not included.
So far DBZBT, God of War, Haunting Ground seem better.
Depth sampling is still not yet added.

Also fixes a regression in GT4 when depth was enabled because the skip
function was misplaced. Other games might've been affected as well.
2018-12-16 20:32:05 +01:00
lightningterror 7d938834d2 GSdx: Add crc id for ZettaiZetsumeiToshi2 EU.
SLES-54587 Raw Danger!
2018-12-16 16:02:50 +01:00
lightningterror bb0f08b2c1 GSdx-d3d: Simplify aout for reading. 2018-12-15 05:46:15 +01:00
lightningterror a8c2076d04 GSdx: Adjust God of War 1 and 2 crc hacks.
Move texture shuffle (shadows) hack to aggressive state.
Adjust water/hell effect crc hack - don't enable hack on native res if
crc is below aggressive, enable if resolution is higher on dx and gl
state.
2018-12-14 15:16:26 +01:00
lightningterror e87a6b9ccd GSdx-d3d11: Plug the TOA and Urban Chaos code in to channel shuffle.
On Tales of Abyss it fixes blur,
On Urban Chaos it fixes fog/transparent layer.

Note: Depth needs to be enabled on d3d11.
No support for d3d9 ofc.
2018-12-13 22:14:49 +01:00
lightningterror a1f4d2ca3f GSdx-d3d11: Add support for Tales of Abyss and Urban Chaos shader bit and shader macro. 2018-12-13 22:14:49 +01:00
KrossX 013c47950d tfx.tx: Add support for Tales of Abyss and Urban Chaos HLE shader.
Add sample_depth function, note only Tales of Abyss and Urban Chaos
depth sampling is supported, full depth fmt will need to wait a little
longer.
2018-12-13 22:14:49 +01:00
lightningterror 50b71f69da GSdx-d3d: Add fixme note fo rPSSetShaderResource slot 4 channel shuffle. 2018-12-13 01:47:10 +01:00
lightningterror 7215618621 GSdx-d3d11: Add support for depth convert format in texture sampler.
Idea is to allot partial support of depth fmt on the new depth convert
format, this way we can utilize channel shuffle on Red, Blue or gXbY
channels with depth shader conversion.

Terminator 3 hits this code path and seems to fix a transparent wall.
Other games will probably benefit from this as well.
2018-12-13 01:47:10 +01:00
lightningterror 3a9ff840cf GSdx-d3d11: Add support for depth_fmt bit as well as macro for shader. 2018-12-13 01:47:10 +01:00
lightningterror abb1cc5fe7 tfx.fx: Add shaders support for PS_DEPTH_FMT on channel shuffle.
Red, blue and gXbY channels support it.
2018-12-13 01:47:10 +01:00
lightningterror c511ce80d2 GSdx-d3d: Add support for channel shuffle in GSRendererDX.
Split the code from GSRendererDX to GSRendererDX9 and GSRendererDX11. We
ensure d3d9 doesn't blow up with regressions, add required code to
GSRendererDX11 to properly support channel shuffle.

Note the feature is still not yet complete, copy function needs to be
implemented (suggested by Gregory) but it can be done at a later date,
this still fixes a bunch of issues on various games.
2018-12-13 01:47:10 +01:00
lightningterror c7aca64642 GSdx-d3d: Add support for ChannelShuffle in PS constant buffer.
Needed for GXBY channel.
2018-12-13 01:47:10 +01:00
lightningterror c8f53f32fc GSdx-d3d11: Add the shader fetch in GSTextureFX11.
Allows us to fetch the channel from the tfx shader.
2018-12-13 01:47:10 +01:00
lightningterror cd5132d201 GSdx-d3d: Add the channel bit to support channel shuffle. 2018-12-13 01:47:10 +01:00
KrossX d38bd9c950 tfx.fx: Port channel shuffle shaders from OpenGL.
Port RGBA shaders to support channel shuffle on Direct3D11.
2018-12-13 01:47:10 +01:00
lightningterror 46989a0c6c GSdx: Forgot to remove OI_TalesOfLegendia from header file. 2018-12-11 23:19:02 +01:00
orbea aa5c0ebb95 GSdx: Remove OI_TalesOfLegendia HW hack. (#2747)
The hack caused glitches to appear on the right side of the screen, the hack was used as a workaround to properly display game ui elements however it is no longer needed on opengl and d3d11. The ui elements are rendered properly with Depth Conversion.
Shadow issues are solved with at least partial level crc hacks.

See https://github.com/PCSX2/pcsx2/issues/2692 for more detailed information.
2018-12-11 19:36:15 +01:00
Alessandro Vetere fe845aee58 GSTextureCache: Initialize palette texture if needed and not done yet.
Also comment on the reason behind palette texture is always created with size 256x1.
2018-12-11 16:36:14 +01:00
Alessandro Vetere 0a5b1eb75d GSTextureCache: Attach palette if needed (psm.pal > 0) also when reading part of framebuffer as texture. 2018-12-11 16:36:14 +01:00
Alessandro Vetere f605012659 GSTextureCache: Refactor and fix palette management (v2).
1) Refactor palette comparison fast path mechanism to avoid using mutable member of Source,
2) Attach palette to texture as soon as needed,
3) Bugfix attach CLUT copy only when pal > 0.
2018-12-11 16:36:14 +01:00
Alessandro Vetere c183368d72 GSTextureCache: Refactor code to avoid using local shared pointer. 2018-12-11 16:36:14 +01:00
Alessandro Vetere 894ce5b7d6 GSTextureCache: Centralize CLUT comparison logic in PaletteKey equality operator. 2018-12-11 16:36:14 +01:00
Alessandro Vetere c368afd6d2 GSTextureCache: Reformat code and adjust comments. 2018-12-11 16:36:14 +01:00
Alessandro Vetere e1dff69a43 GSTextureCache: Compare also pal value in PaletteKey eq operator. 2018-12-11 16:36:14 +01:00
Alessandro Vetere 774373cc65 GSTextureCache: Add ASSERTs on pal value to ease debugging. 2018-12-11 16:36:14 +01:00
Alessandro Vetere acbe6c24a0 GSRendererOGL/GSTextureCache: Improve ICO hack by using palette cache for depth sampling, removing only point of creation of palette textures outside TC. 2018-12-11 16:36:14 +01:00
lightningterror 202945aa49 GSdx: Add proper Jak1 game to Automatic mipmapping.
I added Jak X: Combat Racing by mistake thinking it's Jak1.
Don't include Jak X, we don't know the status yet.
2018-12-11 13:44:54 +01:00
lightningterror bc524d5e56 Gsdx: Adjust Burnout crc hacks to work on progressive mode.
NTSC only.
I don't know what the "impact screen" crc hack did since the dump didn't
show any difference so that may need to be updated as well.
Note: I only tested the JP version.
2018-12-11 12:59:18 +01:00
lightningterror 80af99bb44 GSdx-ogl: Switch shader numbers main18 and main19.
Allows us to port feedback write (DoMerge function) to D3D11 without
adding dummy shaders for osd.
2018-12-10 18:31:59 +01:00
lightningterror 0704b73c2f GSdx-TCOGL: Adjust depth format cases in Texture Cache GL.
Get rid of duplicate code in switch cases.
2018-12-10 03:11:34 +01:00
lightningterror ecbd8d9f2f GSdx-gui: Enable "Disable Depth Emulation" option for Direct3D11. 2018-12-10 00:17:04 +01:00
Kojin ade00f8a70 GSdx-d3d: Support depth as texture.
- Create depth as typeless format and bind shader resource flag.
- Create depth and shader resource view using proper typed formats.
2018-12-10 00:17:04 +01:00
lightningterror eb3a423f80 GSdx: Enable Texture Cache and RendererHW to support depth on Direct3D11. 2018-12-10 00:17:04 +01:00
lightningterror 4328d099c4 GSdx-d3d: Add support to write in depth buffer.
Add support for dss_write.
Enable writing in depth buffer for dss_write,
when depth conversion is active data will be writen in the depth buffer,
if not then use the old method (don't write).
2018-12-10 00:17:04 +01:00
lightningterror 9a5bf12c0b Gsdx-d3d: Allow Direct3D11 to skip psm.depth on texture sampler.
depth fmt is not yet supported. This ensures there are no regressions,
and we are skipping the draw calls for depth fmt not yet supported.
2018-12-10 00:17:04 +01:00
lightningterror 7928cff354 GSdx-TC11: Add support for depth formats in Direct3D11 Texture Cache.
Add depth formats for Direct3D11 to properly support depth.
2018-12-10 00:17:04 +01:00
KrossX c3a1cc3801 convert.fx port main10-16 shaders from Opengl to Direct3d11.
Adds support to do depth conversion through the shaders.
2018-12-10 00:17:04 +01:00
lightningterror 71ac570f32 GSdx-gui: Correct Large Framebuffer tooltip.
Wording/typos.
2018-12-09 17:04:29 +01:00
lightningterror b6d06f53d6 GSdx-gui: Update Large Framebuffer tooltip.
Include games that don't play well with the option (cause ram/vram
spikes).
2018-12-08 14:48:55 +01:00
lightningterror 4da3f567f4 GSdx: Reduce some code checks for dbz bt hacks. 2018-12-08 13:49:06 +01:00
lightningterror 1fa68071d8 GSdx: Add Nickelodeon: Barnyard to automatic mipmapping. 2018-12-06 12:35:28 +01:00
lightningterror f8ec61a3fc GSdx: Add crc ids for Burnout: Takedown and Revenge.
Jap discs.
2018-12-06 05:31:19 +01:00
lightningterror e4e93bd7f5 GSdx: Remove bloom crc hack for Haunting Ground.
Effect is already handled better in Texture Cache. No need for a
duplicate function.
D3D9 might look a bit worse but nobody cares about D3D9.
2018-12-05 13:21:54 +01:00
lightningterror cf97c304ac GSdx: Revert DBZ BT3 Ghosting/Blur hack.
The game still has a bunch of depth and other issues even on gl and it
doesn't play nice with the blur effect as well. Perhaps the hacks can be
changed to work better but for now enable it on native as well.
2018-12-02 05:28:34 +01:00
lightningterror 8307cfc54d GSdx: Ease crc hack for DBZ BT2.
Fixes ground corrupt textures caused by the hack on the EU version.
US works fine with skip 5 but not 4. Didn't spot any regressions on both
so far. Might need extra testing by users.
2018-12-01 16:06:36 +01:00
lightningterror 8747781bdc GSdx: Add JaX and Jak 3 to automatic mipmapping.
Jak 2 not included. See #2712

Close #2712
2018-12-01 12:53:04 +01:00
lightningterror 9abe96cba4 GSdx-d3d: Update Fast DATE and Alpha Stencil behaviour.
Idea is to allow Alpha Stencil to work with Fast Date.
Let Fast Date run for the supported calls since it's more accurate, let
Alpha Stencil take care of the rest.

This might fix some issues where Alpha Stencil caused some issues making
it a bit more accurate.
2018-11-30 10:44:25 +01:00
lightningterror f687f993cc GSdx-d3d: Replace DATE one calls with a variable. 2018-11-29 20:29:28 +01:00
lightningterror 6c34f6c334 GSdx-d3d: Partial port for DATE one (Fast Date) and Fast Accurate Date.
It fixes a bunch of shadow/transparency issues.
Fast DATE doesn't rely on the gui option and is always on.
Confirmed fixed issues: Persona 3 shadows on d3d11,
Digital Devil Saga Transparency d3d9/11.

Fast accurate date works the same/similar to OpenGL.
Confirmed fixed issues: DBZ BT3 ground shadows, Fifa Street 1 shadows
on all d3d renders as well.

Also this option doesn't cause other transparency issues like the
Alpha Stencil hack.

Note: If Alpha Stencil is enabled Fast Date and Fast Accurate Date will
be disabled.

Note2: Full Accurate Date is not implemented so the code fallbacks to
Fast mode instead.

Commits:
3ab12cef2f
584397a3fd

This will probably be the last feature d3d9 gets before getting purged.
2018-11-29 20:29:28 +01:00
lightningterror b33418f270 GSdx: Ease crc hack for DBZ BT3.
Fixes some ground black texture flickering on some stages on the ntsc
version.
2018-11-29 18:24:08 +01:00
lightningterror f183ca12d9 GSdx-gtk: Move around some options to better match windows gui.
Move Enable User Hacks at the top. Otherwise spacing looks weird.
Large Framebuffer should be next to Allow 8 bit textures.
Move Accurate Date and Accurate Blending at the bottom (similar to windows).
2018-11-28 08:21:13 +01:00
lightningterror 584397a3fd GSdx-ogl: Implement a fast Accurate Date algorithm.
Suggested by Gregory.
Change the checkbox to a drop down list Off, Fast, Full.
Off and Full do the same as before, the Fast option is new. Most of the
time users don't actually need full Accurate Date so why not reduce that
cost and use a fast mode instead, plus it can also be used on a gpu with
a limited driver. Also change the default value to Fast instead of Off.
2018-11-28 08:21:13 +01:00
lightningterror 9899d0d6b7 GSdx: Always enable Unscale Point and Line.
Always enable unscale point and line hack on upscaled resolutions, and
purge the gui option.

It was discussed in the past with Gregoy that it can be enabled without
causing any issues which will be beneficial to getting rid of 1 less
option and fixing a bunch of fmv issues without relying on a gui toggle.
2018-11-26 17:13:45 +01:00
iMineLink 8ff0249213 GSVector4i: Fix compare64 function.
Fix GSVector4i::compare64 function by adjusting the number of iterations
needed to cover the comparison of all the elements of the input arrays,
where the number of bytes to compare is indicated in the size parameter
of the function.
The function is used only in GSdx-TC to compare CLUT arrays.
On one hand this fix closes the recent #2706 and possibly the color
regressions indicated in #2702 (which were both introduced with the new
PaletteMap mechanism, which partially replaced the GSVector4i::update
logic with the bugged GSVector4i::compare64).
On the other hand this might impact long standing wrong texture cache
lookup when palette was involved with 8-bit palette disabled (to be
verified which ones).

Close #2713
Fixes #2706
Fixes #2715
2018-11-26 10:01:10 +01:00
lightningterror 9a10612f0b GSdx: Adjust Frame Buffer Conversion tooltip and TC comment to match recent changes. 2018-11-25 13:35:00 +01:00
lightningterror c8f52b0ba3 GSdx-ogl: Move rgb channel 7 to empty slot 5. 2018-11-25 04:06:04 +01:00
lightningterror 193bda164b GSdx: Make OI_TalesOfLegendia hack active only when depth is not supported/disabled.
Fixes right half screen issue on TalesOfLegendia. UI elements of the
screen are properly emulated with depth emulation on gl (possibly fixed
by
1cc696ab31).
Shadows will be glitchy if crc hack level is below partial level.
I'm not even sure if the hack is useful at all anymore since it
introduces issues now.

Issue #2692
2018-11-24 13:40:36 +01:00
lightningterror 3b96e98eac GSdx: Add crc id for Tenchu Fatal Shadows JP. 2018-11-24 02:34:02 +01:00
lightningterror 292e7a6573 GSdx-osd: Remove/purge OSD Indicator code.
The code was never working properly ( tested by @tadanokojin ) so let's
clean up and remove it. If someone actually wishes to maintain it then
they can re add it and update the code to a functional stage.
2018-11-18 14:15:17 +01:00
lightningterror a092806d38 GSdx-gtk: Adjust some spacing, ocd satisfaction and preparation for the next commit. 2018-11-18 14:15:17 +01:00
lightningterror 9994111173 Gsdx: Adjust GSC_Oneechanbara2Special (Zombie Hunters 2) crc hack.
Add a few crc ids (ntsc-j and eu).
Adjust hack, crc hack won't be active on native res if crc level is
below Aggressive state.

Issue #2007
2018-11-18 01:16:50 +01:00
lightningterror 11ddfefb60 GSdx-TC: Adjust comment for PaletteMap when 8-bit texture is disabled.
Follow up to the requested comment changes at
https://github.com/PCSX2/pcsx2/pull/2681#pullrequestreview-174683105
2018-11-17 21:38:35 +01:00
lightningterror 0161c2838e GSdx: Add some extra comments for GSC_HauntingGround crc hacks. 2018-11-17 21:20:27 +01:00
lightningterror ae2642e55a GSdx: Remove blur/ghosting crc hacks for GSC_ShadowofRome.
Upscaling issue. Half Pixel Offset hack solves the issue.
2018-11-17 20:33:39 +01:00
lightningterror d8702a9523 GSdx: Add google translated comments for crc hacks in GSHwHacks.cpp.
Cutie Chinese comments, they were removed in commit

21522e71b2

It's better to have google translated comments than nothing, at least we
have something to go on when doing future testing.

Also ghosting and blur crc hacks might need to be updated as they may
not be necessary on native res only.
2018-11-17 03:09:43 +01:00
lightningterror 210829f633 GSdx: Remove/purge commented out hacks "GSHwHacks.cpp.
List: GSC_Tekken5, GSC_TombRaiderUnderWorld, GSC_XE3, GSC_AceCombat4,
GSC_SoTC, GSC_ResidentEvil4.

Note: I left GSC_ValkyrieProfile2 in there because it might need to be
re enabled for dx, someday will look in to it when I'm up for the task.
2018-11-17 02:19:36 +01:00
Shanoah Alkire cfb61c71dd GSdx: Prevent Null Renderer from crashing in Linux. 2018-11-16 14:50:25 -08:00
arcum42 2e1db411fa GSdx: Folder Reorganization. (#2657)
This pull request is for the pending reorganization of the folder structure on GSdx,
making it better organized and easier to work with.

Also remove unused GSTextureFX.cpp file.
2018-11-16 19:41:37 +01:00
Jonathan Li 15733ed8cf gsdx: Fix memory leak
The memory was allocated with new so it should be freed with delete and
not _aligned_free. Fixes the destructors not being called.
2018-11-16 02:00:42 +00:00
iMineLink 42aee34482 GSdx-TC: Use PaletteMap also when 8-bit texture is disabled by caching only clut copies. (#2681)
Enabled caching of clut copies with PaletteMap also in the case 8-bit texture is disabled, which is the default (on #2344 the caching of clut copies and palette textures was done only when 8-bit texture was enabled).
Brings moderate speedups ~10% in the most concitated parts of the ZoE2 Anubis benchmark, but may improve performance in all the cases when there are many Source objects created with clut copies to be stored.
The quality of the comments has been improved to better highlight the mechanics of the caching system.
2018-11-13 19:22:13 +01:00
lightningterror ef3802b67a GSdx-d3d: Rename Blend Selector to better match opengl code.
Use member name.
om_bsel - > m_om_bsel
2018-11-13 01:56:11 +01:00
lightningterror 41459e6a2c GSdx-d3d: Rename Depth Stencil Selector to better match opengl code.
om_dssel - > m_om_dssel

Blend selector next.
2018-11-13 01:25:15 +01:00
lightningterror 63f9d419f8 GSdx: Rename some variables in GSHwHack.cpp.
GSC_TombRaider -> GSC_TombRaiderAnniversary,
GSC_Burnout - > GSC_BurnoutGames,
GSC_GetaWay - > GSC_GetaWayGames,
GSC_Castlevania - > GSC_CastlevaniaGames.
2018-11-12 21:15:12 +01:00
lightningterror a26dc73836 GSdx-gui: Switch places for "Alpha Correction" and "Logarithmic Z" on d3d9. 2018-11-12 20:13:47 +01:00
lightningterror 48d90a988a GSdx-d3d: Remove not yet used rt parameter in channel shuffle function. 2018-11-11 23:59:11 +01:00
lightningterror b26ed0db60 GSCrc: Small comment correction that I didn't notice before. 2018-11-11 03:45:06 +01:00
lightningterror 3280860ca9 GSdx: Add a couple of GT3/4 crc ids.
Rare demo/beta discs.

Source:

https://forums.pcsx2.net/Thread-Testing-out-games-not-in-the-database?pid=593185#pid593185
2018-11-11 03:42:35 +01:00
iMineLink 292dbbb6ac GSdx-TC: Remove virtual specifier from PaletteKeyHash operator, PaletteKeyEqual operator and Palette destructor. (#2680)
Small follow up corrections from #2344 highlighted by @turtleli
2018-11-10 18:50:19 +01:00
Dmitry 1b0b89776f GSdx: Removed crc id 0x7D4EA48F (multiloader). (#2677)
Removed crc id 0x7D4EA48F and mentions of that id and it's duplicates. The id is from a multiloader when packing images, and not an actual crc id from a game(s).
2018-11-10 02:27:38 +01:00
iMineLink 9fa1b290ba GSdx-TC: Palette management rework. (#2344)
This follows the 4th point of #2310.
The idea was to rework the current palette texture management to improve performances with games that uses multiple palettes for the same data texture.

The new management shows small to none performances improvement in almost every game in terms of FPS, and it lowers the GPU BUS usage by some percentage points in games like Baldur's Gate: Dark Alliance (9% to 7%) which uses many palettes.

The hot topic is that the performances in Zone Of The Enders 2 skyrocketed (2x), because of the fact that the game uses many palettes and a small number of textures to render it's effects.

For more detailed information check the PR  #2344
2018-11-04 22:06:24 +01:00
Dmitry 3ccc53ee74 GSdx: Add a CRC id for RedDeadRevolver RU. (#2673)
Add missing RU crc id: RedDeadRevolver
2018-11-03 22:40:49 +01:00
lightningterror 9fdb7f6cd5 GSdx-gui: Remove "Recommended" word from crc hack levels Partial and Full.
Some users get confused and change the setting to a recommended option.
This can cause some issues when switching different hw render types.
Most of the time users shouldn't change the option and leave it on
Automatic.
Also remove ICO from crc Aggressive tooltip.
2018-11-02 14:54:24 +01:00
lightningterror fd75085111 GSdx-gui: Increase the vertical size for the drop down list for crc hack level, blending accuracy, and TV shader.
Gets rid of scroll bars appearing on GSDumpGui, also fixes TV Shader
drop down list issues.
2018-11-01 00:08:39 +01:00
Akash fc1d9aef09 GSdx-GUI: Disable large framebuffer for custom res
No longer needed after I combined the aligorithm in my previous commit.
2018-09-27 15:41:52 +05:30
Akash dce6d3f451 GSdx-HW: Remove inefficient scaling algorithm
Only impacts custom resolution, there used to be a much weaker algorithm
which doens't consider scissor sizes and gives a minor performance boost
in costs of accuracy (which was used when large framebuffer was disabled
in custom resolutions)

I've removed this as the performance tradeoff is rather negligible after
the implementation of #1942 and the older one is no longer necessary.
Also added an extra parameter for considering the horizontal scissor,
I'm not sure where this might be useful so this is disabled in code for
now till I discover a testcase where this helps or run it on random data
ensuring it's working properly.

Also porting this to the general scaling function might help with memory
spikes which are experienced when large framebuffer is enabled.
2018-09-27 15:34:26 +05:30
Shanoah Alkire 6710b0c906 Get rid of a few GSdx warnings. Remove some extra newlines in Sio's console output. 2018-10-27 01:59:53 -07:00
lightningterror 0cbbf2daf9 GSdx: Add an enum for channel fetch. 2018-10-23 16:52:47 +02:00
lightningterror bb5d120a3b GSdx-d3d: SetupDATE - > use pretty enum names. 2018-10-20 21:12:16 +02:00
lightningterror 6dca3656ed GSdx: Add Harry Potter and the Half-Blood Prince to automatic mipmapping. 2018-10-19 22:16:00 +02:00
KrossX df307bed02 GSdx-d3d: Add macro to support ScalingFactor in shaders. 2018-10-19 11:36:23 +02:00
lightningterror 5ef53b4587 GSdx-d3d: Partial port of the ICO HLE workaround.
We can't do a full port because channel shuffle and depth sampling need
to be ported to d3d but at the very least we can do a partial port that
skips the bad draw calls.
This way we can remove all the remaining crc hacks for ICO in GSHwHacks.
2018-10-19 07:15:06 +02:00
lightningterror 6ab47c934d GSdx: Revert disabled crc hack on native res for SFEX3.
I forgot that it's not an upscaling issue.
2018-10-18 16:13:45 +02:00
lightningterror 411e434baf GSdx-d3d: Move around some functions in DrawPrims to better match ogl.
IsOpaque(), EmulateChannelShuffle, dfmt check for 24bit alpha channel.
2018-10-18 07:02:45 +02:00
lightningterror c92e76b17e GSdx-gui: Change internal resolution drop down list names.
This should make things a bit easier for users when picking resolutions.

Native (PS2)
2x Native (~720p)
3x Native (~1080p)
4x Native (~1440p 2K)
5x Native (~1620p 3K)
6x Native (~2160p 4K)
8x Native (~2880p 5K)
Custom (Not Recommended)
2018-10-16 16:48:50 +02:00
lightningterror 933e43cb58 GSdx: Change how crc hacks work on native res.
Change the code so that some crc hacks on some games that remove
ghosting/blur issues on upscaled resolutions are disabled on native
resolution if crc hack level is below Aggressive state (most of the time).
They aren't needed then so why don't we aim for better accuracy.
2018-10-15 20:41:23 +02:00
Shanoah Alkire 149f30c7fa Removing some warnings from GSdx and pcsx2 because gcc 8 spams them mercilessly. They should probably be fixed properly, but in the meantime, this'll prevent them from masking other compiler warnings. 2018-10-13 13:56:38 -07:00
lightningterror fa53968b3c GSdx-gui: Forgot to update the buttons in Capture Settings. 2018-10-10 21:44:11 +02:00
lightningterror f3610b7c5c GSdx-gui: Minor spacing changes to some buttons. 2018-10-10 21:35:00 +02:00
lightningterror eac7527b93 GSdx-d3d: 24bit no alpha channel port from OpenGL.
Commit:

419dfe0544
2018-10-09 20:25:37 +02:00
lightningterror b360c07253 glsl, fx: Update point sampler comment. 2018-10-09 09:07:45 +02:00
lightningterror b1ca6ba528 GSdx-d3d: Use a pretty enum for ate_second_pass. 2018-10-08 23:58:15 +02:00
lightningterror 0dcd60b524 GSdx-d3d: Remove point sampler from d3d9.
It did nothing.
2018-10-08 21:22:34 +02:00
lightningterror c337ab6a66 GSdx-d3d: Use Colormask instead of GSDXRecoverableError on d3d9 texture shuffle.
Might be better.
2018-10-08 21:12:05 +02:00
lightningterror 201e7d1430 GSdx-d3d: Reformat GSRendererDX11.cpp. 2018-10-08 07:19:07 +02:00
lightningterror e5565d32b1 GSdx-d3d: Port directly set impossible mode in the blending table from OpenGL.
Commit:
97b38d9e1b
2018-10-08 01:06:45 +02:00
lightningterror e44fc33d48 GSdx-d3d: Add some comments in blendmap enums. 2018-10-06 08:26:45 +02:00
lightningterror 4a2549ef24 GSdx-d3d: Make blend enums easier to read.
Easier on the eyes this way.
2018-10-06 08:00:25 +02:00
lightningterror 379d9e4b88 GSdx-d3d: optimize colclip 0 port from OpenGL.
Commits:
7979dec5b0
15b934eb2a
2018-10-05 08:40:01 +02:00
KrossX 5719c6c3c0 glsl: remove signed int cast side (masks and offsets are unsigned to begin with.
Issue #2617
2018-10-04 20:47:03 +02:00
lightningterror 614209be2d GSdx-d3d: Change DATE variable to local. 2018-10-04 05:39:01 +02:00
lightningterror 940263d490 GSdx-gui: Adjust space/rows on some tooltips so they fit better, rename Auto to Automatic list on adv. gl settings in hw hacks. 2018-10-03 15:27:42 +02:00
KrossX 2d094cbc3b tfx.fs: Remove whitespaces. 2018-10-03 15:21:46 +02:00
KrossX 9d562a454b GSdx: Limit Wrap negative UV when PS_FST is 0 only. 2018-10-03 15:21:46 +02:00
lightningterror 694546e870 GSdx-d3d: Add colclip_wrap variable. 2018-10-03 05:50:54 +02:00
lightningterror ef29daa9d0 GSdx-d3d: purge GSDrawingContext* context and GSDrawingEnvironment env from GSRendererDX.h
Not used anywhere in dx code and the code is already defined in
GSState.h with member variable names.
2018-10-03 04:41:17 +02:00
lightningterror 08a270a429 GSdx-d3d: Reformat GSRendererDX.cpp.
Let's keep the file clean and use 1 type of formatting and not a bunch.
It's easier to read this way and looks tidy.
Also correct some commented out code in Texture Sampler.
2018-10-02 02:16:38 +02:00
lightningterror 2aedb97796 GSdx: Add a crc id for Burnout Revenge EU. 2018-10-01 23:29:46 +02:00
lightningterror f6ba6cc3a9 GSdx-gui: Remove Xenosaga tooltip from TC Offset hack.
No longer needed since the issue is fixed.
Commit:

629d2bd425
2018-10-01 22:42:17 +02:00
KrossX 629d2bd425 GSdx: Wrap negative UV on region repeat wrap mode.
Makes UV coord be on the range [0, SIZE) before applying mask and
offset. This fixes Xenosaga's hair for example, which has negative UV
coords.
2018-10-01 22:38:22 +02:00
KrossX e90c87a8ef GSdx-d3d: Keep fract in [0;1] range port from OpenGL.
Fixes texture flickering in Oni on d3d11.

Commit:
a8968257db
2018-09-28 02:33:58 +02:00
KrossX 560966c539 GSdx-d3d: Update nvidia hack with vendor id detection.
Hack will no longer be active on Intel or AMD gpus.
Also remove UserHacks_disable_NV_hack. sprite hack
basically does the same thing so it's kinda useless.
2018-09-25 08:35:05 +02:00
KrossX e063be3043 GSdx-d3d: Port mipmap max_layer calculation from opengl to direct3d.
Fixes texture corruption on direct3d when full mipmapping was used.
2018-09-25 08:35:05 +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 728fa2c1a4 GSdx-d3d: tfx.fx correct texture shuffle shaders.
Some values were incorrect, now I'm no expert but looking at the code
and behavior seemed a bit wrong compared to gl.

Improves d3d rendering on Sonic Unleashed, the purple screen is gone
matching it with gl visuals.
2018-09-17 14:26:08 +02:00
lightningterror 8acc319a4a GSdx-d3d: Mask alpha channel on 24bit format.
dfmt is not supported but we can use the variable to select the
frame buffer format and later disable writting to the alpha channel.

MGS3 sees an improvement, and possibly other games as well.
So far didn't spot any regressions.
2018-09-16 12:54:47 +02:00
lightningterror 14a62c3a3f GSdx-tc: Update fb conversion hack comment with latest d3d changes.
D3D10/11 now supports fb conversion through a shader but only on native
res for now.
Nobody cares about D3D9 so don't ask :).
2018-09-15 14:27:04 +02:00
lightningterror 577bfaa8cd GSdx-d3d: Move Selector reset states in to a separate function.
Also move vs_sel def in header file and rename it using the member name.

Code is easier to read/move/adjust similar to GL.
2018-09-15 05:49:18 +02:00
lightningterror f40c1de919 GSdx: GPU accelerate 8 bits texture conversion port from OpenGL to Direct3D11.
Commit:
d29e375f72

Only native res is supported currently, but it's still great progress.
Someone needs to port the ScalingFactor to D3D from commit:
6121677aa1

Credits to KrossX for porting the shader.
2018-09-13 19:56:59 +02:00
lightningterror 6b52cc9829 GSdx-gui: Minor osd gui adjustments.
Grey out scrolling speed and maximum onscreen messages when
Enable Log is not checked.
2018-09-13 03:23:36 +02:00
lightningterror ad143d92da GSdx: Add Yakuza ntsc-u demo crc id. 2018-09-12 11:33:07 +02:00
lightningterror c39dc3dd78 GSdx-gui: Minor adjustements.
Purge unused IDC_CHECK_DISABLE_ALL_HACKS tooltip from old GSdx versions.

Rename TC Offsets to Texture Offsets.
2018-09-03 20:48:17 +02:00
lightningterror 96a62351ac GSdx: GSHwHack.cpp adjust a few lines I forgot in the previous commit. 2018-09-03 04:51:53 +02:00
lightningterror 38366c084e GSdx: Adjust Yakuza games crc hacks and do some reformatting.
Add a missing crc id for the US version,
, move the crc to DX level - effect is emulated correctly on OpenGL with
depth,
merge the two Yakuza hacks together and reformat it making it easier to
be read.
Skip 3 also seems to work on Yakuza 2.
Related commit:

7f0f19ee02

Reformat the code a bit, ocd satisfaction.
2018-09-03 04:36:11 +02:00
lightningterror 5b9e93c652 GSdx: Add Sly2 Internal prototype disc crc id. 2018-09-01 03:03:20 +02:00
lightningterror 846f31851e GSdx-gui: Grey out Texture filtering and Interlacing on Null. 2018-08-29 02:12:00 +02:00
Jonathan Li 22f1048e8f gsdx:windows: Show different adapters for each renderer
OpenGL does not allow an adapter to be selected, and the available
adapters for D3D11 and D3D9 may be slightly different.
2018-08-29 00:48:16 +01:00
Jonathan Li e4dd0069ca gsdx:windows: Don't refer to D3D10
Direct3D11 is used even if the user's GPU only supports Direct3D feature
level 10.0.
2018-08-29 00:48:16 +01:00
Jonathan Li 05004450a0 gsdx:windows: Refactor D3D11/9 adapter enumeration code
Move the code into separate functions.
2018-08-29 00:48:16 +01:00
Jonathan Li 3e8f9ac518 gsdx:windows: Init hacks dialog member variables in constructor
The skipdraw variables can now be initialised in the constructor as the
dialog no longer preserves state when it is reopened.
2018-08-29 00:48:16 +01:00
Jonathan Li 4d8dea0892 gsdx:windows: Open sub dialogs using temporary objects
This prevents the dialog from preserving state after it is closed, which
simplifies the logic slightly for reopening the dialog.

Also remove an unused variable.
2018-08-29 00:48:16 +01:00
Gregory Hainaut eb104f60e2 round count in constructor (to squash) 2018-08-28 15:30:56 +02:00
Gregory Hainaut b6db0a3c30 gsdx ogl: allow to reallocate the vertex/index buffer
Replace some raw pointers with unique_ptr

When Vertex buffer is updated, we should set again the layout
2018-08-28 15:30:56 +02:00
Gregory Hainaut 5694ef56ca gsdx ogl: use vector for layout parameter of Vertex Array
And keep the state in the object
2018-08-28 15:30:56 +02:00
lightningterror d09ac6d589 GSdx: Add some crc ids for HarryPotterATPOA KO/JP. 2018-08-27 21:26:19 +02:00
lightningterror 122f730608 glsl: Replace leftover tabs with spaces in shaderboost.
I believe all glsl files are cleaned up now.
2018-08-27 14:01:25 +02:00
lightningterror bcb7805c11 GSdx-gui: Don't disable Anisotropic Filtering on gl when Allow 8-bit textures is enabled.
Anisotropic works even with 8bit textures enabled.
2018-08-24 13:12:26 +02:00
lightningterror 1aeec47b30 glsl: Replace leftover tabs with spaces in tfx_fs. 2018-08-22 20:12:53 +02:00
lightningterror d7cdbf6f27 Gsdx: Point Sampler changes.
Re add point sampler to OpenGL. Fixes graphical issues when
Allow 8-bit textures is enabled on AMD gpus.
Issue: https://forums.pcsx2.net/Thread-GSDX-Hardware-mode-Bug-Report-Allow-8-bit-Texture

Adjust the code to be easier to read, and execute the gl code only on amd - suggested by Gregory.

Remove useless ATI_SUCKS define in tfx shader.It wasn't used anywhere outside of the shader.
2018-08-22 20:12:53 +02:00
lightningterror cf222d1ccf GSdx: Add Ape Escape 2 to automatic mipmapping. 2018-08-21 17:28:14 +02:00
lightningterror 937fee84f4 GSdx-gui: Put TC Offset X Y hacks in one line similar to Skipdraw Offset 2018-08-21 14:35:17 +02:00
lightningterror 11bad7b07a GSdx-d3d: Reduce state change - port from GL.
Commit: 37f9bcf9cb

Don't dirty aref when a fog color is uploaded.
Only set clamp mode in clamp mode (region clamp is handled in shader).
2018-08-21 13:56:06 +02:00
lightningterror 6eb385fd9b GSdx-d3d: s/sample_4a/sample_4_index/ 2018-08-21 13:56:06 +02:00
lightningterror 188a1f1416 GSdx-d3d: Drop an useless min in FS - port from GL.
Commit: a1957a685d

GPU will clamp color anyway. It reduces the number of instruction of 25%
(4->3).
2018-08-21 13:56:06 +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 fc1d88cb51 GSdx-gui: Revert spacing between Texture filtering and Hardware settings.
I forgot all about OpenCL which caused some overlapping with the OpenCL
device option.
2018-08-20 02:10:00 +02:00
lightningterror 51cf02d27b GSdx-gui: Adjust main gui spacing.
Decrease spacing between Hardware Settings and Texture Filtering
slightly. It was a bit too much before,
Adjusted spacing to be equal between options, some had incorrect
spacing.

Maybe Accurate Date and Blending Unit Accuracy can be swapped.
2018-08-19 23:05:02 +02:00
Jonathan Li d258ef6275 gsdx:gtk: Improve dialog for small screen resolutions
Makes all the tabs scrollable, which makes the dialog more usable (the
OK button should always be present unless the screen is absurdly small).

Only checked on GTK3.
2018-08-12 19:38:21 +01:00
Jonathan Li 546eac4646 gsdx:gtk3: Fix fetching of monitor resolution
The user may not have configured a primary monitor, so get the
resolution of the monitor that the mouse cursor is currently located on.
2018-08-12 19:38:21 +01:00
Jonathan Li 8391b08e8f gsdx:gtk+3: Adjust visual layout
Use hexpand instead of expand, and use margin-start instead of
margin-left (margin-left is deprecated in GTK+ 3.12). IMO it looks
better this way.

Also, set the properties using gtk_widget_set_* instead of g_object_set.
2018-08-12 19:38:21 +01:00
Jonathan Li c28353e01f gsdx:gtk3: Switch to non-deprecated GTK3 API
The widget expanding issue seems to have resolved itself (probably a
change on the GTK3 end).
2018-08-12 19:38:21 +01:00
lightningterror ca35e707c4 GSdx-gui: Properly grey out Anisotropic Filtering text when the option is inactive. 2018-08-07 13:12:24 +02:00
lightningterror 352fbf0c1f GSdx-gui: Update CRC Hack Level tooltips.
Update Aggressive level tooltips.
Display the correct games that have Aggressive level crc hacks.
2018-08-07 11:41:28 +02:00
Jonathan Li 8b6ffc3f45 gsdx:ogl: Remove unused variables
Fixes some clang warnings.
2018-08-07 00:15:10 +01:00
lightningterror a0f96189d3 GSdx: Adjust God of War II crc hack.
Extend the hack to remove the water / hell effect (vertical lines) on
interlaced mode.

Close #2533
2018-08-04 20:07:26 +02:00
lightningterror 6cfe287c70 GSdx: Add/adjust crc ids.
Add God of War Demo ntsc,
Add Burnout Takedown E3 Demo ntsc,
Adjust regions for Harry Potter ATCOS/ATPOA,
Add comment for crc 0x7ACF7E03 - multiloader.
2018-08-03 12:35:26 +02:00
ivan89el f80af64a2b GSdx: Adjust ShinOnimusha crc hack. (#2521)
The hacks remove smoke/fog effects. They are rendered correctly so let's move the hacks to Aggressive crc state. They can be used as speedhacks.
2018-08-01 11:25:24 +02: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
Jonathan Li 286e7293fa gsdx:windows: Fix screenshot/GS dump path issues
Fixes an issue with screenshots/GS dumps not saving if the path contains
characters not present in the current codepage.
2018-07-23 00:51:02 +01:00
ivan89el d09737dbb5 GSdx: Adjust Spartan crc hack, add missing crc id. (#2510)
Adjust Spartan crc hack: Combine/ease the hacks in to one.
Only remove the glow/yellow bloom effect and don't skip any other effects that shouldn't be skipped. UI and some other post processing effects work properly now.

Add crc id CrashBandicootWoC RU.
2018-07-19 19:33:06 +02:00
Christian Kenny 6d1d32cd83 GSdx: Add Harry Potter Order of the Phoenix to automatic mipmapping. 2018-07-19 04:37:14 +02:00
Dmitry dca7bf5edc GSdx: Add/adjust some CRC ids. (#2512)
Add some missing RU crc ids: Onimusha3, ICO, TombRaiderUnderworld, SoulReaver2, LegacyOfKainDefiance.

Removed crc id 7ACF7E03 and mentions of that id and it's duplicates. The id is from a multiloader when packing images, and not an actual crc id from a game(s).
2018-07-19 00:53:22 +02:00
ivan89el 4ebfceffd2 GSdx: Add some missing crc ids.
Add FinalFightStreetwise RU, SoulCalibur3 RU. Correcting the wrong id TenchuFS RU (the elf was modified widescreen cheat, sorry). Delite Kunoichi RU (the elf was modified widescreen cheat, the original coincides with the EU).
2018-07-15 22:03:08 +02:00
ivan89el 75264ee423 GSdx: Adjust Kunoichi crc hack (#2502)
Move a hack that removed burning/hot air effect. The effect is rendered properly but causes slowdowns so it's best to move it to aggressive for now.

Add comments explaining what the crc hacks do.
2018-07-12 20:31:24 +02:00
ivan89el 46866268ed GSdx: Add some missing crc ids. (#2498)
Kunoichi\Nightshade RU,
Tenchu Fatal Shadows RU,
Urban Reign RU,
Ghost In The Shell SOC RU.
2018-07-03 18:37:12 +02:00
ivan89el cbf8f22b62 GSdx: Adjust Ghost In The Shell SOC crc hack. (#2492)
Ease the crc hack and skip less effects, makes shadows and some other effects work properly.

The game experiences a bit more upscaling issues which can be resolved with Merge Sprite and Wild Arms offset HW hacks.
2018-07-02 22:42:56 +02:00
lightningterror 1fefb4897e GSdx: Add crc id for Shadow of Rome Demo (NTSC-U). 2018-07-01 04:34:08 +02:00
lightningterror 7b8d2d1945 GSdx: Add crc id for ICO Demo (NTSC-U). 2018-06-30 15:30:14 +02:00
lightningterror be4b06ef3e GSdx: Add crc id for The Getaway Black Monday Demo (NTSC-U). 2018-06-30 14:13:06 +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 5c483df3e8 GSdx: Add crc id for The Getaway Black Monday (NTSC-J). 2018-06-26 19:13:57 +02:00
lightningterror 2af05a92f8 GSdx: Add crc id for Ratchet And Clank 3 Regular Demo (NTSC-U). 2018-06-25 22:14:07 +02:00
lightningterror f22843816b GSdx: Add crc id for Ratchet & Clank 2: Going Commando & Jak II Demo disc (NTSC-U). 2018-06-24 21:45:58 +02:00
lightningterror 150b1e8423 GSdx: Add Sly 3 PAL demo crc id. 2018-06-18 21:02:44 +02:00
lightningterror abdd847fbe GSdx: Add some missing crc ids.
Ratchet And Clank NTSC-U: E3 Demo and EB Games Demo,
Soul Calibur 2 NTSC-U: Demo.
2018-06-18 00:53:49 +02:00
lightningterror 2b9c368fa8
GSdx-d3d: Rearange PSSelector(GSDeviceDX.h).
Rearange PSSelector shader list in GSDeviceDX.h
to match GL format.

Easier to read and will make someone's life easier.
2018-06-11 01:08:36 +02:00
lightningterror bb5f989c05 GSdx: Purge leftover SSX3 crc ids no longer needed. 2018-06-10 18:34:24 +02:00
lightningterror af3e55af63 GSdx: Also update Tekken 5 ntsc-j crc hacks to work on progressive mode. 2018-06-09 10:15:55 +02:00
lightningterror 1c58d5acff GSdx: CRC hacks for Tekken 5 NTSC-U should work on progressive mode as well now. 2018-06-08 22:54:56 +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 ba463ed076 GSdx: Disable Alpha hack gui option on D3D9.
Hack is only used on D3D10/11.
2018-05-31 21:22:12 +02:00
Jonathan Li 61406a4349 cmake: Fix GSdx EGL build libX11-xcb linkage issue
Prevents a XGetXCBConnection undefined symbol error.
2018-05-31 01:02:26 +01:00
lightningterror 6ef793545d GSdx:Port better support of palette from GL to D3D10/11.
Port from commit b0af54d3

Fixes shadows in Star Ocean 3.

Note: It works properly on native res only just like on GL.
Upscaling will cause some issues.

Only Direct3D10/11 supports it, D3D9 doesn't support integer operations
so we can't reuse the code.
2018-05-30 14:47:06 +02:00
lightningterror dc2779b385 GSdx: Adjust Sky Gunner crc hack.
Move hack back to Partial (GL level).
Huge vram usage on both gl and dx - maybe not a channel
effect or channel effect not yet detected.
2018-05-22 20:08:45 +02:00
lightningterror 8c2a79ab54 GSdx: Add some missing crc ids.
Sky Gunner US Regular and Trade Demo.
2018-05-22 20:05:14 +02:00
lightningterror d900917bfa GSdx-OSD: Adjust messages.
Change font size from 32 to 28 default.
Change log speed from 6 to 4 default.
Change max log messages from 3 to 2 default.
2018-05-21 17:56:14 +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 ff3052935e GSdx: Adjust Sonic Unleashed crc hacks.
Move crc hacks back to Partial (OpenGL) level.
Game experiences improper texture shuffle emulation and half screen
bottom issue.
2018-05-19 08:48:24 +02:00
lightningterror 290397d1af GSdx: Add a missing crc id for CrashNburn EU. 2018-05-16 01:09:56 +02:00
Christian Kenny 8b6751943e GSdx: Remove Hummer Badlands CRC Hack. 2018-05-15 20:52:05 +02:00
lightningterror 3a8857a782 GSdx: Adjust crc hacks for Big Mutha Truckers.
Move crc hacks back to OpenGL(Partial) level.

Game experiences a half screen bottom issue and vertical stripes.
2018-05-09 18:42:49 +02:00
lightningterror fbc0b1849d GSdx: Adjust crc hacks for Heavy Metal Thunder.
Move the hacks to DX Level(Full). OpenGL renders the effects properly
with Depth Emulation.
2018-05-09 00:07:59 +02:00
Jonathan Li 8f6a3d9fe8 gsdx: remove DirectCompute backend
It hasn't been accessible since OpenCL was added, and it was barely
updated since it was introduced.
2018-05-06 02:01:22 +01:00
lightningterror 191219f7d8 GSdx: Purge crc ids/games no longer needed.
The following games in the crc list are not used anywhere so
we can clean this list up. If some are needed in the future then
they can be re added.

List of removed games:
CaptainTsubasa,
Dororo,
HarvestMoon,
Jak1,
JamesBondEverythingOrNothing,
NamcoXCapcom,
SDGundamGGeneration,
SeintoSeiya,
SengokuBasara,
SilentHill2,
SilentHill3,
Siren,
TalesofDestiny,
VF4,
VF4EVO.
2018-05-05 23:21:34 +02:00
lightningterror e606958a43 Gsdx: Remove Captain Tsubasa crc hacks.
The crc hack broke graphics ingame, causing flickering/transparent
textures and other similar issues.

On a side note the game experiences upscaling issues that can be fixed
with Half Pixel offset hack.
2018-05-05 00:10:11 +02:00
lightningterror 34a94990c4 GSdx: Adjust crc ids.
Add a missing crc id for Captain Tsubasa-JP.
Rename WildArms5 to WildArms4 for crc 565B6170 Jap,
it was incorrect.
2018-05-05 00:10:11 +02:00
Jonathan Li ab9bdb009b baseclasses: Move from unfree to 3rdparty
Update it to the version found at
https://github.com/Microsoft/Windows-classic-samples , which is in an
MIT licensed repo, and add the LICENSE file (edited to remove the SIL
Open Font LICENSE part since that doesn't apply).

Some modifications have been made to reduce the diff/stop git
complaining (not including any file that wasn't in the previous version
and removing the related header includes in streams.h, and fixing some
but not all of the whitespace issues).
2018-04-29 02:19:17 +01:00
Jonathan Li b84b2808f4 baseclasses|gsdx: Move code from baseclasses to GSdx
Moved code seems to be from Gabest. Only the code that is currently used
has been kept.
2018-04-29 02:19:17 +01:00
Jonathan Li 7ea0273119 gsdx: Remove code that does nothing 2018-04-29 02:19:17 +01:00
lightningterror 6496e6db11 Gsdx: Adjust Front Mission 5 crc hacks.
Move CRC hacks do DX level.

Hack that fixes shadows:
Shadows/glitchy black ground textures can be fixed with Preload Frame Data.

Hack that removed vertical stripes:
D3D10/11 correctly emulates texture shuffle but also needs depth support.
2018-04-27 17:59:24 +01:00
lightningterror c8c9731262 GSdx: Update D3D fbmask emulation on texture shuffle.
Improves accuracy on Sly series.

Rendering is still bad and needs a lot more work but
it's a little bit better.
2018-04-24 22:42:59 +01:00
lightningterror 0f5d3d2f1b GSdx: Add Sly 3 demos crc ids.
Regular Demo US,
E3 Demo US.
2018-04-22 23:51:56 +01:00
lightningterror 230a497a12 GSdx-TC: Don't skip depth lookup on Jackie Chan Adv and SVC Chaos.
Don't skip draw calls on Jackie Chan Adv and SVC Chaos,
fixes regressions on Jackie Chan Adv and SVC Chaos.

Gregory: The correct fix would be to trace all textures writes to
be sure of the source. But it is a much bigger work.
2018-04-15 00:42:07 +01:00
lightningterror 6073a26f5d GSdx: Add some missing crc ids.
Add SVC Chaos: SNK vs. Capcom EU/JP,
Add Jackie Chan Adventures EU.
2018-04-15 00:42:07 +01:00
lightningterror 0e39caaad3 GSdx: Adjust Naruto series crc hacks
Purge CRC hacks that removed lighting on maps.
Games: Naruto - Narutimate Hero 3,
Naruto Shippuuden: Narutimate Accel.
2018-04-03 16:01:22 +01:00
lightningterror b6a73f6db3 Gsdx: Add some missing crc ids.
Tenchu Fatal Shadows US,
God Hand EU,
The Getaway EU,
The Getaway Black Monday EU.
2018-04-02 11:39:45 +01:00
lightningterror 4cb164b795 GSdx: Adjust CRC hacks.
Purge Sengoku Basara crc hacks. Texture shuffle is emulated correctly on
d3d11/ogl. d3d9 skips the bad draw call.

Move Eternal Poison crc hack to d3d level. Not needed on ogl since
the game is emulated correctly.

Move hack that removes texture shuffle for Demon Stoneback back to ogl level,
half screen bottom issue remains.

Extent CRC hack for The Getaway and The Getaway Black Monday to work on
EU regions.
2018-04-02 11:39:45 +01:00
lightningterror 014e27bc20 GSdx: Add Quak3 Revolution to Automatic mipmapping. 2018-03-27 15:11:08 +02:00
lightningterror 312db7755b GSdx: Adjust CRC hacks.
Move CRC hack that removed shadows to Aggressive, shadows are misaligned
when upscaling - can be fixed with HPO. We can use the hack as a
speedhack for Aggressive state.

Add correct FBP code for Sly 2 E3 Demo. CRC hack should work properly now.

Purge God of War 1/2 CRC hacks that fixed/removed the vertical red lines.
No longer needed since the issue is fixed accross all renders.
Also useless to be kept for speedhacks.
2018-03-27 15:11:08 +02:00
lightningterror 9769f19ebe GSdx: Remove fbmask handle in GSRendererDX.
It's already handled in texture shuffle code.
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
lightningterror 2ad5db2279 GSdx Adjust/Replace crc hack for Final Fight Streetwise.
Replace/remove an old crc hack that was used to fix the red vertical
lines issue, the hack is no longer needed. The new hack removes depth
effects on D3D only.
Note: The game has another vertical lines issue that can be fixed with
texture shuffle on D3D.

Add comments to Simple2000Vol114 explaining what the hacks do.
2018-03-22 14:46:31 +01:00
lightningterror 99350d6caa GSdx: Add some missing crc ids.
Sly 2 E3 Demo US, Sly 2 JP.
2018-03-22 14:46:31 +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
lightningterror f4fa115c82 GSdx: Remove GT3/Concept CRC Hacks.
This follows PR #2304.
The CRC hacks are no longer needed due to the partial port of channel
shuffle on D3D.
They cause higher vram spikes  now.
2018-03-13 18:56:30 +05:30
lightningterror bd0947e7a3 GSdx: Add/adjust CRC ids.
This follows PR #2330.

Add some missing regions: Tomb Raider Legend JP,
StarWars Force Unleashed EU, SuperMan Returns EU, Valkyrie Profile 2 FR.

Rename GT3/Concept titles, they were incorrect.

Adjust Harley Davidson region id from NoRegion to US.

Add some missing regions to automatic mipmapping:
FIFA 03 US, FIFA 04 EU, FIFA 05 EU.

Reformat a few comments.
2018-03-13 18:56:30 +05:30
lightningterror 73f1d7d099 GSdx: Rename HW hacks drop list options.
Add "Default" nametag for default list options for the hacks: Sprite,
Round Sprite, GL Advanced settings, HPO.

Should help users know which options are the default ones with less
confusion.
2018-03-04 20:54:10 +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
Jonathan Li fb4f274882 gsdx: Remove inappropriate comment 2018-03-02 23:41:46 +00:00
lightningterror 38aa4e1745 GSdx: GSCrc.cpp reformat comments and whitespaces. 2018-03-02 10:10:31 +05:30
lightningterror 2be9cf060d GSdx: Add/adjust CRC ids.
Add CRC id for FFXII US, SFEX3 EU,
GT4 CH and GT4 Online Beta US.
Adjust BullyCC region from US to EU.

Add Missing regions for Ratchet & Clank,
Ace Combat, Destroy All Humans and Soul Reaver
series to Automatic Mipmapping.
2018-03-02 10:10:31 +05:30
Christian Kenny 10ebe16653 GSdx (OGL HW): Perform a texture shuffle when the address of the framebuffer and the texture are the same.
Tomb Raider: Angel of Darkness relies on this behavior to produce a distance fog effect.

Closes #2215
2018-02-22 00:20:54 +05:30
FlatOutPS2 c1fd01545a GSdx: Remove GT4/Tourist Trophy CRC hacks
Removes GT4/Tourist Trophy CRC hacks. The hack had already been moved to
aggressive due to VRAM spike issues, but is no longer necessary at all
due to the in-game brightness/contrast setting issue being moved to
behind the frame buffer conversion hack for Direct3D and being resolved for OpenGL.
2018-02-21 17:08:48 +05:30
lightningterror 768a4412d5 Gsdx: Adjust Ikkitousen CRC hacks.
Move hacks that disabled shadows to DX level since OpenGL renders
shadows properly with Depth Emulation.

Some other upscaling issues appear with the disabled hack like a small
black border on the bottom of the screen or some ui elements but those
can be fixed with TC X,Y Offset hack.
2018-02-21 17:06:16 +05:30
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
Jonathan Li f64488f818 gsdx:d3d: Fix fbmask conversion on texture shuffle
Port of 6580f4922f.
2018-02-06 00:03:25 +00:00
lightningterror 85c59fdb5e GSdx: Adjust DBZ BT2 CRC hack and id, add R&C3 EU to Automatic Mipmap.
Adjust region id for BT2.
Move the sky texture(depth) hack back to Partial level only for the EU
regions.  Effect is still not rendered correctly and causes a half
screen bottom issue.

Add R&C3 EU to Automatic Mipmapping.
2018-02-05 23:03:19 +00:00
lightningterror 86a8cbf402 GSdx: Change Skipdraw Maximum limit value.
Previously the limit was 1000, now 10000 in the GUI. It should help in
some rare cases where a higher number is needed without the need of ini
editing and value reset issues caused by the GUI.
2018-02-05 23:03:19 +00:00
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 9dc7930ff2 GSdx: Merge CRC hacks of Wild Arms 4 and 5
It's better to avoid duplicate code so let's merge these two together
as well.
2018-01-12 13:25:40 +05:30
lightningterror fbdd0f4394 GSdx: Remove/move/merge CRC hacks.
Remove Aggressive CRC hacks for SSX 3. Was used to remove the red lines
on older versions but no longer needed since the issue has been fixed.
Offered 1fps or less speed bump but it's not worth keeping for such a
minimal increase.

Merge all FFX CRC hacks in to one. They share the same code so it's
better to have one to avoid duplicate code.

Move CRC hack for Bleach Blade Battlers to Aggressive. It removes the
character shading. It can be used as a speed hack since the gains are
quite good from it. Around 15-30%.
2018-01-10 08:10:56 +05:30
lightningterror 29ef586f91 GSdx: Move CRC hacks for Soul Calibur 2&3 to DX level.
Add missing CRC ids for Soul Calibur 2 and 3.
Move CRC hacks to DX level. They are not needed anymore on OpenGL since
Depth Emulation fixes depth issues (shadows).
2018-01-09 20:36:14 +05:30
lightningterror 687c0b45e2 Gsdx: Tekken 5 Channel effect and CRC Hacks
Move CRC hack to Partial that fix the half screen
bottom issue since the effect is not rendered correctly.

Move CRC hack to Aggressive. These hacks are only
needed when running upscaled resolution. They skip the
blur effect which cause ghosting and some other screen issues.
Side effect is they also remove the channel effect on OpenGL
which is emulated correctly so let's put them on Aggressive.

Comment out a hack, it's unknown what the hack does atm.
If there are new issues then it will be added back.

Added comments what the hacks do.

Partial port for channel shuffle effect to Direct3D for Tekken5.
The effect is skipped and not rendered but now the top left
screen glitch has been resolved.
Note: At least Minimum CRC level is required for this to work.
2017-12-13 13:31:49 +01:00
lightningterror 41051f3cfe GSdx: Add hidden option to disable Nvidia hack
Add hidden option "UserHacks_DisableNVhack" to disable
the Nvidia hack on Direct3D which added black lines on the right
and bottom of the screen. Could be useful for Intel and AMD GPUs.

A better solution would be to add Vendor Id detection instead,
but this will do for now.

To disable the Nvidia hack add UserHacks_DisableNVhack=1 in GSdx.ini
2017-12-10 21:37:00 +05:30
lightningterror a74a5d95ab GSdx: Remove/move CRC hacks for Simpsons Game
Remove CRC hacks no longer needed.
Move CRC hacks to Aggressive level. Can be used as a performance hack.
2017-11-28 16:59:13 +05:30
lightningterror 3c74f0f907 GSdx: Extend support of "Preload Frame Data" for Direct3D.
Fixes glitchy water in Rogue Galaxy in Direct3D when the hack is
enabled.
Fixes Test Drive car reflection in Direct3D when the hack is enabled.

OTher games are affected as well.
2017-11-27 11:01:43 +01:00
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
lightningterror 431b4f6f17 GSdx: Rearrange HW Hacks
Rearrange the two columns of HW hacks, new arrangement
is done in alphabetical order on Windows and Linux.

Rename some hacks on Linux to match the windows version.

Some other minor tweaks as well.
2017-11-20 09:54:32 +01:00
Christian Kenny 5956493684 GSdx: Remove CRC hack for James Bond Everything or Nothing. Thes hack was used to avoid a VRAM spike, but isn't needed anymore. 2017-11-19 12:58:48 +05:30