Commit Graph

95 Commits

Author SHA1 Message Date
lightningterror 2aadf0be89 GSdx: Adjust Scaling Factor.
Use value of 1 when upscale multiplier is 0 for ScalingFactor, this is
to avoid doing math with 0 in shader.

It helps custom res be less broken. Still not recommended to use custom
res ofc.
2019-01-22 23:25:01 +01:00
Kojin 468b9ded46 gsdx-d3d11: Update texture copy method to handle depth
- Rename CopyRenderTarget to CloneTexture
- Allow copy of depth target

Also fix a small oversight from the removal of MSAA.
2019-01-22 06:52:24 +01:00
Kojin 57824261c6 gsdx-d3d11: Cache rt depth stencil on m_state
Cache the depth stencil in addition to color rt.
This will allow us to check for depth stencil equality on slot 4.
2019-01-22 06:52:24 +01:00
lightningterror b4cb805a91 gsdx-tc: Remove CanConvertDepth virtual bool and use m_can_convert_depth for depth toggling. 2019-01-18 14:53:06 +01:00
Kojin e429677a07 gsdx-hw: Completely remove MSAA from renderer code. 2019-01-15 19:13:14 +01:00
lightningterror e05b5d2420 GSdx-d3d: Move channel and texture shuffle in GSRendererDX.
Preparations for file merge.
2019-01-14 02:30:25 +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
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 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
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 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 7e8360efbc GSdx-d3d: Rename d3d9 blendtable and variables to d3d11. 2018-12-22 22:53:09 +01:00
Kojin e51eadaf16 gsdx-osd: Update m_font to use unique_ptr 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
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
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 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 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 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 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 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
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 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
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 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
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