Commit Graph

2941 Commits

Author SHA1 Message Date
degasus 0b02dc4f81 FramebufferManager: check for g_framebuffer_manager 2015-11-24 22:48:56 +01:00
degasus 0f26cdd31b FramebufferManager: Allow CreateXFBSource to return nullptr 2015-11-24 22:48:55 +01:00
degasus c9dc5fb376 TextureCache: Allow the backends to return nullptr for textures. 2015-11-24 22:48:55 +01: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
JosJuice 74ea765427 Mark more strings for translation 2015-11-20 11:33:47 +01:00
degasus ee2223c4a0 TextureCache: Fix crash for invalid textures. 2015-11-17 23:29:54 +01:00
degasus 087ba5268a TextureCache: Rewrite EFB Copy control flow 2015-11-15 12:02:41 +01:00
degasus dcdf8fd3ce TextureCache: Split efb2ram from efb2tex 2015-11-15 11:59:52 +01:00
Scott Mansell 636bedb207 XFMem: Don't warn on writes of zero to unknown registers. 2015-11-08 14:59:55 +13:00
Tillmann Karras 2ad901b2da VideoCommon: drop unused variable/setter 2015-11-06 15:43:58 +01:00
Tillmann Karras 81d9cce70c VideoCommon: rename TextureCache to TextureCacheBase 2015-11-06 15:43:58 +01:00
Scott Mansell 51c984dde3 Remove the "Show EFB Copy Regions" debug option.
It was only implemented in OpenGL, though the option was visible in both
backends, leading to memory leaks if you enabled it in DirectX.

And it wasn't particularly useful as a debug feature as it only showed
where in the EFB the copies were taken from, not what format it was, or
what the copy was used for, or what content was in the EFB at that point
in time.

Also, it stretched the copy regions relative to the window, so the
on-screen regions don't even line up with the window unless the game used
the full EFB (some pal games) and you game image stretched to the full
window.
2015-11-05 18:15:46 +13:00
Scott Mansell ba7b7522be BPStructs: add debug info for texture setup. 2015-11-05 00:13:25 +13:00
Scott Mansell e161e714c7 Merge pull request #3226 from Tilka/shadergen
VideoCommon: return code/uid from shader gens
2015-11-04 13:42:49 +13:00
Tillmann Karras bc38892db7 DriverDetails: remove BUG_BROKENINFOLOG leftovers
It was removed in 9618738278.
2015-11-03 18:50:44 +01:00
Tillmann Karras 71d1eb3c31 VideoCommon: return code/uid from shader gens
rather than passing in non-const references
2015-11-03 14:40:23 +01:00
Ryan Houdek c04358fbe2 Merge pull request #3222 from Tilka/vertexmanagerbase
VideoCommon: rename VertexManager to VertexManagerBase
2015-11-03 08:34:30 -05:00
Sintendo c4b56f06f9 Fix a few typos 2015-11-02 21:17:43 +01:00
Tillmann Karras a656c05be2 VertexManagerBase: fix indentation 2015-11-02 11:53:54 +01:00
Tillmann Karras c52c73f762 VideoCommon: VertexManager -> VertexManagerBase
It may be a bit weird to see calls to static functions in
VertexManagerBase now, but at least it's easier to see what's going on.
2015-11-02 11:53:54 +01:00
Tillmann Karras 983978ee66 VideoCommon: flush vertex manager if components change 2015-11-01 22:39:31 +01:00
Tillmann Karras 7066689131 ShaderCaches: remove unneeded typedefs 2015-10-29 14:43:05 +01:00
Tillmann Karras b0d5b4483e VertexLoaderX64: optimize more color swizzles
Based on https://gist.github.com/rygorous/c5dba8c6c75bc83aa4ae, but with
a small tweak and a somewhat related change for the 565 case.
2015-10-25 14:51:07 +01:00
Scott Mansell bd20dd3962 Merge pull request #3188 from lioncash/texcache
TextureCacheBase: Change CacheLinesPerRow to BytesPerRow
2015-10-25 17:46:43 +13:00
Scott Mansell 4c5c33c514 VertexShader: Remove 'special case' that has been disabled forever. 2015-10-23 19:02:51 +13:00
Tillmann Karras 33784456a5 VertexLoaderTester: drop superfluous newlines 2015-10-22 16:31:02 +02:00
Tillmann Karras 2a58802c00 VertexLoaderManager: symbolize magic constant 2015-10-22 16:31:02 +02:00
Tillmann Karras d80124ab59 VertexLoaderX64: optimize 4444 color conversion
https://gist.github.com/rygorous/75133a50c60f9243366e
2015-10-22 16:30:56 +02:00
Lioncash c28e3affc5 TextureCacheBase: Change CacheLinesPerRow to BytesPerRow 2015-10-22 08:14:43 -04:00
mimimi085181 ff709247e2 Check the hashes of efb copies before applying them as partial texture updates 2015-10-18 16:36:38 +02:00
Scott Mansell e7b2a22225 Support Conservative Depth as a fallback for EarlyZ
Allows Mesa based drivers to support ZCompLoc
2015-10-18 01:46:54 +13:00
Scott Mansell ac8976689b Merge pull request #3177 from Tilka/fix_warnings
PixelShaderGen: silence -Wformat-security warnings
2015-10-17 17:44:29 +13:00
flacs 63b08618c2 Merge pull request #3174 from ShadowsFriend/generic_build_fix
VideoCommon: Add includes for generic build
2015-10-17 05:08:30 +02:00
Tillmann Karras 1df455bd13 PixelShaderGen: silence -Wformat-security warnings 2015-10-17 05:05:50 +02:00
Lioncash c756025902 Core: Move a global into a namespace 2015-10-16 22:52:41 -04:00
Ilia Mirkin 2fc2b82963 VideoCommon: teach gcc to type-check the arguments fed to Write()
Note that the "this" implicit argument counts as 1, which is why all the
printf arguments are shifted over one.
2015-10-16 18:20:37 -04:00
Ilia Mirkin 5380fd9dba VideoCommon: fix variable types fed to Write() function 2015-10-16 18:20:36 -04:00
Christian Widmer 252a3d16c2 VideoCommon: Add includes for generic build
On x86_64 and arm64 builds Common/MsgHandler.h and Common/Logging/Log.h are
indirectly included through the corresponding VertexLoaders, Emitters
and lastly Assert.h. Because the generic build does not build a vertex
loader JIT it does not include those and fails at compile time.
Thanks to HdkR and mibofra!
2015-10-16 20:18:27 +02:00
Markus Wick d12b026ecb Merge pull request #3165 from mimimi085181/partial-texture-updates-same-offset
Do not try to load strided efb copies or ones with wrong dimensions
2015-10-16 10:02:36 +02:00
Lioncash 419fed3952 VertexShaderManager: Get rid of other magic constants 2015-10-15 23:41:42 -04:00
Lioncash b5b304cff2 VertexShaderManager: Get rid of float pointer casts 2015-10-15 23:34:54 -04:00
mimimi085181 af28934703 Do not delete strided efb copies on load
This hopefully allows to use partial texture updates with strided efb copies that start at the same offset as the loaded texture
2015-10-15 00:45:55 +02:00
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