Commit graph

659 commits

Author SHA1 Message Date
degasus
02dd062518 VideoCommon: Drop now unused efb2tex matrix generation. 2017-12-06 09:30:03 +01:00
Stenzek
e0ffce2785 D3D: Use VideoCommon EFB-to-texture shaders 2017-12-06 03:33:50 +10:00
Lioncash
b0fadbb5de D3D/VertexManager: Add missing includes
Gets rid of reliance on indirect includes
2017-12-02 20:09:33 -05:00
degasus
e2a9ee384f VideoCommon: Rename TextureConversionShader namespace. 2017-12-02 15:17:39 +01:00
Markus Wick
491c10ec96 VideoBackends: Use VideoCommon shader generators for efb2tex copies.
This will generate one shader per copy format. For now, it is the same
shader with the colmat hard coded. So it should already improve the GPU
performance a bit, but a rewrite of the shader generator is suggested.

Half of the patch is done by linkmauve1:
VideoCommon: Reorganise the shader writes.
2017-12-02 15:17:39 +01:00
Lioncash
1e7096dd27 D3DBase: Mark file-scope variables as internally linked where applicable 2017-11-30 23:46:46 -05:00
Stenzek
db1d9de933 AbstractTexture: Drop slow map readback path 2017-11-22 18:49:33 +10:00
Stenzek
752dd4761d D3D: Use new readback methods for EFB2RAM 2017-11-22 18:47:04 +10:00
Stenzek
56afebeb44 AbstractTexture: Seperate CopyRectangleFromTexture to two methods
ScaleRectangleFromTexture, which does a draw, and
CopyRectangleFromTexture, which where possible, does a bit-for-bit copy.
2017-11-22 18:47:04 +10:00
Stenzek
f43d85921d VideoBackends: Add AbstractStagingTexture class
Can be used for asynchronous readback or upload of textures.
2017-11-22 18:47:04 +10:00
Stenzek
a584ccc7d8 AbstractTexture: Support BGRA8 formats
Used for some driver's swap chains, and EFB to RAM.
2017-11-22 18:47:04 +10:00
Stenzek
49a9c33bd7 VideoCommon: Move abstract texture creation function to Renderer 2017-11-22 18:47:04 +10:00
Stenzek
5860c97144 D3D: Move device release from Renderer destructor to shutdown
Necessary if we wish to have GPU objects in our base class, as otherwise
the device will be released before the objects.
2017-11-22 18:47:04 +10:00
Stenzek
c5a89b6483 D3D: Remove BeginFrame/EndFrame
These functions did not do anything anyway. There is also no need to
present the backbuffer when shutting down.
2017-11-22 18:47:04 +10:00
Stenzek
d9400f708a D3D: Move remaining static variables from Render.cpp to Renderer class 2017-11-22 18:47:04 +10:00
Stenzek
798ec96e14 D3D: Make state cache part of Renderer and not static 2017-11-22 18:17:07 +10:00
Stenzek
39559f6358 VideoConfig: Remove bSupportsInternalResolutionFrameDumps
Field is unused as of Hybrid XFB.
2017-11-21 17:19:43 +10:00
Lioncash
d6f10fdc15 D3DUtil: Remove unused defines 2017-11-19 12:14:18 -05:00
Lioncash
01a92af014 D3DUtil: Make file-scope variables internally linked where applicable
All file scope variables are able to be made internally linked.

CD3DFont is essentially used as an extension to the utility interface, so
this is able to be made internal as well, removing a global from
external view.
2017-11-19 12:12:39 -05:00
Leo Lam
80bcc0d58d
Merge pull request #6186 from lioncash/enum-class
VideoConfig: Make AspectMode and StereoMode enum classes
2017-11-19 15:08:16 +01:00
Markus Wick
40ed0e4251
Merge pull request #6198 from lioncash/cmake
D3D: Remove non-existent files from CMakeLists.txt
2017-11-19 10:41:32 +01:00
Lioncash
364eaadfe5 VideoBackends: Remove header inclusions made unnecessary with Hybrid XFB
Just some inclusions that weren't removed in the initial Hybrid XFB PR.
2017-11-19 00:53:10 -05:00
Lioncash
2ef8ded8ce D3D: Remove non-existent files from CMakeLists.txt
Just a leftover that was missed in the Hybrid XFB PR.
2017-11-19 00:29:23 -05:00
Lioncash
5337e58284 VideoConfig: Make StereoMode an enum class
Makes for more strongly-typed identifiers (and doesn't pollute
surrounding namespaces)
2017-11-18 23:19:53 -05:00
iwubcode
7248dd47d5 Hybrid XFB: Fix lint errors 2017-11-17 22:11:32 -06:00
iwubcode
4964fc87ae Video Backends: Remove the right of the xfb region for games where the
VI stride does not match the VI width
2017-11-17 22:11:32 -06:00
iwubcode
53684701fa HybridXFB: Fix lint errors 2017-11-17 22:11:31 -06:00
iwubcode
1090549552 Software Backend: Force EFB/XFB to copy to ram 2017-11-17 22:11:31 -06:00
iwubcode
33bc286baa Remove old XFB logic 2017-11-17 22:11:29 -06:00
iwubcode
b285188de1 Video Backends: Implement vertical scaling for xfb copies. This fixes the
display of PAL games that run in 50hz mode.
2017-11-17 22:11:29 -06:00
iwubcode
198d3b69b4 Add ability to dump xfb copies to texture for debugging purposes 2017-11-17 22:11:28 -06:00
iwubcode
a9f0d1783b Support frame and video dumping from VideoCommon 2017-11-17 22:11:23 -06:00
iwubcode
79387dddb2 Add support for hybrid XFB 2017-11-17 19:47:56 -06:00
Lioncash
2a782b8f16 D3D/main: Remove unused variable in InitBackendInfo() 2017-11-12 13:24:02 -05:00
Lioncash
3dbd6a53cc D3DUtil: Remove unused file-scope variables
These used to be used when the drawShadedTexSubQuad() function existed,
but since it's been removed they now have no use.
2017-11-11 18:56:44 -05:00
JosJuice
a310cbec8e Fix incorrect handling of auto IR
Some lines of code in Dolphin just plainly grabbed the value of
g_ActiveConfig.iEFBScale, which resulted in Auto being treated as
0x rather than the actual automatically selected scale.
2017-11-03 16:04:46 +01:00
Leo Lam
e29cd19f73
Merge pull request #6118 from Tomcc/master
Resolution independent mipmaps (high IR Super Mario Galaxy Fix)
2017-10-31 21:37:20 +01:00
iwubcode
b201777b83 D3D Backend: Change encoding parameter types from DWORD to our platform agnostic types 2017-10-30 10:27:02 -05:00
Tommaso Checchi
5fb6ceac45 Fixed fog, lava, water in Mario Galaxy (and possibly other games) in higher IRs by detecting & fixing the mipmaps that aren't just used for downscaling, but are handmade to create a gradient. 2017-10-27 00:45:20 -07:00
Stenzek
24ddea04ce VideoBackends: Move SamplerState to common 2017-09-11 20:01:54 +10:00
Stenzek
836b9b9acb Renderer: Move cull mode to a rasterization state object
Also moves logic for primitive handling to VideoCommon.
2017-09-11 20:01:45 +10:00
Stenzek
2869c570f1 Renderer: Move depth state to VideoCommon and seperate from bpmem 2017-09-11 19:40:26 +10:00
Stenzek
c15ea2f1ed D3D: Fix crash if shaders fail to compile 2017-09-07 11:45:43 +10:00
Jules Blok
c97a799c5f Merge pull request #6016 from Armada651/allow-tearing
D3DBase: Support the "allow tearing" DXGI flags.
2017-09-06 13:22:23 +02:00
Stenzek
1073053df9 Merge pull request #6026 from stenzek/d3d-ubershader-logicop
ShaderGen: Output uint when logic op is enabled for D3D ubershaders
2017-09-06 18:33:47 +10:00
iwubcode
1ccfccdcf0 D3D: Properly handle dual source blending 2017-09-05 23:51:31 -05:00
Stenzek
84f8ebd95f VideoBackends: Clear uid bits that are unused for the current backend
Currently, this is only the logic op bit, but this will be extended to
the framebuffer fetch/blend modes. In the future, when/if we move to
VideoCommon pipelines, this state will be part of the pipeline UID
anyway, and we can mask it out in the backend by using a two-level map,
so the shaders/programs are shared.
2017-09-05 23:49:42 +10:00
Jules Blok
347fd065df D3DBase: Support the "allow tearing" DXGI flags.
This makes sure our framerate is unlocked when we disable V-Sync.
2017-09-04 23:12:52 +02:00
Anthony
ee6930a231 Merge pull request #6013 from stenzek/d3d-logic-op
D3D: Implement logic op support
2017-09-03 19:26:50 -07:00
Anthony
26e777d80b Merge pull request #5337 from stenzek/d3d-common-blending-state
D3D: Use blending state from VideoCommon
2017-09-03 19:25:46 -07:00