Commit Graph

77 Commits

Author SHA1 Message Date
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 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
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
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 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
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 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
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
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