Commit graph

26958 commits

Author SHA1 Message Date
Markus Wick
8c1be29cef
Merge pull request #6466 from lioncash/mffs
Interpreter_SystemRegisters: Handle mffs, mtfsb0, mtfsb1, mtfsf and mtfsfi with the record bit set
2018-03-19 09:37:01 +01:00
Markus Wick
523031f037
Merge pull request #6444 from stenzek/d3d-bbox
D3D: Fix broken bounding box
2018-03-19 09:21:22 +01:00
Markus Wick
98b4716902
Merge pull request #6442 from stenzek/async-compiler-priority
ShaderCache: Implement compile priority
2018-03-19 09:16:53 +01:00
Markus Wick
0c0a342483
Merge pull request #6464 from lioncash/using
JitArm64_RegCache: Remove using namespace declaration from header
2018-03-19 09:11:45 +01:00
Markus Wick
22aba8c56d
Merge pull request #6468 from lioncash/downcast
JitInterface: Remove a downcast within InitJitCore
2018-03-19 09:00:56 +01:00
Markus Wick
3d49bdb488
Merge pull request #6462 from lioncash/ppc
PPCTables: Make the op type enum an enum class
2018-03-19 08:55:32 +01:00
Markus Wick
8002bfbc41
Merge pull request #6461 from lioncash/emitter
x64Emitter: Move FloatOp and NormalOp enum definitions into the cpp file
2018-03-19 08:53:00 +01:00
Markus Wick
79b21e1381
Merge pull request #6459 from lioncash/enum
VertexShaderGen: Convert defines to an enum
2018-03-19 08:48:25 +01:00
Markus Wick
768cd7ede5
Merge pull request #6458 from lioncash/remove-mainbase
VideoBackendBase: Migrate functions from MainBase.cpp to VideoBackendBase.cpp
2018-03-19 08:46:35 +01:00
Lioncash
14b204a9bb JitInterface: Remove a downcast within InitJitCore
This isn't necessary as JitBase is already within the type hierarchy that
CPUCoreBase is.
2018-03-19 03:13:16 -04:00
Lioncash
eea99de118 Interpreter_SystemRegisters: Handle mffs, mtfsb0, mtfsb1, mtfsf, and mtfsfi with the record bit set
All of these with the record bit set update condition register 1 with the
contents of the FPSCR's FX, FEX, VX and OX bits.

Helper_UpdateCR1() does exactly that, so we use it here to perform this
for us.
2018-03-19 00:05:00 -04:00
Lioncash
6ae8a2b5f8 JitArm64_RegCache: Remove using namespace declaration from header
Dumping a namespace in a header file should be avoided since it can
cause random name and type clashing in unexpected ways.
2018-03-18 19:39:58 -04:00
Lioncash
6428cee939 PPCTables: Make the op type enum an enum class
Reduces the amount of identifiers dropped into the global namespace when
the PPCTables header is included.
2018-03-18 18:53:58 -04:00
Lioncash
975ba4abf0 x64Emitter: Make FloatOp and NormalOp enum classes
Reduces the amount of identifiers placed in the Gen namespace internally.
2018-03-18 18:04:54 -04:00
Lioncash
c22a6f4551 x64Emitter: Move FloatOp and NormalOp enums to the cpp file
These are only used internally. This also allows us to eliminate some
symbols that get dumped into the exposed Gen namespace.

By extension this also hides the Write[X] functions from OpArg's public
interface. This is only used internally by XEmitter, so they shouldn't
be usable by anything else.
2018-03-18 18:04:48 -04:00
Lioncash
2b3b1e8d09 VertexShaderGen: Convert defines to an enum
Unlike defines, these will actually obey namespacing (should one be
added), and also provide a symbol when debugging, as opposed to a magic
value.
2018-03-18 15:45:20 -04:00
Pierre Bourdon
0c128f3abe
Merge pull request #6450 from leoetlino/nandboot
Boot: Set TYPE_NANDBOOT when booting from NAND
2018-03-18 20:44:44 +01:00
Lioncash
b68e8b872e VideoBackendBase: Migrate functions from MainBase.cpp to VideoBackendBase.cpp
Given that this only contains functions from the VideoBackendBase class,
it makes more sense to move these to the relevant cpp file to keep them
all together.
2018-03-18 15:33:59 -04:00
Léo Lam
b86947264b
Merge pull request #6453 from leoetlino/remove-unused
State: Remove unused Verify functions
2018-03-18 11:24:37 +01:00
Léo Lam
4b3542558a
Merge pull request #6456 from lioncash/video-static
MainBase: Remove unused file-scope variables
2018-03-18 11:24:16 +01:00
Pierre Bourdon
7465906a0f
Merge pull request #6455 from JosJuice/qt-trans-iterator
DolphinQt2: Fix issues with MoIterator
2018-03-17 23:19:26 +01:00
Lioncash
13ed716419 MainBase: Remove effectively unused s_FifoShuttingDown variable
This is only ever set and cleared, which is fine, however nothing else
ever actually reads its state to perform differing behavior.
2018-03-17 18:10:43 -04:00
Lioncash
826c11ba3b MainBase: Remove unused s_beginFieldArgs struct
This is only ever memset to zero and never used again.

This also gets rid of an instance of undefined behavior considering the
draft standard for C++17 (N4659) states at [dcl.type.cv] paragraph 5:

"
The semantics of an access through a volatile glvalue are implementation-defined.
If an attempt is made to access an object defined with a volatile-qualified type
through the use of a non-volatile glvalue, the behavior is undefined.
"
2018-03-17 18:07:08 -04:00
JosJuice
9970f05ec8 DolphinQt2: Fix issues with MoIterator
Before this, DolphinQt2 would crash at boot with an assertion error
when using a Windows debug build, at least if the Dolphin GUI
language was set to English.
2018-03-17 21:54:39 +01:00
Pierre Bourdon
1667980470
Merge pull request #6454 from JosJuice/qt-vs-launch
Fix launching DolphinQt2 from Visual Studio
2018-03-17 19:11:44 +01:00
JosJuice
ffb672286a Fix launching DolphinQt2 from Visual Studio
Fourth time now...
2018-03-17 19:10:57 +01:00
Anthony
87c6ed3e00
Merge pull request #6436 from spycrab/qt_layout
Qt: Improve spacing
2018-03-17 09:57:51 -07:00
spycrab
c421848559 Qt: Improve spacing 2018-03-17 16:14:56 +01:00
Stenzek
56fd7bded4
Merge pull request #6452 from lioncash/shader
OGLShader: Fix mismatched assignment in compute shader constructor
2018-03-17 12:42:36 +10:00
Léo Lam
6aa6be2804 State: Remove unused Verify functions
These were unused in the entire codebase.
2018-03-16 22:56:54 +01:00
Lioncash
882d1c1256 OGLShader: Ensure m_id and m_compute_program_id are always initialized
Depending on which constructor is invoked, m_id or m_compute_program_id
can end up in an uninitialized state. We should ensure that the object
is completely initialized to something deterministic regardless of the
constructor taken.
2018-03-16 17:49:34 -04:00
Lioncash
83f17ac59f OGLShader: Fix mismatched assignment in compute shader constructor
This shouldn't be assigning to the regular ID.
2018-03-16 17:44:23 -04:00
Léo Lam
917f0e2182
Merge pull request #6441 from spycrab/qt_exec
Qt/Main: Add option to launch file without -e
2018-03-16 20:25:13 +01:00
Léo Lam
25704a2494 Boot: Set TYPE_NANDBOOT when booting from NAND
It makes more sense to set TYPE_NANDBOOT than TYPE_RETURN. The latter
is normally only set when returning to the system menu from a game.
2018-03-16 20:17:43 +01:00
JosJuice
bdaa7be299
Merge pull request #6448 from lioncash/qt
DolphinQt2: Fix project loading in VS
2018-03-16 20:17:01 +01:00
Lioncash
293d84b9be DolphinQt2: Fix project loading in VS
These headers are already specified in the QtMoc item section, so these
are seen as a duplicate definition of the file, causing a project load
error.
2018-03-16 15:07:44 -04:00
spycrab
0911b44f60 Qt/Main: Add option to launch file without -e 2018-03-16 19:41:54 +01:00
Pierre Bourdon
6fdac685d6
Merge pull request #6409 from leoetlino/timing
IOS: Minor IPC fixes
2018-03-16 18:54:01 +01:00
Léo Lam
a63aaeecee IOS: Fix "kernel FD table full" error code 2018-03-16 18:51:08 +01:00
Léo Lam
d029f2a7b6 IPC: Clear X1 when acknowledging a reply
Hardware tests indicate that IOS clears X1 when it acknowledges
an IPC request.
2018-03-16 18:51:08 +01:00
Léo Lam
1a71076e50 IPC: Remove incorrect guess about acks
A very basic hardware test shows that the ARMMSG doesn't change until
IOS replies. (People could have disassembled IOS to verify this too...)

Console:

sending request at 00034640 - ARMMSG 133e0fa0
00000000000000000000000000000010(ack) - ARMMSG 133e0fa0
00000000000000000000000000000100(reply) - ARMMSG 00034640

Dolphin, prior to this fix:

sending request (00034640) - ARMMSG 133e0fa0
00000000000000000000000000000011(ack) - ARMMSG 00034640
00000000000000000000000000000100(reply) - ARMMSG 00034640

Dolphin, after this fix:

sending request at 00034640 - ARMMSG 133e0fa0
00000000000000000000000000000011(ack) - ARMMSG 133e0fa0
00000000000000000000000000000100(reply) - ARMMSG 00034640

(Yes, note that the X1 bit is still set. This is a bug that I will
fix in the next commit.)
2018-03-16 18:51:08 +01:00
Léo Lam
b9f7d67667 IPC: Fix missing interrupt when writing to Y1/Y2
The IPC interrupt is triggered when IY1/IY2 is set and Y1/Y2 is written
to even when this results in clearing the bit.

This shouldn't change anything in practice but it's a difference
that Dolphin wasn't taking into account, which made me waste some time
when I was writing a hwtest :/
2018-03-16 18:51:08 +01:00
Léo Lam
35e3775a77 IOS: Remove outdated comment 2018-03-16 18:51:08 +01:00
Léo Lam
fa89614b07 IOS: Adjust IPC timing based on hardware tests
This adjusts IOS IPC timing to be closer to actual hardware:

* Emulate the IPC interrupt delay. On a real Wii, from the point of
  view of the PPC, the IPC interrupt appears to fire about 100 TB ticks
  after Y1/Y2 is seen.

* Fix the IPC acknowledgement delay. Dolphin was much, much too fast.

* Fix Device::GetDefaultReply to return more reasonable delays. Again,
  Dolphin was way too fast. We now use a more realistic, average reply
  time for most requests.

  Note: the previous result from https://dolp.in/pr6374 is flawed.
  GetTicketViews definitely takes more than 25µs to reply.
  The reason the reply delay was so low is because an invalid
  parameter was passed to the libogc wrapper, which causes it to
  immediately return an error code (-4100).

* Fix the response delay for various replies that come from the kernel:
  fd table full, unknown resource manager / device, invalid fd,
  unknown IPC command.

Source: https://github.com/leoetlino/hwtests/blob/af320e4/iostest/ipc_timing.cpp
2018-03-16 18:51:07 +01:00
Léo Lam
7f3156b521
Merge pull request #6447 from lioncash/func
Use __func__ instead of __FUNCTION__ where applicable
2018-03-16 18:48:11 +01:00
Lioncash
7926a0c814 Use __func__ instead of __FUNCTION__ where applicable
This replaces usages of the non-standard __FUNCTION__ macro with the standard
mandated __func__ identifier.

__FUNCTION__ is a preprocessor definition that is provided as an
extension by compilers. This was the only convenient option to rely on
pre-C++11. However, C++11 and greater mandate the predefined identifier
__func__, which lets us accomplish the same thing.

The difference between the two, however, is that __func__ isn't a
preprocessor macro, it's an actual identifier that exists at function
scope. The C++17 draft standard (N4659) at section [dcl.fct.def.general]
paragraph 8 states:

"
The function-local predefined variable __func__ is defined as if a
definition of the form

static const char __func__[] = "function-name ";

had been provided, where function-name is an implementation-defined
string. It is unspecified whether such
a variable has an address distinct from that of any other object in the
program.
"

Thankfully, we don't do any macro or string concatenation with __FUNCTION__
that can't be modified to use __func__.
2018-03-16 13:41:53 -04:00
Léo Lam
76eee7095e
Merge pull request #6446 from lioncash/assert-param
Assert: Remove unused parameter from DEBUG_ASSERT
2018-03-16 18:13:32 +01:00
Lioncash
75f5fcdfee Assert: Remove unused parameter from DEBUG_ASSERT
This brings the macro in line with the regular ASSERT macro, which only has one
macro parameter.
2018-03-16 13:01:11 -04:00
Mat M
328585ef17
Merge pull request #6445 from lioncash/assert-guard
Assert: Wrap assertion macro bodies in do {} while (0)
2018-03-16 12:42:56 -04:00
Lioncash
f44e2dc425 Assert: Wrap assertion macro bodies in do {} while (0)
Enforces the termination of the macro with a semicolon. Aside from that
requirement, behavior remains the same.
2018-03-16 12:35:23 -04:00