Commit Graph

783 Commits

Author SHA1 Message Date
53cf42fb06 D3D11: Fix some cases where render target switches desynced StateManager
This was occuring in certain EFB copy patterns, leaving the textures
unbound for the next draw call.
2016-03-26 00:01:26 +10:00
63e4e07683 D3D11: Simplify MSAA depth texture resolving
This also fixes EFB depth buffer copies when MSAA is enabled.
2016-03-26 00:00:39 +10:00
0b9a72a62d VideoCommon: Refactor TexMode0 mipmaps disabled test into a helper function 2016-03-24 13:43:29 +11:00
902e5cddf7 VideoBackends: Do not use Anisotropy on Point filtered textures.
The D3D backend was always forcing Anisotropic filtering when that is enabled regardless of how the game chose to configure the texture filtering registers; this causes the same issues as "Force Filtering" without Anisotropy, such as causing game UI elements to no longer line up adjacent correctly. Historically, OpenGL's Anisotropy support has always worked "better" than D3D's due to seeming to not have this problem; unfortunately, OpenGL's Anisotropy specification only gives GL_LINEAR based filtering modes defined behavior, with only the mipmap setting being required to be considered. Some OpenGL implementations were implicitly disabling Anisotropy when the min/mag filters were set to GL_NEAREST, but this behavior is not required by the spec so cannot be relied on.
2016-03-24 13:43:29 +11:00
961901daae Merge pull request #3355 from mimimi085181/partial-texture-updates-check-dimensions
Partial texture updates: Check the dimensions of the efb copy
2016-02-29 00:49:48 +01:00
6fe3a3004d Rename Direct3D to Direct3D 11 2016-02-16 22:43:21 -05:00
932dd14418 NativeVertexFormat: Add missing override specifier 2016-02-15 23:41:20 -05:00
69c82f32ff NativeVertexFormat: Use in-class initialization 2016-02-15 23:40:34 -05:00
bb4d636f34 Copy all layers of textures with CopyRectangleFromTexture 2016-02-14 21:17:06 +01:00
99555a35ca For partial texture updates check the dimensions of the efb copy and the target texture, not just the binary size.
This should get Donkey Kong Country Returns characters to be as broken as they should be. They will be fixed in a later pr.

Expected result is:
efbtex: characters are always flickering or invisible, no matter what scaling or IR setting
efb2ram: characters are always working properly at 1xIR, no matter what scaling or IR setting
2016-02-14 17:13:51 +01:00
e1f21602fd Merge pull request #3426 from Sonicadvance1/ES_fix_framedump
Add support for framedumping to OpenGL ES.
2016-01-28 18:24:32 -05:00
5ebd1e215b Fifo: Make g_bSkipCurrentFrame a TU-local variable
This is only ever queried, making it a global isn't necessary.
2016-01-25 05:23:14 -05:00
e187c55bdd OpcodeDecoder: Add namespace 2016-01-24 01:31:36 -05:00
d9fec92628 VideoCommon: Header cleanup
Also remedies places where the video backends and core rely on things
being indirectly included.
2016-01-17 20:11:45 -05:00
48b60649af Merge pull request #3495 from Armada651/d3d-float
D3D: Use a 32-bit floating point depth buffer.
2016-01-14 00:39:23 +01:00
5f244abf28 Fifo: Create a "Fifo" namespace. 2016-01-12 23:28:26 +01:00
0c92603fd5 Merge VideoBackendHardware into VideoBackend.
And rename it to VideoBackendBase because of conflicts within the backends itself.
2016-01-12 23:18:58 +01:00
8158d291aa D3D: Use the full depth range for Z pokes. 2016-01-11 22:27:41 +01:00
129975233f D3D: Use a 32-bit floating point depth buffer. 2016-01-11 22:27:40 +01:00
e7fbd1fd50 Merge pull request #3439 from Armada651/depth-range
Render: Clamp the z range to the full range.
2016-01-10 19:09:57 +01:00
3f15aa4b57 Add support for framedumping to OpenGL ES. 2016-01-09 00:21:20 -06:00
bf1c53a6e8 Merge pull request #3451 from RisingFog/libav
Use ffmpeg for Windows Video Dumping instead of VFW
2016-01-09 01:01:05 +01:00
c34fb3edf0 Use ffmpeg for Windows Video Dumping instead of VFW 2016-01-07 18:37:58 -05:00
ad1f7576ad VideoConfig: Use "GFX.ini" for both D3D and OGL.
They share the same format, so there is no need to separate their configs.
2016-01-06 21:43:11 +01:00
8c3108b354 Render: Clamp the z range to the full range. 2016-01-03 15:39:34 +01:00
01f99a04a2 VideoBackend: Get rid of a boolean global
Also gets rid of global headers
2016-01-02 18:03:28 -05:00
330329254c Merge pull request #3361 from stenzek/d3d-vectored-efb-pokes
D3D: Implement vectored efb pokes
2015-12-30 15:27:24 +01:00
d8e5d8659e TextureCache, fix an incorrect assert. 2015-12-29 14:25:31 +13:00
aabcd441d9 Merge pull request #3381 from Armada651/revert-3076
Revert "Merge pull request #3076 from void-ghost/stereo3d_presets"
2015-12-28 10:18:32 +01:00
5cb047f449 D3D: Fix compilation error on windows 2015-12-28 15:50:01 +10:00
294bb75316 Merge pull request #3295 from stenzek/d3d-xfb-msaa
D3D: Fix multiple issues relating to MSAA
2015-12-28 01:13:42 +01:00
4d48a7abfc D3D: Fix crash on startup/resize 2015-12-23 23:07:31 +10:00
da0e647346 Render: Get rid of explicit new and delete 2015-12-22 19:10:05 -05:00
8bda12bcfd Revert "Merge pull request #3076 from void-ghost/stereo3d_presets"
This reverts commit 81414b4fa2, reversing
changes made to b926061f64.

Conflicts:
	Source/Core/DolphinWX/Frame.cpp
	Source/Core/VideoCommon/VideoConfig.cpp
	Source/Core/VideoCommon/VideoConfig.h
2015-12-23 00:35:19 +01:00
f448c6e291 FramebufferManagerBase: Get rid of explicit delete and new 2015-12-21 15:57:48 -05:00
f295182833 VideoBackends: Simplify initialization and deinitialization of resources
Approximately three or four times now, the issue of pointers being
in an inconsistent state been an issue in the video backend renderers
with regards to tripping up other developers.

Global (ugh) resources are put into a unique_ptr and will always have a
well-defined state of being - null or not null
2015-12-20 22:40:37 -05:00
50b9ab4541 Set g_vertex_manager to nullptr on DX11 backend shutdown.. OGL backend already does this 2015-12-20 17:02:36 -08:00
a61fc372bb VideoCommon: Change PokeEFB to take a pointer rather than a vector
This saves allocating a vector for the pass-through path.
2015-12-20 14:42:14 +10:00
7b628c99ec D3D: Implement vectored efb pokes, increase util vertex buffer size to 64KiB 2015-12-20 00:31:58 +10:00
e26d9f7c35 MSAA: Store samples in ini files. 2015-12-15 09:41:01 +01:00
5dcd3cd4fd D3D: Fix crash when taking screenshot with crop enabled
This was due to specifying negative source coordinates for the texture copy, which must lie within the bounds of the source and destination textures.

The behavior now is to clamp the copy region to [0 <= size <= backbuffer size], resulting in a copy region that can be smaller than the backbuffer, but never larger.
2015-12-09 02:38:24 +10:00
63264ac23f D3D: Fix EFB depth buffer copies, filtering on scaled EFB copies when MSAA is enabled, real XFB filtering
Since ResolveSubresource cannot be used with depth textures (and throws an error with the debug layer enabled), use a shader which selects the minimum depth value from all samples.

Changes the sampler by XFBEncoder to use a linear filter, rather than point, to match GL behavior.
2015-12-08 20:29:21 +10:00
5e803c3db3 D3D: Fix EFB->XFB copies incorrectly scaling, match GL behavior 2015-11-28 20:04:36 +10:00
fc00598785 NativeVertexFormat: Inline Initialize in contructor
They were only called at once, so no need to seperate them.

This also removes the only dereference of the NativeVertexFormat in VideoCommon, so backends may just return nullptr.
2015-11-24 22:48:49 +01:00
d1b132731d D3D: Remove redundant cast, move pitch calculation to caller 2015-11-24 21:54:19 +10:00
6be4608a0d D3D: Fix crash on some drivers with small textures 2015-11-24 21:15:19 +10:00
f172cda50f Merge pull request #3191 from lioncash/rekt
MathUtil: Minor changes to Rectangle
2015-11-18 10:40:54 +01:00
087ba5268a TextureCache: Rewrite EFB Copy control flow 2015-11-15 12:02:41 +01:00
dcdf8fd3ce TextureCache: Split efb2ram from efb2tex 2015-11-15 11:59:52 +01:00
d7d8704353 D3D-TextureEncoder: Remove TCache::Entry usage 2015-11-15 11:59:52 +01:00