Commit Graph

4755 Commits

Author SHA1 Message Date
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
arcum42 d05163a26f
Remove gigaherz old wip 'new' iopdma code. (#2703)
* Remove gigaherz old wip new iopdma code.

* Second pass removing dma code I missed last time.
2018-12-09 18:00:04 -08: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