Commit Graph

218 Commits

Author SHA1 Message Date
Jules Blok 4fd943aedd VideoConfig: Limit the Stereo 3D option to the OpenGL backend. 2014-11-23 14:27:38 +01:00
Jules Blok fa32f751d3 ShaderGen: Handle ShaderCode objects directly.
ShaderGeneratorInterface does not have virtual function members, so we have to implement each type explicitly.
2014-11-23 14:24:09 +01:00
degasus c211450b99 OGL: implement bounding box support with ssbo
This implemention tries to be as accurate as the old SW implemention, but it will remove the dependcy of our vertexloader on videosw.
2014-11-17 21:20:32 +01:00
Stevoisiak b25e1a2eb4 Various formatting and consistency fixes 2014-11-13 22:42:18 -05:00
Yuriy O'Donnell 88d11ec5b2 D3D: RestoreState no longer resets PS resources 2014-10-27 00:02:30 +01:00
Yuriy O'Donnell 0c5a572f8d D3D: Use two buffers for VertexManager 2014-10-26 23:38:15 +01:00
Yuriy O'Donnell c35847b795 D3D: Using start index and base vertex instead of buffer offsets 2014-10-26 23:38:14 +01:00
Yuriy O'Donnell 48ba55203b D3D: Vertex and index data in one buffer 2014-10-26 23:38:14 +01:00
Yuriy O'Donnell 72ba13ca8a D3D: Enabled depth clipping 2014-10-21 06:26:20 +02:00
skidau 81efd0e87f Merge pull request #1315 from RisingFog/movie-menu-input-display
Moved Input Display to Movie Menu
2014-10-20 14:34:02 +11:00
Yuriy O'Donnell 97423d5ed8 D3D: Fixed anisotropic filtering.
This got broken when d3d state cache was implemented.
2014-10-18 17:47:47 +02:00
Fog 467ab1a629 Moved Input Display to Movie Menu 2014-10-17 21:08:34 -04:00
Yuriy O'Donnell b78396847f D3D: Removed SetBlendOp, SetSrcBlend and SetDestBlend as they are now trivial 2014-10-17 22:24:57 +02:00
Yuriy O'Donnell 9bdfd4a833 D3D: State cache now reduces number of blend state permutations by collapsing some states that have blending disabled 2014-10-16 18:27:43 +02:00
Yuriy O'Donnell bea68c95a4 D3D: Fixed uninitialized members of gx_state 2014-10-15 20:22:41 +02:00
Yuriy O'Donnell 21655dc61a D3D: moved render state cache implementation to D3DState.h/cpp 2014-10-15 20:22:41 +02:00
Yuriy O'Donnell e7f8032d7d D3D: State cache now uses BitField to define packed render states 2014-10-15 20:22:40 +02:00
Yuriy O'Donnell 2e4667caaa D3D: Moved render state cache into separate source files.
Refactored  StateCache::Get() to early out for narrower indentation.
Added comments to clarify ownership of objects returned by  StateCache::Get().
2014-10-15 20:22:39 +02:00
Yuriy O'Donnell f434bd7d3f D3D: Implemented cache for dynamic render states 2014-10-15 20:22:39 +02:00
skidau 8912315596 Merge pull request #1290 from lioncash/xfb
Fix XFB scaling in D3D
2014-10-15 14:09:33 +11:00
slx7R4GDZM 5a3f19aeaf Fix XFB scaling in D3D 2014-10-14 22:25:31 -04:00
Fog 8d424b114a Move bDumpFrames to SConfig (and it's references) 2014-10-12 23:56:16 -04:00
skidau 871d308b88 Merge pull request #1206 from comex/amperspocalypse
Change a bunch of reference function arguments to pointers.
2014-10-05 12:14:04 +11:00
comex 7f6284c2fc Change a bunch of reference function arguments to pointers.
Per the coding style and sanity.
2014-10-02 03:00:33 -04:00
Rachel Bryk f6c6f03cce Add on screen frame counter. 2014-09-30 18:49:44 -04:00
Rachel Bryk 4fe1119e52 Cleanup Renderer::CalculateTargetSize(), and allow IRs higher than 4x to be set via ini. 2014-09-25 19:50:25 -04:00
magumagu 32e5043b29 WIP XFB scaling.
Still an ugly mess.
2014-09-19 12:33:15 -05:00
Jasper St. Pierre a8e591dc73 VideoCommon: Remove support for decoding to ARGB textures
The D3D / OGL backends only ever used RGBA textures, and the Software
backend uses its own custom code for sampling. The ARGB path seems to
just be dead code.

Since ARGB and RGBA formats are similar, I don't think this will make
the code more difficult to read or unable to be used as
reference. Somebody who wants to use this code to output ARGB can simply
modify the MakeRGBA function to put the shift at the other end.
2014-09-04 18:36:56 -07:00
Shawn Hoffman 266992684d msvc: remove some remnants of SDL and DSound from projects and general cleanup. 2014-09-01 21:27:44 -07:00
Lioncash 844d45b26e D3D: Clean up brace placements 2014-08-30 18:06:47 -04:00
comex e31d6feaa2 Unify three types of non-FIFO requests to the GPU thread around Common::Event and Common::Flag.
The only possible functionality change is that s_efbAccessRequested and
s_swapRequested are no longer reset at init and shutdown of the OGL
backend (only; this is the only interaction any files other than
MainBase.cpp have with them).  I am fairly certain this was entirely
vestigial.

Possible performance implications: efbAccessReady now uses an Event
rather than spinning, which might be slightly slower, but considering
the slow loop the flags are being checked in from the GPU thread, I
doubt it's noticeable.

Also, this uses sequentially consistent rather than release/acquire
memory order, which might be slightly slower, especially on ARM...
something to improve in Event/Flag, really.
2014-08-26 12:43:39 -04:00
Jasper St. Pierre 63f1a16969 Core: Remove UpdateFPSDisplay
This is effectively unused, as the window handles that we pass to the
GLInterface are window handles for the frame which isn't ever a real
toplevel window. Host_UpdateTitle is what actually sets the proper title
on the render window.
2014-08-19 10:05:58 -04:00
Jasper St. Pierre 7ca8d8dfc7 Core: Don't pass through a reference to the window handle
Now that MainNoGUI is properly architected and GLX doesn't need to
sometimes craft its own windows sometimes which we have to thread back
into MainNoGUI, we don't need to thread the window handle that GLX
creates at all.

This removes the reference to pass back here, and the g_pWindowHandle
always be the same as the window returned by Host_GetRenderHandle().

A future cleanup could remove g_pWindowHandle entirely.
2014-08-19 10:05:58 -04:00
KScorp 97dce14368 Fixed depth matrix shaders in OpenGL and Direct3D to be more precise. Fixes some graphical glitches in some games. 2014-08-17 04:43:11 -05:00
Shawn Hoffman f1b82a34b2 Windows: Use a shared precompiled header for dolphin code under Source/ 2014-08-14 23:51:13 -07:00
Lioncash 2b341bb267 D3D: Remove an unnecessary call to Host_GetRenderWindowSize() 2014-08-08 19:21:41 -04:00
Lioncash a66a7e1344 Isolate D3D and Software Renderer from wxWidgets code 2014-08-03 20:28:50 -04:00
Ryan Houdek 7e83a0ea9b Merge pull request #700 from jimbo1qaz/master
Fix D3D Real XFB texture sampling.
2014-08-01 22:57:44 -05:00
Pierre Bourdon 83838a645f Merge pull request #690 from Armada651/d3dfullscreen_fixes
Exclusive fullscreen fixes
2014-07-30 16:28:56 -07:00
Jules Blok 4501aeefbe CFrame: Check borderless fullscreen setting before enabling exclusive fullscreen in the video config.
Fixes a bug where "Use Fullscreen" would initialize into exclusive fullscreen regardless of the borderless fullscreen setting.

Also relieves the need for the video renderer to check the borderless fullscreen setting each time.
2014-07-30 12:15:26 +02:00
jimbo1qaz fe9b7fa4f3 Fix D3D Real XFB texture sampling. 2014-07-29 18:15:01 -07:00
Lioncash 4fa71dd59e Remove fakepoll.h.
It was only used for Windows XP and lower.

This also bumps the _WIN32_WINNT define in the stdafx precompiled headers to set the minimum version as Windows Vista.
2014-07-26 22:53:40 -04:00
Jules Blok ed2c74a024 D3D: Set s_last_fullscreen_mode when constructing the renderer. 2014-07-26 13:47:11 +02:00
Pierre Bourdon 8e865f3848 Merge pull request #506 from Armada651/d3dfullscreen
D3D: Add exclusive fullscreen support.
2014-07-26 13:22:11 +02:00
Jules Blok 06b13f12d3 D3D: Make the global swapchain static again. 2014-07-26 13:04:46 +02:00
Jules Blok 6724ce6275 Cosmetic changes based on feedback on PR #506. 2014-07-26 13:04:39 +02:00
Jules Blok bd9953d97e Remove the 3D Vision hack.
The hack was needed because the Nvidia 3D Vision heuristics are documented to only support surfaces that are the same size as the backbuffer. This would be the case if you enabled the hack and selected the "Auto (Window Size)" internal resolution.

However, on recent drivers the same effect is achieved by selecting the "Auto (Multiple)" internal resolution. Therefore the hack is no longer required.
2014-07-26 12:45:10 +02:00
Pierre Bourdon 906b05cb1c Merge pull request #672 from delroth/vertex-loader
Vertex loader: reduce dependency on global state
2014-07-26 02:03:03 +02:00
Pierre Bourdon 73f9a22e2e VertexLoader: Remove global state dependency on g_nativeVertexFmt 2014-07-26 01:35:09 +02:00
Lioncash 5767691f4e Get rid of a few C-style struct declarations 2014-07-23 20:36:45 -04:00
Jules Blok 4b3d579573 Renderer: Only notify the host when exiting fullscreen 2014-07-21 20:50:50 +02:00
Jules Blok 009b4dd376 Exit exclusive fullscreen when the stop confirmation is shown.
Also have the renderer remember its own fullscreen state. This is done to prevent a case where we exit exclusive fullscreen through the configuration and a focus shift at the same time. In this case the renderer would fail to detect that the fullscreen state was changed.
2014-07-21 20:50:48 +02:00
Jules Blok 36ea1890c8 Let the Renderer decide when to exit fullscreen.
This ensures the transition from/to exclusive mode happens while the RenderFrame is fullscreen.

This prevents fullscreen loops and relieves us of having to restore the window size after we exit fullscreen.
2014-07-21 17:11:13 +02:00
Jules Blok cd94ff1966 VideoConfig: Add "Borderless Fullscreen" option.
This option will disable exclusive fullscreen for users who prefer the old behaviour.
2014-07-20 22:02:57 +02:00
Jules Blok 3400871992 Renderer: Don't attempt to switch to exclusive fullscreen if "render to main" is enabled. 2014-07-19 21:14:49 +02:00
Jules Blok 9064bf147d D3D: Don't set the windowed mode size when we initialize in fullscreen. 2014-07-19 21:14:48 +02:00
Jules Blok d00e76b3ef Cosmetic changes based on feedback on PR #506. 2014-07-19 21:14:47 +02:00
Jules Blok 5837b35add Renderer: Restore exclusive mode after focus has been regained. 2014-07-19 21:14:47 +02:00
Jules Blok 5f04e9c526 D3D: Make the swapchain available outside of the namespace.
This commit reverts a part of pull request #579.
2014-07-19 21:14:46 +02:00
Jules Blok 643c9ff173 D3D: Initialize the renderer in exclusive fullscreen mode if it is enabled. 2014-07-19 21:14:46 +02:00
Jules Blok 961076a3d5 D3D: Return to windowed mode before destroying the swapchain. 2014-07-19 21:14:45 +02:00
Jules Blok 77bc879384 D3D: Add exclusive fullscreen support. 2014-07-19 21:14:44 +02:00
Jules Blok d72375fdfa D3D: Request desktop resolution before overriding the buffer size.
This fixes issues where the wrong refresh rate is selected for some monitors.
2014-07-19 21:14:44 +02:00
Jules Blok c323b386ae Prevent DXGI from making changes to the window.
Prevents DXGI from responding to Alt+Enter and messing up our fullscreen handling.
2014-07-19 21:14:43 +02:00
Dolphin Bot b9dc69105d Merge pull request #595 from Armada651/pref_log
FPSCounter: Flush the logs every second and close them when the renderer is shut down.
2014-07-18 12:59:04 +02:00
Jules Blok 3b978f7c27 Turn the FPSCounter namespace into a class. 2014-07-16 20:40:40 +02:00
degasus 7e79806efc remove unused globals
Also change globals into statics which are only used in one file
2014-07-11 16:10:20 +02:00
degasus 81ed17be53 avoid the extern keyword in .cpp files 2014-07-11 16:10:20 +02:00
Jules Blok 1754cbda9d Move FPSCounter calls to RenderBase. 2014-07-10 23:11:09 +02:00
Lioncash a523a6d1bf D3D: Use std::strings for Compile[x]Shader and CompileAndCreate[x]Shader
With strings, we don't need to care about passing in a length, since it internally stores it. So now, we don't even need a length parameter for these functions anymore as well.
This also kills off some sprintf_s calls.
2014-07-07 19:32:03 -04:00
Lioncash 00efaedb02 FPS counter cleanup
- Isolate it into it's own namespace
- Shorten function names, the namespace self-documents.
- Just use the std I/O, we can just write directly to the stream for
  logging.
2014-07-02 20:23:09 -04:00
degasus f1ddd3c66a VideoCommon: remove unused stats 2014-06-27 09:35:26 +02:00
Lioncash ca5340ebde Centralize the logging code into its own folder in Common. 2014-06-25 22:11:42 -04:00
Lioncash 8b13afbb8e Remove the 32-bit config platform from the VS solution and projects 2014-06-24 22:07:26 -04:00
Tony Wasserka fbca397c92 Merge pull request #439 from degasus/lighting-fix
Lighting cleanup
2014-06-21 12:17:26 +02:00
Paul Olszewski c5ef249c4b Make the common "Failed to enumerate outputs" message much more useful.
Now it includes its most common cause, a simply-worded solution, and an exclamation point.
2014-06-20 15:51:54 -05:00
degasus 924ad1ee9f LightingShader: hard code const variable 2014-06-19 16:46:53 +02:00
degasus d93f2973f7 PixelShader: use the vertex const buffer for ppl 2014-06-19 16:33:33 +02:00
Tony Wasserka e642c8d0c1 Merge pull request #497 from Armada651/osd-scaling
D3D: Reset viewport before drawing the OSD.
2014-06-19 15:26:10 +02:00
Lioncash ce54c1e571 Kill off replaceable usages of s[n]printf. 2014-06-18 19:53:38 -04:00
Jules Blok 6c52ec93b7 D3D: Reset viewport before drawing the OSD. 2014-06-16 23:34:54 +02:00
Armada f2759ffe65 Remove EmuWindow.
All it did was raise complexity.
2014-06-15 00:49:49 +02:00
Lioncash 49b0eef393 Remove the min/max functions in CommonFuncs.
The algorithm header has the same functions.
2014-05-29 21:44:41 -04:00
shuffle2 329fcad04f Merge pull request #421 from CarlKenner/MissingSpace
Fix error message when D3D11 HResults fail.
2014-05-29 14:06:18 -07:00
CarlKenner 361d53fdc7 Fix error message when D3D11 HResults fail.
Prevents showing the wrong function name by putting a space between the function name and "Failed".
Also fixes the capitalization.
2014-05-27 00:45:26 +09:30
Lioncash 1583ce9363 Use strings instead of arbitrary buffers for video statistics 2014-05-25 21:11:29 -04:00
magumagu 1357277f40 Video backends: mass-replace "xfregs" with "xfmem". 2014-05-16 18:58:07 -07:00
Shawn Hoffman 17577affba D3D: Don't pass D3D10_SHADER_WARNINGS_ARE_ERRORS to the compiler in debug builds.
For quite a while this has been causing integer division to generate a warning as error, blocking shader compiling. This means probably no one has even been running D3D in debug builds...
I tried disabling the warning with a #pragma, but it doesn't seem to apply when this flag is used.
2014-05-10 22:12:54 -07:00
Tony Wasserka a40ea4e26a Merge pull request #236 from magumagu/d3d11-fix-peekz
D3D11: Use appropriate shader for PEEK_Z.
2014-04-27 16:09:02 +02:00
magumagu 648b9865d8 D3D11 backend: fix rounding in texture encoder.
We need to explicitly round when converting colors from float to uint
because multiplying a normalized float by 255 might not result in a whole
number.  (The exact result here may vary depending on your
drivers/hardware.)

Ideally, we shouldn't be using floating point here, but fixing that is a
much more complicated patch.

Fixes gxtest TEV tests using Intel HD 4000.
2014-04-15 23:36:05 -07:00
magumagu fd9c1fa746 VideoBackend: remove unused config vars.
No point to keeping around variables which are always "true".
2014-04-11 14:53:12 -07:00
magumagu 76d7c1eb9c D3DBackend: Don't recompute ID3D11Layout.
CreateInputLayout requires a shader as an input, but it only cares about
the signature; we don't need to recompute it for different shaders with
the same inputs.
2014-04-11 13:13:01 -07:00
magumagu f9d2f7e88c D3D11: Use appropriate shader for PEEK_Z.
Trying to use GetDepthMatrixProgram outside of
TCacheEntry::FromRenderTarget is a bad idea, so don't.  Instead, use a
shader which only copies the input.

Fixes lens flare depth test in Twilight Princess. See
http://code.google.com/p/dolphin-emu/issues/detail?id=5999 .
2014-03-30 19:50:53 -07:00
Tony Wasserka 16105db709 BPMemory: Make use of BitField in a number of structures. 2014-03-25 23:57:58 +01:00
Tony Wasserka 8941f19cdb BPMemory: Expose the pixel_format and zformat fields in PE_CONTROL as enumerations. 2014-03-25 23:57:58 +01:00
Tillmann Karras 7e39cf3b0d .gitignore: fix the build directory pattern 2014-03-17 02:55:56 +01:00
Tillmann Karras 2fcaca0603 More range-based loops and overrides 2014-03-17 02:55:55 +01:00
Lioncash a82675b7d5 Kill off some usages of c_str.
Also changes some function params, but this is ok.
Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
2014-03-14 13:51:23 -04:00
Matthew Parlane 31cfc73a09 Fixes spacing for "for", "while", "switch" and "if"
Also moved && and || to ends of lines instead of start.
Fixed misc vertical alignments and some { needed newlining.
2014-03-11 00:35:07 +13:00
Tillmann Karras d802d39281 clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-03-09 21:14:26 +01:00