Commit Graph

624 Commits

Author SHA1 Message Date
skidau 9551650c42 Merge pull request #1095 from crudelios/sw-bbox
Reimplement Bounding Box calculation using the software renderer.
2014-10-13 15:57:11 +11:00
Lioncash 01f1768c55 Merge pull request #1273 from lioncash/iamanidiot
Software: Remove obsoleted VideoConfigDialog.
2014-10-13 00:46:42 -04:00
Lioncash b315040c6b Software: Remove obsoleted VideoConfigDialog. 2014-10-13 00:30:08 -04:00
Fog 8d424b114a Move bDumpFrames to SConfig (and it's references) 2014-10-12 23:56:16 -04:00
Fog cd0c784d5a Changed Dump Frames References 2014-10-12 19:51:13 -04:00
crudelios 9786f54414 Fixed a small bug. 2014-10-10 12:28:17 +01:00
crudelios 987bd8bb8f Several small optimizations. 2014-10-10 12:28:16 +01:00
crudelios 176ea06e82 Get buildbot to compile. 2014-10-10 12:28:15 +01:00
crudelios 47c67f014f Fix linux build and various warnings.
Increase savestate version.
2014-10-10 12:28:13 +01:00
crudelios 2d4b7e3f3f Reimplement Bounding Box calculation using the software renderer. 2014-10-10 12:27:06 +01:00
skidau 215685a6fe Merge pull request #1214 from rohit-n/format-warning
OGL: Silence string format warnings.
2014-10-06 16:12:40 +11: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
Rohit Nirmal 12c6f97d80 OGL: Silence string format warnings. 2014-10-03 12:07:10 -04: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
Tony Wasserka 13fc8e7df1 Merge pull request #578 from RachelBryk/IR
Cleanup Renderer::CalculateTargetSize(), and allow IRs higher than 4x to be set via INI.
2014-09-30 19:21:21 +02:00
comex 2eebdff01b Remove useless STACKALIGN macro.
It only ever did anything on 32-bit OS X.

Anyway, it wasn't even on the right functions, and these days
ABI_PushRegistersAndAdjustStack should handle maintaining the ABI
correctly.
2014-09-30 01:42:47 -04:00
comex b8e31c1d3e Add OpenGL 4.0-4.5 core extensions.
This noticeably includes GL_ARB_get_program_binary, which was previously
thought unsupported on OS X.  Well, actually, the OS X implementation is
trivial and reports 0 binary formats (as of 10.10; this is hardcoded in
GLEngine, by the way), but at least it'll work if it's fixed someday.
2014-09-29 00:36:45 -04:00
comex 0ae9e398c8 Rejigger some FIFO buffer variables to be more rational.
videoBuffer -> s_video_buffer
size -> s_video_buffer_write_ptr
g_pVideoData -> g_video_buffer_read_ptr (impl moved to Fifo.cpp)

This eradicates the wonderful use of 'size' as a global name, and makes
it clear that s_video_buffer_write_ptr and g_video_buffer_read_ptr are
the two ends of the FIFO buffer s_video_buffer.

Oh, and remove a useless namespace {}.
2014-09-28 21:25:12 -04:00
comex f0131c2e09 Mechanical changes to move most CP state to a struct rather than separate globals.
The next commit will add a separate copy of the struct and the ability
for LoadCPReg to work on it.
2014-09-28 21:23:29 -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
skidau fb18d5376f Merge pull request #1142 from lioncash/linucks
Fix some warnings on Linux
2014-09-23 13:43:18 +10:00
Lioncash 836ff6d506 Fix some warnings on Linux 2014-09-21 20:13:22 -04:00
Lioncash 23b82bbacd OGL: Get rid of explicit deletes in RasterFont 2014-09-21 20:06:13 -04:00
Tony Wasserka 1d23c2ca8b GPU: Only load the relevant color components upon writes to the tev color registers.
The other two components need not be valid upon write, hence loading them results in glitches.

Fixes issue 6783.
2014-09-21 10:38:22 +02:00
Ryan Houdek eb23882398 Merge pull request #1120 from rohit-n/muh-precompiled-headers
Fix build failing when disabling precompiled headers.
2014-09-19 17:43:42 -05:00
Rohit Nirmal 46057db37d Fix build failing when disabling precompiled headers. 2014-09-19 18:17:51 -04:00
Ryan Houdek c5f9301e6e Add a comment to the software renderer that stride should be implemented 2014-09-19 12:33:15 -05:00
magumagu 32e5043b29 WIP XFB scaling.
Still an ugly mess.
2014-09-19 12:33:15 -05:00
Rohit Nirmal c0f7cab3f5 Remove extra semicolons at the ends of some lines. 2014-09-10 12:17:38 -04:00
Ryan Houdek 71cb09f1ca Merge pull request #1027 from rohit-n/change-include
Include CommonTypes.h instead of Common.h.
2014-09-10 00:35:16 -05:00
skidau d1439bc1db Merge pull request #1041 from RachelBryk/kill-g_CoreStartupParameter
Kill Core::g_CoreStartupParameter.
2014-09-10 11:00:42 +10:00
Rachel Bryk f93aa7087c Kill Core::g_CoreStartupParameter. 2014-09-09 00:24:49 -04:00
Fiora 94c20db369 Rename Log2 and add IsPow2 to MathUtils for future use
Also remove unused pow2/pow2f functions.
2014-09-08 20:15:45 -07:00
Rohit Nirmal fbc64984ca Include CommonTypes.h instead of Common.h. 2014-09-08 15:39:58 -04:00
shuffle2 0576046fdd Merge pull request #972 from Sonicadvance1/fix-intel-windows
Work around Intel's failings with buffer_storage
2014-09-05 11:06:49 -07:00
Fiora 07e0c917c6 Revert "JIT64: optimize CA calculations" 2014-09-05 10:26:30 -07:00
comex 97420c6ec6 Merge pull request #852 from FioraAeterna/optimizeca
JIT64: optimize CA calculations
2014-09-05 11:52:02 -04:00
comex e7f03dd066 Merge pull request #948 from comex/vao-fix
Don't switch to a vertex array object of 0.
2014-09-05 11:46:28 -04:00
Jasper St. Pierre ea1245d191 TextureDecoder: Pass the TLUT address straight into the texture decoder
This removes the requirement for the TextureDecoder to have access to
global texture memory.
2014-09-04 18:36:57 -07:00
Jasper St. Pierre fcd4ecc942 TextureDecoder: Add an enum for the TLUT formats
Quick code cleanup. The enum names and values come from libogc.
2014-09-04 18:36:56 -07: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
Sonicadvance1 e32b2e1771 Work around Intel's failings with with buffer_storage 2014-09-04 19:03:49 -05:00
Lioncash cf390ba537 OGL: Make rasters 2D array static in RasterFont 2014-09-03 22:59:13 -04:00
Lioncash 89557f6c2f OGL: Fix constant casing in RasterFont 2014-09-03 22:59:05 -04:00
comex b48e059173 Don't switch to a vertex array object of 0.
This causes glDrawArrays to fail in core profile, and thus on OS X, see:

http://renderingpipeline.com/2012/03/attribute-less-rendering/

There must be something bound, even though it is not used.

Fixes #7599.  I'm not sure this is actually the best way to fix it,
since AFAICT it makes a nonobvious assumption that *something* will be
bound before the first attributeless rendering in
TextureConverter::DecodeToTexture, but it's what degasus suggested and
seems to work.
2014-09-03 00:10:45 -04: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
Fiora b51aa4fa89 Rename Log2 and add IsPow2 to MathUtils for future use
Also remove unused pow2/pow2f functions.
2014-09-01 20:41:07 -07:00
Pierre Bourdon 494a60e41b VertexLoader: Change VtxDesc to use u64 instead of u32
This is required to make packing consistent between compilers: with u32, MSVC
would not allocate a bitfield that spans two u32s (it would leave a "hole").
2014-09-01 11:18:02 +02:00
Lioncash 844d45b26e D3D: Clean up brace placements 2014-08-30 18:06:47 -04:00
Lioncash 1d706b2311 Get rid of C-style empty function parameter indicators 2014-08-30 15:23:48 -04:00
Ryan Houdek c908a1e212 Merge pull request #882 from Sonicadvance1/fix-pp-blackness
Fix PostProcessing shader garbage on screen.
2014-08-28 10:29:03 -05:00
Ryan Houdek ca68526ec7 Clear the texture used by PP shaders prior to use.
We were generating a texture without ever setting the data to a known value.
This happened on the old code as well, just that PP shaders are receiving some love and people are using it and noticing some of its issues.
2014-08-28 10:16:39 -05: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
comex e0f35e0e59 Remove unused declarations. 2014-08-23 15:26:59 -04:00
Lioncash f17dcd2019 Merge pull request #764 from magcius/new-nogui-2
Rewrite GLInterface
2014-08-21 14:14:54 -04:00
Shawn Hoffman 5471c71819 msvc: resolve all warnings in VideoBackends/OGL. 2014-08-19 22:33:47 -07:00
Shawn Hoffman fd16065979 msvc: resolve all warnings in VideoBackends/Software. 2014-08-19 22:33:47 -07: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
Ryan Houdek 32fb61816b Fixes PP-shaders on !Mesa targets.
Seems mesa has a quirk where
define THING(x) (#x)
is the same as
define THING(x) (##x)

Didn't realize I messed it up since it just worked since I only tested on Mesa.
2014-08-17 21:28:59 -05:00
Pierre Bourdon 9e2fbaf405 Merge pull request #823 from KScorp/depthmatrixshaders
Fixed depth matrix shaders in OpenGL and Direct3D to be more precise.
2014-08-17 22:08:42 +02:00
Lioncash 15a3b30e27 Merge pull request #790 from lioncash/ogl-cleanup
Small OGL cleanup
2014-08-17 15:17:04 -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
Lioncash f0743e2571 OGL: Removed some unnecessary preprocessor directives from Render.cpp.
scrshotThread was also unused so that is removed as well.

Also added the algorithm header, since we use min and max here.
2014-08-16 23:57:06 -04:00
shuffle2 2270c3e90a Merge pull request #797 from shuffle2/msvc-pch
Windows: Use a shared precompiled header for dolphin code under Source/
2014-08-16 14:58:28 -07:00
Lioncash f11e587fa4 OGL: Get rid of an unnecessary WIN32 ifdef in main.cpp 2014-08-15 16:16:53 -04:00
Lioncash 7e3d1050f0 OGL: Add static to a function in NativeVertexFormat 2014-08-15 14:16:04 -04:00
Lioncash 32953fd968 OGL: Clean up parameters for some functions. 2014-08-15 14:15:23 -04:00
Lioncash 960b54670c OGL: Fix brace and body placements
Also got rid of void argument specifiers. These are a carryover from C.
2014-08-15 14:12:29 -04:00
Shawn Hoffman f1b82a34b2 Windows: Use a shared precompiled header for dolphin code under Source/ 2014-08-14 23:51:13 -07:00
Ryan Houdek cced3b4a18 Change OpenGL's post processing to use the new VideoCommon PP object.
Let's OpenGL's PostProcessing namespace be changed to a class inheriting from VideoCommon's PostProcessing class.
2014-08-13 01:05:15 -05:00
Ryan Houdek 6bdc32c54a Add the VideoCommon PostProcessing class.
This class loads all the common PP shader configuration options and passes those options through to a inherited class that OpenGL or D3D will have.
Makes it so all the common code for PP shaders is in VideoCommon instead of duplicating the code across each backend.
2014-08-13 01:05:10 -05:00
Lioncash bcd10bfda6 Software: Fix function casing in SWRenderer 2014-08-10 22:28:18 -04:00
Lioncash f9f46f33d6 Software: Fix some if-statement body placements 2014-08-10 22:28:17 -04:00
Lioncash 34eb0c6e1c Software: Fix over-indentation of SetupQuad() 2014-08-10 22:28:16 -04:00
Lioncash 4129cdeb4d Software: Apply static to some functions 2014-08-10 22:28:15 -04:00
Lioncash 568bdec598 Software: Fix function casing in TextureEncoder 2014-08-10 22:28:14 -04:00
Lioncash 2918f46d8b Software: Fix the formatting and function casing in Vec3.h 2014-08-10 22:28:04 -04:00
Lioncash 6625d9cba5 Software: Fix various brace styling errors 2014-08-10 21:18:38 -04:00
Lioncash b95d9b43de Software: Make an enum into a static constant in DebugUtil.cpp 2014-08-10 20:51:10 -04:00
Lioncash b050657322 Software: Make constants char_width and char_height private in RasterFont 2014-08-10 20:48:28 -04:00
Lioncash 6b49ddfec9 Software: Get rid of an unnecessary format string in SWmain.cpp 2014-08-10 04:38:12 -04: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
Pierre Bourdon 226a9c2392 Move GLInterface around to remove VideoBackends dependency on DolphinWX 2014-08-02 09:34:39 -07: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
degasus 5205d7baa6 ogl: fix rasterfont 2014-07-31 19:03:18 +02: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
Matthew Parlane a3ca3b0424 Merge pull request #696 from lioncash/more-forward-decls
Convert some more header inclusions into forward declarations
2014-07-30 13:53:48 +12:00
Lioncash b03c12764d Really get rid of the MSVC 2005 workaround completely 2014-07-29 21:20:43 -04:00
jimbo1qaz fe9b7fa4f3 Fix D3D Real XFB texture sampling. 2014-07-29 18:15:01 -07:00
Lioncash 522a5c35ad Convert some more header inclusions into forward declarations 2014-07-29 20:55:07 -04: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
Ryan Houdek bc9ef95643 Support Sampler binding in the shader.
In the cases where we support the binding layout keyword, use it for more than binding UBO location.
This changes it so it is supported for samplers as well.

Instances when this is enabled is if a device supports GL_ARB_shading_language_420pack, or if it supports GLES 3.10.
2014-07-18 17:04:03 -05: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
Pierre Bourdon 2fbdc03572 Merge pull request #642 from phire/vs-constants
VideoSoftware: Use the same max XFB size as VideoCommon.
2014-07-18 09:12:36 +02:00
Pierre Bourdon d44fc48295 SW: Call OnFrameEnd in the FifoPlayer XFB hack. Required to dump DFF frames. 2014-07-17 13:20:13 +02:00
Scott Mansell 2be83c13be VideoSoftware: Use the same max XFB size as VideoCommon.
And lets just use the same constant as videocommon, so if it ever
increases (again) VideoSoftware will be automatically updated.
2014-07-17 22:39:09 +12:00
Dolphin Bot 51dff5a74e Merge pull request #622 from phire/sw-fix-frame-dump
Fixed Frame dumping in VideoSoftware.
2014-07-17 02:04:03 +02:00
Scott Mansell 92eed47213 Fixed Frame dumping in VideoSoftware.
Old code dumped the efb, which was no-longer relevant since the
backend gained xfb support.
New code dumps the colour texture which is about to be rendered to
the screen so correctly reflects the bypassXFB option.
2014-07-17 11:43:59 +12:00
Jules Blok 3b978f7c27 Turn the FPSCounter namespace into a class. 2014-07-16 20:40:40 +02:00
Scott Mansell b8695a57da Fix incorrect clamping in SWRenderer.
A previous PR changed a whole lot of min/maxes to std::min/std::max
but made a mistake here and used a templated min which cast it's
arguments to unsigned instead of casting return value.

This resulted in glitchy artifacts in bright areas (See issue 7439)

I rewrote the code to use a proper clamping function so it's cleaner
to read.
2014-07-15 21:15:49 +12:00
Lioncash b66eb03b2f OGL: Correctly guard against array bounds of s_encodingPrograms
s_encodingPrograms is defined as an array with a length of 64
NUM_ENCODING_PROGRAMS is also defined as 64.

However 64 is out of bounds, so we want to be comparing for "equal to or
greater than here"
2014-07-14 00:48:14 -04:00
Tillmann Karras 0ccee6c87b Fix warnings unearthed by #579 2014-07-13 02:16:51 +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
degasus 6d3f249dcc mark all local variables as static 2014-07-11 16:10:20 +02:00
degasus 22e1aa5bb4 mark all local functions as static 2014-07-11 16:07:23 +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
Justin Chadwick 43dcbe0a73 Change the comments to be more detailed. 2014-07-04 08:00:49 -04:00
Justin Chadwick 30f93ab418 Place pinned memory as top priority 2014-07-03 20:35:13 -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 7db5a4b22d Statistics: Reformat stats string 2014-06-27 09:36:50 +02: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
Pierre Bourdon 5dff577339 Merge pull request #500 from lioncash/ini
Use only section-based ini reading.
2014-06-22 17:21:45 +02:00
Tony Wasserka d60f91ef5a Merge pull request #501 from magumagu/sw-cp-structs
VideoSoftware: remove duplicated CommandProcessor structures.
2014-06-21 22:23:19 +02:00
magumagu 8bf3ffc76f VideoSoftware: remove duplicated CommandProcessor structures. 2014-06-21 11:54:43 -07: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
degasus 027baad73b VideoCommon: use the Light struct in XF memory 2014-06-19 16:33:29 +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
Lioncash f05d3f6e5d Use only section-based ini reading. 2014-06-16 01:31:23 -04:00
Pierre Bourdon 020b4fde1e Merge pull request #492 from Armada651/master
Remove EmuWindow
2014-06-15 14:16:53 +02:00
Armada f2759ffe65 Remove EmuWindow.
All it did was raise complexity.
2014-06-15 00:49:49 +02:00
Tony Wasserka d7736ac714 Merge pull request #445 from magumagu/video-dead-code
Video backends: remove dead code.
2014-06-13 22:38:22 +02:00
Paul Olszewski 5d793881b0 Fix the capitalization of "GameCube" throughout the project. 2014-06-08 11:24:49 +09:00
Ryan Houdek d2e4c2fc50 Fix OpenGL ES version detection.
Mesa report GLES version as "3.0" not "3.00"
Spec mandates X.Y versioning scheme, doesn't say how long the decimal place must be.
2014-06-06 21:21:35 -05:00
degasus 9566dcf0da OGL: speed up the EFB cache
gcc doesn't optimize this loops with -O2, so using memset now.
A flag to skip the clear funktion was added as the cache is already cleared most of the time.
2014-06-05 14:53:09 +02:00
degasus d9eafd94a2 OGL-StreamBuffer: replace size_t with u32
Yes, this matters.
We align our buffer all the the time which needs a division. u64 divisions are just so slow.
2014-06-05 13:33:50 +02:00
degasus 606e46ba8d OGL-StreamBuffer: move alignment to caller
Only the caller know if alignment is needed at all, so it can be skipped now.
2014-06-05 13:32:13 +02:00
degasus 02a4e3d70f OGL-StreamBuffer: make the SLOT calculation much easier
The size of the buffer is now power of 2, so we can use a shift instead of a division.
This was at about 2% of the global CPU usage.
2014-06-05 13:32:13 +02:00
degasus d81d2e8915 OGL-StreamBuffer: allocate fences in StreamBuffer directly 2014-06-05 13:32:13 +02:00
degasus 0688cfdaef OGL-StreamBuffer: don't use coherent mapping
Coherent mapping seems to be much slower on fermi gpus.
2014-06-05 12:18:44 +02:00
magumagu 0aecd9504e Video backends: remove dead code. 2014-06-01 01:56:09 -07: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
shuffle2 b58753bd69 Merge pull request #370 from Sonicadvance1/remove_specialized_memcmp
Removes ZeroFrog's "optimized" memcpy and memcmp functions.
2014-05-22 13:02:11 -07:00
degasus c1b6fcc00b ogl: pixel format shader without resolving
v2: Don't use std::to_string as this function is broken on android.
2014-05-19 09:29:40 +02:00
degasus e150d307a6 ogl: use ARB_texture_multisample for msaa 2014-05-19 09:21:44 +02:00
degasus fab78c2dff ogl: add ARB_texture_multisample 2014-05-19 09:21:44 +02:00
degasus 775858b6bc ogl: drop NV_framebuffer_multisample_coverage 2014-05-19 09:21:44 +02:00
degasus afea848e3b ogl: drop csaa support 2014-05-19 09:21:44 +02:00
Tony Wasserka 6950f533ae Merge pull request #355 from magumagu/gx-missing-opcode
Opcode decoding: handle missing opcodes 0x88 etc.
2014-05-18 11:12:06 +02:00
Ryan Houdek a4bb0dafb4 Removes ZeroFrog's "optimized" memcpy and memcmp functions.
These were only compiled in on Windows and x86_32.
They provided "optimized" copies and compares based on blocksizes for the AMD Athlon and Duron CPU families.
The code was taken from something that AMD provides with a as-is license.
Just get rid of this crap.
2014-05-17 18:03:31 -05:00
Tony Wasserka fc34d5a130 Merge pull request #360 from magumagu/lighting-rounding
Video backends: fix rounding in lighting computation.
2014-05-17 21:06:31 +02:00
magumagu 9b82d72070 Video backends: warn on usage of GL_DRAW_QUADS_2.
It's not normally used, so if it shows up, it could indicate a CPU emulation
bug.
2014-05-17 11:55:32 -07:00
Tony Wasserka 0fac17da33 Merge pull request #269 from magumagu/swbackend-xfregisters
SW backend: use VideoCommon XFRegisters struct.
2014-05-17 10:40:57 +02:00
magumagu 1357277f40 Video backends: mass-replace "xfregs" with "xfmem". 2014-05-16 18:58:07 -07:00
magumagu 8f5342c442 Video backend: merge global var xfmem into xfregs.
There isn't really any reason to keep them separate.
2014-05-16 18:55:31 -07:00
magumagu 818c89313e Video backends: unify xfregs/xfmem structures.
Removes the duplicate swxfregs global variable/struct from the software
backend in favor of the ones from VideoCommon.
2014-05-16 18:55:30 -07:00
magumagu 8b82cea704 Video backends: fix behavior of "konst" TEV inputs.
Also fixes TEVCOLORARG_HALF.

Values verified to match hardwarere.
2014-05-16 12:19:35 -07:00
Tony Wasserka b8817267f4 Merge pull request #366 from Jezze/vertex
OGL/VertexManager: Remove unused variable.
2014-05-16 16:18:14 +02:00
Tony Wasserka 25e8dc0aed Merge pull request #354 from magumagu/gx-primitive-mask
Opcode decoding: 0xC0 isn't a valid command.
2014-05-16 15:59:59 +02:00
Jens Nyberg f742c5a057 OGL/VertexManager: Remove unnused m_CurrentVertexFmt 2014-05-13 23:59:08 +02:00
magumagu 9e4eeb3b9b Video backends: fix rounding in lighting computation.
For whatever reason, the hardware doesn't do a full divide by 255, but
instead uses an approximation with shifting, similar to the way it is done
in TEV.
2014-05-11 12:53:02 -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
magumagu 39d439fc48 Opcode decoding: handle missing opcodes 0x88 etc.
Hardware testing shows that they do the same thing as the 0x80 family of
opcodes: they draw quads.
2014-05-10 20:33:28 -07:00
magumagu 369c0c4ce2 Opcode decoding: 0xC0 isn't a valid command.
Fix our opcode decoders to handle this appropriately.
2014-05-08 15:49:19 -07:00
Tony Wasserka b4e1ac5f08 Merge pull request #185 from degasus/shader-cleanup
Shader cleanup
2014-05-06 11:37:11 +02:00
magumagu bca0b7b543 OpenGL: delete unused function parameter in TextureConverter.
(While I'm here, also mark some functions static.)
2014-05-05 10:56:36 -07:00
degasus 25b8edd2a6 ogl: fix signed vs unsigned comparison warning 2014-05-05 17:06:36 +02:00
Ryan Houdek 2d8cfb89d7 Changes posmtx vertex attribute to integer.
This makes it so we don't need to do some dumb casting from float to integer in our shaders.
Only tested in OpenGL, needs to be tested in D3D.
2014-04-30 19:11:06 -05:00
Ryan Houdek 99338daa8f Fixes glVertexAttribIPointer on GLES.
We need to pull in function pointers for OpenGL 3.0 in order to use glAttribIPointer.
This isn't too big of an issue, and this code will be gone in the future when we change over to libepoxy.
Just need to push code upstream to libepoxy to support Android with GLES and GL first.
2014-04-30 19:11:06 -05: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
Tony Wasserka fe65474cc4 Software renderer: Update a reference link. 2014-04-24 00:42:08 +02:00
Pierre Bourdon d8ca861fec Merge pull request #287 from Tilka/unused_variable
Fix "warning: unused variable 'skipFrames'"
2014-04-19 09:03:19 +02:00
Tillmann Karras d523d2002b Fix "warning: unused variable 'skipFrames'" 2014-04-19 04:59:37 +02:00