Commit graph

2761 commits

Author SHA1 Message Date
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