Commit Graph

478 Commits

Author SHA1 Message Date
Stenzek 134d967be2 Refactoring and cleanup of GLInterface (now GLContext) 2018-10-20 21:11:34 +10:00
Tillmann Karras 97cc9894e4 Update to Visual Studio's default Windows SDK 2018-10-20 00:53:08 +01:00
Mat M ecd4897d43
Merge pull request #7437 from stenzek/graphics-options-race
Fix race condition caused by opening graphics options while running
2018-10-12 10:29:28 -04:00
Tilka 32ef8706e5
Merge pull request #7414 from Sintendo/shortmovs
x64Emitter: emit shorter MOVs for 64-bit immediates
2018-10-06 00:01:35 +01:00
MerryMage 826bcad3a5 UnitTets: Add tests for frsqrte 2018-09-28 18:11:30 +01:00
Stenzek a877d5f6dc Remove unused Host_ShowVideoConfig 2018-09-28 14:05:53 +10:00
Sintendo 8a93dd0105 x64EmitterTest: Fix linting issues 2018-09-16 19:52:12 +02:00
Sintendo 58a0d0f117 x64EmitterTest: test MOV with 64-bit immediates 2018-09-16 19:52:12 +02:00
Lioncash c4fb07f428 Common, DSP: Only compile in x86-64 emitter related utilities on x86 platforms
Previously these were required to be built into the executable so that
the JIT portion of the DSP code would build properly, as the
x86-64-specifics were tightly coupled to the DSP common code. As this is
no longer the case, this is no longer necessary.
2018-06-21 06:53:31 -04:00
Lioncash 6f473b96d0 PowerPC: Convert CPUCore enum into an enum class
Makes the enum values strongly-typed and prevents the identifiers from
polluting the PowerPC namespace. This also cleans up the parameters of
some functions where we were accepting an ambiguous int type and
expecting the correct values to be passed in.

Now those parameters accept a PowerPC::CPUCore type only, making it
immediately obvious which values should be passed in. It also turns out
we were storing these core types into other structures as plain ints,
which have also been corrected.

As this type is used directly with the configuration code, we need to
provide our own overloaded insertion (<<) and extraction (>>) operators
in order to make it compatible with it. These are fairly trivial to
implement, so there's no issue here.

A minor adjustment to TryParse() was required, as our generic function
was doing the following:

N tmp = 0;

which is problematic, as custom types may not be able to have that
assignment performed (e.g. strongly-typed enums), so we change this to:

N tmp;

which is sufficient, as the value is attempted to be initialized
immediately under that statement.
2018-06-15 10:27:59 -04:00
spycrab 4d55cb745c UnitTests: Fix MSVC compilation 2018-06-12 15:28:59 +02:00
spycrab ccf9ecbb03 UnitTests/VertexLoaderTest: Fix compilation on newer GTest versions 2018-06-12 14:59:57 +02:00
Léo Lam 8074192a85
Merge pull request #7057 from leoetlino/string
Config/StringUtil/IniFile: Get rid of some duplicated code
2018-06-04 12:44:57 +02:00
degasus 7154bfd825 UnitTest: Add StringUtil ToString/TryParse test
Only a single one, but the main one for ini files:
Check if the written values can be parsed again.
2018-06-03 23:12:32 +02:00
Léo Lam 6b9aef7042 FS: Add a struct for modes
As suggested here: https://dolp.in/pr7059#pullrequestreview-125401778

More descriptive than having a std::tuple of FS::Mode, and lets us
give names to known triplets of modes (like in ES). Functions that
only forward mode arguments are slightly less verbose now too.
2018-06-03 20:45:35 +02:00
Lioncash 4288bfe0f9 Common: Move host communication enum to Host.h
Given this is actually a part of the Host interface, this should be
placed with it.

While we're at it, turn it into an enum class so that we don't dump its
contained values into the surrounding scope. We can also make
Host_Message take the enum type itself directly instead of taking a
general int value.

After this, it'll be trivial to divide out the rest of Common.h and
remove the header from the repository entirely
2018-05-28 14:34:59 -04:00
Léo Lam cec7fded60 IOSC: Implement VerifyPublicKeySign for ECC 2018-05-20 20:04:53 +02:00
Léo Lam 67ce7e34e9 UnitTests: Add basic tests for ec crypto code
Verifies that PrivToPub and ComputeSharedSecret give expected results.
2018-05-20 19:59:26 +02:00
Lioncash ba01f6dba3 CommonFuncs: Convert ROUND_UP_POW2 macro to a function
Also move it to MathUtils where it belongs with the rest of the
power-of-two functions. This gets rid of pollution of the current scope
of any translation unit with b<value> macros that aren't intended to be
used directly.
2018-05-10 19:42:20 -04:00
Lioncash 0a3631cc76
FloatUtils: Remove IntDouble and IntFloat
Type punning via unions in C++ invokes undefined behavior. Instead, leverage BitCast,
our variant of C++2a's std::bit_cast
2018-05-10 12:28:09 -04:00
Lioncash b3292298c9
BitUtils: Add C++14/C++17 compatible equivalent of std::bit_cast from C++2a
Given bit conversions between types are quite common in emulation
(particularly when it comes to floating-point among other things) it
makes sense to provide a utility function that keeps all the boilerplate
contained; especially considering it makes it harder to accidentally
misuse std::memcpy (such as accidentally transposing arguments, etc).

Another benefit of this function is that it doesn't require separating
declarations from assignments, allowing variables to be declared const.
This makes the scenario of of uninitialized variables being used less
likely to occur.
2018-05-10 12:28:05 -04:00
Léo Lam 7feabcd096 IOS/FS: Fix rename not handling existing target correctly
The existing backend did not handle cases where the target exists
correctly.

This is a bug that has been around forever but was only recently
exposed when ES started to use our FS code.

Also adds some unit tests to make sure this won't get broken again.
2018-05-08 23:55:13 +02:00
Lioncash 86018b503b Common: Move floating-point utility functions to FloatUtils.h/.cpp
Keeps all of the floating-point utility functions in their own file to
keep them all together. This also provides a place for other
general-purpose floating-point functions to be added in the future,
which will be necessary when improving the flag-setting within the
interpreter.
2018-05-07 02:56:32 -04:00
spycrab db0e5108dc Win32/FileUtil: Fix IsDirectory() not working for certain directories 2018-05-04 23:53:41 +02:00
Léo Lam 2fcc633c28
Merge pull request #6649 from leoetlino/fs-tests
UnitTests: Add tests for the Wii filesystem
2018-04-20 21:34:06 +02:00
Tillmann Karras 4cfd900c67 Fix some warnings 2018-04-17 14:10:05 +01:00
Léo Lam 45647df349 UnitTests: Add tests for the Wii filesystem
This adds unit tests for the Wii filesystem now that the filesystem
interface is neatly separated from the IPC code.

Basic FS functionality is tested, in addition to problematic usages and
edge cases that Dolphin used to handle incorrectly (which of course
broke emulated software).

These tests should make it quite a bit harder to introduce regressions.

Issues that are covered by the tests in particular:

* Metadata: issue 10234 (though tests are commented out for now because
  Dolphin doesn't support NAND images yet so it can't track metadata);

* EOF seeks/reads: https://github.com/dolphin-emu/dolphin/pull/4942

* Read/write operations from multiple handles: see issue 2917, 5232 and
  8702 and https://github.com/dolphin-emu/dolphin/pull/2649
2018-04-15 14:29:27 +02:00
Lioncash f1be7cd4a0
CMakeLists: Link bochs in privately where applicable
Everything that links in core doesn't need to see anything related to bochs, because it's only used internally.
Anything else that relies on bochs should be linking it in explicitly.
2018-04-08 04:59:58 -04:00
Lioncash 136f16599f UnitTests: Add basic tests for RotateRight() and RotateLeft() 2018-03-31 18:09:50 -04:00
Lioncash 397b3fb976 CPUCoreBase: Make the GetName() member function const qualified
This function should have no need to modify internal class state.
2018-03-24 16:17:39 -04:00
JosJuice b8c83dd5f3
Merge pull request #5973 from ligfx/renamefifoqueue
Rename Common::FifoQueue to Common::SPSCQueue
2017-11-19 13:51:22 +01:00
Léo Lam 5dae20ea9d UnitTests: Add DSP accelerator tests
Includes DSP accelerator tests for basic behaviour, and everything
that was fixed by the PR.
2017-09-24 20:48:29 +02:00
Michael M b58f8d19ab Rename Common::FifoQueue to Common::SPSCQueue
Since all queues are FIFO data structures, the name wasn't informative
as to why you'd use it over a normal queue. I originally thought it had
something to do with the hardware graphics FIFO.

This renames it using the common acronym SPSC, which stands for
single-producer single-consumer, and is most commonly used to talk about
lock-free data structures, both of which this is.
2017-08-23 17:00:52 -07:00
Michael M 7d791cb6f6 BitUtilsTest: update to pass clang-format 2017-08-13 19:04:56 -07:00
Stenzek 1fccbd5be3 DolphinWX: Add a progress dialog host command
Allows feedback from backends to be communicated to the user when
long-running operation are performed (e.g. shader compilation).
2017-07-30 12:38:48 +10:00
Anthony 6fe33f844f Merge pull request #5770 from ligfx/lognewconfig
LogManager: use layered config
2017-07-27 11:58:57 -07:00
Léo Lam ee868e2362 Move the Wiimote connect code out of Host
I don't know who thought it would be a good idea to put the Wiimote
connect code as part of the Host interface, and have that called
from both the UI code and the core. And then hack around it by having
"force connect" events whenever Host_ConnectWiimote is called
from the core...
2017-07-23 15:47:32 +08:00
Léo Lam 91f8283a1d Remove Wii Remote connection status from status bar
Showing the Wii remote connection status leads to inconsistent UX,
because we don't do anything like that for GameCube controllers
or with Bluetooth passthrough.

It's also questionable how useful it is given that:

* it doesn't print the number of connected remotes, just that one
  remote is connected, connecting or not connected, so the only info
  it provides is actually wrong when using multiple remotes;

* this user-facing feature is actually broken in master and no one has
  complained AFAIK, which means people don't really rely on it;

* the status bar isn't visible most of the time unless the user is
  using render to main or deliberately keeping the main window's
  status bar visible by moving the render window and they're not too
  far away from their screen;

* emulated Wii remotes now reconnect on input, which means that there
  is less of a need to actually know at all times whether a remote
  is connected, since pressing any button will reconnect it and provide
  immediate, visible feedback via OSD messages and the Wii remote
  pointer appearing.
2017-07-15 13:01:56 +08:00
Michael Maltese 0019c34c73 DolphinWX: fix input bitmaps not working when background input is off 2017-07-12 00:12:07 -07:00
Michael Maltese 8b54ac225b Merge Core/Config/Config.h into Common/Config/Config.h
Allows code in Common to take advantage of the layered config logic.
2017-07-09 16:28:54 -07:00
Michael Maltese 1d0185d7d5 DSPDisassembler: remove unused base_addr parameter 2017-06-30 01:47:02 -07:00
Michael Maltese 391c7319f5 DSPDisassembler: get rid of double-pass and temp file 2017-06-30 01:47:01 -07:00
Michael Maltese 8e849b1595 Remove OpenAL DLL from Externals 2017-06-27 00:06:14 -07:00
Léo Lam 60c6fbe9cc Add CommonTitles.h for common Wii title IDs 2017-06-26 15:17:55 +02:00
Niels Boehm df82adca43 Add function testing whether a bitmask is valid.
This one verifies bitmasks where low bits are set to 1 (hence the name).
Any stray 0 among the lower ones or any stray 1 among the higher zeros
renders the mask invalid.

The edge cases of all zeros and all ones are considered valid masks.

It uses an efficient implementation. It's the counterpart of
https://graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2
2017-06-22 20:22:53 +02:00
Léo Lam 5243eae4e9 UnitTests: Use a temporary profile directory
This prevents Dolphin from modifying any file in the user directory.
2017-06-18 16:23:09 +02:00
Léo Lam 6c3069be97 IOS/ESFormats: Use SignedBlobReader for TMDs and tickets 2017-06-14 22:45:29 +02:00
shuffle2 ffd8309aca Merge branch 'master' into fix-unittests 2017-06-07 21:20:06 -07:00
Shawn Hoffman 1bb26dddb1 msbuild: only set /NODEFAULTLIB in one place 2017-06-07 17:30:05 -07:00
Shawn Hoffman a2358786dc unittests: set user directory so SYSCONF does not get created at the drive root 2017-06-06 04:07:13 -07:00
Sepalani 5fb26abb17 StringUtil: Add StringPopBackIf UnitTests 2017-06-06 05:50:45 +01:00
shuffle2 c8166951a0 Merge pull request #5418 from MerryMage/config-again-and-again
VideoConfig: Port to layered configuration system
2017-06-05 21:11:04 -07:00
Michael Maltese 80710984dc DSPTool: extract tests into a DSPAssemblyTest
- Moves all test code from DSPTool into UnitTests/Core/DSPAssemblyTest.
- Converts test files (which could only be loaded if they were in the
  shell's working directory, so basically never) into C++ values.
- Enables most of the commented-out tests.
- Removes non-deterministic random code test.
2017-06-05 19:28:40 -07:00
Léo Lam d9fd056803 Fix minor formatting issues
These were not caught by the lint script while it was broken.
2017-06-05 02:32:19 +02:00
Shawn Hoffman 09367c8c10 msbuild: remove more duplicate code 2017-06-03 18:20:41 -07:00
Shawn Hoffman ddae5058e9 msbuild: increment other version numbers to vs2017 equivalents 2017-06-03 18:20:39 -07:00
MerryMage 41afe78a44 Config: Integrate 2017-06-03 18:11:57 +01:00
shuffle2 3443454ba2 Merge pull request #5271 from JosJuice/allow-aslr
Allow (but don't force) ASLR
2017-06-02 21:53:02 -07:00
BhaaL 072c161445 upgrade to Windows SDK 10.0.15063.0
this is required for /permissive- to work, because some headers in the
Windows SDK use Microsoft extensions that are not allowed in standards mode
2017-05-28 13:37:31 +02:00
Michael Maltese f6e1da0dc0 AudioCommon: add Cubeb backend 2017-05-27 18:28:56 -07:00
Pierre Bourdon d592bdd4d4 Migrate to Visual Studio 2017.
Auto-generated by the IDE, I'll trust it knows what it's doing.
2017-05-25 15:58:59 -07:00
Michael Maltese 974ada25e4 CMake: use RUNTIME_OUTPUT_DIRECTORY rather than setting OUTPUT_NAME each time 2017-05-22 00:19:14 -07:00
Michael Maltese 6d403d9ad4 CMake: specify unittests libs directly in target_link_libraries 2017-05-22 00:19:14 -07:00
Michael Maltese 8e57a0ff14 CMake: remove explicit platform libraries from UnitTests
They're not used directly, and any libraries that need them will pull
them in transitively.
2017-05-22 00:19:14 -07:00
Michael Maltese be2f4466e3 CMake: move unittests target to UnitTests 2017-05-22 00:19:14 -07:00
Michael Maltese ea35549e00 CMake: don't explictly create Tests/ directory 2017-05-22 00:19:13 -07:00
Michael Maltese 41fb6db6e3 CMake: remove extraneous TestUtils directory 2017-05-22 00:19:13 -07:00
Michael Maltese 87d64afe19 CMake: pass all srcs to add_test in ARGN 2017-05-22 00:19:13 -07:00
Michael Maltese 9d130b52f7 CMake: use unittests_stubhost object library 2017-05-22 00:19:13 -07:00
Michael Maltese a78ca46d9e CMake: use implicit target location in add_test 2017-05-22 00:19:13 -07:00
Michael Maltese 942cbd3c8d CMake: don't prefix test targets with Test_
The current prefixing makes it harder to build test executables directly
from the command line, since the target name breaks CMake convention and
doesn't match the name passed to `add_dolphin_test`. They all have "Test"
somewhere in the name anyways.
2017-05-22 00:19:13 -07:00
JosJuice e019872d62 Remove no-pie build flags 2017-05-20 09:35:53 +02:00
Helios747 a465c483f3 Remove D3D12 2017-05-18 17:01:12 -07:00
spycrab e66ad018f4 Convert VolumeDirectory names back to SHIFT-JIS (issue #9988) 2017-05-01 14:08:47 +02:00
Markus Wick 34ac749b8b Merge pull request #5144 from MerryMage/mfspr
Jit_SystemRegisters: Make mfspr PIE-compliant
2017-04-10 22:30:56 +02:00
Léo Lam 47a09de019 Add unit tests for IOS/ESFormats
This adds unit tests for IOS/ESFormats, and in particular, for the
TMDReader. It is tested using invalid TMDs (to check IsValid()) and
two valid, properly signed TMDs.

Things which are now tested:

* Title type helper functions.
* TMDReader: Validity check.
* TMDReader: General information returned by the Get*() methods.
* TMDReader: Raw TMD and generated TMD view, compared against IOS.
* TMDReader: Game ID generation code (which is Dolphin specific).
* TMDReader: Content information: getting by ID/index, order, metadata.
2017-04-05 20:54:11 +02:00
MerryMage 38917a151d CoreTiming: Pull globals into a single struct 2017-04-05 10:22:48 +01:00
Michael Maltese b305a6c575 VertexLoaderTest: fix maybe-uninitialized warning
Fixes warning:

```
../Source/UnitTests/VideoCommon/VertexLoaderTest.cpp:222:15: error: variable 'f' may be uninitialized when used here [-Werror,-Wconditional-uninitialized]
    ExpectOut(f * scale);
              ^
../Source/UnitTests/VideoCommon/VertexLoaderTest.cpp:198:12: note: initialize the variable 'f' to silence this warning
    float f, g;
           ^
            = 0.0
../Source/UnitTests/VideoCommon/VertexLoaderTest.cpp:223:15: error: variable 'g' may be uninitialized when used here [-Werror,-Wconditional-uninitialized]
    ExpectOut(g * scale);
              ^
../Source/UnitTests/VideoCommon/VertexLoaderTest.cpp:198:15: note: initialize the variable 'g' to silence this warning
    float f, g;
              ^
               = 0.0
```
2017-03-31 13:51:20 -07:00
Mat M 6a595aabe9 Merge pull request #5153 from ligfx/stubhostnorequestfullscreen
StubHost: remove unused Host_RequestFullscreen()
2017-03-31 00:21:04 -04:00
Mat M 774d2420e3 Merge pull request #5158 from ligfx/coretimingstatic
CoreTimingTest: make AdvanceAndCheck() static (fix warning)
2017-03-31 00:09:20 -04:00
Matthew Parlane e05b6cf3f4 Merge pull request #5155 from ligfx/expecttruefalse
UnitTests: use EXPECT_TRUE/EXPECT_FALSE (fixes warnings)
2017-03-26 14:53:17 +13:00
Michael Maltese 0c28ff2acc CoreTimingTest: make AdvanceAndCheck() static (fix warning)
Fixes warning:

```
../Source/UnitTests/Core/CoreTimingTest.cpp: In function 'void AdvanceAndCheck(u32, int, int, int)':
../Source/UnitTests/Core/CoreTimingTest.cpp:52:6: error: no previous declaration for 'void AdvanceAndCheck(u32, int, int, int)' [-Werror=missing-declarations]
 void AdvanceAndCheck(u32 idx, int downcount, int expected_lateness = 0, int cpu_downcount = 0)
      ^
```
2017-03-24 21:37:34 -07:00
Michael Maltese 04db3d5a50 UnitTests: use EXPECT_TRUE/EXPECT_FALSE (fixes warnings)
Using `EXPECT_EQ` with boolean literals can cause a warning in certain
versions of GCC. See https://github.com/google/googletest/issues/322

Fixes warnings:

```
../Source/UnitTests/Common/BitSetTest.cpp: In member function 'virtual void BitSet_Basics_Test::TestBody()':
../Source/UnitTests/Common/BitSetTest.cpp:15:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/BitSetTest.cpp: In member function 'virtual void BitSet_BitGetSet_Test::TestBody()':
../Source/UnitTests/Common/BitSetTest.cpp:27:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/StringUtilTest.cpp: In member function 'virtual void StringUtil_StringBeginsWith_Test::TestBody()':
../Source/UnitTests/Common/StringUtilTest.cpp:23:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/StringUtilTest.cpp:25:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/StringUtilTest.cpp:26:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/StringUtilTest.cpp:27:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/StringUtilTest.cpp: In member function 'virtual void StringUtil_StringEndsWith_Test::TestBody()':
../Source/UnitTests/Common/StringUtilTest.cpp:35:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/StringUtilTest.cpp:37:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/StringUtilTest.cpp:38:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../Source/UnitTests/Common/StringUtilTest.cpp:39:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
c
```
2017-03-24 17:26:27 -07:00
Michael Maltese 9234ed82da BitUtilsTest: compare ints of the same signedness (fixes warnings)
Fixes warnings like:

```
dolphin/Source/UnitTests/Common/BitUtilsTest.cpp:5:
../Externals/gtest/googletest/include/gtest/gtest.h:1392:11: warning: comparison of integers of different signs: 'const unsigned long' and 'const int' [-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
../Externals/gtest/googletest/include/gtest/gtest.h:1421:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, int>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
dolphin/Source/UnitTests/Common/BitUtilsTest.cpp:12:3: note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<unsigned long, int>' requested here
  EXPECT_EQ(Common::BitSize<s8>(),  8);
  ^
../Externals/gtest/googletest/include/gtest/gtest.h:1924:63: note: expanded from macro 'EXPECT_EQ'
                      EqHelper<GTEST_IS_NULL_LITERAL_(val1)>::Compare, \
```
2017-03-24 17:15:37 -07:00
Michael Maltese 5d69e99943 StubHost: remove unused Host_RequestFullscreen()
Fixes warning:

```
../Source/UnitTests/TestUtils/StubHost.cpp: In function 'void Host_RequestFullscreen(bool)':
../Source/UnitTests/TestUtils/StubHost.cpp:39:6: error: no previous declaration for 'void Host_RequestFullscreen(bool)' [-Werror=missing-declarations]
 void Host_RequestFullscreen(bool)
      ^
```
2017-03-24 16:41:12 -07:00
Lioncash 552c0d8404 Common: Move byte swapping utilities into their own header
This moves all the byte swapping utilities into a header named Swap.h.

A dedicated header is much more preferable here due to the size of the
code itself. In general usage throughout the codebase, CommonFuncs.h was
generally only included for these functions anyway. These being in their
own header avoids dumping the lesser used utilities into scope. As well
as providing a localized area for more utilities related to byte
swapping in the future (should they be needed). This also makes it nicer
to identify which files depend on the byte swapping utilities in
particular.

Since this is a completely new header, moving the code uncovered a few
indirect includes, as well as making some other inclusions unnecessary.
2017-03-03 17:18:18 -05:00
Lioncash ee61bd6f2e CMakeLists: Normalize whitespace
Normalizes tabs to spaces to follow our codebase's indentation style.
2017-03-01 14:53:23 -05:00
Mat M a3ba169e7d Merge pull request #4809 from Orphis/cmake_windows
CMake for Windows: getting a working binary!
2017-02-03 08:33:13 -05:00
Florent Castelli 3842a9b71c OpenAL: Move Windows binaries to lib folder and fix CMake detection
The module FindOpenAL is looking for the dll in a folder called lib, not x64.
This is only used on Windows x64, it's fine to remove the platform name.
2017-02-03 04:54:54 +01:00
Florent Castelli 9180c87197 cmake: Put test targets in folders 2017-02-03 04:23:24 +01:00
Florent Castelli e5f576f862 gtest: Update to latest version from git 2017-01-26 03:14:08 +01:00
Florent Castelli 223e213bcf cmake: Change endmacro(.*) to endmacro() 2017-01-25 15:07:32 +01:00
Lioncash 0a6f0dfb74 Common: Add bit utility header
This attempts to make some bit arithmetic more self-documenting and also
make it easier during review to identify potential off-by-one errors by
making it possible to just specify which bits are being extracted.

Functions both support the case where bits being extracted can vary and
fixed bit extraction. In the case the bits are fixed, compile-time asserts
are present to prevent accidental API usage at compile-time.

e.g. Instead of shifting and masking to get bits 10 to 15,
Common::ExtractBits<10, 15>(value) can just be done instead.
2017-01-14 11:16:02 -05:00
Léo Lam 8bef7259e3 Add the g_ prefix to the jit global
Jan 04 22:55:01 <leoetlino>   fwiw, it looks like there are new warnings in the RegCache code
Jan 04 22:55:04 <leoetlino>   Source/Core/Core/PowerPC/Jit64/FPURegCache.cpp:13:33: warning: declaration shadows a variable in the global namespace [-Wshadow]
Jan 04 22:56:19 <@Lioncash>   yeah, the jit global should have a g_ prefix.

This fixes shadowing warnings and adds the g_ prefix to a global.
2017-01-07 23:19:49 +01:00
BhaaL 23d99f2f2c specify custom brace style to fix unions
BreakBeforeBraces: Allman apparently includes all styles,
except for AfterUnion (which is false) when using clang-format -dump-config
2017-01-05 12:55:13 +01:00
Sepalani a6114bad34 Import/Export signature files as CSV 2016-12-18 00:27:10 +00:00
JosJuice 0c6fd47460 Add unit test for StringUtil's newly added JoinStrings 2016-11-27 22:11:14 +01:00
JosJuice 841e5893f4 IOS HLE: Add unit test for path/filename escaping 2016-11-27 22:11:05 +01:00
Jules Blok 8203ea929b BlockingLoop: Yield to UI message pump while waiting. 2016-11-11 13:37:02 +01:00
degasus 05eff01229 Android: Update the gradle file to use android studio 2.2 cmake. 2016-10-05 23:44:10 +02:00
Stenzek 77a128ab87 Implement experimental Vulkan backend 2016-10-01 02:40:01 +10:00
EmptyChaos 2e14920e16 CoreTiming: Guarantee FIFO processing of timed events
The min-heap provides no ordering when the key is the same on 2
nodes. Disambiguate identical times by tracking the order items
were added into the queue.
2016-09-08 19:46:42 +10:00
EmptyChaos 59465911d7 CoreTiming: Fix scheduling into the past
ForceExceptionCheck messes up the downcount and slice length if the
callback is scheduled into the past (g_slice_length becomes negative)
2016-09-03 14:55:44 +10:00
EmptyChaos ac63e54473 [UnitTests] Add CoreTimingTest 2016-09-03 14:55:44 +10:00
Lioncash e01c143379 Common: namespace MemoryUtil 2016-08-07 13:03:07 -04:00
degasus 3b3cbc4aab BusyLoopTest: Only run 10 times.
Running this test 100 times is not worth to spend 1 second.
2016-06-27 22:06:52 +02:00
Pierre Bourdon 6ed001ad42 Merge pull request #3954 from delroth/x64-emitter-test
x64EmitterTest: fill cpu_info with 0x01 instead of 0xFF to make gcc happier
2016-06-27 02:38:10 +02:00
Pierre Bourdon a910a4309f x64EmitterTest: fill cpu_info with 0x01 instead of 0xFF to make gcc happier 2016-06-27 01:55:42 +02:00
degasus d79aeaa1e9 VideoCommon: Drop GetConfigName.
We're past 5.0 now, so there is no need to look for old inis.
2016-06-26 12:34:59 +02:00
degasus fdbda7b7dd Null: Create Visual Studio project file.
Why is this so stupid on linux.....
2016-06-25 22:40:23 +02:00
Pierre Bourdon 3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Lioncash 8d9221a71e MathUtilTest: Fix tests on MSVC - Document compiler bug
MSVC's implementation of numeric_limits currently generates incorrect
signaling NaNs. The resulting values are actually quiet NaNs instead.

This commit is based off of a solution by shuffle2. The only
difference is a template specialization for floats is also added
to cover all bases
2016-04-03 19:16:47 -04:00
Lioncash b3c77fd96a VertexLoaderTest: Amend code to fix new warnings in Visual Studio
Fixes warning C4334
2016-03-30 21:00:08 -04:00
hdcmeta 8cc686b360 D3D12: Initial commit for D3D12 backend implementation. 2016-02-15 09:48:25 -08:00
Chris Burgener c34fb3edf0 Use ffmpeg for Windows Video Dumping instead of VFW 2016-01-07 18:37:58 -05:00
Lioncash 8371c428cd VertexLoaderBase: Get rid of explicit delete and new 2015-12-22 20:09:54 -05:00
Lioncash f295182833 VideoBackends: Simplify initialization and deinitialization of resources
Approximately three or four times now, the issue of pointers being
in an inconsistent state been an issue in the video backend renderers
with regards to tripping up other developers.

Global (ugh) resources are put into a unique_ptr and will always have a
well-defined state of being - null or not null
2015-12-20 22:40:37 -05:00
Ryan Houdek 1a638175d2 Enable the page fault test on targets that aren't x86_64 2015-11-19 00:51:29 -06:00
Scott Mansell 95f3c956a8 Move GL interface code out of the OpenGL video backend. 2015-09-22 00:36:45 +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
Lioncash 3f1b488a12 CommonFuncs: Replace ArraySize define with constexpr equivalent 2015-09-03 23:47:14 -04:00
Shawn Hoffman aa7208e270 [windows] Update projects to vs2015. 2015-09-03 04:23:01 -07:00
Lioncash caec42135d MathUtil: Remove IsNAN and IsINF
These aren't necessary, since the stdlib provides equivalents.
2015-08-21 15:05:43 -04:00
Tillmann Karras 439fb26b9b x64Emitter: add MOVSLDUP/MOVSHDUP 2015-08-06 10:39:43 +02:00
Matthew Parlane f32cede086 Revert "x64: build a Position-Independent Executable (PIE)" 2015-06-14 16:06:26 +12:00
degasus c375111076 Options: merge SCoreStartupParameter into SConfig 2015-06-12 19:07:45 +02:00
Ryan Houdek 59e2225f7d Remove ARMv7 support. 2015-06-07 22:44:13 -05:00
flacs d3e47dfcf5 Merge pull request #2496 from Tilka/fma4
Jit64: add FMA4 support to fmaddXX
2015-06-06 17:31:55 +02:00
Tillmann Karras d4538c762f MemoryUtil: get executable pages near static data
and clean up a bit.
2015-06-03 21:44:31 +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
Tillmann Karras 8db6588bb9 XEmitter: add FMA4 instructions 2015-06-02 19:19:52 +02:00
degasus 9c730b0a1f Unittests: Add BlockingLoopTest 2015-05-30 13:40:36 +02: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
Ryan Houdek 69963dc4b0 Merge pull request #2274 from degasus/disable_bbox
Disable bbox
2015-05-25 08:46:12 -04: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 6b2a1e57e2 BBox: remove now unreachable SW bbox implementation 2015-05-25 09:33:34 +02:00
Fiora 22317ac74c Merge pull request #2417 from Tilka/vex
XEmitter: VEX-related cleanup

I'm merging this solely because of the FMA3 error message
2015-05-18 16:23:23 -07:00
Tillmann Karras c2c31086ae XEmitter: restructure WriteVEXOp wrappers 2015-05-17 18:44:56 +02:00
yerejm e4e1fe5a9c Reset faked CPU extension support at test end to ensure test isolation. 2015-05-17 11:48:05 +10:00
Tillmann Karras 9793fed742 XEmitter: add PUNPCKLQDQ 2015-03-18 12:09:06 +01:00
Tillmann Karras 8d90ecda7f VertexLoaders: make positions more compact 2015-03-18 12:09:06 +01:00
Tillmann Karras 49ae99ffc9 UnitTests: rewrite vertex loader tests
The position attribute now has complete coverage.
2015-03-18 12:09:06 +01:00
Tillmann Karras f82afd1b2f Fix warnings 2015-03-16 19:02:30 +01:00
Tillmann Karras b0bde31ac0 Fix include order of files outside of Source/Core 2015-03-01 14:54:22 +01:00
Stevoisiak 93b16a4a2d Formatting/Whitespace Cleanup
Various fixes to formatting and whitespace
2015-02-25 10:48:21 -05:00
magumagu 18ada7a0f5 Merge pull request #2033 from magumagu/mmio-fix-addresses
Fix the addresses of MMIO registers.
2015-02-22 10:58:25 -08:00
Ryan Houdek 0567b28ba1 [Android] Fix building unit tests. 2015-02-18 16:24:30 -06:00
Ryan Houdek 2ebe57ed3f Convert our vertex loader unit test to the new RunVertices arguments arrangement. 2015-02-16 16:51:39 -06:00
magumagu f316265973 Fix the addresses of MMIO registers.
MMIO registers are located at 0x0C000000 and 0x0D000000, not 0xCC000000.
The 0xCC000000 addresses are just an artifact of address translation.
2015-02-15 18:29:37 -08:00
Pierre Bourdon 1e809d9c11 Revert "Merge pull request #1903 from RisingFog/libav"
This reverts commit 34079a0037, reversing
changes made to 3274df7158.
2015-01-26 02:35:29 +01:00
skidau 34079a0037 Merge pull request #1903 from RisingFog/libav
Use ffmpeg for Windows Video Dumping instead of VFW
2015-01-26 12:03:44 +11:00
Scott Mansell fe28d1476a Make the IsMMIOAddress function easier to read, add tests.
This also makes IsMMIOAddress more restrictive.
2015-01-24 17:24:40 +13:00
Fog 6cad635bd8 Use ffmpeg for Windows Video Dumping instead of VFW 2015-01-21 19:47:45 -05:00
Tillmann Karras 1dcf49237b VertexLoaderX64: support VAT.ByteDequant=0 2015-01-20 09:23:15 +01:00
Tillmann Karras eb13aa43fe XEmitter: overload MOVBE() 2015-01-18 12:59:33 +01:00
Tillmann Karras 1efa9b8b72 x64Emitter: add MOVLPS/MOVHPS 2015-01-07 11:23:52 +01:00
Tillmann Karras 3daa6ab259 x64Emitter: fix MOVLPD/MOVHPD
These instructions were using the wrong prefix which turned
MOVLPD(reg, mem) into MOVDDUP(reg, mem) and made the rest of them
invalid.
2015-01-07 11:23:52 +01:00
Markus Wick 25fac0282c Merge pull request #1764 from Armada651/safe-exclusive
D3D: Only try to apply exclusive mode when the renderer is in focus.
2015-01-06 11:00:47 +01:00
Jules Blok b7e056c74d Host: Add Host_RendererIsFullscreen(). 2015-01-04 17:09:56 +01:00
Tillmann Karras 6bcdb10eee CMake: simplify some expressions 2015-01-03 13:17:57 +01:00
degasus 809117102e VideoCommon: split VertexLoaderBase from VertexLoader 2014-12-21 14:12:43 +01:00
degasus a71c8158d9 VertexLoader: remove inlined getters
They just blow up the code.
2014-12-21 13:47:43 +01:00
degasus ec28a80e00 VideoLoader: remove VAT_*_FRACBITS
They are used to remove the flush amounts, but as we don't
flush anymore on vertex loader changes (only on native
vertex format right now), this optimization is now unneeded.

This will allow us to hard code the frac factors within the
vertex loaders.
2014-12-21 13:47:42 +01:00
degasus e88e63adb3 UnitTests: fix VertexLoaderTest 2014-12-09 18:56:27 +01:00
Tillmann Karras 791d5458e5 UnitTests: add tests for bitwise AVX instructions 2014-12-06 22:28:03 +01:00
Tillmann Karras ddebdb61c4 UnitTests: fix register symbol name in AVX tests 2014-12-06 22:28:03 +01:00
Lioncash b94dbca160 Host: Kill off GetRenderWindowSize 2014-11-17 13:44:49 -05:00
comex cb0af4057e Link Foundation/CoreServices into unit tests so they build with DISABLE_WX. 2014-11-14 11:28:13 -05:00
Lioncash 884ec2ed13 Host: Kill off Host_SysMessage
Equivalent facilities already exist.
2014-11-05 02:30:48 -05:00
comex d2990bc70a Merge pull request #1420 from jcowgill/fix-cmake-test-names
Rename unittest targets to Tests_*
2014-10-29 17:23:26 -04:00
James Cowgill 5887eeb849 Rename unittest targets to Test_*
CMake 3.0 prints out a warning when adding any target whose name contains
a slash. This commit fixes the warnings by using an underscore instead.
Run 'cmake --help-policy CMP0037' for more details.
2014-10-29 08:13:51 +00:00
comex c81e3da22f Add unit test. 2014-10-25 16:57:25 -04:00
comex 4d610cc30e Add a test for page fault handling.
This both tests that they work correctly and prints timing information
if you run it manually.
2014-10-19 20:41:52 -04:00
Fiora 4289221584 X64Emitter: add unit test for FMA 2014-10-07 18:21:07 -07: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
Ryan Houdek 4e16abd742 Merge pull request #1083 from FioraAeterna/lzcnt
Add LZCNT support, use in cntlzw
2014-09-14 09:18:10 -05:00
Fiora 997c5c2d0e x64Emitter: add LZCNT/TZCNT support and detection
Also add a unit test.
2014-09-14 05:31:22 -07:00
Lioncash 068799ff73 UnitTests: Fix misplaced braces in the x64Emitter tests 2014-09-13 20:45:17 -04:00
Fiora 1bd8d1ee98 Add immediate tests for WriteNormalOp
also fix a bug in Bochs that was preventing adc from passing.
2014-09-13 16:39:34 -07: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
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
Fiora 5088a2b4e2 x64Emitter: add BMI1/BMI2 support
TZCNT and LZCNT use a completely different encoding scheme, so they should
probably go in a separate patch.

Also add some tests.
2014-09-03 10:04:01 -07:00
Pierre Bourdon cee71afce5 x64EmitterTest: Fake support for all CPU extensions 2014-09-03 02:26:11 +02:00
Pierre Bourdon 5b4f1fe92c UnitTests: Add tests for the x64Emitter 2014-09-02 10:17:32 +02:00
Shawn Hoffman 839cace5ff msvc: get UnitTests compiling
Choose it from VS or pass /p:RunUnitTests=true to msbuild
2014-09-01 21:27:45 -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
Shawn Hoffman 647dc998e4 unittests: correct some integers which should have been floating point types 2014-09-01 05:57:03 -07:00
Lioncash f200a03d97 UnitTests: Remove now non-existent UpdateStatusBar from StubHost. 2014-08-24 08:34:25 -04:00
Lioncash cf46ac7dc9 Core: Kill off Host_ShowJitResults
Another host function that can be killed off by simple wx event handling
2014-08-15 15:18:28 -04:00
Lioncash e266635f40 Merge pull request #740 from lioncash/host
Core: Kill off a few Host interface functions.
2014-08-09 00:50:14 -04:00
Lioncash 7bf82f1989 Core: Kill off Host_UpdateLogDisplay()
This was actually never used as far as I can tell. There was no wx event handling done whatsoever for the global ID, So this is basically a dead function.
2014-08-08 19:21:40 -04:00
Lioncash a0a533d3a3 UnitTests: Get rid of now-nonexistent Host_GetInstance() within StubHost 2014-08-08 19:21:39 -04:00
Lioncash d4eb0684f7 Core: Kill off Host_UpdateBreakPointView()
Uses wxWidgets event propagation to the parent window which then appropriately handles the breakpoint list updating.
2014-08-08 19:21:29 -04:00
Tillmann Karras f927af20f2 Fix more warnings from #579 2014-08-07 03:24:42 +02:00
Tony Wasserka fa5588e103 UnitTests: Disable VertexLoader tests if EGL is enabled.
Interface design issues prevent this test from linking correctly. Until this issue is resolved, we'll disable the tests for now.
2014-08-04 18:40:39 +02:00
Pierre Bourdon 35654513c1 VertexLoader: Add more tests, including a few small benchmarks 2014-08-02 14:02:38 -07:00
Pierre Bourdon c39ef56db5 VertexLoader: Add very basic unit testing to get started 2014-08-02 09:34:39 -07:00
Pierre Bourdon 8b26d7bf1e UnitTests: make it possible to build tests for code that has global dependencies 2014-08-02 09:34:39 -07:00
Tony Wasserka 38c8a4efb2 MMIO: Cleanup Mapping class by using templates instead of macros. 2014-07-27 19:23:19 +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 49b0eef393 Remove the min/max functions in CommonFuncs.
The algorithm header has the same functions.
2014-05-29 21:44:41 -04:00
Tillmann Karras c9405b2030 BitFieldTest: fix warnings 2014-04-19 18:31:35 +02:00
Pierre Bourdon cf315a487f Merge pull request #271 from delroth/threading-stuff
Threading improvements: add Common::Flag and improve Common::Event
2014-04-14 23:23:16 +02:00
Pierre Bourdon e24cad0780 Common::Flag: Add support for TestAndSet + test by implementing basic spinlocks. 2014-04-14 23:13:15 +02:00
Tony Wasserka 774a394808 UnitTests: Add a test for BitField behavior on odd structure alignment. 2014-04-14 20:13:23 +02:00
Pierre Bourdon 6bdcbad3e4 Common: Move the Event class to a separate file, and add tests for it. Fix includes everywhere to match this. 2014-04-14 10:54:07 +02:00
Pierre Bourdon f9fb39d383 Common: Add a 'Flag' class that is used to encapsulate a boolean flag manipulated from several threads 2014-04-14 10:54:07 +02:00
Tony Wasserka 948c0a54f1 UnitTests: Add tests for BitField. 2014-03-25 23:57:54 +01:00
Tillmann Karras e0baed850f MathUtilTest: add test for FlushToZero 2014-03-24 16:14:22 +01:00
Tillmann Karras 46becfc06b Tests: fix signed/unsigned comparison warning 2014-03-17 02:55:58 +01:00
Tillmann Karras f28116b7da clang-modernize -add-override 2014-03-09 21:12:01 +01:00
Tillmann Karras 9ef64245fa MathUtil: fix IsQNAN()
The constants were one nibble too short and the lower 51 bits don't
actually have to be zero.
2014-03-09 19:34:58 +01:00
Tillmann Karras 17adcbb14e MMIOTest: fix sign warning 2014-03-09 15:24:32 +01:00
Pierre Bourdon aabd524142 Add more tests for Common and Core/MMIO 2014-03-09 14:27:04 +01:00
Pierre Bourdon 177ef615d7 UnitTests: ensure the Binaries/Tests directory exists before linking. 2014-03-03 04:03:53 +01:00
Pierre Bourdon 9ea845310d Unittests: Always use GTest from Externals (recommended way from GTest FAQ). 2014-03-03 03:38:46 +01:00
Pierre Bourdon 2d71571be5 Do not hard fail when running 'make unittests' without GTest. 2014-03-03 03:12:58 +01:00
Pierre Bourdon a4ee187711 Tests: Add more MMIO tests as an example. 2014-03-03 00:25:41 +01:00
Pierre Bourdon d4ed4adace Add the infrastructure required to easily add unit tests and test it with a very simple test file. 2014-03-03 00:25:41 +01:00
Pierre Bourdon 0f89060cf3 Remove Source/{Unittests,TestSuite}.
These directories have been unused for several years and without any automated
way of running the tests, they are pretty much useless.

While they might be useful as a reference, in their present state they should
not be kept in the repository.
2014-02-23 22:36:32 +01:00
Jasper St. Pierre 34692ab826 Remove unnecessary Src/ folders 2013-12-31 14:03:19 -05:00
Jasper St. Pierre 43e618682e Convert all vcxproj files to UNIX line endings 2013-12-31 14:03:18 -05:00
comex c579637eaf Run code through the advanced tool 'sed' to remove trailing whitespace. 2013-11-03 20:54:05 -05:00
John Peterson 9ab63aba88 Adding unit test project to VS solution
because that inform about compile errors because of changes in function identity

DSP unit test build fix
2013-05-22 03:29:58 +02:00
Shawn Hoffman 56b1373baf Remove scons-related files 2012-03-25 12:55:02 -07:00
Maarten ter Huurne 4c7c29b8b6 Let "make install" on OS X copy the bundle to /Applications.
The "dsptool" executable is not included in the bundle.
The "tester" executable is not included in the bundle and it no longer
installed on other platforms, since it is neither expected nor useful
to install unit tests.
2011-12-14 02:50:36 +01:00
Glenn Rice 7135dba54e Add the DSPTool and UnitTests to the cmake build. They are optional, and to enable them add -DDSTPTOOL and -DUNITTESTS to the cmake command line.
Also, don't check to see if a directory is a wad file.  They aren't.  This removes an annoying and invalid debug assertion with the debug build.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7682 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-07-18 01:47:55 +00:00
Soren Jorvang 05719ac81a Move SConscript files out from the Src subdirectories to be
consistent with the other build systems.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7282 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-03 19:44:56 +00:00
Soren Jorvang 540238cf79 Prepare for the release of Xcode 4, which has working LTO
with static libraries.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7280 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-03 04:35:03 +00:00
hrydgard 3201b61b52 LTCG (link time code gen) was off in some projects, so turn it off in all of them so that the linker doesn't have to restart halfway through.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7084 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-05 20:14:23 +00:00
Soren Jorvang 98e24f5873 The compiler need not obey the static keyword, so to avoid linker
problems, whole functions in .h files need to also be static in
case they are included in several .cpp files.

Also a few other minor LTO fixes.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7082 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-05 16:06:05 +00:00
Soren Jorvang cc289a05bb Turn back on unit tests in SCons.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7057 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-04 01:02:06 +00:00
Soren Jorvang 9c21d003af Remove the global namespace a bit and remove some dead code.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7043 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-02 18:21:20 +00:00
Glenn Rice 8b309e26dc Remove PluginSpecs.h. Merge the few needed enums from that file into Common.h for now. I am up for suggestions on a better place for those.
Fix frame dumping on linux.
Make sure that on screen messages get cleared between games.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7039 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-02 04:40:27 +00:00
Soren Jorvang db1765c425 Move async checking for pressed keys into Host_GetKeyState()
and use wxGetKeyState on platforms other than Windows.

I am not sure if wxGetKeyState is unreliable on Windows or if
the use of GetAsyncKeyState() is simply historical, but for now
I've left the Windows call in there just in case.

This does mean that Host_GetKeyState() is currently only valid
for the small set of keycodes that overlap between wx and Win32,
one of which is VK_TAB/WXK_TAB.

Anyway, please test wxGetKeyState on Windows and remove the
ifdef if it works, so we can extend it to the remaining hotkeys.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6988 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-30 16:40:38 +00:00
Soren Jorvang a22d807bf0 Try to fix Windows build.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6968 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-29 14:58:32 +00:00
Soren Jorvang b3a183dffe Core and DSPCore now have mutual dependencies, which breaks the
assumption on the part of many linkers that static libraries make
up a DAG, so merge libdspcore into libcore.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6967 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-29 14:06:48 +00:00
Soren Jorvang 2a7f305d45 Some preliminary cleanup of the global namespace for LTO.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6942 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-28 00:53:30 +00:00
pierre 98752f2a1e Core/DSPCore: Changed g_dsp._r back to g_dsp.r. Removed the check*Exclude
functions accidentally added. Fixed the jitted ar register arithmetic.
Added a CMakeList.txt for the UnitTests, but did not add the subdirectory
to Source/CMakeLists.txt.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6687 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-29 20:20:52 +00:00
j4ck.fr0st 603c99f64f Compile fix for Unittests.
A lot of tests are failing right now, not sure yet if this is caused by the recent reg changes or other stuff (at least broken according to tests: iar, subarn, addarn, 'ir, 'nr, 'l, 's, 'sn, 'ln, 'lsn, 'lsm, 'lsnm, 'sl etc - err, most/all that use increase/decrease)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6683 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-29 13:05:42 +00:00
Jordan Woyak 26f84c1e74 StringUtil cleanup. Nothing seems broken.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6367 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-10 04:12:31 +00:00
pierre 874dab37f8 Core/DSPCore: Make Jit read from coefficient ROM when told to do so,
change the unit test to catch this bug if it turns up again and two more
zeroWriteBackLog() calls.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6356 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-07 23:15:31 +00:00
pierre 4b9831cdce Core/DSPCore: Extended opcode handling fixes
* Make writeToBackLog private to DSPIntExtOps.cpp 
  (JIT variants of 'l and 'ln are disabled and broken as is)
* Make zeroing of the backlog conditional on doing an interpreter fallback and
  do it at a few more places
* Fix selection of cleanup for extended opcodes.
* Fix the DSP unit tests to correctly emit the function prolog/epilog
  (else EBX wouldn't be saved)
* Add a few more DSP unit tests


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6325 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-10-31 23:26:18 +00:00
Soren Jorvang 75dbad3610 Build but don't install the dsptool/tester/MemcardManager tools
which aren't really useful to typical users.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5935 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-22 03:38:32 +00:00
Glenn Rice 8c7bdebf1e Fix the global build on linux.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5923 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-20 04:19:25 +00:00
Soren Jorvang 6813a75ab2 Some pathnames are used both by SCons and cpp which can be a bit tricky.
Should revisit and make the distinction more explicit.

Put the Data and Sys directories under Resources in the OS X app bundle.

Construct config.h (now lower-case to avoid confusion with other Config.h
instances in the tree) in the root. One tiny step towards a read-only
and cross-buildable source tree.

Some minor bits of non-Linux Unix portability.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5921 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-20 02:45:31 +00:00
Soren Jorvang a2b1f829cb Get rid of a number of unnecessary env.Clones.
Use SCons' convenient # shorthand for the root of our tree.
 
Also various minor cleanup of SConscripts.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5915 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-19 03:42:37 +00:00
luisr142004 c2ee89b170 include the MP compiler option, which will allow for faster compiling + some minorly stuff :p
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5882 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-16 09:22:53 +00:00