Commit Graph

5548 Commits

Author SHA1 Message Date
31a8424bcc fix formatting uglies introduced in glsl-master branch 2012-10-09 23:54:17 -05:00
4a4833e617 default to GLSL instead of Cg 2012-10-09 23:43:22 -05:00
9996f27120 Give OSX users more of a chance of supporting Single pass DSB in the future. 2012-10-09 23:42:41 -05:00
d012c75005 Implement Program shaders cache. Seems to reduce a small amount of stuttering when F-Zero starts. Did it because I can :| 2012-10-09 23:42:41 -05:00
c76593f6a2 Looky, OSX found an issue for me. 2012-10-09 23:42:40 -05:00
7aad45658e Add a GUI option to use GLSL shaders. Also fix a small typo. 2012-10-09 23:42:39 -05:00
7f12daa014 Looks like we make use of fmod, make a GLSL function for it! 2012-10-09 23:41:49 -05:00
3bcec51334 More coding style fixes because I suck at sed 2012-10-09 23:41:48 -05:00
3c6d0fc710 8 spaces indentation -> tabs 2012-10-09 23:41:48 -05:00
5b06bbf87d Use UBOs in every shader. I had missed a few. Only cache Uniform locations if we aren't using UBOs. 2012-10-09 23:41:06 -05:00
5bcbf92f43 Make sure to support everything even if GPU doesn't. 2012-10-09 23:41:06 -05:00
d4a80ca3ec yay, UBOs work 100% now. 2012-10-09 23:41:05 -05:00
1f75ee49bf UBO works for Pixel Shaders if Binding for UBO is zero, otherwise fails. Probably why Vertex shader UBO is failing. Too tired to investigate right now. 2012-10-09 23:41:05 -05:00
b105d70339 Firin ma lazer 2012-10-09 23:41:05 -05:00
c82b92bfc2 Fix one error. 2012-10-09 23:41:05 -05:00
2fbca145cb Remove bSupportsGLSLLocation since it won't work how I expect it. 2012-10-09 23:41:05 -05:00
4a84c6f742 Add in UBOs, doesn't work yet. Still debugging here. 2012-10-09 23:41:05 -05:00
76e5766a1b Put Vertex Uniforms in to the correct places to get ready for UBOs. 2012-10-09 23:41:04 -05:00
d897491f94 Few compiler errors that got exposed once I got Dual Source Blending working. Seems it isn't working quite 100% either. Good chance I missed something anyway. 2012-10-09 23:41:04 -05:00
d83ead5914 Support Dual Source Blending in OGL plugin with GLSL. 2012-10-09 23:39:16 -05:00
eff019442f Playing through SSBM story made me find this. 2012-10-09 23:37:52 -05:00
b24990ca28 Bit of cleanup. Clean up my massive hack in the ShaderManagerFiles. Almost feature parity with Nvidia CG now I think. Just need to do Alpha test with Dual source blending now. 2012-10-09 23:37:52 -05:00
cf68cc0c61 Add support for GL_ARB_shading_language_420pack so we don't have to binding sampler locations. Also add support for GL_ARB_separate_shader_objects which doesn't currently work for some reason....investigating. 2012-10-09 23:37:52 -05:00
8058f2f32f Missed one 2012-10-09 23:33:02 -05:00
9064b76deb Shader Compile fixes. Played SMS for two shines. 2012-10-09 23:33:02 -05:00
7cec31dbf3 Almost there. 2012-10-09 23:33:02 -05:00
8123b137aa This is the terrible bit that can't be removed until we use UBOs in the GLSL shaders. 2012-10-09 23:31:31 -05:00
0fc755c4df More stuff 2012-10-09 23:31:31 -05:00
66a5334158 moe 2012-10-09 23:30:48 -05:00
3943840d5c Now CG plays nice with this new stuff. 2012-10-09 23:27:59 -05:00
a357c77257 Add in GLSL setting again.
PS and VS making. Untested and won't work for now.

Add in program shader cache files.

Readd NativeVertexFormat stuffs.

Add in PS and VS cache things.

SetShaders in places.

Fixed EFB cache index computations in OpenGL renderer.

The previous computation was very likely to go out of array bounds,
which could result in crashes on EFB access.

Also, the cache size was rounded down instead of up. This is a problem
since EFB_HEIGHT (528) is not a multiple of EFB_CACHE_RECT_SIZE (64).
2012-10-09 23:23:37 -05:00
3990002250 Optimize JitCache::InvalidateICache by maintaining a "valid blocks" bitset
Most of the InvalidateICache calls are for a 32 bytes block: this is the
number of bytes invalidated by PowerPC dcb*/icb* instructions. Profiling
shows that a lot of CPU time is spent checking if there are any JIT blocks
covered by these 32 bytes (using std::map::lower_bound).

This patch adds a bitset containing the state of every 32 bytes block in
RAM (JIT cached/not JIT cached). Using that, a 32 bytes InvalidateICache
can check in the bitset if any JIT block might be invalidated. A bitset
check is a lot faster than an std::map::lower_bound operation, improving
performance of JitCache::InvalidateICache by more than 100%.

Some practical numbers:

* Xenoblade Chronicles (PAL)
  56.04FPS -> 59.28FPS (+5.78%)
* The Last Story (PAL)
  30.9FPS -> 32.83FPS (+6.25%)
* Super Mario Galaxy (PAL)
  59.76FPS -> 62.46FPS (+4.52%)

This function still takes more time than it should - more optimization in
this area might be possible (specializing for 32 bytes blocks to avoid
useless memcpy, for example).
2012-10-06 01:49:09 +02:00
8cefcaa94c Implement a simple benchmarking mode which logs FPS to a file
Very useful to compare performance between two builds, check the impact of
a configuration option, etc. FPS log is stored in User/Logs/fps.txt and is
reset each time you launch a game. Only enabled if you check the "Log FPS
to file" option in your graphics settings.

Could be improved a bit: currently logs only every 1s (so you can't really
see small variations), maybe output more infos to the fps.txt like
average/stddev (but Excel/Libreoffice/Google Docs can compute that easily
too).
2012-10-04 05:41:02 +02:00
bb8b5936c0 Revert "Partially revert revision d511b506120c."
This reverts commit 08e06b2293.
2012-09-27 18:15:44 +02:00
8fed3b76c8 If setting videobackend back to null strings, Just set it to the front of the list. Fixes loading game specific INI files that don't load back the "default" video backend which is nothing. 2012-09-25 00:47:37 +00:00
41266129ba Should fix issue 5630. 2012-09-24 17:16:34 -05:00
3229bf824c Should actually load the backend when it changes via game INI 2012-09-23 17:54:23 -05:00
f8f8aea577 Allow the user to set graphics backend from Game INI. Zero GUI option available for setting. 2012-09-23 16:02:11 -05:00
b4ae200d0d This changes a mmap in MemArena so you don't need 786MB of memory free to actually allocate the 1GB memory space in Linux 32bit. I was also running in to this issue in my development. Kudos to plbl4ster to actually taking the time to research this. Closes issue 5625. 2012-09-23 10:08:13 -05:00
1e174ad31a F-Zero and Phantasy Star Online Memory Card Manager support. Thanks to Ralf from GS Central
Original information:
http://board.gscentral.org/retro-hacking/53093.htm

Signed-off-by: LPFaint99 <lpfaint99@gmail.com>
2012-09-21 21:41:04 -07:00
208d25c3f5 Revert merges of aram-dma-fixes and memcard-delay
These merges, while in theory improving emulation accuracy, cause issues
in other parts of the emulator based on invalid assumptions. memcard-delay
fixed some of these issues in the EXI memcard code, but several other
problems still exist and I don't have the time to debug that right now.
2012-09-07 01:11:38 +02:00
1ffb9ce47e Fix broken build when using SDL from Externals.
The problem here was the logic that detects SDL in the main CMakeLists.txt
is not the same as it is in DolphinWX/CmakeLists.txt to set libraries. When
using SDL from Externals it failed at link time because -lSDL was never set.
This fixes the problem by using the same condition logic to set the libs
as used when detecting SDL in the first place.
2012-09-02 16:53:15 -06:00
d2e057d137 Update libav code to remove deprecation warnings. 2012-08-28 22:34:24 -05:00
6773261a85 Use correct linker flags for SDL. 2012-08-28 03:35:31 -06:00
90af798d3d Partially revert be200074e9 for OS X systems
/dev/shm is not a tmpfs mountpoint on that operating system. Use /tmp but keep
the unlinking to avoid useless disk IO.
2012-08-25 03:30:37 +02:00
60aed4e5b0 Merge branch 'memcard-delay' 2012-08-24 12:45:45 +02:00
be200074e9 [Linux] Change from using /tmp to /dev/shm in MemArena so we don't cause any disk IO, also unlink file while it is open to allow multiple instances running. This was discussed months ago, but was never implemented for whatever reason. 2012-08-22 23:39:50 -05:00
bab9b5d3ce FifoPlayer: Fix fifo log playback in dual-core mode. 2012-08-22 01:04:09 +02:00
0b00c95b79 Simulate a small delay on GC Memcard operations
This was not needed for most games before because the external exception was
itself delayed. aram-dma-fixes changed that and made the external exception
happen a lot quicker, breaking games that relied on the memcard operations
delay.

Fixes issue 5583.
2012-08-20 13:49:12 +02:00
54fc4029dd Use do { ... } while (0) for the *_LOG macros
Without this patch, such code would not compile:

if (cond)
    WARN_LOG(FOO, "msg");
else
    WARN_LOG(FOO, "msg2");
2012-08-20 13:12:49 +02:00