Commit Graph

26977 Commits

Author SHA1 Message Date
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
Mat M 9f4d5122a2
Merge pull request #6438 from lioncash/assert
Assert: Uppercase assertion macros
2018-03-16 11:59:14 -04:00
Stenzek 93865b327f ShaderCache: Implement compile priority
Currently, when immediately compile shaders is not enabled, the
ubershaders will be placed before any specialized shaders in the compile
queue in hybrid ubershaders mode. This means that Dolphin could
potentially use the ubershaders for a longer time than it would have if
we blocked startup until all shaders were compiled, leading to a drop in
performance.
2018-03-17 01:53:11 +10:00
Stenzek cb19ddd1d4 D3D: Fix broken bounding box 2018-03-17 00:20:43 +10:00
Stenzek 1259370cdf
Merge pull request #6439 from JosJuice/android-ubershader-config
Bring the Android GUI setting for ubershaders up to date
2018-03-16 23:19:13 +10:00
Anthony d3dd85dbd7
Merge pull request #6440 from spycrab/remove_skip_dcbz
Properties/GameConfig: Remove "Skip DCBZ"
2018-03-15 12:40:11 -07:00
spycrab a2d6bab0d2 Properties/GameConfig: Remove "Skip DCBZ" 2018-03-15 20:33:01 +01:00
Anthony 1c3cc26d19
Merge pull request #6386 from spycrab/qt_dbg_code
Qt/Debugger: Implement "Code" widget
2018-03-15 11:35:26 -07:00
JosJuice 828c2c44ca Bring the Android GUI setting for ubershaders up to date
9fa2470 changed how the ubershader setting is stored in INIs but didn't
update the Android GUI code to reflect that, so the setting in the
Android GUI has been broken starting with that commit.

Fixes https://bugs.dolphin-emu.org/issues/10947
2018-03-15 19:15:13 +01:00
Lioncash 50a476c371 Assert: Uppercase assertion macros
Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
2018-03-14 22:03:12 -04:00
Markus Wick 19d97f3fd9
Merge pull request #6430 from stenzek/uid-cache-fixes
ShaderCache: Fix several issues in background shader compiling
2018-03-14 17:08:36 +01:00
Stenzek 517a977444 ShaderCache: Fix several issues in background shader compiling
- In D3D, shaders could be compiled on the main thread, blocking
startup.
- Reduced the latency between a pipeline being requested and used in all
backends in hybrid ubershader mode, when no shader stages were present.
- Fixed a case where async compilation could cause the same UID to be
appended multiple times to the UID cache.
- Fix incorrect number of threads being used when immediately compile
shaders was enabled.
2018-03-15 01:50:47 +10:00
Stenzek b3f948891a
Merge pull request #6437 from stenzek/gl-element-buffer-binding
OGL: Ensure VAO is active before unmapping buffers
2018-03-15 00:47:50 +10:00
Stenzek dc9012ae08 OGL: Ensure VAO is active before unmapping buffers
Fixes a crash which could occur in platforms which do not support
buffer_storage, and EFB2RAM is enabled (which indirectly uses the
attributeless buffer).
2018-03-15 00:32:39 +10:00
Léo Lam 6813c5e1e9
Merge pull request #6434 from lioncash/x86-dsp
DSPCore: Move x64 JIT source files into an x64 subdirectory
2018-03-14 10:54:46 +01:00
Markus Wick b6ef0691e7
Merge pull request #6435 from stenzek/mali-primitive-restart
DriverDetails: Disable primitive restart on Vulkan with Mali driver
2018-03-14 09:43:36 +01:00
Lioncash 9f2a46b08d DSPCore: Use nested namespace specifiers for the x64 JIT
Slims down the amount of lines needed for namespacing.
2018-03-13 18:57:25 -04:00
Lioncash b3fd79b45a DSPCore: Rename namespace to match moved x64 JIT files
Maintains consistency between location and code
2018-03-13 18:48:16 -04:00
Lioncash ab5b90bf15 DSPCore: Move x64 JIT source files into an x64 subdirectory
While the code is namespaced out properly, the files weren't separated
into their own directory. This moves the files so that introducing a general
interface is easier in the future for supporting other architectures.
2018-03-13 18:26:26 -04:00
Stenzek 51e4014a35 DriverDetails: Disable primitive restart on Vulkan with Mali driver 2018-03-14 02:56:24 +10:00
Stenzek db810956ec Vulkan: Provide a more accurate method of detecting drivers/vendors
This is needed to differentiate between the open-source Mesa drivers and
their binary counterparts for Intel and AMD.
2018-03-14 02:48:53 +10:00
Markus Wick f7ff634e4f
Merge pull request #6432 from degasus/OGL-OSD-update
OGL: Scale OSD text on big screens.
2018-03-13 16:37:58 +01:00
Pierre Bourdon 8a2cc14656
Merge pull request #6433 from hrydgard/optimize-uninitialize-xfb-memory
SSE-optimize UninitializeXFBMemory
2018-03-13 12:42:24 +01:00
Henrik Rydgård 6cbb716f60 SSE-optimize UninitializeXFBMemory
Lowest hanging fruit I could find with a profiler.

Not sure this stuff actually needs to be done, but assuming it is, why
not do it quickly? 10x faster, goes from 1% CPU to 0.09%.
2018-03-13 11:55:28 +01:00
degasus a5c0739fab OGL: Scale OSD text on big screens. 2018-03-12 20:38:06 +01:00
degasus d4449971c9 OGL: Warn if buffer_storage isn't available.
Yes, this commit is only to blame OSX and Mali. Through the former supports unsynchronized mappings, the latter supports *no* way to stream dynamic data at all. Let's try to make bad news, as they ignore friendly feature requests. Maybe we just need to make more noise...
2018-03-12 20:38:00 +01:00
Léo Lam 90ca62e416
Merge pull request #6428 from JosJuice/qt-zh-order
Qt2 translation: Don't place "zh_CN" and "zh_TW" after "zh"
2018-03-12 18:44:41 +01:00
JosJuice 4b85f7fe79 Qt2 translation: Don't place "zh_CN" and "zh_TW" after "zh"
The least specific language code should be tried last.
2018-03-11 22:27:17 +01:00
Pierre Bourdon d3ef7f0bd5
Merge pull request #6431 from stenzek/uid-cache-version
ShaderCache: Decouple shader UID cache from git commit
2018-03-11 08:38:58 +01:00
Stenzek 427aa188d4 ShaderCache: Use a version number for pipeline UID caches 2018-03-11 14:48:09 +10:00
Léo Lam 63d5e57337
Merge pull request #6419 from Ebola16/Fix_OpenAL
Change FATAL_ERROR to STATUS message for OpenAL not found in externals
2018-03-10 13:35:30 +01:00
Pierre Bourdon d72947d638
Merge pull request #6427 from JosJuice/thousandseparate-encoding
StringUtil: Fix Windows encoding in ThousandSeparate
2018-03-10 13:16:00 +01:00