Commit Graph

2898 Commits

Author SHA1 Message Date
flacs b0bbe52cc9 Merge pull request #3164 from phire/samplerArrays
PixelShaderGen: Use arrays of texture samplers.
2015-10-12 18:44:14 +02:00
Tillmann Karras 9f8981c7c0 VertexLoaderUtils: remove simple wrapper functions 2015-10-11 23:40:50 +02:00
Scott Mansell 645e4cbbee PixelShaderGen: Use arrays of texture samplers. 2015-10-12 05:06:39 +13:00
Tillmann Karras 0f1b287402 Misc. style fixes 2015-10-10 17:44:42 +02:00
Rohit Nirmal 18f0831861 VideoCommon: Silence -Wsign-compare warnings. 2015-10-03 20:32:16 -05:00
shuffle2 81414b4fa2 Merge pull request #3076 from void-ghost/stereo3d_presets
Stereo3d presets
2015-10-03 18:10:23 -07:00
Lioncash 5464e698fc Merge pull request #3102 from rohit-n/build-pch
Fix building with PCH disabled.
2015-10-03 13:30:51 -04:00
Scott Mansell 58d893e56f Merge pull request #3075 from waddlesplash/no-regexp
FileSearch: Don't use RegExes, just do string comparisons.
2015-10-02 04:00:23 +13:00
flacs 696d6eae09 Merge pull request #3108 from lioncash/cstyle-array
ChunkFile: Provide additional helpers for C-style arrays
2015-10-01 01:55:54 +02:00
Lioncash c6678687b0 ChunkFile: Provide additional helpers for C-style arrays
Gets rid of magic numbers in cases where the array size is known at compile time.
This is also useful for future entries that are stack allocated arrays as these
functions prevent incorrect sizes being provided.
2015-09-30 19:45:46 -04:00
flacs 16957fcaec Merge pull request #3107 from lioncash/pragma
TextureDecoder_x64: Remove now-unnecessary clang #pragma warning suppression
2015-09-29 19:53:12 +02:00
Lioncash 50a7390622 TextureDecoder_x64: Remove unnecessary commented out header 2015-09-29 11:04:00 -04:00
Lioncash 80c7e3ebc0 TextureDecoder_x64: Remove clang warning suppression
This was an issue two years ago on clang 3.3
2015-09-29 11:00:59 -04:00
Lioncash 4a981e3a04 FPSCounter: Change Update's return type to void
Its returned value is never used.
2015-09-29 10:01:37 -04:00
Lioncash 55c7754738 FPSCounter: Give the refresh interval a concrete type 2015-09-29 10:01:37 -04:00
Lioncash e82b6a8532 FPSCounter: Direct initialize class members 2015-09-29 10:01:37 -04:00
Lioncash bf23fcfc1f FPSCounter: Don't provide direct access to m_fps 2015-09-29 09:43:03 -04:00
Rohit Nirmal 3b75f45cf6 Fix building with PCH disabled. 2015-09-28 11:51:08 -05:00
waddlesplash 5643fe5d1f FileSearch: Don't use RegExs, just do string comparisons.
Nothing used the RegEx feature of FileSearch, and GCC < 4.9
doesn't support C++11 RegEx properly, so get rid of it.
2015-09-27 13:25:51 -04:00
Scott Mansell af327aec79 Merge pull request #3036 from mimimi085181/hash-respecting-stride
Respect the stride for efb copies when hashing them
2015-09-28 05:23:55 +13:00
flacs 8ea9b07b59 Merge pull request #3093 from lioncash/header_shuffle
Common: Trim Common.h
2015-09-27 03:18:03 +02:00
Lioncash cc036ca86c Common: Remove other Common prefixed headers from Common.h 2015-09-26 18:51:58 -04:00
Lioncash 1d42db2439 Common: Move NonCopyable to its own header 2015-09-26 18:50:35 -04:00
mimimi085181 e24b8c4ab7 Respect the stride for efb copies when hashing them 2015-09-26 20:19:02 +02:00
Ryan Houdek be667e7de8 Merge pull request #3035 from aserna3/SSAAImprovements
Improved OGL and D3D's AA options in UI
2015-09-26 09:27:39 -04:00
Anthony Serna df189c3ea3 Improved D3D and OGL AA option UI
Removed Quality Levels from D3D AA options

Dropdown text now shows whether you're applying MSAA or SSAA

Added a description for SSAA

Moved SSAA checkbox

Cleaned up AA in backends slightly. Supported modes is now a list of ints.
2015-09-25 09:05:18 -07:00
Lioncash 7e69a0ce79 CommandProcessor: Remove unused extern 2015-09-24 11:35:46 -04:00
ghost 7c1565b201 VideoConfig/LocalConfig/HotkeyManager: Added hotkeys for switching stereo-3d presets.
Added 3 depth/convergence presets. They are adjustable via (existing) hotkeys - changes to depth and convergence are applied to current preset.
Added 3 hotkeys for activating presets. Added hotkey for toggle between first and second preset.
Added OSD message for convergence/depth changes.
Presets are saved into per-game configs.
2015-09-24 15:19:55 +03:00
Lioncash d694994874 BoundingBox: Remove unnecessary headers 2015-09-24 03:19:43 -04:00
Rohit Nirmal a48e425f41 Silence -Wshadow warning. 2015-09-23 11:02:24 -05:00
Lioncash 213d11dc62 Merge pull request #2939 from lioncash/find
FramebufferManagerBase: Compress a loop into a find_if
2015-09-22 18:56:38 -04:00
Scott Mansell a355d9868e FifoRecorder: Use Video Common to record efb2ram correctly.
Texture updates have been moved into TextureCache, while
TMEM updates where moved into bpmem. Code for handling
efb2ram updates was added to TextureCache.

There was a bug for preloaded RGBA8 textures, it only copied
half the texture. The TODO was wrong too.
2015-09-22 23:59:16 +12:00
ghost 07e4b4f7c4 VideoBackend: Video config filename is now exposed in VideoBackends.
It reduces redundancy. Needed make possible to save current video config.
2015-09-22 09:47:19 +03:00
Scott Mansell b6cd78a370 VideoBackendBase: Remove check for XP. 2015-09-19 07:10:44 +12:00
Lioncash 28d1001ff8 VertexLoaderUtils: Get rid of pointer casts
Eliminates most ubsan asserts that stem from VideoCommon when running starfield.
2015-09-17 14:24:11 -04:00
Markus Wick 295b869304 Merge pull request #3028 from mimimi085181/sonic-fighters-regression-fix2
Fix performance regression in Sonic the Fighters, introduced by PR#2001
2015-09-16 21:53:03 +02:00
Lioncash b7739f5d85 VideoCommon: Remove unnecessary enum typedef 2015-09-14 19:43:31 -04:00
mimimi085181 dd458b554d Fix performance regression in Sonic the Fighters, introduced by PR#2001 2015-09-12 09:12:14 +02:00
Lioncash baa9eacd51 LookUpTables: Make functions constexpr 2015-09-12 03:04:40 -04:00
Ryan Houdek 6d9b4d7d35 Merge pull request #3025 from Tilka/fixfix
VertexLoaderX64: fix 2GB warnings
2015-09-12 01:38:14 -04:00
Scott Mansell 68b415ba87 Merge pull request #3019 from mimimi085181/store-base-hash
Store the base hash for paletted textures in the texture cache entries
2015-09-12 16:24:29 +12:00
Tillmann Karras 63c9fdd074 VertexLoaderX64: fix 2GB warnings
Unlike the CPU JIT, the vertex loader JIT already emits
position-independent code, so all we need to do is disable the warning.
2015-09-12 01:24:47 +02:00
flacs c5685ba53a Merge pull request #2972 from lioncash/align
General: Replace GC_ALIGN macros with alignas
2015-09-11 17:00:13 +00:00
Lioncash 19459e827f Partially revert "General: Toss out PRI macro usage" 2015-09-11 09:49:00 -04:00
mimimi085181 e408e0ab17 Store the base hash for paletted textures in the texture cache entries 2015-09-10 22:28:59 +02:00
Ryan Houdek 3014feedc8 Merge pull request #3012 from degasus/destAlpha
VideoCommon: Drop "Disable destAlpha" hack
2015-09-10 13:56:43 -04:00
mimimi085181 38f6cf2089 Perform garbage collection for efb copies
This checks every TEXTURE_KILL_THRESHOLD frames, to see if the hash for the memory area of the efb copy has hanged. If it has changed, the efb copy can be removed, it wouldn't be used anymore. Before this pr, some efb copies would never be deleted.

Fixes issue https://bugs.dolphin-emu.org/issues/6101 and possibly some other VRAM leaks.
2015-09-10 11:58:58 +02:00
degasus 74b20e627c VideoCommon: Drop "Disable destAlpha" hack
This option has no use any more, neither performance nor driver workaround.
2015-09-09 21:31:54 +02:00
Scott Mansell 1f800b80dd Merge pull request #2960 from phire/improve_efb2tex
Make efb2tex behave much more like efb2ram.
2015-09-07 14:12:03 +12:00
degasus 1c0366993a VideoBackends: Reimplement SSAA, now for D3D + OGL 2015-09-06 19:40:00 +02:00
Scott Mansell ac467d9fb9 FifoPlayer: Don't check efb copy hashes when plaing back a broken dff 2015-09-07 05:20:25 +12:00
Lioncash 8ce04f9a65 General: Replace GC_ALIGN macros with alignas
Standard supported alignment -> out with compiler-specific.
2015-09-06 12:53:51 -04:00
Scott Mansell bda964e0b9 Workaround to allow partial texture updates to keep working in NSMBWii 2015-09-07 02:32:01 +12:00
Scott Mansell ee649c6d9f Make efb2tex behave more like efb2ram.
Instead of having special case code for efb2tex that ignores hashes,
the only diffence between efb2tex and efb2ram now is that efb2tex
writes zeros to the memory instead of actual texture data.

Though keep in mind, all efb2tex copies will have hashes of zero as
their hash.
2015-09-07 02:32:01 +12:00
Scott Mansell c08a83a5aa Merge pull request #2957 from phire/unify_efbcopy
Cleanup and unify efb copy implemtations into VideoCommon
2015-09-07 00:10:42 +12:00
Scott Mansell d797b5d0b5 Use ROUND_UP instead of custom bittwiddling. 2015-09-06 23:00:17 +12:00
Scott Mansell e745748c3e Improve comments for texture formats enum. 2015-09-06 21:16:51 +12:00
Scott Mansell b9be3245e1 Move common EFB copy code into VideoCommon
Addded a few duplicated depth copy texture formats to the enum
in TextureDecoder.h. These texture formats were already implemented
in TextureCacheBase and the ogl/dx11 texture cache implementations.
2015-09-06 21:16:51 +12:00
Scott Mansell be4caa3dc0 Merge pull request #2961 from lioncash/printf
General: Toss out PRI macro usage
2015-09-06 21:02:22 +12:00
comex 96e42dff52 Merge pull request #2977 from lioncash/unused
General: Remove unimplemented function prototypes
2015-09-05 22:20:47 -04:00
Lioncash 633be0387d General: Remove unimplemented function prototypes 2015-09-05 22:01:07 -04:00
Lioncash 8fdb013d54 General: Toss out PRI macro usage
Now that VS supports more printf specifiers, these aren't necessary
2015-09-05 16:02:35 -04:00
Markus Wick 60e0339ae5 Merge pull request #2963 from Sonicadvance1/AArch64_improved_vertexloader
[AArch64] Minor improves to the vertex loader JIT
2015-09-05 15:44:52 +02:00
Scott Mansell 52948bb3ef Cleanup and unify handling of efb copy stride. 2015-09-05 23:37:24 +12:00
Ryan Houdek 7650117c26 Properly support MSAA and SSAA as separate features(+GLES)
SSAA relies on MSAA being active to work. We only supports 4x SSAA while in fact you can enable SSAA at any MSAA level.
I even managed to run 64xMSAA + SSAA on my Quadro which made some pretty sleek looking games. They were very cinematic though.

With this, it properly fixes up SSAA and MSAA support in GLES as well. Before they were broken when stereo rendering was enabled.
Now in GLES they can properly support MSAA and also stereo rendering with MSAA enabled(with proper extensions).
2015-09-05 05:23:29 -05:00
Ryan Houdek 9618738278 Remove all of our workarounds for Qualcomm devices we don't support anymore. 2015-09-04 23:45:35 -05:00
Ryan Houdek c458c9d049 [AArch64] Minor improves to the vertex loader JIT
Just some minor improvements noticed by dumping the vertex loader blocks.
2015-09-04 19:57:08 -05:00
Lioncash e90eb17aeb Merge pull request #2956 from JosJuice/extra-space
Remove extra space from 5a32c3f
2015-09-04 14:22:59 -04:00
JosJuice 0af2bbcea3 Remove extra space from 5a32c3f 2015-09-04 15:32:30 +02:00
Lioncash a11ae2cf30 CommonFuncs: Remove SLEEP macro
There's already a function in Thread for this.
2015-09-04 02:43:38 -04:00
Shawn Hoffman aa7208e270 [windows] Update projects to vs2015. 2015-09-03 04:23:01 -07:00
booto 5a32c3fba4 VideoCommon: xfb height calculation adjusted
Baten Kaitos allocates its XFBs from a tagged heap
structure. With the old calculation, too many lines
were being written so the tag of the allocation
after the XFB was being corrupted. Fixes crash
mentioned in this comment:
https://code.google.com/p/dolphin-emu/issues/detail?id=7734#c6
2015-09-03 03:57:03 +08:00
Scott Mansell ecbb83fa0f Merge pull request #2686 from booto/field-timing
VI: derive field timing from VI registers
2015-09-03 01:09:43 +12:00
Markus Wick 66e9395d5d Merge pull request #2937 from lioncash/enums
VideoCommon: Convert some defines into enums
2015-09-02 13:27:09 +02:00
Lioncash 401f765462 FramebufferManagerBase: Compress a loop into a find_if 2015-09-01 16:54:44 -04:00
Rohit Nirmal 9c26bb0e17 Fix building with PCH disabled. 2015-09-01 13:45:23 -05:00
Lioncash 71ef0a0245 PixelShaderGen: Use spaces instead of tabs for vertical alignment 2015-09-01 12:20:50 -04:00
Lioncash 91eff28699 PixelShaderGen: Move defines into the implementation file
These aren't used outside of it. This also reduces the amount of things in
the global namespace.
2015-09-01 12:18:18 -04:00
Lioncash c760ffbd28 BPMemory/XFMemory: Convert defines to enums
These actually convey a concrete type, as well as also providing a
symbolic constant during debugging.
2015-09-01 12:07:10 -04:00
booto acc9a74174 VI: Restore forced-progressive hack with option
Bugfix: TargetRefreshRate uses rounded result
NTSC's 59.94 was becoming 59 with integer division.
2015-09-01 20:24:40 +08:00
booto 480dbb22f2 VI: derive field timing from VI registers 2015-09-01 20:24:40 +08:00
Lioncash f7e22c8126 VertexLoader_Color: Mark translation-unit-local functions static 2015-08-31 17:31:23 -04:00
Lioncash ec42be79f3 VertexLoader_Color: Get rid of some pointer casts 2015-08-31 17:31:11 -04:00
Markus Wick a16669231a Merge pull request #2917 from Sonicadvance1/android_fix_sgs6
[Android] Workaround Mali driver issue on the Samsung Galaxy S6.
2015-08-29 08:56:32 +02:00
Rohit Nirmal 6252d2d71a Fix building with PCH disabled. 2015-08-28 14:13:28 -05:00
Markus Wick b11de5bddb Merge pull request #2918 from lioncash/memcpy
DataReader: Get rid of pointer casts
2015-08-28 20:45:15 +02:00
Ryan Houdek 01db003779 [Android] Workaround Mali driver issue on the Samsung Galaxy S6.
Samsung updated the video drivers on the SGS6 which introduced a bug when disabling vsync.
Both the driver versions are r5p0, but the md5sums of the blob differ.
To work around the issue, make sure to never disable vsync by calling eglSwapInterval.

We can't actually determine the driver version on Android yet.
So until the driver version lands that displays the driver version string in the GL_VERSION string
we will need to keep this workaround enabled at all times, which is a bit annoying.

Current mali drivers return the video driver version in one of the EGL strings you can query.
The issue with that is that Android eats all of those strings, so we can't query it.
2015-08-28 09:02:46 -05:00
flacs d373dd372d Merge pull request #2913 from Tilka/fix_warning_fix
AVIDump: fix -Wsign-compare warning
2015-08-27 23:50:34 +02:00
Lioncash 4fb3a8b78d DataReader: Get rid of pointer casts 2015-08-27 13:43:04 -04:00
Tillmann Karras ee4a12ffe2 Jit64: some byte-swapping changes 2015-08-26 05:41:18 +02:00
Ryan Houdek cd03b8baf6 Merge pull request #2895 from Sonicadvance1/qualcomm_workaround_gles31
Disable OpenGL ES 3.1 on all Qualcomm Adreno devices.
2015-08-24 13:22:12 -05:00
Ryan Houdek cc3fb7e7b4 Merge pull request #2883 from degasus/master
Profiler: Sort output by total time
2015-08-22 17:52:54 -05:00
Ryan Houdek b4e4a4cef4 Disable OpenGL ES 3.1 on all Qualcomm Adreno devices.
Their new driver that supports GLES3.1 + AEP has issues with it.
At the very least they don't implement all of the geometry shader features fully which causes shader linker issues when we attempt to use them.
I don't have a device so I can't fully test, so until I do I'm going to blanket disable the whole thing.
2015-08-22 09:12:19 -05:00
Ryan Houdek 3242e1a617 Fix the shader overrunning our max shader size.
The Star Wars games really push the hardware to its limits, which can cause the shaders that are produced to be 18kb or more.
Double our maximum shader size to compensate.
Fixes issue #8860
2015-08-22 01:01:03 -05:00
Tillmann Karras 39ced2a2d7 AVIDump: fix -Wsign-compare warning
Cast the other side of the comparison to avoid a warning with newer
ffmpeg/libav versions (cb3591e69738c808d26ba15eb02414fedfcd91cc).
2015-08-21 10:26:35 +02:00
degasus 17932935d9 Profiler: Sort output by total time 2015-08-20 11:50:43 +02:00
Markus Wick cb264df64c Merge pull request #2874 from barat/master
VideoCommon: Allow more Ram for HiresTexture if system memory is over 4GB
2015-08-20 11:08:42 +02:00
Bartosz Telesiński a52aaf22ba VideoCommon: Allow more Ram for HiresTexture if system memory is over 4GB 2015-08-19 23:13:09 +02:00
Dominic Chen 09714f86c3 Fix some compilation warnings 2015-08-19 11:07:54 -04:00
Markus Wick ff95fa8a6d Merge pull request #2861 from lioncash/param
VideoCommon: Remove unused parameters
2015-08-17 15:02:44 +02:00
Lioncash 8e17c710f3 TextureConversionShader: Remove an unused parameter 2015-08-16 21:10:54 -04:00
Lioncash 0e41b973c7 VertexShaderManager: Remove unused parameter 2015-08-16 21:07:10 -04:00
Jules Blok b01ca1794a Revert "VideoCommon: Clamp integer conversions."
This reverts commit 0f2c72f0f8.
2015-08-15 13:50:43 +02:00
degasus d3cf4034de DriverDetails: Disable GL_ARB_copy_image on mesa. 2015-08-06 19:41:36 +02:00
degasus e2f42f8fd0 OGL: Move copy_image variable into backend. 2015-08-06 19:41:36 +02:00
Scott Mansell a1df1f5ae4 Widescreen Heuristic: Cleanup code. 2015-08-01 14:39:34 +12:00
Scott Mansell 615e5db0cb Make the GameCube game widescreen heuristic smarter.
The last heuristic wasn't quite smart enough and had a few
false positives in Mario Kart: Double Dash and Metroid prime 2.

Now we only activate if the game is rendering a 16:9
projection to a 4:3 viewport.
2015-08-01 13:21:53 +12:00
unknown 739ede2242 Fix code to comply with coding style 2015-07-31 20:00:36 -04:00
mirrorbender 0faba3b018 Changed the aspect ratio settings to account for NTSC/PAL pixel aspect ratios and VI scaling. 2015-07-31 19:58:02 -04:00
Scott Mansell 567d0b20fa Merge pull request #2769 from phire/autodetect_widescreen
Heuristic to detect if a gamecube game is rendering 16:9 widescreen.
2015-07-29 18:23:35 +12:00
booto 86dce8b0f7 VideoCommon: reduce level of debug output 2015-07-27 10:22:40 +08:00
Scott Mansell bb60bcc42d Heuristic to detect if a gamecube game is rendering 16:9 widescreen.
Someone suggested on IRC that we should make a database of memory
locations in GameCube games which contain the 'Widescreen' setting
so we can automatically detect if the game is in 4:3 or 16:9 mode.

But that's hardly optimal, when the game actually tells the gpu
what aspect ratio to render in. 10 min and 6 lines of code later,
this is the result. Not only does it detect the correct aspect ratio
it does so on the fly.

I'm a little suprised nobody thought about doing this before.
2015-07-27 10:40:41 +12:00
booto 9d055ba5f2 Video: Trying to fix D3D/XFB disabled regression 2015-07-26 00:59:00 +08:00
booto efd250494d Video: stride in bytes rather than pixels 2015-07-25 02:48:56 +08:00
booto c43ae67b3b RealXFB sizes don't get scaled by IR
When calculating the size of the undisplayed margin in the case where
fbWidth != fbStride for RealXFB for displaying in the output window,
we do not scale by IR - RealXFB is implicitly 1x.
2015-07-25 01:52:13 +08:00
booto 2e28ed3291 Video: respect stride of efb copies to xfb 2015-07-25 01:52:12 +08:00
Ryan Houdek 8bd108426e Merge pull request #2759 from Sonicadvance1/pvr_workaround2
Work around PowerVR's shader compiler.
2015-07-22 16:51:48 -05:00
Ryan Houdek 6ee5ce32cf Merge pull request #2757 from Sonicadvance1/pvr_workaround
Work around slow glBufferSubData on PowerVR.
2015-07-22 16:48:40 -05:00
Markus Wick 6bcdae616b Merge pull request #2679 from Tinob/master
Implement scaled partial texture updates
2015-07-22 19:04:04 +02:00
Ryan Houdek c1df6d7b4e Work around PowerVR's shader compiler.
This bug has been reported to IMGTec at https://pvrsupport.imgtec.com/ticket/472

The basic idea of the bug is that if you're doing a bitwise and  of a constant value vector with a constant scalar value, this causes PowerVR's shader
compiler to fail out with a very non-descriptive message.
Working around the issue by making the value a vector that it is being masked by.
2015-07-20 22:04:16 -05:00
Ryan Houdek 012a9afdb6 Work around slow glBufferSubData on PowerVR.
As with all tiled renderers, glBufferSubData is terribly slow.
Use glBufferData as typical.
2015-07-20 22:02:58 -05:00
Justin Chadwick b3a0b6def4 Disables assert messages that seem to be invalid. 2015-07-08 16:12:32 -04:00
Markus Wick f6766dd347 Merge pull request #2722 from lioncash/statement
VertexLoaderBase: Adjust the scope of a boolean variable
2015-07-08 09:37:06 +02:00
Tillmann Karras 2559a6f25c VertexLoader: avoid empty lines in perf-$pid.map 2015-07-08 07:17:28 +02:00
Lioncash df379dabae VertexLoaderBase: Adjust the scope of a boolean variable
if a or b do actually turn out to be null, this can cause a null pointer dereference.
2015-07-07 18:33:58 -04:00
Rodolfo Bogado d8cd2c3252 Implement scaled partial texture updates 2015-07-02 08:53:40 -03:00
Lioncash daa205990f Use emplace() instead of insert() where applicable for maps. 2015-06-28 19:52:40 -04:00
Jules Blok 75a9740ab7 Merge branch 'stable' 2015-06-25 12:24:15 +02:00
Ryan Houdek 521f6e89c3 Merge pull request #2624 from sigmabeta/android-save-screenshot
Android: Save screenshot at end of an emulation session.
2015-06-24 21:39:47 -05:00
Jules Blok dbfdbf7dbd D3D: Cosmetics.
Merge two cases which should've already been merged.
2015-06-24 23:16:53 +02:00
Jules Blok 2a5dd69c72 Merge branch 'stable' 2015-06-24 19:34:16 +02:00
mimimi085181 829fc3dc2d Quick fix for an invalid iterator 2015-06-24 19:12:46 +02:00
Markus Wick 8493feb89f Merge pull request #2602 from mimimi085181/partial-texture-updates2
Support partial texture updates via efb copies
2015-06-24 09:22:50 +02:00
sigmabeta a028805626 Android: Save screenshot at end of an emulation session. 2015-06-23 22:22:01 -04:00
degasus 5bc88d5c6a Revert "GeometryShaderGen: Don't use `centroid in` for input variables."
This reverts commit 4cbaddb7ad.
2015-06-22 17:20:41 +02:00
mimimi085181 0ed6b5623f Support partial texture updates via efb copies 2015-06-21 14:02:44 +02:00
Ryan Houdek a811370329 [AArch64] Fix a couple of bugs in the vertex loader
In particular this fixes the 6666 colour format
We were loading from the wrong location and it was causing /terrible/ colour changes.

This also fixes a bug in the all the colour formats(except 888) where the unaligned path was loading in to the wrong register.
2015-06-20 21:12:31 -05:00
flacs a702c4e01e Merge pull request #2629 from lioncash/vertexloader-ifdef
VertexLoader: Remove the LOADERDECL define.
2015-06-21 03:17:38 +02:00
Lioncash 619e333dcc VertexLoader: Remove the LOADERDECL define.
These functions aren't called from jitted code anymore so it isn't necessary.
2015-06-20 20:52:54 -04:00
Lioncash cfead69f67 RenderBase: Remove an unused variable 2015-06-19 20:30:29 -04:00
Lioncash 4c79aa8216 HiresTextures: Remove unused variable 2015-06-19 17:31:04 -04:00
degasus dd2183dbb5 Revert "GeometryShaderGen: Don't use `centroid in` for input variables."
This reverts commit 4cbaddb7ad.
2015-06-18 20:25:32 +02:00
Jeffrey Pfau 7085fcc8d6 Fix FreeBSD build 2015-06-13 21:52:47 -07:00
Jules Blok 4042945ee5 Merge branch 'stable' 2015-06-13 01:12:12 +02:00
degasus c375111076 Options: merge SCoreStartupParameter into SConfig 2015-06-12 19:07:45 +02:00
Markus Wick be1d1e2798 Merge pull request #2024 from RisingFog/irgui
Add UI Support for up to 8x Internal Resolutions
2015-06-11 15:47:39 +02:00
Fog 6e7fedd4d0 Add UI Support for up to 8x Internal Resolutions 2015-06-10 20:17:30 -04:00
degasus 20ec5867ec GameIni: Remove default Projection Hack 2015-06-10 19:31:10 +02:00
Jules Blok fd637030e4 GeometryShaderGen: Consistently use xfmem just as the vertex shader.
There are very rare conditions in which xfmem can actually desync from bpmem.
2015-06-10 16:13:54 +02:00
Jules Blok 4cbaddb7ad GeometryShaderGen: Don't use `centroid in` for input variables. 2015-06-10 16:04:32 +02:00
mimimi085181 4d5fdb74be Code cleanup for FreeTexture after merging PR #2097 2015-06-09 21:45:09 +02:00
Markus Wick e47e4c677a Merge pull request #2097 from mimimi085181/find-textures-by-hash
Search the texture cache for small textures by address and hash
2015-06-09 10:12:05 +02:00
Jules Blok d5788f75a3 Merge pull request #2533 from degasus/syncgpu
Fifo: Rewrite SyncGPU
2015-06-09 09:43:26 +02:00
NanoByte011 06d1b8c63a VideoSW: rewrite lighting attenuation
- Fixes remaining lighting issues (Mario Tennis, etc)
- Apply same fixes to Software Renderer
- Corrected zero length light direction vector to resolve with normal direction (essentially becomes LIGHTDIF_NONE which was what I was after)
2015-06-08 23:20:27 +02:00
degasus d31bed8b79 Fifo: Rewrite SyncGpu
The new implementation has 3 options:
 SyncGpuMaxDistance
 SyncGpuMinDistance
 SyncGpuOverclock

The MaxDistance controlls how many CPU cycles the CPU is allowed to be in front
of the GPU. Too low values will slow down extremly, too high values are as
unsynchronized and half of the games will crash.
The -MinDistance (negative) set how many cycles the GPU is allowed to be in
front of the CPU. As we are used to emulate an infinitiv fast GPU, this may be
set to any high (negative) number.

The last parameter is to hack a faster (>1.0) or slower(<1.0) GPU. As we don't
emulate GPU timing very well (eg skip the timings of the pixel stage completely),
an overclock factor of ~0.5 is often much more accurate than 1.0
2015-06-08 23:16:24 +02:00
comex 5c7caf1f22 Merge pull request #2517 from comex/netplay-timebase-rb
[rebased] Compare timebase of netplay users to detect desyncs.
2015-06-07 17:47:53 -07:00
Ryan Houdek 10bd68936c [AArch64] Implement ZFreeze cache 2015-06-07 12:13:01 +02:00
Tillmann Karras 5ddd2cef6c zfreeze: cache vertex positions
Suggested by degasus.
2015-06-07 12:13:00 +02:00
Tillmann Karras 9e2f4dd7da VertexLoaderX64: revert 9da86092ae
I can't reproduce that it's actually faster and it will definitely be
slower with position caching for zfreeze.
2015-06-07 12:13:00 +02:00
comex 9c63b78397 Fix indeterminism in GPU thread mode. 2015-06-06 02:14:06 -04:00
Jules Blok ef1dfa8bcb VideoBackends: Allow the viewport to use the full depth range. 2015-06-06 03:37:46 +02:00
mimimi085181 3b9020dc9b Search the texture cache for small textures by address and hash
This fixes issue 6563:
https://code.google.com/p/dolphin-emu/issues/detail?id=6563

This PR adds a 2nd map to texture cache, which uses the hash as key. Cache entries from this new map are used only if the address matches or if the texture was fully hashed. This restriction avoids false positive cache hits. This results in a possible situation where safe texture cache accuracy could be faster than the fast one.

Small textures means up to 1KB for fast texture cache accuracy, 4KB for medium, and all textures for safe accuracy.

Since this adds a small overhead to all texture cache handling, some regression testing would be nice. Games, which use a lot of textures the same time, should be affected the most.
2015-06-05 21:30:39 +02:00
comex 78e0e78671 Merge pull request #2516 from comex/hires-oops
Undo accidental screwup of some HiresTextures code from project-moration
2015-06-04 16:13:05 -04:00
JosJuice 95a2abc1ce Use PanicAlertT instead of PanicAlert when appropriate
I tried to change messages that contained instructions for users,
while avoiding messages that are so technical that most users
wouldn't understand them even if they were in the right language.
2015-06-04 13:25:06 +02:00
comex 830a4e4f8f Undo accidental screwup of some HiresTextures code from project-moration.
This is why I should wait for people to review, even if I get annoyed
that nobody seems to care. :duncecap:
2015-06-04 02:52:41 -04:00
Tillmann Karras 7a6a5e2791 VertexLoaderX64: generate PIC
Address static memory relative to a base register, analog to what we're
doing with PPCSTATE in the CPU JIT. This allows executable memory for
the vertex loader JIT to be allocated anywhere, not just within 2 GiB of
static data.

Fixes issue 8180.
2015-06-03 02:27:37 +02:00
comex 0c5aa54606 Merge pull request #2470 from degasus/syncgpu
Common: Blocking Loop (extracted from Fifo.cpp)
2015-06-02 20:19:00 -04:00
comex a3b3f0522b Merge pull request #1556 from comex/project-moration
Rudimentary version of Wii IPC determinism.  Ported from my old udpnet branch.
2015-06-02 18:38:19 -04:00
Markus Wick aa2576a2c7 Merge pull request #2480 from phire/GamesDoWeirdShit
Fix invalid pointer errors in Burnout 2.
2015-05-31 23:26:55 +02:00
flacs a806feb10e Merge pull request #2474 from Tilka/zfreeze
zfreeze: fix 2-component positions
2015-05-31 06:35:21 +02:00
degasus bfa61105d5 Common: Update BlockingLoop to only use one atomic.
This merges two atomic<bool> into one atomic<int>.
We did move the bit from one bool to another, now we can use operator--.
2015-05-30 12:58:09 +02:00
degasus 02a3a063c3 Fifo: Extract syncing loop
It's now a new helper function within common.
2015-05-30 12:58:09 +02:00
Scott Mansell 7df6982973 Add a dirty flag for arraybases.
Only loop through and call getPointers when something has actually
changed.
Worth about 2-4% speedup un SMG over the previous commit.
2015-05-30 04:39:48 +12:00
Scott Mansell f57517f1a0 Clean up cached_arraybases. Update VideoSW to new scheme.
Move ownership of cached_arraybases from CPMemory to VertexLoaderManager
to better match it usage.
2015-05-30 04:09:27 +12:00
Tillmann Karras 4943b36259 zfreeze: fix 2-component positions 2015-05-29 13:43:12 +02:00
Scott Mansell 6d916762fb Fix invalid pointer errors in Burnout 2.
Yet another story of games loading weird shit into registers.

For some reason, Burnout 2 would (in rare situations) load invalid
addresses into cp_state.array_bases. What would the real hardware
do in this situation? Who knows, Burnout 2 doesn't actually enable
the vertex array with the invalid address so nothing kinky happens.

But dolphin tries to optimise things and starts using the address
as soon as it is loaded into memory. This causes GetPointer (which is
now much more vocal) to throw an error.

The Fix:  We don't call GetPointer until we are sure the vertex array
has been enabled.
2015-05-29 18:51:17 +12:00
Ryan Houdek cdbdff436b Merge pull request #2478 from degasus/fix_prefetching
HiresTexture: Fix prefetching with broken textures
2015-05-29 01:42:48 -04:00
degasus c69cc91f00 HiresTexture: Fix prefetching with broken textures 2015-05-29 07:31:11 +02:00
Lioncash ac26f8e79f Pass strings by const reference where possible 2015-05-28 20:54:55 -04:00
comex a225426510 Rewrite FileSearch and improve ScanDirectoryTree.
- FileSearch is now just one function, and it converts the original glob
  into a regex on all platforms rather than relying on native Windows
  pattern matching on there and a complete hack elsewhere.  It now
  supports recursion out of the box rather than manually expanding
  into a full list of directories in multiple call sites.

  - This adds a GCC >= 4.9 dependency due to older versions having
  outright broken <regex>.  MSVC is fine with it.

- ScanDirectoryTree returns the parent entry rather than filling parts
  of it in via reference.  The count is now stored in the entry like it
  was for subdirectories.

- .glsl file search is now done with DoFileSearch.

- IOCTLV_READ_DIR now uses ScanDirectoryTree directly and sorts the
  results after replacements for better determinism.
2015-05-28 19:14:42 -04:00
Lioncash 1ba3b4e7ac CommandProcessor: Replace volatile usages with atomics
Also remove said variables from being globals.
2015-05-27 03:53:29 -04:00
Lioncash ec03196267 PixelEngine: Replace volatile usages with atomics
Also removes two unused volatile variables.
2015-05-27 02:39:55 -04:00
Markus Wick a6b327751a Merge pull request #2463 from lioncash/fifo
Fifo: Replace usages of volatile with atomics
2015-05-27 08:03:39 +02:00
Lioncash 4cb55cc427 Fifo: Replace usages of volatile with atomics 2015-05-27 00:42:56 -04:00
Matthew Parlane 3135b4f3e4 Merge pull request #2461 from lioncash/barrier
Thread: Remove unused Barrier class
2015-05-27 13:21:14 +10:00
Lioncash 23c11b3f27 Thread: Remove unused Barrier class 2015-05-26 19:25:59 -04:00
galop1n 2975e53091 D3D: Depth range inversion.
Credits go to Galop1n for designing this technique and to BhaaLseN for cleaning up the commit.
2015-05-26 15:31:31 +02:00
Markus Wick a6412fb41e Merge pull request #2162 from degasus/prefetch_tex
CustomTexture: prefetch all available textures
2015-05-26 13:30:26 +02:00
Ryan Houdek 061848457a Merge pull request #2382 from RisingFog/vfwfix
Fix video dumping incorrect lengths for some games in Windows
2015-05-25 23:46:22 -04:00
Ryan Houdek dad5d8e13d Merge pull request #2357 from degasus/ogl_efb_poke_merge
ogl: efb poke merge
2015-05-25 23:26:39 -04:00
Ryan Houdek 69963dc4b0 Merge pull request #2274 from degasus/disable_bbox
Disable bbox
2015-05-25 08:46:12 -04:00
Tillmann Karras 30ebb2459e Set copyright year to when a file was created 2015-05-25 13:22:31 +02:00
Tillmann Karras cefcb0ace9 Update license headers to GPLv2+ 2015-05-25 13:22:31 +02:00
Tillmann Karras 268f52e054 Add missing license headers 2015-05-25 13:11:47 +02:00
degasus 7e127da791 VideoCommon: Warn if bbox is disabled but used 2015-05-25 09:33:34 +02:00
degasus 029912681e VideoCommon: return 0 if bbox is disabled
Through just returning the last written value sounds better, this crashes Paper Mario.
In my opinion, gfx issues are fine on older GPUs, but crashes should not happen.
2015-05-25 09:33:34 +02:00
degasus 6b2a1e57e2 BBox: remove now unreachable SW bbox implementation 2015-05-25 09:33:34 +02:00
degasus acd074e291 VideoCommon: Make BBox emulation optional 2015-05-25 09:33:34 +02:00
Jules Blok e31982474c OGL: Depth range inversion. 2015-05-22 23:52:22 +02:00
Jules Blok 88cc91030e VertexShaderGen: Use correct depth output when glClipControl is supported. 2015-05-22 23:52:21 +02:00