Commit Graph

1162 Commits

Author SHA1 Message Date
Mathew Maidment 05e431d5b5 Merge pull request #3645 from lioncash/dxmem
D3D12: Get rid of most explicit delete and new usages
2016-02-16 22:54:04 -05:00
Mathew Maidment 96e48c3c9f Merge pull request #3644 from lioncash/shadercache
ShaderCache: Minor changes
2016-02-16 22:52:39 -05:00
Chris Burgener 6fe3a3004d Rename Direct3D to Direct3D 11 2016-02-16 22:43:21 -05:00
Lioncash 6b08194728 D3D12: Get rid of safe deletion macros
Anything these macros provided can be obsoleted by using
the correct standard library types.
2016-02-16 02:09:06 -05:00
Lioncash 626fcf4c15 D3DStreamBuffer: Use size_t within the class interface
A few StreamBuffer instances take arguments that are actually size_t,
and this will cause truncation warnings during argument forwarding
with make_unique.
2016-02-16 02:08:52 -05:00
Lioncash 932dd14418 NativeVertexFormat: Add missing override specifier 2016-02-15 23:41:20 -05:00
Lioncash 69c82f32ff NativeVertexFormat: Use in-class initialization 2016-02-15 23:40:34 -05:00
Lioncash 6c0db9fe3c ShaderCache: Remove unnecessary template type specifications
These are already inferred through the passed in arguments.
2016-02-15 23:32:30 -05:00
Lioncash 53fe5a04ec ShaderCache: Remove unnecessary null checks
We already bail out if the shader compilation fails.
Also, there would have already been a nullptr dereference in
InsertByteCode prior to reaching this point.
2016-02-15 23:29:30 -05:00
Lioncash a22f2e1144 D3DBase: Fix missing return statement 2016-02-15 21:15:43 -05:00
hdcmeta 8cc686b360 D3D12: Initial commit for D3D12 backend implementation. 2016-02-15 09:48:25 -08:00
mimimi085181 bb4d636f34 Copy all layers of textures with CopyRectangleFromTexture 2016-02-14 21:17:06 +01:00
mimimi085181 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
Lioncash 1df1ba55bb VideoCommon: Convert some DataReader includes into forward declarations
Gets rid of some indirect inclusions in cpp files.
Also this will reduce the amount of rebuilt files if
changes occur in the DataReader header.
2016-01-31 15:19:20 -05:00
Ryan Houdek 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
Lioncash 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
Lioncash e187c55bdd OpcodeDecoder: Add namespace 2016-01-24 01:31:36 -05:00
Pierre Bourdon be1a9e4231 Merge pull request #3518 from Sonicadvance1/blacklist_sandy
Blacklist Sandy Bridge on mesa from using geometry shaders.
2016-01-20 19:32:56 +01:00
Ryan Houdek 3dda36bc5b Blacklist Sandy Bridge on mesa from using geometry shaders. 2016-01-20 12:13:21 -06:00
Pierre Bourdon 24c228c6e9 Merge pull request #3523 from lioncash/video
VideoCommon: Header cleanup
2016-01-18 02:24:50 +01:00
Lioncash 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
Stenzek edebadc093 PixelShaderGen: Use bitwise AND for wrapping indirect texture coordinates
(x % y) is not defined in GLSL when sign(x) != sign(y).
This also has the added benefit of behaving the same as sampler wrapping modes, in regards to negative inputs.
2016-01-15 19:46:38 +10:00
Jules Blok 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
degasus 5f244abf28 Fifo: Create a "Fifo" namespace. 2016-01-12 23:28:26 +01:00
degasus 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
Jules Blok 8158d291aa D3D: Use the full depth range for Z pokes. 2016-01-11 22:27:41 +01:00
Jules Blok 129975233f D3D: Use a 32-bit floating point depth buffer. 2016-01-11 22:27:40 +01:00
Ryan Houdek 5a549ef663 [Android] Add support for rotation and minimizing the application 2016-01-10 13:00:32 -06:00
Pierre Bourdon 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
Ryan Houdek b4eb5d8e3f Disable geometry shaders on mesa AMD/ATI drivers.
Causes misrenderings in games that uses them.
2016-01-09 15:09:37 -06:00
Tillmann Karras 98ea1f773a VideoSW: fix some warnings 2016-01-09 10:38:07 +01:00
Ryan Houdek 3f15aa4b57 Add support for framedumping to OpenGL ES. 2016-01-09 00:21:20 -06:00
Pierre Bourdon 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
Chris Burgener c34fb3edf0 Use ffmpeg for Windows Video Dumping instead of VFW 2016-01-07 18:37:58 -05:00
Jules Blok db551c55a2 FrameBufferManager: Fix typo in stereoscopic MSAA shader. 2016-01-07 20:05:12 +01:00
degasus efbe5bc4b6 VideoSW: Use more VideoCommon
Now we require lots of empty functions, but this removes by far more duplicated code.
2016-01-06 22:10:29 +01:00
Ryan Houdek 7fcb5a803b Merge pull request #3359 from degasus/ini
VideoConfig: Use "GFX.ini" for both D3D and OGL.
2016-01-06 16:02:23 -05:00
Markus Wick 05fdf0398b Merge pull request #3313 from degasus/videosw
VideoSW: Clear Vertex data before usage
2016-01-06 21:56:02 +01:00
degasus 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
Ryan Houdek 0a42a0ab1b Merge pull request #3428 from Sonicadvance1/proper_glextensions
Make GLExtensions no longer require slghtly modified GL headers
2016-01-06 15:24:47 -05:00
Mathew Maidment 0509292f86 Merge pull request #3431 from stenzek/shadercache
ShaderGen: Remove virtual methods and string from ShaderGeneratorInterface.
2016-01-04 19:11:14 -05:00
Markus Wick ca7160f714 Merge pull request #3434 from lioncash/enum
OnScreenDisplay: Make CallbackType an enum class
2016-01-04 13:47:22 +01:00
Markus Wick 3045e08daf Merge pull request #3430 from lioncash/compare
ProgramShaderCache: Simplify SHADERUID comparison operators
2016-01-04 13:42:39 +01:00
Lioncash 1bcfae5fd7 OGL: Correct unique_ptr types
By default unique_ptr will call delete on the given type if an array
qualifier isn't present, not delete[]. It's important to explicitly
specify an array is being handled.
2016-01-03 16:00:16 -05:00
Jules Blok 8c3108b354 Render: Clamp the z range to the full range. 2016-01-03 15:39:34 +01:00
Lioncash 01f99a04a2 VideoBackend: Get rid of a boolean global
Also gets rid of global headers
2016-01-02 18:03:28 -05:00
Lioncash edda018d54 OnScreenDisplay: Make CallbackType an enum class 2016-01-02 14:57:55 -05:00
Ryan Houdek 37525f3fcf Make GLExtensions no longer require slghtly modified GL headers.
In fact, removes the need for external headers at all.
2016-01-02 10:34:13 -06:00
Stenzek 617f9d9532 ShaderGen: Remove virtual methods from ShaderGeneratorInterface, move string buffer to ShaderCode
This fixes the crashes occuring at startup with a non-empty shader cache.
Because LinearDiskCache reads/writes to the storage of ShaderUid, ShaderUid must be trivially copyable.
Additionally, adds a static assert to LinearDiskCache to ensure this doesn't happen in the future.

The initialization of ShaderUid data has been moved to the code generation functions, so the above condition holds true.
2016-01-02 17:35:06 +10:00
Lioncash 6093d1f72a ProgramShaderCache: Simplify SHADERUID comparison operators 2016-01-01 22:28:42 -05:00
Ryan Houdek b4e9bbb551 Merge pull request #3336 from Sonicadvance1/improve_glextensions
[GLExtensions] Improve the extension loader.
2016-01-01 13:01:51 -05:00
Markus Wick 330329254c Merge pull request #3361 from stenzek/d3d-vectored-efb-pokes
D3D: Implement vectored efb pokes
2015-12-30 15:27:24 +01:00
Scott Mansell d8e5d8659e TextureCache, fix an incorrect assert. 2015-12-29 14:25:31 +13:00
degasus 5d63a08a50 VideoSW: Clear Vertex data before usage
This must have no effect, everything else is usage of uninitialized memory.
2015-12-28 20:37:25 +01:00
Markus Wick 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
Markus Wick 281860eafa Merge pull request #3400 from lioncash/shadergen
ShaderGen: Get rid of static buffers
2015-12-28 10:09:11 +01:00
Stenzek 5cb047f449 D3D: Fix compilation error on windows 2015-12-28 15:50:01 +10:00
Markus Wick 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
Lioncash 8ce3a4aa70 ShaderGeneration: Get rid of static buffers 2015-12-26 17:01:54 -05:00
Scott Mansell bed102ae89 Revert "ShaderGen: Toggle value of uninitialized color." 2015-12-27 02:28:29 +13:00
Stenzek 12ef4c8ae0 OGL: Fix for black framebuffer when resolution/msaa mode changes 2015-12-23 23:29:32 +10:00
Stenzek 4d48a7abfc D3D: Fix crash on startup/resize 2015-12-23 23:07:31 +10:00
Lioncash 8371c428cd VertexLoaderBase: Get rid of explicit delete and new 2015-12-22 20:09:54 -05:00
Lioncash da0e647346 Render: Get rid of explicit new and delete 2015-12-22 19:10:05 -05:00
Jules Blok 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
Lioncash e422af9cce FramebufferManager: Get rid of raw new and delete 2015-12-22 18:06:05 -05:00
Lioncash f448c6e291 FramebufferManagerBase: Get rid of explicit delete and new 2015-12-21 15:57:48 -05:00
Lioncash d20ba76ab3 StreamBuffer: Make factory function return a std::unique_ptr 2015-12-21 10:21:38 -05:00
Lioncash ec71452706 StreamBuffer: Correct function casing 2015-12-21 10:09:03 -05:00
Lioncash 1eea95a5be StreamBuffer: Use std::array for fences 2015-12-21 10:07:56 -05:00
Lioncash 7b69fec8e7 StreamBuffer: Remove unnecessary inline specifiers
Methods defined directly in class bodies are inline by default
2015-12-21 10:04:14 -05:00
Lioncash 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
hdcmeta 50b9ab4541 Set g_vertex_manager to nullptr on DX11 backend shutdown.. OGL backend already does this 2015-12-20 17:02:36 -08:00
Stenzek 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
Stenzek 7b628c99ec D3D: Implement vectored efb pokes, increase util vertex buffer size to 64KiB 2015-12-20 00:31:58 +10:00
degasus 5e9ab28ed1 VideoSW: Clear normal vertex data.
This data might not be initialized but used for lighting.
This matches our ShaderGen usage in VertexShaderGen.cpp:166.
2015-12-19 10:51:42 +01:00
Pierre Bourdon de21da5fb2 Merge pull request #3315 from degasus/test
ShaderGen: Toggle value of uninitialized color.
2015-12-18 14:21:37 +01:00
Scott Mansell ebe3c49c5f Merge pull request #3332 from degasus/master
MSAA: Store samples in ini files.
2015-12-19 01:37:10 +13:00
Markus Wick e15b6e1a37 Merge pull request #3162 from lioncash/rast
Software: Minor changes to Rasterizer
2015-12-15 18:22:42 +01:00
degasus e26d9f7c35 MSAA: Store samples in ini files. 2015-12-15 09:41:01 +01:00
Ryan Houdek 78dda1cf79 [OGL] Update extension checks in Render.
This was relying on behaviour that GLExtensions was adding fake extensions to the supported list with ES.
This no longer happens so it needed to be changed.
2015-12-13 11:39:45 -06:00
Stenzek 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
Stenzek 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
degasus f511e539c2 VideoSW: Use Zero for undefined colors. 2015-12-06 12:39:18 +01:00
Lioncash 7762d68c4b Rasterizer: Mark some references as const 2015-12-06 02:51:36 -05:00
Lioncash 0608ed5130 Rasterizer: Specify internal linkage on Draw
It's not exposed in the header.
2015-12-06 02:51:34 -05:00
Lioncash a0924b5e1b Rasterizer: Convert BLOCK_SIZE into a constant variable 2015-12-06 02:51:33 -05:00
Lioncash 2793785e0c Rasterizer: Get rid of a clamp macro 2015-12-06 02:51:28 -05:00
Lioncash 9b921c2e7c Rasterizer: Get rid of a trivial pointer cast 2015-12-06 02:44:06 -05:00
degasus d28c9ae354 VideoSW: Wipe output vertices
They shall be overwritten afterwards.
2015-12-02 21:37:12 +01:00
Ryan Houdek 21b708106c Make sure not to use a GL texture buffer past the max size.
The spec says that vendors can set the max texture size to be 65KB and we want 1MB.
Check the maximum supported and drop to the max if it is less than 1MB
2015-11-30 01:18:03 -06:00
Stenzek 5e803c3db3 D3D: Fix EFB->XFB copies incorrectly scaling, match GL behavior 2015-11-28 20:04:36 +10:00
degasus 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
degasus df799dd124 VideoCommon: Create default implementation for state setters
It's fine to pull those within the backends, so there is no need to enforce them to implement this interface.
2015-11-24 22:39:10 +01:00
Stenzek d1b132731d D3D: Remove redundant cast, move pitch calculation to caller 2015-11-24 21:54:19 +10:00
Stenzek 6be4608a0d D3D: Fix crash on some drivers with small textures 2015-11-24 21:15:19 +10:00
Ryan Houdek d27dcdba48 We shouldn't be trying to enable the SSBO extension in ES. 2015-11-23 14:47:43 -06:00
Ryan Houdek ed5e3c054e Enable Anisotropic filtering in ES.
This adds a check to make sure the vendor supports anisotropic filtering.
Pretty much all vendors support this, even the mobile ones.
2015-11-19 02:00:43 -06:00
Markus Wick f172cda50f Merge pull request #3191 from lioncash/rekt
MathUtil: Minor changes to Rectangle
2015-11-18 10:40:54 +01:00
degasus 087ba5268a TextureCache: Rewrite EFB Copy control flow 2015-11-15 12:02:41 +01:00