Commit Graph

14736 Commits

Author SHA1 Message Date
bunnei c35a7e8b3a Merge pull request #4539 from lioncash/disc
common: Silence two discarded result warnings
2020-08-18 22:03:09 -04:00
bunnei 02b8956639 Merge pull request #4522 from lioncash/vulk-copy
vulkan/wrapper: Avoid unnecessary copy in EnumerateInstanceExtensionProperties()
2020-08-18 19:31:35 -04:00
Lioncash ecb9029c6a common/telemetry: Migrate namespace into the Common namespace
Migrates the Telemetry namespace into the Common namespace to make the
code consistent with the rest of our common code.
2020-08-18 15:08:32 -04:00
Lioncash d9fc3abc1f vfs_real: Resolve sign conversion warnings 2020-08-18 14:58:33 -04:00
Lioncash 182739ce1b vfs_real: Avoid redundant map lookups
Avoids some trivially avoidable map lookups by keeping the result of
find operations around and querying them.
2020-08-18 14:58:29 -04:00
Lioncash 475e8a40ea common/color: Migrate code over to the Common namespace
No external code makes use of this header, so we can freely change the
namespace.
2020-08-18 14:27:41 -04:00
Lioncash e478c61eeb common/concepts: Move <type_traits> include out of the Common namespace
This is a compiler/linker error waiting to happen.
2020-08-18 14:24:54 -04:00
bunnei 0e803716d2 Merge pull request #4381 from Morph1984/fix-open-folder-installed-title
main: Fix Open Save/Mod Locations for installed titles
2020-08-18 12:54:06 -04:00
bunnei d41da32b19 Merge pull request #4532 from lioncash/object-name
configuration_shared: Simplify name lookup in highlighting functions
2020-08-18 00:45:02 -04:00
bunnei ab2ebb773e Merge pull request #4535 from lioncash/fileutil
common/fileutil: Convert namespace to Common::FS
2020-08-17 22:35:30 -04:00
bunnei 02ad0482f1 Merge pull request #4537 from lioncash/tz
common/time_zone: Simplify GetOsTimeZoneOffset()
2020-08-17 14:27:02 -04:00
bunnei 6c92f886d3 Merge pull request #4540 from lioncash/tr3
configure_hotkeys: Don't translate empty strings
2020-08-17 12:24:58 -04:00
bunnei 337c9de4bd Merge pull request #4494 from lioncash/transcode
aes_util: Make use of non-template variant of Transcode
2020-08-17 03:50:35 -04:00
Rodrigo Locatti dab507e850 Merge pull request #4531 from lioncash/overload
yuzu: Make use of qOverload where applicable
2020-08-17 04:13:14 -03:00
David a705bd0ef6 Merge pull request #4443 from ameerj/vk-async-shaders
vulkan_renderer: Async shader/graphics pipeline compilation
2020-08-17 15:06:11 +10:00
bunnei 5476c87467 Merge pull request #4515 from lat9nq/pgs-menubar-config
main: Add an option to modify the currrent game's configuration
2020-08-17 01:03:39 -04:00
David b88580e35d Merge pull request #4520 from lioncash/pessimize
async_shaders: Resolve -Wpessimizing-move warning
2020-08-17 14:36:05 +10:00
ameerj 4cb6ad9eaf Remove unneeded newlines, optional Registry in shader params
Addressing feedback from Rodrigo
2020-08-16 16:33:21 -04:00
Ameer J 8374d79c4b Morph: Update worker allocation comment
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2020-08-16 12:02:22 -04:00
ameerj b467d4dbd0 move thread 1/4 count computation into allocate workers method 2020-08-16 12:02:22 -04:00
ameerj 3fa34fa7bf Address feedback, add shader compile notifier, update setting text 2020-08-16 12:02:22 -04:00
ameerj 5a2879a781 Vk Async Worker directly emplace in cache 2020-08-16 12:02:22 -04:00
ameerj f029fa19bf Address feedback. Bruteforce delete duplicates 2020-08-16 12:02:22 -04:00
ameerj 77698ae7d6 Vk Async pipeline compilation 2020-08-16 12:02:22 -04:00
David Marcec f17f347e03 Preliminary effects 2020-08-17 01:23:55 +10:00
MerryMage 1057908c3a dynarmic: Add unsafe optimizations 2020-08-16 14:15:39 +01:00
Lioncash ea46b5546b configure_hotkeys: Don't translate empty strings
There's no need to translate an empty string. This just gives
translators unnecessary work.
2020-08-16 08:13:25 -04:00
Lioncash a87209e09d common/fileutil: Convert namespace to Common::FS
Migrates a remaining common file over to the Common namespace, making it
consistent with the rest of common files.

This also allows for high-traffic FS related code to alias the
filesystem function namespace as

namespace FS = Common::FS;

for more concise typing.
2020-08-16 06:52:40 -04:00
Lioncash a67c91f9dd common: Silence two discarded result warnings
These are intentionally discarded internally, since the rest of the
public API allows querying success. We want all non-internal uses of
these functions to be explicitly checked, so we can signify that we
intentionally want to discard the return values here.
2020-08-16 06:17:33 -04:00
Lioncash 89b10968fc common/time_zone: Simplify GetOsTimeZoneOffset()
We can simplify this function down into a single line with the use of
fmt. A benefit with the fmt approach is that the fmt variant of
localtime is thread-safe as well, making GetOsTimeZoneOffset()
thread-safe as well.
2020-08-16 03:58:47 -04:00
Lioncash f9fe50958e yuzu: Resolve -Wextra-semi warnings
While we're in the same area, we can ensure GameDir member variables are
always initialized to consistent values.
2020-08-16 03:58:29 -04:00
bunnei f3ea8a3653 Merge pull request #4528 from lioncash/discard
common: Make use of [[nodiscard]] where applicable
2020-08-16 01:47:54 -04:00
bunnei e6984ce40f Merge pull request #4519 from lioncash/semi
maxwell_3d: Resolve -Wextra-semi warning
2020-08-16 00:55:15 -04:00
lat9nq 385449fb24 main: Add an option to modify the currrent game's configuration
Creates a new entry in the Emulation menu called "Configure Current Game..." that is only available if a game is currently being executed in yuzu. When selected, it opens the game properties dialog for the current game.

Thanks to @BSoDGamingYT for reminding me to do this.
2020-08-15 20:28:48 -04:00
Lioncash 0977ef7d7f common/compression: Roll back std::span changes
Seems like all compilers don't support std::span yet.
2020-08-15 17:17:56 -04:00
Lioncash 2ef7815422 common: Make use of [[nodiscard]] where applicable
Now that clang-format makes [[nodiscard]] attributes format sensibly, we
can apply them to several functions within the common library to allow
the compiler to complain about any misuses of the functions.
2020-08-15 17:17:52 -04:00
bunnei 81eae1562a Merge pull request #4526 from lioncash/core-semi
core: Resolve several -Wextra-semi warnings
2020-08-15 02:14:11 -04:00
bunnei 2f477fe630 Merge pull request #4527 from lioncash/pessimizing2
software_keyboard: Resolve a pessimizing move warning
2020-08-15 02:13:44 -04:00
bunnei a191355688 Merge pull request #4492 from lioncash/linkage
system_control: Make functions internally linked where applicable
2020-08-15 02:11:49 -04:00
bunnei 88fdc4c659 Merge pull request #4463 from lioncash/lockdiscard
kernel/scheduler: Mark SchedulerLock constructor as nodiscard
2020-08-15 01:31:23 -04:00
bunnei 352755a57a Merge pull request #4416 from lioncash/span
lz4_compression/zstd_compression: Make use of std::span in interfaces
2020-08-15 00:53:11 -04:00
bunnei d9dacef9d7 Merge pull request #4453 from ReinUsesLisp/block-to-linear
textures/decoders: Fix block linear to pitch copies
2020-08-14 19:52:12 -04:00
Lioncash f6ff8a0235 configuration_shared: Simplify name lookup in highlighting functions
We can query the given object name directly from the widget itself. This
removes any potential for forgetting to change the name if the widget
gets renamed and makes the API much simpler (just pass in the widget,
and not worry about its name).
2020-08-14 14:17:02 -04:00
Lioncash 0d29e40857 yuzu: Make use of qOverload where applicable
Eliminates a verbose function cast.
2020-08-14 14:12:55 -04:00
Lioncash b86bba9f7e time_zone_content_manager: Collapse auto and default case
Prevents a useless self-assignment from occurring.
2020-08-14 10:58:58 -04:00
David Marcec ac9d36c1dc Disable biquad filter 2020-08-14 23:20:20 +10:00
Lioncash 910dff8816 software_keyboard: Resolve a pessimizing move warning
A std::vector created in place like this is already an rvalue and
doesn't need to be moved.
2020-08-14 09:14:54 -04:00
Lioncash 0c78ed16df core: Resolve several -Wextra-semi warnings
We can amend one of the cascade macros to require semicolons in order to
compile. In other cases, we can just remove the superfluous semicolons.
2020-08-14 09:09:20 -04:00
Lioncash 7557cf39f9 shader/memory: Amend UNIMPLEMENTED_IF_MSG without a message
We need to provide a message for this variant of the macro, so we can
simply log out the type being used.
2020-08-14 08:38:37 -04:00
Lioncash dea59d837b macro-interpreter: Resolve -Wself-assign-field warning
This was assigning the field to itself, which is a no-op. The size
doesn't change between its initial assignment and this one, so this is a
safe change to make.
2020-08-14 08:26:50 -04:00
Lioncash cde4447257 vulkan/wrapper: Avoid unnecessary copy in EnumerateInstanceExtensionProperties()
Given this is implicitly creating a std::optional, we can move the
vector into it.
2020-08-14 08:23:49 -04:00
Lioncash cb79f177aa gl_shader_disk_cache: Make use of std::nullopt where applicable
Allows the compiler to avoid unnecessarily zeroing out the internal
buffer of std::optional on some implementations.
2020-08-14 08:20:44 -04:00
Lioncash a743375791 async_shaders: Resolve -Wpessimizing-move warning
Prevents pessimization of the move constructor (which thankfully didn't
actually happen in practice here, given std::thread isn't copyable).
2020-08-14 08:16:50 -04:00
Lioncash 6dd94f94e6 maxwell_3d: Resolve -Wextra-semi warning
Semicolons after a function definition aren't necessary.
2020-08-14 08:13:41 -04:00
David Marcec 2b0185e2a0 Reworked ADPCM decoder to allow better streaming 2020-08-14 21:04:28 +10:00
Lioncash f44ad07f2f emu_window: Mark Scoped constructor and Acquire() as nodiscard
Ensures that callers make use of the constructor, preventing bugs from
silently occurring.
2020-08-14 04:43:44 -04:00
Lioncash 8d7e58562f kernel/scheduler: Mark SchedulerLock constructor as nodiscard
Allows the compiler to warn about cases where the constructor is used
but then immediately discarded, which is a potential cause of
locking/unlocking bugs.
2020-08-14 04:43:44 -04:00
Rodrigo Locatti 2740be0f9d Merge pull request #4495 from lioncash/conv
cheat_engine: Resolve implicit bool->u64 conversion
2020-08-14 03:10:17 -03:00
bunnei a03ec7bdf4 Merge pull request #4514 from Morph1984/worker-alloc
gl_shader_cache: Use std::max() for determining num_workers
2020-08-13 17:06:57 -04:00
LC 77a3efb1c5 Merge pull request #4511 from lioncash/build2
General: Tidy up clang-format warnings part 2
2020-08-13 15:13:21 -04:00
Lioncash 78ddcbe3ba General: Tidy up clang-format warnings part 2 2020-08-13 14:19:08 -04:00
Morph 237d4bb1c5 gl_shader_cache: Use std::max() for determining num_workers
Does not allocate more threads than available in the host system for boot-time shader compilation and always allocates at least 1 thread if hardware_concurrency() returns 0.
2020-08-12 09:23:34 -04:00
bunnei d7958019b6 Merge pull request #4497 from lioncash/freezer-alg
freezer: Make use of std::erase_if
2020-08-11 23:07:17 -04:00
bunnei 0a7b8e1308 Merge pull request #4493 from jbeich/dragonfly
common/virtual_buffer: drop unused includes
2020-08-11 12:52:50 -04:00
bunnei 312c3a7327 Merge pull request #4502 from lioncash/build
General: Tidy up clang-format warnings
2020-08-11 11:04:05 -04:00
ReinUsesLisp 9a83f8794b textures/decoders: Fix block linear to pitch copies
There were two issues with block linear copies. First the swizzling was
wrong and this commit reimplements them.

The other issue was that these copies are generally used to download
render targets from the GPU and yuzu was not downloading them from
host GPU memory unless the extreme GPU accuracy setting was selected.
This commit enables cached memory reads for all accuracy levels.

- Fixes level thumbnails in Super Mario Maker 2.
2020-08-10 20:45:03 -03:00
bunnei 10c4fff79c Merge pull request #4496 from lioncash/ce-desig
cheat_engine: Make use of designated initializers
2020-08-10 13:53:43 -04:00
ameerj 5d4750541b Remove UI changes
This PR is now only the Analog devices handling the range value defaulting at 100%
2020-08-10 12:46:14 -04:00
ameerj ac3cdc1741 Add range slider functionality for gc adapter 2020-08-10 12:46:14 -04:00
Ameer 6afee6b0c8 undo unnecessary newlines, slider range 50-150 2020-08-10 12:46:14 -04:00
Ameer 16d15421c5 Address c++20 warning, fix inaccurate range text display when slide == 0 2020-08-10 12:46:14 -04:00
Ameer 1eb1eff48c Add range slider for analog sticks 2020-08-10 12:46:14 -04:00
bunnei 16993fc92b Merge pull request #4491 from lioncash/unused-vars
kernel: Remove unused variables
2020-08-10 12:04:30 -04:00
bunnei 51bfe3397f Merge pull request #4488 from lioncash/file
vfs_vector: Make creation of array vfs files less verbose
2020-08-09 17:19:34 -04:00
Lioncash 14874f0b67 General: Tidy up clang-format warnings 2020-08-08 20:08:44 -04:00
bunnei dc446cf34e Merge pull request #4448 from Morph1984/fix-entries
game_list_worker: Do not clear entries when > 1 gamedir is present
2020-08-07 17:11:52 -04:00
bunnei 7483e76613 Merge pull request #4457 from ogniK5377/SetScreenShotPermission
am: Unstub SetScreenShotPermission
2020-08-07 09:34:20 -04:00
bunnei d17331ebbf Merge pull request #4389 from ogniK5377/redundant-format-type
video_core: Remove redundant pixel format type
2020-08-07 09:33:58 -04:00
Lioncash 80d04c0daa common/concepts: Rename IsBaseOf to DerivedFrom
This makes it more inline with its currently unavailable standardized
analogue std::derived_from.

While we're at it, we can also make the template match the requirements
of the standardized variant as well.
2020-08-07 08:09:57 -04:00
bunnei 27636c8a7a Merge pull request #4483 from lioncash/constexpr-hex
partition_data_manager: Make data arrays constexpr
2020-08-06 23:14:14 -04:00
bunnei 556422d711 Merge pull request #4490 from lioncash/arbiter
address_arbiter/scheduler: Resolve sign conversion warnings
2020-08-06 22:28:11 -04:00
Lioncash 21229948aa freezer: Move entry finding to its own function
Cleans up the callsites in other functions.
2020-08-06 03:11:21 -04:00
Lioncash 4a54d99f0d freezer: Take address values by value
VAddr will always be 64-bit, so there's no need to take a trivial
primitive alias by reference.
2020-08-06 03:04:54 -04:00
Lioncash b67eb6746b freezer: Make use of std::erase_if
With C++20 we can simplify the erasing idiom.
2020-08-06 03:03:05 -04:00
Lioncash 304da7bfc8 cheat_engine: Resolve implicit bool->u64 conversion
We can just return zero here.
2020-08-06 02:55:47 -04:00
Lioncash 6c2392941b cheat_engine: Make use of designated initializers
Same behavior, but makes the member being assigned obvious.
2020-08-06 02:48:13 -04:00
Lioncash accf36193b partition_data_manager: Update master key hashes
Fills in some hashes that were previously unhandled.
2020-08-06 02:42:01 -04:00
Lioncash b0c3f66dc7 partition_data_manager: Make data arrays constexpr
Previously the constructor for all of these would run at program
startup, consuming time before the application can enter main().

This is also particularly dangerous, given the logging system wouldn't
have been initialized properly yet, yet the program would use the logs
to signify an error.

To rectify this, we can replace the literals with constexpr functions
that perform the conversion at compile-time, completely eliminating the
runtime cost of initializing these arrays.
2020-08-06 02:41:58 -04:00
Lioncash c4f9130264 partition_data_manager: Eliminate magic value
We can use sizeof to make it obvious at the call site where the value is
coming from.
2020-08-06 02:34:10 -04:00
Lioncash 8b8cb4da9f aes_util: Make use of non-template variant of Transcode
Same behavior, less template instantiations.
2020-08-06 02:31:19 -04:00
comex 23523e4c0a Fix thread naming on Linux, which limits names to 15 bytes.
- In `SetCurrentThreadName`, when on Linux, truncate to 15 bytes, as (at
  least on glibc) `pthread_set_name_np` will otherwise return `ERANGE` and
  do nothing.
- Also, add logging in case `pthread_set_name_np` returns an error
  anyway.  This is Linux-specific, as the Apple and BSD versions of
  `pthread_set_name_np return `void`.
- Change the name for CPU threads in multi-core mode from
  "yuzu:CoreCPUThread_N" (19 bytes) to "yuzu:CPUCore_N" (14 bytes) so it
  fits into the Linux limit.  Some other thread names are also cut off,
  but I didn't bother addressing them as you can guess them from the
  truncated versions.  For a CPU thread, truncation means you can't see
  which core it is!
2020-08-05 20:34:49 -07:00
bunnei f0be76a50a Merge pull request #4489 from lioncash/typesafe
ipc_helpers: Only allow trivially copyable objects with PushRaw() and PopRaw()
2020-08-05 23:20:23 -04:00
bunnei 7f6689983f Merge pull request #4484 from lioncash/aesutil
aes_util: Allow SetIV() to be non-allocating
2020-08-05 22:35:41 -04:00
bunnei 9e2e3dacdd Merge pull request #4477 from lioncash/log-desig
logging/backend: Make use of designated initializers
2020-08-05 22:34:12 -04:00
Jan Beich ff9473d6a0 common/virtual_buffer: drop unused includes
On DragonFly and NetBSD build fails with

src/common/virtual_buffer.cpp
src/common/virtual_buffer.cpp:16:10: fatal error: sys/sysinfo.h: No such file or directory
 #include <sys/sysinfo.h>
          ^~~~~~~~~~~~~~~
2020-08-05 21:36:35 +00:00
bunnei c6ea0b876c Merge pull request #4475 from lioncash/bqueue
buffer_queue: Make use of designated initializers/std::nullopt where applicable
2020-08-05 16:56:46 -04:00
bunnei 5c068fa60c Merge pull request #4479 from lioncash/concepts
CMakeLists: Resolve #4478
2020-08-05 16:18:08 -04:00
Lioncash 9e72b1df7d system_control: Make functions internally linked where applicable
These functions are only ever used internally as implementation details
for GenerateRandomRange(), so these can be given internal linkage.
2020-08-05 15:34:27 -04:00
Lioncash 3ea31a9922 kernel: Remove unused variables
Resolves a few compiler warnings.
2020-08-05 15:19:48 -04:00
Lioncash 353cd8dc24 scheduler: Resolve sign conversion warning 2020-08-05 15:12:29 -04:00
Lioncash 792c1666f7 address_arbiter: Resolve sign conversion warning
Makes our type conversion explicit.
2020-08-05 15:07:19 -04:00
bunnei 88efb0c4ce Merge pull request #4444 from lioncash/volatile
common/atomic_ops: Don't cast away volatile from pointers
2020-08-05 14:22:36 -04:00
Lioncash 43ef4a7305 ipc_helpers: Only allow trivially copyable objects with PushRaw() and PopRaw()
It's undefined behavior to use non-trivially copyable objects with
std::memcpy, so we can add asserts to catch usages of these at
compile-time.
2020-08-05 14:08:28 -04:00
Lioncash 42c79b8507 vfs_vector: Make creation of array vfs files less verbose
We can add a helper function to make creation of these files nicer.
While we're at it, we can eliminate an unnecessary std::array copy in
the constructor. This makes the overhead on some of these functions way
less intensive, given some arrays were quite large.

e.g. The timezone location names are 9633 bytes in size.
2020-08-05 12:37:00 -04:00
bunnei ccd9337ec7 Merge pull request #4466 from ogniK5377/loader-type-safe
loader: Make IdentifyFile typesafe
2020-08-05 12:34:25 -04:00
Morph 8890184d23 main: Fallback to loader if no control nca is found with patch manager
In some rare instances, the patch manager is not able to find a control nca, fallback to the previous method of parsing a control nca through the loader if this occurs.
2020-08-04 21:14:20 -04:00
Morph 714a04ebd8 main: Fix Open Save/Mod Locations for installed titles
Previously NAND/SDMC installed titles would open device saves when they are supposed to be user saves. This is due to the control nca not being read and thus returns 0 for both GetDefaultNormalSaveSize() and GetDeviceSaveDataSize(). Fix this by utilizing the patch manager to read the control nca.
2020-08-04 21:14:20 -04:00
Morph 07603e19b9 game_list_worker: Do not clear entries when > 1 gamedir is present
Previously the map of entries was being cleared while looping through each game directory, this resulted into all game directories except the last game dir to lose content metadata information. Fix this by clearing the entries only once.
2020-08-04 21:13:35 -04:00
bunnei 460d686bbd Merge pull request #4476 from lioncash/tz
time_zone_binary: Make use of designated initializers
2020-08-04 18:56:28 -04:00
bunnei 4e96278c63 Merge pull request #4401 from ogniK5377/GetIndirectLayerImageRequiredMemoryInfo
vi: IApplicationDisplayService:GetIndirectLayerImageRequiredMemoryInfo
2020-08-04 18:45:11 -04:00
bunnei 09bd480eab Merge pull request #4430 from bunnei/new-gpu-vmm
hle: nvdrv: Rewrite of GPU memory management.
2020-08-04 18:44:26 -04:00
bunnei 62a64fc33b Merge pull request #4445 from Morph1984/async-threads
renderer_opengl: Use 1/4 of all threads for async shader compilation
2020-08-04 18:43:42 -04:00
bunnei 9fa1bebc57 Merge pull request #4450 from Morph1984/fix-gamelist-scanning
game_list_worker: Fix game list subdirectory scanning
2020-08-04 18:43:17 -04:00
bunnei e909b4731b Merge pull request #4472 from lioncash/const-get
perf_stats: Mark GetMeanFrametime() as const
2020-08-04 07:00:23 -07:00
bunnei 7cbb4227c7 Merge pull request #4469 from lioncash/missing
vk_texture_cache: Silence -Wmissing-field-initializer warnings
2020-08-04 06:59:51 -07:00
David 614476af30 Merge pull request #4470 from lioncash/qualifier
patch_manager: Resolve -Wignored-qualifier warnings
2020-08-04 14:09:48 +10:00
David 82f4fb21e8 Merge pull request #4481 from lioncash/cpp-dep
yuzu: Resolve C++20 deprecation warnings related to lambda captures
2020-08-04 14:06:07 +10:00
David a7fa221005 Merge pull request #4474 from lioncash/hle-profile
profile_manager: Make use of designated initializers
2020-08-04 13:51:15 +10:00
bunnei a4ff924420 Merge pull request #4473 from lioncash/cheat-desig
dmnt_cheat_vm: Make use of designated initializers
2020-08-03 18:07:17 -07:00
bunnei cf35405a71 Merge pull request #4456 from Morph1984/stub-really-long-fs-func
fsp-srv: Stub Read/WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute
2020-08-03 18:06:48 -07:00
Lioncash c28e7f51f3 aes_util: Allow SetIV to be non-allocating
In a few places, the data to be set as the IV is already within an array.
We shouldn't require this data to be heap-allocated if it doesn't need
to be. This allows certain callers to reduce heap churn.
2020-08-03 14:29:58 -04:00
bunnei afe7c91b50 Merge pull request #4480 from lioncash/optimize
tests/core_timing: Remove pragma optimize(off)
2020-08-03 11:27:52 -07:00
bunnei cdd9f577b4 Merge pull request #4482 from lioncash/ldr-sign
service/ldr: Resolve sign mismatch warnings
2020-08-03 11:27:13 -07:00
bunnei 70a59da903 Merge pull request #4468 from lioncash/regcache
registered_cache: Resolve -Wmaybe_uninitialized warnings
2020-08-03 11:26:45 -07:00
bunnei 9a685a6c85 Merge pull request #4471 from ogniK5377/sm-getservice-concept
sm: Make use of IsBaseOf for GetService
2020-08-03 11:11:22 -07:00
Lioncash bb711ced9d perf_stats: Make use of designated initializers
Same behavior, but allows us to avoid a now-unnecessary zero
initialization.
2020-08-03 12:33:40 -04:00
Lioncash 2a2bc9c147 perf_stats: Mark GetMeanFrametime() as const
The general pattern is to mark mutexes as mutable when it comes to
matters of constness, given the mutex acts as a transient member of a
data structure.
2020-08-03 12:33:35 -04:00
Lioncash 29ee53cb35 vulkan: Silence more -Wmissing-field-initializer warnings 2020-08-03 12:28:57 -04:00
Lioncash 08e30e0240 yuzu: Resolve C++20 deprecation warnings related to lambda captures
C++20 deprecates capturing the this pointer via the '=' capture.
Instead, we replace it or extend the capture specification.
2020-08-03 11:54:04 -04:00
Lioncash 78ff298d6d service/ldr: Resolve sign mismatch warnings
We were performing an int < size_t comparison. We can just correct the
type of the induction variable.
2020-08-03 11:48:16 -04:00
Lioncash 7967b2cb56 CMakeLists: Resolve #4478
This switch is enabled by default in all recent versions of GCC and
Clang.
2020-08-03 11:21:24 -04:00
Lioncash 2745697bcc tests/core_timing: Remove pragma optimize(off)
I made a review comment about this in the PR that this was introduced
in (#3955, commit 4df46e0525), but it
seems to have been missed.

We shouldn't be using this pragma here because it's MSVC specific. This
causes warnings on other compilers.

The test it's surrounding is *extremely* dubious, but for the sake of
silencing warnings on other compilers, we can mark "placebo" as volatile
and be on with it.
2020-08-03 11:12:55 -04:00
bunnei be05759325 Merge pull request #4467 from lioncash/mode
file_sys/mode: Make use of DECLARE_ENUM_FLAG_OPERATORS with Mode
2020-08-03 08:07:56 -07:00
Lioncash 607a02edda time_zone_binary: Make use of designated initializers 2020-08-03 10:42:38 -04:00
Lioncash 8190a40d18 logging/backend: Make use of designated initializers
Same behavior, less code.
2020-08-03 10:37:48 -04:00
Lioncash a1aab876e6 buffer_queue: Make use of std::nullopt
Allows compilers to eliminate unnecessary zeroing out of the optional's
buffer.
2020-08-03 09:31:51 -04:00
Lioncash 9b1ab372a7 buffer_queue: Make use of designated initializers 2020-08-03 09:31:51 -04:00
Lioncash 5430961f0d profile_manager: Make use of std::nullopt
Allows some implementations to completely avoid unnecessarily zeroing
out the internal buffer.
2020-08-03 09:03:42 -04:00
Lioncash 1f909d614c profile_manager: Make use of designated initializers
More compact code.
2020-08-03 09:01:31 -04:00
Lioncash 743ed2b727 dmnt_cheat_vm: Make use of designated initializers
Allows for more compact code.
2020-08-03 08:50:51 -04:00
Lioncash 2fa750dd6b file_sys/mode: Make use of DECLARE_ENUM_FLAG_OPERATORS with Mode
Same behavior, minus a hand-rolled operator.
2020-08-03 07:52:36 -04:00
David Marcec 4d0ba04c73 sm: Make use of IsBaseOf for GetService 2020-08-03 21:46:14 +10:00
Lioncash 39ac833461 patch_manager: Resolve -Wignored-qualifier warnings
Top level const will always be ignored in this case, so it can be
removed.
2020-08-03 07:42:56 -04:00
Lioncash 872200c7a9 registered_cache: Resolve -Wmaybe_uninitialized warnings
While we're at it, we can avoid a redundant map lookup.
2020-08-03 07:34:46 -04:00
David Marcec b20f4de430 Place in anonymous namespace 2020-08-03 21:31:28 +10:00
David Marcec 46d3c84839 loader: Make IdentifyFile typesafe
Relies on #4465 for concept.h Common::IsBaseOf
2020-08-03 21:31:27 +10:00
David ecaac59acd ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer (#4465)
* ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer

With the support of C++20, we can use concepts to deduce if a type is an STL container or not.

* More agressive concept for stl containers

* Add -fconcepts

* Move to common namespace

* Add Common::IsBaseOf
2020-08-03 07:28:54 -04:00
David 6ecae2e559 Merge pull request #4263 from lat9nq/fix-screencaps-2
screenshots: Option to save screenshots immediately in a specified directory + Linux workaround
2020-08-03 21:00:14 +10:00
David 6b05ff83bb Merge pull request #4439 from lioncash/cpu
cpu_manager: Remove redundant std::function declarations
2020-08-03 20:58:31 +10:00
David 1e44d65d1e Merge pull request #4438 from lioncash/localizing
yuzu/main: Remove redundant usages of QStringLiteral("")
2020-08-03 20:58:00 +10:00
David Marcec 0cd3851934 mix buffer depopping 2020-08-01 16:25:08 +10:00
Morph f6fa311cf9 minor nits 2020-07-31 11:02:59 -04:00
David Marcec 542ea8c6e8 am: Unstub SetScreenShotPermission 2020-08-01 00:44:14 +10:00
Morph 488cacca52 fsp-srv: Stub Read/WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute
Stub these 2 service commands required for Animal Crossing: New Horizons Update 1.4.0
2020-07-30 15:39:44 -04:00
Morph 06adef078c fs: Rename SaveDataDescriptor to SaveDataAttribute 2020-07-30 15:29:39 -04:00
David 4d4f03d11c Merge pull request #4392 from lioncash/guard
compatible_formats: Add missing header guard
2020-07-31 01:08:56 +10:00
David Marcec 6368b02526 adpcm streaming 2020-07-30 18:16:57 +10:00
bunnei 2441e2670e Merge pull request #4396 from lioncash/comma
surface_params: Replace questionable usages of the comma operator with semicolons
2020-07-29 19:55:44 -04:00
Morph 9759c28518 game_list_worker: Fix game list subdirectory scanning
Oddly enough the scan that feeds the manual content provider is hardcoded to scan 2 nested directories deep.
This effectively rendered the scan subdirectories setting useless as the manual content provider cannot find any games located more than 2 nested directories deep.
Furthermore, this behavior causes game files to be picked up by the manual content provider even if scan subdirectories is disabled.

FIx this by utilizing the behavior described when populating the game list for populating the content provider.
2020-07-29 09:22:29 -04:00
Morph eafd4145ac main: Add support for removing SDMC installed titles 2020-07-29 06:50:30 -04:00
Morph 4a6d4ab839 xts_archive: Check if the file is nullptr prior to parsing
Fixes an access violation where the file no longer exists at the specified path while being parsed.
2020-07-29 06:50:30 -04:00
Morph 0724e89467 registered_cache: Add support for removing folder ncas 2020-07-29 06:50:30 -04:00
Morph d15eb82edc game_list: Limit context menu options for homebrew
Hides the following options when the title id is 0:
- Open Save Location
- Open Mod Data Location
- Open Transferable Shader Cache
- All removal options except Remove Custom Configuration
2020-07-29 06:50:30 -04:00
Morph 81e3d7e924 main: Remove assert for opening savedata when program_id = 0 2020-07-29 06:50:30 -04:00
Morph 092dda59cb main: Silence [[fallthrough]] warning 2020-07-29 06:50:30 -04:00
Morph 0c6e683a63 main: Split removal cases into their individual functions and address feedback 2020-07-29 06:50:30 -04:00
Morph 96583b9b05 main: Connect game list remove signals to removal functions 2020-07-29 06:50:30 -04:00
Morph c756d76945 game_list: Add "Remove" context menu
Adds the following actions:
- Remove Installed Update
- Remove All Installed DLC
- Remove Shader Cache
- Remove Custom Configuration
- Remove All Installed Contents
2020-07-29 06:50:30 -04:00
bunnei 04a8b17939 Merge pull request #4442 from lioncash/devicemem
device_memory: Remove unused system member
2020-07-28 13:03:30 -07:00
Morph 9fa696c0d5 configure_graphics: Remove Force 30 FPS mode
The introduction of multicore rendered this setting non-functional as timing code was changed.

This removes the setting entirely.
2020-07-28 08:07:26 -04:00
Morph b93b5093a9 renderer_opengl: Use 1/4 of all threads for async shader compilation 2020-07-28 05:08:27 -04:00
Lioncash 32ce1467e5 common/atomic_ops: Don't cast away volatile from pointers
Preserves the volatility of the pointers being casted.
2020-07-28 04:36:53 -04:00
ReinUsesLisp 87e6485855 service/bsd: Handle Poll with no entries accurately
Testing shows that Poll called with zero entries returns -1 and signals
an errno of zero.
2020-07-28 01:51:47 -03:00
ReinUsesLisp 853ee47a15 services/bsd: Implement most of bsd:s
This implements: Socket, Poll, Accept, Bind, Connect, GetPeerName,
GetSockName, Listen, Fcntl, SetSockOpt, Shutdown, Recv, RecvFrom,
Send, SendTo, Write, and Close

The implementation was done referencing: SwIPC, switchbrew, testing
with libnx and inspecting its code, general information about bsd
sockets online, and analysing official software.

Not everything from these service calls is implemented, but everything
that is not implemented will be logged in some way.
2020-07-28 01:48:42 -03:00
ReinUsesLisp 20ac4ae8b7 service/sockets: Add worker pool abstraction
Manage worker threads with an easy to use abstraction.
We can expand this to support thread deletion in the future.
2020-07-28 01:47:03 -03:00
ReinUsesLisp 3cd68cade4 service/sockets: Add worker abstraction to execute blocking calls asynchronously
This abstraction allows executing blocking functions (like recvfrom on a
socket configured for blocking) without blocking the service thread.
It is intended to be used with SleepClientThread.
2020-07-28 01:47:03 -03:00
ReinUsesLisp 8a8f687fd2 service/sockets: Add translate functions
These functions translate from Network enumerations/structures to guest
enumerations/structures and viceversa.
2020-07-28 01:47:03 -03:00
ReinUsesLisp c2a607014a service/sockets: Add enumerations and structures
Add guest enumerations and structures used in socket services
2020-07-28 01:47:03 -03:00
ReinUsesLisp bd466d12be services/nifm: Implement GetCurrentIpAddress
This is trivially implemented using the Network abstraction

- Used by ftpd
2020-07-28 01:47:03 -03:00
Lioncash 078b7446c7 device_memory: Remove unused system member
This isn't used by anything in particular, so it can be removed.
2020-07-27 23:37:49 -04:00
Lioncash 3c31a08802 cpu_manager: Remove redundant std::function declarations
We can just return the function directly. Making for less reading.
2020-07-27 21:57:05 -04:00
bunnei 1bd1d08fc4 Update src/core/hle/service/nvdrv/devices/nvmap.cpp
Co-authored-by: LC <mathew1800@gmail.com>
2020-07-27 18:27:20 -07:00
Lioncash 7decda6bc2 core_timing: Make use of uintptr_t to represent user_data
Makes the interface future-proofed for supporting other platforms in the event we ever support platforms with differing pointer sizes. This way, we have a type in place that is always guaranteed to be able to represent a pointer exactly.
2020-07-27 21:21:01 -04:00
Lioncash af5fdb4682 yuzu/main: Remove redundant usages of QStringLiteral("")
An empty QStringLiteral can more efficiently be replaced with an empty
QString.
2020-07-27 21:04:17 -04:00
bunnei f8370efc1b Merge pull request #4419 from lioncash/initializer
vulkan: Resolve -Wmissing-field-initializer warnings
2020-07-27 15:52:03 -07:00
bunnei 61fefea059 Merge pull request #4434 from CrazyMax/lang_unused_var
AM: GetDesiredLanguage: remove unused variable
2020-07-27 12:37:52 -07:00
Rodrigo Locatti ee09a7ba3a Merge pull request #4432 from bylaws/patch-1
video_core/gpu: Correct the size of the puller registers
2020-07-27 05:25:49 -03:00
CrazyMax ac316a25a1 remove unused variable; 2020-07-27 10:36:26 +03:00
bunnei d9f73562d8 Merge pull request #4431 from kelnos/fix-exit-crash
GCAdapter: only join worker thread if running & joinable
2020-07-26 18:03:37 -07:00
Brian J. Tarricone f637cfec64 GCAdapter: only join worker thread if running & joinable 2020-07-26 14:54:02 -07:00
Billy Laws 0d1a089177 video_core/gpu: Correct the size of the puller registers
The puller register array is made up of u32s however the `NUM_REGS` value is the size in bytes, so switch it to avoid making the struct unnecessary large. Also fix a small typo in a comment.
2020-07-26 22:26:29 +01:00
lat9nq 6befb6e733 config: Make the save-as identifier more consistent
Solves an issue with restoring the value upon reloading program.
2020-07-26 13:31:00 -04:00
bunnei 841de299af Merge pull request #4426 from lioncash/lock
nvflinger: Use return value of Lock()
2020-07-26 09:19:24 -07:00
bunnei c021c9f3ae Merge pull request #4418 from lioncash/udp-warn
udp/client: Remove unused boost include
2020-07-25 21:50:37 -07:00
bunnei 991aca142e hle: nvdrv: Rewrite of GPU memory management. 2020-07-26 00:49:43 -04:00
bunnei 54d0f82e6e Merge pull request #4415 from lioncash/maybe
virtual_buffer: Mark size parameter of FreeMemoryPages() as [[maybe_unused]]
2020-07-25 21:35:09 -07:00
bunnei aa100a7e22 Merge pull request #4417 from lioncash/poll
gc_adapter/gc_poller: Resolve compiler warnings
2020-07-25 19:42:09 -07:00
FearlessTobi 8574303acc yuzu/configure_debug: Remove duplicated checkboxes
Those are already found in the Filesystem tab.
They were added back to the Debug tab by mistake in the Vulkan PR.
2020-07-26 02:45:19 +02:00
Lioncash f35d0d8f83 nvflinger: Mark interface functions with return values as [[nodiscard]]
Not using the return value of these functions are undeniably the source
of a bug. This way we allow compilers to loudly make any future misuses
evident.
2020-07-25 19:42:45 -04:00
Lioncash 94ae1a0bf1 nvflinger: Use return value of Lock()
comex reported in #4424 that we were incorrectly discarding the return
value of Lock() which is correct.
2020-07-25 19:04:53 -04:00
bunnei 34f9706950 Merge pull request #4350 from ogniK5377/hid-update-connected
hid: Only update keyboard & debug pad inputs if enabled
2020-07-25 11:57:24 -07:00
LC 690e92c4f3 common/string_util: Remove unimplemented function prototype (#4414)
This function was relocated to log.h as a constexpr function, so this
can be removed.
2020-07-25 15:37:51 +02:00
David Marcec 844bee65b3 Fix perf regression 2020-07-25 21:46:25 +10:00
Lioncash 0ab49b988e vulkan: Resolve -Wmissing-field-initializer warnings 2020-07-25 03:50:18 -04:00
Lioncash 5987e39f21 udp/client: Remove unused boost include
Also silences a deprecation warning from boost on Clang/GCC.
2020-07-25 03:42:03 -04:00
Lioncash bc2f95ea67 gc_adapter: Resolve C++20 deprecation warning 2020-07-25 03:38:22 -04:00
Lioncash 6efd1a2675 gc_poller: Resolve -Wsign-compare warning 2020-07-25 03:37:22 -04:00
Lioncash e94ad47152 gc_poller: Resolve -Wredundant-move warning 2020-07-25 03:35:40 -04:00
Lioncash 57f72ffa49 lz4_compression: Make use of std::span in interfaces
Allows compressing the data and size parameters into one.
2020-07-25 03:17:04 -04:00
Lioncash 84e6115423 zstd_compression: Make use of std::span in interfaces
Allows condensing the data and size parameters into a single argument.
2020-07-25 03:11:56 -04:00
Lioncash 3aad302953 virtual_buffer: Mark size parameter of FreeMemoryPages() as [[maybe_unused]]
This isn't used on Windows, but is used on non-Windows operating
systems.
2020-07-25 03:04:27 -04:00
bunnei 2f7d9afee7 Merge pull request #4380 from ogniK5377/swkbd-inline-1
swkbd: Return result for Calc request for inlined swkbd
2020-07-24 22:31:24 -07:00
bunnei b6ba7c5249 Merge pull request #4393 from lioncash/unused5
vk_rasterizer: Remove unused variable in Clear()
2020-07-24 20:33:58 -07:00
David Marcec 5f24aa9e0f Fix stream channel count when outputting to stereo 2020-07-25 13:31:43 +10:00
David Marcec 7cdad5d1fb Address issues 2020-07-25 12:39:37 +10:00
David Marcec 4c85fba0db Queue extra mix buffer 2020-07-25 12:39:36 +10:00
David Marcec f1ec702c03 Disable time stretcher for time being 2020-07-25 12:39:35 +10:00
David Marcec 81b2b4fbe9 audio_core: Apollo Part 1, AudioRenderer refactor 2020-07-25 12:39:34 +10:00
bunnei bcb6b4e574 Merge pull request #4377 from Morph1984/dark-themes
qt-themes: Add Midnight Blue qdarkstyle theme (2.8.1)
2020-07-24 19:23:45 -07:00
bunnei 0db2f8a714 Merge pull request #4334 from lat9nq/clear-per-game-settings
configure_per_game: Clearer per-game settings
2020-07-24 19:19:27 -07:00
bunnei ffbbadb29e Merge pull request #4388 from lioncash/written
buffer_cache: Eliminate redundant map lookup in MarkRegionAsWritten()
2020-07-24 11:29:37 -07:00
bunnei 82278bde7e Merge pull request #4391 from lioncash/nrvo
video_core: Allow copy elision to take place where applicable
2020-07-24 06:33:09 -07:00
bunnei f0fff26e67 Merge pull request #4394 from lioncash/unused6
video_core: Remove unused variables
2020-07-23 19:54:59 -07:00
bunnei da17329c3e Merge pull request #4353 from ameerj/gc-refactor
gc_adapter: Refactor code
2020-07-23 18:44:39 -07:00
Jan Beich 423d410d7c network: add missing include for BSDs
src/core/network/network.cpp:112:28: error: use of undeclared identifier 'SHUT_RD'
constexpr int SD_RECEIVE = SHUT_RD;
                           ^
src/core/network/network.cpp:113:25: error: use of undeclared identifier 'SHUT_WR'
constexpr int SD_SEND = SHUT_WR;
                        ^
src/core/network/network.cpp:114:25: error: use of undeclared identifier 'SHUT_RDWR'
constexpr int SD_BOTH = SHUT_RDWR;
                        ^
src/core/network/network.cpp:120:37: error: unknown type name 'in_addr'; did you mean 'in_addr_t'?
constexpr IPv4Address TranslateIPv4(in_addr addr) {
                                    ^~~~~~~
                                    in_addr_t
/usr/include/netdb.h:66:20: note: 'in_addr_t' declared here
typedef __uint32_t      in_addr_t;
                        ^
src/core/network/network.cpp:121:27: error: member reference base type 'in_addr_t' (aka 'unsigned int') is not a structure or union
    const u32 bytes = addr.s_addr;
                      ~~~~^~~~~~~
src/core/network/network.cpp:121:15: error: variables defined in a constexpr function must be initialized
    const u32 bytes = addr.s_addr;
              ^
src/core/network/network.cpp:126:10: error: incomplete result type 'sockaddr' in function definition
sockaddr TranslateFromSockAddrIn(SockAddrIn input) {
         ^
/usr/include/netdb.h:142:9: note: forward declaration of 'sockaddr'
        struct  sockaddr *ai_addr;      /* binary address */
                ^
src/core/network/network.cpp:127:5: error: unknown type name 'sockaddr_in'; did you mean 'sockaddr'?
    sockaddr_in result;
    ^~~~~~~~~~~
    sockaddr
/usr/include/netdb.h:142:9: note: 'sockaddr' declared here
        struct  sockaddr *ai_addr;      /* binary address */
                ^
src/core/network/network.cpp:127:17: error: variable has incomplete type 'sockaddr'
    sockaddr_in result;
                ^
/usr/include/netdb.h:142:9: note: forward declaration of 'sockaddr'
        struct  sockaddr *ai_addr;      /* binary address */
                ^
src/core/network/network.cpp:131:29: error: use of undeclared identifier 'AF_INET'
        result.sin_family = AF_INET;
                            ^
src/core/network/network.cpp:135:29: error: use of undeclared identifier 'AF_INET'
        result.sin_family = AF_INET;
                            ^
src/core/network/network.cpp:139:23: error: use of undeclared identifier 'htons'
    result.sin_port = htons(input.portno);
                      ^
src/core/network/network.cpp:143:14: error: variable has incomplete type 'sockaddr'
    sockaddr addr;
             ^
/usr/include/netdb.h:142:9: note: forward declaration of 'sockaddr'
        struct  sockaddr *ai_addr;      /* binary address */
                ^
src/core/network/network.cpp:156:1: error: unknown type name 'linger'
linger MakeLinger(bool enable, u32 linger_value) {
^
src/core/network/network.cpp:157:5: error: unknown type name 'linger'
    linger value;
    ^
src/core/network/network.cpp:185:16: error: use of undeclared identifier 'AF_INET'
        return AF_INET;
               ^
src/core/network/network.cpp:195:16: error: use of undeclared identifier 'SOCK_STREAM'
        return SOCK_STREAM;
               ^
src/core/network/network.cpp:197:16: error: use of undeclared identifier 'SOCK_DGRAM'
        return SOCK_DGRAM;
               ^
src/core/network/network.cpp:207:16: error: use of undeclared identifier 'IPPROTO_TCP'
        return IPPROTO_TCP;
               ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2020-07-22 22:10:15 +00:00
David Marcec 56c3c62a45 vi: IApplicationDisplayService:GetIndirectLayerImageRequiredMemoryInfo
Needed for dark souls and monster hunter
2020-07-21 23:06:18 +10:00
Rodrigo Locatti beafe0508a Merge pull request #4359 from ReinUsesLisp/clamp-shared
renderer_{opengl,vulkan}: Clamp shared memory to host's limit
2020-07-21 04:51:05 -03:00
Rodrigo Locatti 05ffdb1383 Merge pull request #4360 from ReinUsesLisp/glasm-bar
gl_arb_decompiler: Execute BAR even when inside control flow
2020-07-21 04:50:55 -03:00
Rodrigo Locatti ce9754ffa5 Merge pull request #4361 from ReinUsesLisp/lane-id
decode/other: Implement S2R.LaneId
2020-07-21 04:50:45 -03:00
Lioncash 3245700495 surface_params: Make use of designated initializers where applicable
Provides a convenient way to avoid unnecessary zero initializing.
2020-07-21 02:27:22 -04:00
Lioncash 4ec316a7b2 surface_params: Remove redundant assignment
This is a redundant assignment that can be removed.
2020-07-21 02:26:49 -04:00
Lioncash 9758e39655 surface_params: Replace questionable usages of the comma operator with semicolons
These are bugs waiting to happen.
2020-07-21 02:26:48 -04:00
David 9263c9af72 Merge pull request #4306 from ReinUsesLisp/bsd-network
core/network: Add network abstraction
2020-07-21 16:05:47 +10:00
Lioncash 074f382a39 video_core: Remove unused variables
Silences several compiler warnings about unused variables.
2020-07-21 00:57:25 -04:00
Lioncash 09172c0347 vk_rasterizer: Remove unused variable in Clear()
The relevant values are already assigned further down in the lambda, so
this can be removed entirely.
2020-07-21 00:49:10 -04:00
Lioncash cff696cfbb compatible_formats: Add missing header guard
Prevents potential inclusion issues from occurring.
2020-07-21 00:42:19 -04:00
Lioncash 991e4dc0b3 video_core: Allow copy elision to take place where applicable
Removes const from some variables that are returned from functions, as
this allows the move assignment/constructors to execute for them.
2020-07-21 00:36:13 -04:00
bunnei 2e4a5d2110 Merge pull request #4324 from ReinUsesLisp/formats
video_core: Fix, add and rename pixel formats
2020-07-21 00:13:04 -04:00
lat9nq c9dd8cd8a5 configure_ui: Ensure a separator follows the returned path 2020-07-20 23:19:07 -04:00
lat9nq 90a5f09f8c configure_ui: don't use an empty string
If the user had cancelled, it would clear the text box. That behavior was sanitized underneath, but may anyways cause inconveniences.
2020-07-20 23:11:46 -04:00
lat9nq 0f7e75ddb5 main: Don't use as many string copies
Co-Authored-By: LC <lioncash@users.noreply.github.com>
2020-07-20 23:03:55 -04:00
lat9nq 0e7594102b main: rewrite (save as) screenshot saving
This picks a default directory and file name. If on Windows and save-as screenshot saving is enabled, it asks the user, first defaulting to the default screenshot path, and with a default filename in the format `[title_id]_[year-mt-dy_hr-mn-sc-msc].png`. Otherwise, or on Linux for now, it simply saves a file in that directory with that file name.
2020-07-20 23:03:55 -04:00
lat9nq 3db1abfcbc configuration: Setup UI to config screenshot path and saving
This adds two options to the General -> UI tab. The first disables picking a place to save the file. The second chooses a default directory for saving screenshots.
2020-07-20 23:03:49 -04:00
lat9nq 11fb3d5d12 common: Add a screenshots directory
Adds a screenshots directory as a path managed by FileUtil.
2020-07-20 22:51:02 -04:00
David Marcec f3ef6e4fb1 video_core: Remove redundant pixel format type
We already get the format type before converting shadow formats and during shadow formats.
2020-07-21 12:44:32 +10:00
bunnei 10ae1e1dad Merge pull request #4168 from ReinUsesLisp/global-memory
gl_arb_decompiler: Use NV_shader_buffer_{load,store} on assembly shaders
2020-07-20 21:54:17 -04:00
Lioncash 1842c5df37 buffer_cache: Eliminate redundant map lookup in MarkRegionAsWritten()
We can make use of emplace()'s return value to determine whether or not
we need to perform an increment.

emplace() performs no insertion if an element already exist, so this can
eliminate a find() call.
2020-07-20 17:48:00 -04:00
Morph 19b3180ae3 wait_tree: Include Midnight Blue dark themes 2020-07-20 01:25:25 -04:00
James Rowe e9af5f404a qt-themes: Add Midnight Blue qdarkstyle theme (2.8.1)
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2020-07-20 01:25:25 -04:00
David Marcec 87a838304b Address issues 2020-07-20 11:52:07 +10:00
lat9nq 255f148a11 configure_graphics_advnaced: clang-format mk ii 2020-07-19 13:26:55 -04:00
lat9nq 41724d04c1 configure_graphics_advanced: Fix oversight from rebase 2020-07-19 13:26:55 -04:00
lat9nq a8532de77b configuration_shared: Remove unused functions
These were only kept for compatibility with old code during testing.
2020-07-19 13:26:55 -04:00
lat9nq 932de8986b configuration: Use forward declares and remove extraneous structs 2020-07-19 13:26:55 -04:00
lat9nq 7df8f2b760 configuration_shared: Make CheckState strongly typed
Also gets rid of unnecessary explicit namespace usage.
2020-07-19 13:26:55 -04:00
lat9nq d26e1a1839 clang-format 2020-07-19 13:26:55 -04:00
lat9nq 3676efbf03 configuration_shared: Break up tracker structs to respective classes
One less global variable.
2020-07-19 13:26:55 -04:00
lat9nq 54f4eba5a9 configure_system: break instead of semicolon
Makes the code more readable

Co-Authored-By: LC <lioncash@users.noreply.github.com>
2020-07-19 13:26:55 -04:00
lat9nq c2fa65efb6 clang-format 2020-07-19 13:26:55 -04:00
lat9nq f5f2f3e926 configure_system: Highlight labels on startup
whoops
2020-07-19 13:26:55 -04:00
lat9nq a0c66140a6 configure_graphics: Fix layout in global config
Fixes a regression where the global config takes up a lot of extra space.
2020-07-19 13:26:55 -04:00
lat9nq a186061bb9 configure_per_game: Improve style consistency
The way the configurations are set up, it is not trivial to do this. I'll leave it as is, but the API selection, and the background color and volume slider selectors are kind of not following the style.
2020-07-19 13:26:55 -04:00
lat9nq 2cb8f9ba8b configure_system: Implement highlighted overrides 2020-07-19 13:26:55 -04:00
lat9nq e79a198006 configuration_shared: Add default combobox setup function
Not a catch-all, but helps clean up the code for when I do this a lot. Also fixes some bugs caught in configure_graphics.
2020-07-19 13:26:55 -04:00
lat9nq df6af4e1a3 configuration_shared: Use an int instead of a QString
I noticed some of the code could be reduced to just passing the function an int, since I was doing the same thing over and over. Also clang-formats configure_graphics
2020-07-19 13:26:55 -04:00
lat9nq d75846daff configure_graphics_advanced: Implement highlighted overrides 2020-07-19 13:26:55 -04:00
lat9nq 14ab428a82 configuration_shared: Switch back to background colors
Let's see if I make up my mind.
2020-07-19 13:26:55 -04:00
lat9nq cfff443f00 configuration_shared: Better use global text
Also adds trackers for graphics and advanced graphics
2020-07-19 13:26:55 -04:00
lat9nq 5565548fb7 configure_audio: fix UI margins 2020-07-19 13:26:55 -04:00
lat9nq c80b9c67a7 configure_graphics: Implement highlighted overrides 2020-07-19 13:26:55 -04:00
lat9nq 0c8536e020 configure_audio: Implement highlighted overrides 2020-07-19 13:26:55 -04:00
lat9nq 1408d300ea configuration_shared: Require name of the widget for highlighting
Prevents mass-coloring of elements later on
2020-07-19 13:26:55 -04:00
lat9nq 26b196fcb2 configuration_shared: Use a highlight instead of background color
Fixes visibility in the built-in dark theme
2020-07-19 13:26:55 -04:00
lat9nq b4c860d57e configure_general: Implement manual tristate buttons 2020-07-19 13:26:55 -04:00
lat9nq a2ba6cf83d configuration_shared: Initial functions and data for manual tristate
Sets up initial support for implementing colored tristate functions. These functions color a QWidget blue when it's overriding a global setting, and discolor it when not. The lack of color indicates it uses the global state, replacing the Qt::CheckState::PartiallyChecked state with the global state.
2020-07-19 13:26:55 -04:00
ameerj bb2375ec9d Fix axis thresholding while polling
axes were very sensitive when mapping controls.
2020-07-19 11:49:26 -04:00
David Marcec 7ca5dcb7df swkbd: Return result for Calc request for inlined swkbd
Fixes random swkbd popups in monster hunter
2020-07-19 18:56:16 +10:00
ReinUsesLisp fc8ff7f4ef core/network: Add network abstraction
This commit adds a network abstraction designed to implement bsd:s but
at the same time work as a generic abstraction to implement any
networking code we have to use from core.

This is implemented on top of BSD sockets on Unix systems and winsock on
Windows. The code is designed around winsocks having compatibility
definitions to support both BSD and Windows sockets.
2020-07-19 04:12:40 -03:00
Rodrigo Locatti 5714c2c44a Merge pull request #4376 from ogniK5377/dark-wait-tree
frontend: Improve wait tree readability for dark themes
2020-07-19 03:55:36 -03:00
Jan Beich 01ee1a02ba alignment: explicitly include <new> after 203d2aaaa8
In file included from src/core/hle/kernel/memory/page_table.cpp:5:
src/./common/alignment.h:67:68: error: no member named 'align_val_t' in namespace 'std'
        return static_cast<T*>(::operator new (n * sizeof(T), std::align_val_t{Align}));
                                                              ~~~~~^
src/./common/alignment.h:71:51: error: no member named 'align_val_t' in namespace 'std'
        ::operator delete (p, n * sizeof(T), std::align_val_t{Align});
                                             ~~~~~^
2020-07-18 23:06:16 +00:00
David Marcec 157dfba918 Address issues 2020-07-19 01:02:41 +10:00
FearlessTobi 1c533f3c4f Address trivial review comments. 2020-07-18 14:09:13 +02:00
FearlessTobi bbaa6e26a2 configure_ui: Address some review comments from the previous PR 2020-07-18 14:09:13 +02:00
FearlessTobi 0dec785dc4 yuzu: Port translation support from Citra
Co-Authored-By: Weiyi Wang <wwylele@gmail.com>
2020-07-18 14:09:11 +02:00
David Marcec 4e11d6d05a frontend: Improve wait tree readability for dark themes 2020-07-18 20:22:03 +10:00
bunnei 01588e3e91 Merge pull request #4348 from lioncash/nano
core_timing: Make usage of nanoseconds more consistent in the interface
2020-07-18 01:45:10 -04:00
bunnei ca13092ccc Merge pull request #4373 from lioncash/allocator
alignment: Simplify AlignmentAllocator implementation
2020-07-18 01:04:17 -04:00
ReinUsesLisp 76bd3a8843 gl_arb_decompiler: Use NV_shader_buffer_{load,store} on assembly shaders
NV_shader_buffer_{load,store} is a 2010 extension that allows GL applications
to use what in Vulkan is known as physical pointers, this is basically C
pointers. On GLASM these is exposed through the LOAD/STORE/ATOM
instructions.

Up until now, assembly shaders were using NV_shader_storage_buffer_object.
These work fine, but have a (probably unintended) limitation that forces
us to have the limit of a single stage for all shader stages. In contrast,
with NV_shader_buffer_{load,store} we can pass GPU addresses to the
shader through local parameters (GLASM equivalent uniform constants, or
push constants on Vulkan). Local parameters have the advantage of being
per stage, allowing us to generate code without worrying about binding
overlaps.
2020-07-18 01:59:57 -03:00
bunnei 5891a0bf07 Merge pull request #4345 from Morph1984/fix-createfile
filesystem: Create subdirectories prior to creating a file
2020-07-18 00:59:26 -04:00
bunnei 54f4821375 Merge pull request #4273 from ogniK5377/async-shaders-prod
video_core: Add asynchronous shader decompilation and compilation
2020-07-18 00:48:27 -04:00
David Marcec 578f84cdf4 Fix style issues 2020-07-18 14:24:32 +10:00
bunnei 8ff5d393b7 Merge pull request #4364 from lioncash/desig5
vulkan: Make use of designated initializers where applicable
2020-07-18 00:12:43 -04:00
bunnei 3968c41ffa Merge pull request #4365 from lioncash/mii
mii/manager: Make use of designated initializers
2020-07-17 22:20:15 -04:00
bunnei bc49860ffc Merge pull request #4374 from ReinUsesLisp/fix-err
vk_device: Fix build error on old MSVC versions
2020-07-17 20:30:24 -04:00
bunnei 1d166b80ae Merge pull request #4366 from lioncash/mii-sign
mii/manager: Resolve sign mismatch warnings
2020-07-17 20:13:06 -04:00
FearlessTobi f7cf5430b0 file_sys/nsp: Make SetTicketKeys actually do something
Previously, the method wasn't modifying any class state and therefore not having any effects when called.
Since this has been the case for a very long time now, I'm not sure if we couldn't just remove this method altogether.
2020-07-18 02:02:39 +02:00
ReinUsesLisp 1e30bdee64 vk_device: Fix build error on old MSVC versions
Designated initializers on old MSVC versions fail to build when they
take the address of a constant.
2020-07-17 20:27:53 -03:00
bunnei d9a40d2422 Merge pull request #4344 from VolcaEM/c3
dmnt_cheat_vm: Implement opcode 0xC3 (ReadWriteStaticRegister)
2020-07-17 17:11:52 -04:00
bunnei ad5d8431f5 Merge pull request #4309 from Morph1984/fix-romfs-bug
fs: Fix RomFS building when zero byte files are present
2020-07-17 17:01:20 -04:00
ameerj 45584cf459 std::size_t where appropriate, make error message more clear if can't read 2020-07-17 12:10:32 -04:00
bunnei b4914299eb Merge pull request #4322 from ReinUsesLisp/fix-dynstate
vk_state_tracker: Fix dirty flags for stencil_enable on VK_EXT_extended_dynamic_state
2020-07-17 09:50:45 -04:00
Lioncash 203d2aaaa8 alignment: Simplify AlignmentAllocator implementation
With C++20, much of the allocator interface has been simplified, so we
can make the same adjustments.
2020-07-17 08:30:12 -04:00
LC 10cf640cb6 Merge pull request #4369 from lioncash/hle-macro
macro_hle: Remove unnecessary std::make_pair calls
2020-07-17 05:20:41 -04:00
LC e1b448b550 Merge pull request #4340 from lioncash/remove
shader_cache: Make use of std::erase_if
2020-07-17 05:19:20 -04:00
David Marcec 3a127edd0b Drop settings namespace 2020-07-17 17:23:24 +10:00
David Marcec bab9531cc6 Remove duplicate config 2020-07-17 14:26:18 +10:00
David Marcec 73118715ca Use conditional var 2020-07-17 14:26:17 +10:00
David Marcec 95b545df7c Drop max workers from 8->2 for testing 2020-07-17 14:26:15 +10:00
David Marcec 74d8c9e0dd Rebase for per game settings 2020-07-17 14:26:14 +10:00
David Marcec a4e811af27 async shaders 2020-07-17 14:24:57 +10:00
David 6825b4911d Merge pull request #4347 from lioncash/logging
settings: Make use of std::string_view over std::string for logging
2020-07-17 13:25:06 +10:00
David be744bfa16 Merge pull request #4371 from lioncash/cmake2
core/CMakeLists: Add missing physical_memory.h header file
2020-07-17 13:22:19 +10:00
David ba106cc5e7 Merge pull request #4357 from lioncash/unused4
kernel: Remove unused variables
2020-07-17 13:18:31 +10:00
David 8e8a332ce3 Merge pull request #4358 from lioncash/unused5
kernel/thread: Remove unimplemented function prototype
2020-07-17 13:17:52 +10:00
Lioncash 62ad951689 macro_hle: Remove unnecessary static keywords
These functions are already in an anonymous namespace which makes the
functions internally linked.
2020-07-16 23:17:17 -04:00
David 662b3a3e2f Merge pull request #4367 from lioncash/inc2
constants: Add missing <array> include
2020-07-17 13:14:01 +10:00
David e6e7f7834a Merge pull request #4368 from lioncash/macro
macro: Resolve missing parameter in doxygen comment
2020-07-17 13:13:22 +10:00
David cf419ad73e Merge pull request #4370 from lioncash/simplify
macro_hle: Simplify shift expression in HLE_771BB18C62444DA0()
2020-07-17 13:13:05 +10:00
Lioncash f128be35fe core/CMakeLists: Add missing physical_memory.h header file
Allows this header file to show up in IDE CMake generators.
2020-07-16 22:56:31 -04:00
Lioncash 68f92e780d macro_hle: Simplify shift expression in HLE_771BB18C62444DA0()
Given the expression involves a 32-bit value, this simplifies down to
just: 0x3ffffff. This is likely a remnant from testing that was never
cleaned up.

Resolves a -Wshift-overflow warning.
2020-07-16 22:16:11 -04:00
Lioncash a18530237c macro_hle: Remove unnecessary std::make_pair calls
The purpose of make_pair is generally to deduce the types within the
pair without explicitly specifying the types, so these usages were
generally unnecessary, particularly when the type is enforced by the
array declaration.
2020-07-16 21:59:25 -04:00
Lioncash 38c36545d5 macro: Resolve missing parameter in doxygen comment
Resolves a -Wdocumentation warning.
2020-07-16 21:54:42 -04:00
Lioncash 7e7daed253 constants: Add missing <array> include
Eliminates reliance on an indirect include.
2020-07-16 21:43:20 -04:00
Lioncash 214247f203 mii/manager: Resolve sign mismatch warnings
Previously the loop termination condition was testing variables of
different signedness.
2020-07-16 21:07:04 -04:00
Rodrigo Locatti b3078bd676 Merge pull request #4363 from lioncash/mismatch
vk_texture_cache: Amend mismatched access masks and indices in UploadBuffer
2020-07-16 21:54:40 -03:00
Lioncash 29a5f65f31 mii/manager: Make use of designated initializers
Allows returning the structure in a more concise manner.
2020-07-16 20:45:33 -04:00
bunnei 669dfb415e Merge pull request #4292 from bunnei/mii-rewrite
hle: service: mii: Rewrite service to properly support creation of random and default miis.
2020-07-16 20:05:40 -04:00
Lioncash daa19f1894 wrapper: Make use of designated initializers where applicable 2020-07-16 20:01:01 -04:00
Lioncash 28c7c4e06c vk_texture_cache: Make use of designated initializers where applicable 2020-07-16 19:52:38 -04:00
Lioncash 6ae380626f vk_texture_cache: Amend mismatched access masks and indices in UploadBuffer
Discovered while converting relevant parts of the codebase over to
designated initializers.
2020-07-16 19:45:46 -04:00
Lioncash f683a6e7e0 vk_swapchain: Make use of designated initializers where applicable 2020-07-16 19:27:02 -04:00
Lioncash 98e5d57908 vk_stream_buffer: Make use of designated initializers where applicable 2020-07-16 19:22:11 -04:00
Lioncash 947749d35d vk_staging_buffer_pool: Make use of designated initializers where applicable 2020-07-16 19:22:03 -04:00
Lioncash 4694ea8a99 vk_shader_util: Make use of designated initializers where applicable 2020-07-16 19:17:41 -04:00
Lioncash 683403d1cf vk_scheduler: Make use of designated initializers where applicable 2020-07-16 19:11:43 -04:00
Lioncash a6f0caeeb9 vk_sampler_cache: Make use of designated initializers where applicable 2020-07-16 19:06:40 -04:00
Lioncash faba1ede49 vk_resource_manager: Make use of designated initializers where applicable 2020-07-16 19:02:35 -04:00
Lioncash 96a6d95c9c vk_renderpass_cache: Make use of designated initializers where applicable 2020-07-16 18:57:23 -04:00
Lioncash 71a085c84f vk_rasterizer: Make use of designated initializers where applicable 2020-07-16 18:49:42 -04:00
Lioncash 42dadb45ac vk_query_cache: Make use of designated initializers where applicable 2020-07-16 18:34:04 -04:00
Lioncash fe2c963646 vk_pipeline_cache: Make use of designated initializers where applicable 2020-07-16 18:32:29 -04:00
Lioncash 8ffbe8e7c9 vk_memory_manager: Make use of designated initializers where applicable 2020-07-16 18:26:30 -04:00
Lioncash 6b6af38615 vk_image: Make use of designated initializers where applicable 2020-07-16 18:24:26 -04:00
Lioncash f734fa9d78 vk_descriptor_pool: Make use of designated initializers where applicable 2020-07-16 18:19:45 -04:00
Lioncash cc47d8b0ce vk_graphics_pipeline: Resolve narrowing warnings
For whatever reason, VK_TRUE and VK_FALSE aren't defined as having a
VkBool32 type, so we need to cast to it explicitly.
2020-07-16 18:13:49 -04:00
Lioncash 0b4ecb96d4 vk_compute_pipeline: Make use of designated initializers where applicable 2020-07-16 17:32:12 -04:00
Lioncash 7818dcd562 vk_compute_pass: Make use of designated initializers where applicable
Note: Some barriers can't be converted over yet, as they ICE MSVC.
2020-07-16 17:23:56 -04:00
Lioncash 5dc1c68a04 vk_buffer_cache: Make use of designated initializers where applicable
Note: An array within CopyFrom() cannot be converted over yet, as it
ICEs MSVC when converted over.
2020-07-16 16:59:39 -04:00
Rodrigo Locatti 10abdf0147 Merge pull request #4327 from lioncash/desig2
address_space_info: Make use of designated initializers
2020-07-16 17:41:55 -03:00
Rodrigo Locatti b880ecc427 Merge pull request #4333 from lioncash/desig3
vk_graphics_pipeline: Make use of designated initializers where applicable
2020-07-16 17:41:45 -03:00
Rodrigo Locatti 475e7fb624 Merge pull request #4332 from lioncash/vkdev
vk_device: Make use of designated initializers where applicable
2020-07-16 17:41:20 -03:00
ReinUsesLisp c5391180e6 decode/other: Implement S2R.LaneId
This maps to host's thread id.

- Fixes graphical issues on Paper Mario.
2020-07-16 16:09:39 -03:00
ReinUsesLisp 021aca9492 gl_arb_decompiler: Execute BAR even when inside control flow
Unlike GLSL, GLASM allows us to call BAR inside control flow.

- Fixes graphical artifacts in Paper Mario.
2020-07-16 16:05:52 -03:00
ReinUsesLisp 03bb8691b7 renderer_{opengl,vulkan}: Clamp shared memory to host's limit
This stops shaders from failing to build when the exceed host's shared
memory size limit. An error is logged.
2020-07-16 16:02:46 -03:00
bunnei a002ba827d Merge pull request #4321 from lioncash/desig
vk_blit_screen: Make use of designated initializers where applicable
2020-07-16 14:55:36 -04:00
Lioncash e05eec5d51 kernel/thread: Remove unimplemented function prototype
This isn't used, so it can be removed.
2020-07-16 14:32:46 -04:00
Lioncash 3fe863c8f2 kernel: Remove unused variables
Resolves some compiler warnings in the Linux build.
2020-07-16 14:17:50 -04:00
Lioncash 0a5524a15b kernel: Add missing include 2020-07-16 13:51:51 -04:00
Lioncash 02ff5e8d81 cpu_manager: Mark function getters as static
All these do are return std::function instances of static functions, so
these can be used without an instance of the CPU manager.
2020-07-16 13:30:56 -04:00
Lioncash 59f9dcf6cd cpu_manager: Remove unused preemption_count variable
Shrinks the data structure by 8 bytes.
2020-07-16 13:24:25 -04:00
Lioncash 7f032388fd cpu_manager: Add missing includes
Previously this header was relying on indirect inclusions that are no
longer satisfied.
2020-07-16 13:22:58 -04:00
Ameer 05174770cc Refactor adapter code 2020-07-16 13:00:04 -04:00
bunnei 97f40e32b5 Merge pull request #4261 from ameerj/gc-calibration
input_common: GC Controller save and compare against analog origin state
2020-07-16 11:40:09 -04:00
bunnei 8fd2e0d2ea Merge pull request #4337 from lat9nq/fix-per-game-async
main: Set async gpu properly after loading per-game setting
2020-07-16 11:33:51 -04:00
bunnei 1d761c4440 Merge pull request #4297 from FearlessTobi/skip-profile-select
main/profile_select: Don't prompt for profile selection when only one is available
2020-07-16 09:45:09 -04:00
David 2aa1af8abb Merge pull request #4346 from lioncash/thread
kernel/handle_table: Remove usages of the global system instance
2020-07-16 23:02:04 +10:00
David Marcec 255847b16d hid: Only update keyboard & debug pad inputs if enabled
Previously we would ignore this setting and would update the states regardless of the user setting
2020-07-16 22:28:49 +10:00
David 524a16f9c4 Merge pull request #4249 from Morph1984/delete-update-aoc-on-overwrite
registered_cache: Remove previous update/dlc if it exists on install
2020-07-16 20:36:22 +10:00
Morph 5a7b65b6d5 Check for empty section0 and CNMT prior to install 2020-07-16 05:22:51 -04:00
Morph 6bba209bba Add comment to clarify the nullptr check 2020-07-16 00:15:27 -04:00
Morph 7f908ceb00 filesystem: Create subdirectories prior to creating a file
If subdirectories exist in the given path parameter and don't exist in the real filesystem create them prior to creating the files within.
This fixes the softlocks upon save creation in The Legend of Zelda: Breath of the Wild
2020-07-16 00:15:27 -04:00
bunnei 3f9b1b22bc Merge pull request #4328 from lioncash/unused-var3
memory_layout: Remove unused data member
2020-07-15 22:08:05 -04:00
Lioncash 66e6dccc66 core_timing: Remove unused data member
Shrinks the size of the CoreTiming class by 8 bytes.
2020-07-15 19:41:37 -04:00
Lioncash 56054fe86d core_timing: Make TimedCallback take std::chrono::nanoseconds
Enforces our desired time units directly with a concrete type.
2020-07-15 19:41:22 -04:00
Lioncash 9e113a2b67 core_timing: Make use of std::chrono with ScheduleEvent 2020-07-15 18:54:15 -04:00
Lioncash 3ce5234599 settings: Resolve a sign conversion warning within GetTimeZoneString()
A sign conversion warning was occurring due to an int < size_t
comparison.
2020-07-15 13:45:22 -04:00
Lioncash 1d41247fce kernel/process: Move name and system context to the bottom of the member list
These aren't directly important or commonly used within the process, so
we can move these to the bottom to allow everything else to be more
likely to be within a cache line.
2020-07-15 13:40:18 -04:00
Lioncash 9346d1e257 kernel/handle_table: Remove usages of the global system instance
Removes even more usages of the global system instance, trimming away
more dependencies on global variables and making them explicit in the
interface.
2020-07-15 13:40:15 -04:00
Lioncash 8c0ba1ce84 settings: Make use of std::string_view over std::string for logging
In all usages of LogSetting(), string literals are provided.
std::string_view is better suited here, as we won't churn a bunch of
string allocations every time the settings are logged out.

While we're at it, we can fold LogSetting() into LogSettings(), given
it's only ever used there.
2020-07-15 13:37:33 -04:00
Lioncash 7deb699566 kernel/thread: Remove global GetCurrentThread()
This is only used in one place, so we can fold it into the calling code,
eliminating a place for the global system instance to be used.
2020-07-15 13:28:05 -04:00
Morph 63f16db2e6 clang format 2020-07-15 13:27:04 -04:00
Morph 9dc8b2f03c Use proper install result when overwriting files 2020-07-15 13:27:04 -04:00
Morph c530630c1c Remove global system instance and address feedback 2020-07-15 13:27:04 -04:00
Morph 5054a6c429 registered_cache: Remove previous update/dlc if it exists on install
- This checks for and removes old updates or dlc based on title id. If a content meta nca exists within the registered cache, it will attempt to remove all the ncas associated with the content meta before installing a new update/dlc
2020-07-15 13:27:04 -04:00
VolcaEM 67310a4623 clang-format 2020-07-15 01:22:52 +02:00
VolcaEM bec0bdabc8 dmnt_cheat_vm: Implement opcode 0xC3 (ReadWriteStaticRegister)
This was based on Atmosphére's DMNT Cheat VM:

- https://github.com/Atmosphere-NX/Atmosphere/blob/master/stratosphere/dmnt/source/cheat/impl/dmnt_cheat_vm.hpp
- https://github.com/Atmosphere-NX/Atmosphere/blob/master/stratosphere/dmnt/source/cheat/impl/dmnt_cheat_vm.cpp

From Atmosphére's documentation: "Code type 0xC3 reads or writes a static register with a given register"

There are now only two remaining opcodes to implement (PauseProcess and BreakProcess)

This is untested because I don't have any experience in testing cheats on yuzu
2020-07-15 01:19:22 +02:00
Rodrigo Locatti 9dd2647098 Merge pull request #4342 from lioncash/endian
common/swap: Make use of std::endian
2020-07-14 18:49:07 -03:00
Lioncash 589f33c54c common/swap: Make use of std::endian
Allows removing a bunch of defines in favor of a two liner.
2020-07-14 16:26:54 -04:00
Lioncash 7d3ba83dde shader_cache: Make use of std::erase_if
Now that we use C++20, we can also make use of std::erase_if instead of
needing to do the erase-remove idiom.
2020-07-14 15:49:15 -04:00
bunnei 4d15c4ae6f Merge pull request #4242 from ReinUsesLisp/maxwell-dma
maxwell_dma: Match official doc and support pitch->voxel copies
2020-07-14 14:04:16 -04:00
lat9nq ca132f7dfb clang-format 2020-07-14 13:46:42 -04:00
lat9nq be59d82047 settings: Move settings sanitization to its own function
Creates a new function that can be expanded later to fix other settings that are known to cause emulation errors across executables.
2020-07-14 13:36:09 -04:00
Ameer ed995fe27e Rebase to master 2020-07-14 13:04:02 -04:00
bunnei c4ce38fcb5 Merge pull request #4294 from MerryMage/cpu-opt-settings
configuration: Add settings to enable/disable specific CPU optimizations
2020-07-14 12:38:03 -04:00
bunnei f1b2cb5eec Merge pull request #4282 from Morph1984/fs-size
filesystem: Set various NAND partition sizes to their defaults
2020-07-14 12:16:42 -04:00
Ameer 2b38468a0b Fix crash if gc configured but adapter not connected 2020-07-14 11:23:10 -04:00
bunnei f18dca4b04 Merge pull request #4314 from lioncash/input-warn
gcadapter: Tidy up compiler warnings
2020-07-14 10:20:12 -04:00
bunnei 1434f790a0 Merge pull request #4315 from lioncash/udp-warn
udp: Silence a C++20 deprecation warning
2020-07-14 09:33:16 -04:00
lat9nq 688bae221f main: Set async gpu properly after loading per-game setting
Another error that got pass me and only noticed when I was doing the per-game settings UI rework. This prevents asynchronous GPU emulation from being disabled while multi core is enabled as a result of a poorly put together per-game config.
2020-07-14 01:02:10 -04:00
lat9nq 73c7843bff configure_general: Explicitly guard use_multi_core when applying settings
This is likely an oversight during a rebase. Guards use_multi_core to be only set when the global value is in use. It should not make a difference given the current code base, but makes the code sensible.
2020-07-14 00:49:17 -04:00
Lioncash 8d7fa4e28c vk_device: Make use of designated initializers where applicable
Avoids redundant repetitions of variable names, and allows assignment
all in one statement.
2020-07-13 22:24:01 -04:00
LC e15aa03b49 Merge pull request #4280 from jbeich/system-libusb
cmake: pass libusb include directory
2020-07-13 22:21:07 -04:00
Ameer a8deadbb2b input_common: drop unused libusb.h include
Remnant of an early implementation.
2020-07-14 01:50:34 +00:00
Lioncash 869f37566e vk_graphics_pipeline: Make use of designated initializers where applicable
Avoids redundant variable name repetitions.
2020-07-13 21:07:56 -04:00
Jan Beich cfc73b4188 input_common: make libusb private to gc_adapter 2020-07-13 18:48:19 +00:00
Lioncash ed658d92dc memory_layout: Remove unused data member
This isn't used, so it can be removed entirely, shrinking the structure
size by 8 bytes.
2020-07-13 10:51:23 -04:00
Lioncash 14332845af address_space_info: Use type alias to simplify code
We can define an alias for the index arrays and then just reuse it to
make the code nicer to read.
2020-07-13 10:42:52 -04:00
Lioncash c8b9f7bd14 address_space_info: Make use of designated initializers
We can alter the structure so that we can use designated initializers in
the array, eliminating the comments that indicate their field names.
2020-07-13 10:42:49 -04:00
ReinUsesLisp a068ce4c32 video_core: Rearrange pixel format names
Normalizes pixel format names to match Vulkan names. Previous to this
commit pixel formats had no convention, leading to confusion and
potential bugs.
2020-07-13 01:44:23 -03:00
ReinUsesLisp 44fb3cf920 video_core: Fix DXT4 and RGB565 2020-07-13 01:01:09 -03:00
ReinUsesLisp 716ab93365 video_core/format_lookup_table: Add formats with existing PixelFormat 2020-07-13 01:01:09 -03:00
ReinUsesLisp 46c327d2d9 video_core: Fix B5G6R5_UNORM render target format 2020-07-13 01:01:09 -03:00
ReinUsesLisp 12937875a5 video_core: Fix B5G6R5U 2020-07-13 01:01:09 -03:00
ReinUsesLisp ac8eeffbbc video_core: Implement RGBA32_SINT render target 2020-07-13 01:01:09 -03:00
ReinUsesLisp 59610b129f video_core: Implement RGBA32_SINT render target 2020-07-13 01:01:09 -03:00
ReinUsesLisp 5ba68f5fab video_core: Implement RGBA16_SINT render target 2020-07-13 01:01:09 -03:00
ReinUsesLisp f8136072ff video_core: Implement RGBA8_SINT render target 2020-07-13 01:01:09 -03:00
ReinUsesLisp ad494d0a3c video_core: Implement RG32_SINT render target 2020-07-13 01:01:09 -03:00
ReinUsesLisp 469c89d31a video_core: Implement RG8_SINT render target and fix RG8_UINT 2020-07-13 01:01:09 -03:00
ReinUsesLisp c6e852f5c5 video_core: Implement R8_SINT render target 2020-07-13 01:01:08 -03:00
ReinUsesLisp 29e5516bb8 video_core: Implement R8_SNORM render target 2020-07-13 01:01:08 -03:00
ReinUsesLisp 8cb663e1b4 video_core/surface: Remove explicit values on PixelFormat's definition 2020-07-13 01:01:08 -03:00
ReinUsesLisp 0902bb64f1 video_core/surface: Reorder render target to pixel format switch 2020-07-13 01:01:08 -03:00
ReinUsesLisp 43e15338e2 kernel/scheduler: Use std::mutex instead of spin lock
Profiling shows that this is a highly contested mutex, causing dimishing
results compared to a OS lock. std::mutex implementations can spin for a
while before falling back to an OS lock.

This avoids wasting precious CPU cycles in a no-op.
2020-07-12 21:27:24 -03:00
Lioncash 6d507f7487 vk_blit_screen: Make use of designated initializers where applicable
Now that we make use of C++20, we can use designated initializers to
make things a little nicer to read.
2020-07-12 19:45:30 -04:00
ReinUsesLisp 6e3bbca693 vk_state_tracker: Fix dirty flags for stencil_enable on VK_EXT_extended_dynamic_state
Fixes a regression on any game using stencil on devices with
VK_EXT_extended_dynamic_state.
2020-07-12 20:43:42 -03:00
Lioncash cb588c9ef1 udp: Silence a C++20 deprecation warning
C++20 deprecates using the = lambda capture to implicitly capture the
this pointer. Instead, we must specify it explicitly.
2020-07-12 15:49:42 -04:00
Lioncash 7c05493952 gc_poller: Mark GCButtonFactory::GetNextInput() as const
This doesn't modify class instance state.
2020-07-12 15:43:07 -04:00
Lioncash 340875a12f gc_poller: Get rid of undefined behavior in Create()
Ensures that the function always has returns in all control paths.
2020-07-12 15:41:35 -04:00
Lioncash ff47456e8b gc_poller: Silence sign conversion warnings 2020-07-12 15:40:22 -04:00
Lioncash 1fe8261049 gc_adapter: Remove deprecated usage of = in lambda captures
It's deprecated in C++20 to use = to capture the this pointer.

Instead, we can simply pass this as an argument to the thread
constructor.
2020-07-12 15:38:19 -04:00
Lioncash 6b6d076f51 gc_adapter: Silence sign conversion warnings 2020-07-12 15:36:27 -04:00
MerryMage 188203ec23 configure_cpu: Split optimization settings off into Debug tab 2020-07-12 19:32:32 +01:00
Fernando Sahmkow 979eda4b70 Merge pull request #4265 from Morph1984/file-rename
vfs_real: Fix MoveFile
2020-07-12 13:00:09 -04:00
LC 4b13d493ed Merge pull request #4290 from lioncash/latest
CMakeLists: Make use of /std:c++latest on MSVC
2020-07-12 12:25:10 -04:00
bunnei 4d096ef36d Merge pull request #3385 from Morph1984/batch-install
frontend: Add support to batch install files to NAND
2020-07-12 12:20:56 -04:00
Tobias dec48c55cb common/alignment: Fix compilation errors (#4303) 2020-07-12 16:45:49 +02:00
Morph e01424699b fs: Fix RomFS building when zero byte files are present
When zero byte files are present, the key (offset) for that file is identical to the file right after. A std::map isn't able to fit key-value pairs with identical keys (offsets), therefore, the solution is to use std::multimap which permits multiple entries with the same key.

This most prominently fixes Pokemon Sword and Shield weather with any RomFS mod applied.
2020-07-12 04:33:35 -04:00
bunnei 739562c334 Merge pull request #4275 from CrazyMax/desired_language
AM: fix GetDesiredLanguage:
2020-07-12 01:45:08 -04:00
bunnei 734ab6f472 Merge pull request #4289 from ReinUsesLisp/dynfix
vk_rasterizer: Pass <pSizes> to CmdBindVertexBuffers2EXT
2020-07-11 23:44:03 -04:00
bunnei bd88e9fa71 hle: service: mii: Rewrite service to properly support creation of random and default miis. 2020-07-11 21:34:59 -04:00
bunnei 1b617c2e35 Revert "Port citra-emu/citra#5441: "Common: remove a mod from AlignUp"" 2020-07-11 19:28:09 -04:00
Marshall Mohror ebab55ab8f Common: remove a mod from AlignUp (#5441)
In cases where the size is not a known constant when inlining, AlignUp<std::size_t> currently generates two 64-bit div instructions.
This generates one div and a cmov which is significantly cheaper.
2020-07-11 18:39:00 +02:00
MerryMage 202c1fc6a4 configure_cpu: Add tooltips 2020-07-11 16:38:38 +01:00
MerryMage f82bbf743c configure_cpu: Show/Hide debugging options 2020-07-11 16:38:38 +01:00
FearlessTobi 32051d4b49 main/profile_select: Don't prompt for profile selection when only one is available 2020-07-11 16:08:34 +02:00
MerryMage 79dfd272a9 configuration: Add settings to enable/disable specific CPU optimizations 2020-07-11 14:34:09 +01:00
Lioncash f13c3a81e7 CMakeLists: Make use of /std:c++latest on MSVC
Provides the buildbot with one builder that is always tracking the
latest version of the C++ standard, allowing us to progressively rectify
our code and amend any differences between standards over time instead
of waiting for a complete standard change, potentially breaking a lot of
code all at once.
2020-07-11 04:45:40 -04:00
bunnei 12834a1c44 Merge pull request #4203 from VolcaEM/services
service: Update function tables
2020-07-11 00:02:36 -04:00
bunnei 74f380638c Merge pull request #4250 from Morph1984/key-writing
KeyManager: Prevent writing of invalid keys
2020-07-10 22:45:18 -04:00
ReinUsesLisp 991dafcee3 vk_rasterizer: Pass <pSizes> to CmdBindVertexBuffers2EXT
This has been fixed in Nvidia's public beta driver 451.74. The previous
beta driver will be broken, people using these will have to update.
2020-07-10 18:15:32 -03:00
bunnei 75a97dc002 Merge pull request #4221 from jbeich/unused-qt-opengl
cmake: drop dependency on QtOpenGL
2020-07-10 15:18:04 -04:00
Ameer a885855ff4 Break out of scan loop if can't find adapter on first run 2020-07-10 11:07:43 -04:00
ReinUsesLisp 2691f5e6b9 video_core/textures: Add and use SwizzleSliceToVoxel, and minor style changes
Change GOB sizes from free-functions to constexpr constants.

Add SwizzleSliceToVoxel, a function that swizzles a 2D array of pixels
into a 3D texture and use it for 3D copies.
2020-07-10 04:09:32 -03:00
Morph ef6946bf66 vfs_real: Fix MoveFile
The file wasn't closed prior to being renamed / moved, throwing an error that states "The process cannot access the file because it is being used by another process." Fix this by closing the file prior to a rename / move operation.

Fixes saving in Luigi's Mansion 3 and KATANA KAMI: A Way of the Samurai Story.
2020-07-10 00:39:23 -04:00
Morph c0dc6904e7 KeyManager: Prevent writing of invalid keys
If the keys are zero, don't write them to the autogenerated file.
2020-07-10 00:39:00 -04:00
Morph 4bf2b55e67 Add additional empty check for the QStringList returned by the InstallDialog 2020-07-10 00:38:29 -04:00
Morph b5535fe1a0 Update the install and progress dialogs
- Remove the overwrite files checkbox, it will always overwrite
- The progressbar now reflects the progress in terms of data transferred.
2020-07-10 00:38:28 -04:00
Morph 29b9d83e05 Refactor batch installing files
Key issues fixed:
- Progress dialog showing up as white/hanging/getting stuck/unresponsive.

Key changes:
- Progress dialog now shows progress as a function of all files instead of per nca within a file.
- Overwrite existing files will overwrite all files in the selection.
2020-07-10 00:38:28 -04:00
Morph d31b8ab0fa Add support for batch install to NAND
This adds support to batch install files to NAND
2020-07-10 00:38:28 -04:00
Morph 9108fb8dd1 bis_factory: Set User NAND free space to be 1 MiB less than total. 2020-07-10 00:37:39 -04:00
Morph bc260d4b5b sdmc_factory: Set the SDMC total size to 1 TiB
We should not be limited by the SDMC's partition size, set this to 1 TiB. Hardware is limited to the max allowed by the MBR partition table which is 2 TiB.
2020-07-10 00:37:39 -04:00
Morph d378516007 bis_factory: Use hardware default NAND partition sizes
Sets the total space of user and system partitions to their hardware defaults.
Furthermore, return the total space as free space for the user partition to prevent it from reaching zero.
Some games like Bioshock 2 check for the available free space prior to save creation, and we should not be limited by arbitrary limits.
2020-07-10 00:37:39 -04:00
Morph 99ce1117c7 settings: Remove storage size options 2020-07-10 00:37:39 -04:00
David Marcec 12c6b9eac1 cmake: Fix libfmt linking errors 2020-07-10 14:04:06 +10:00
Rodrigo Locatti 46c4b88e36 Merge pull request #4283 from lat9nq/fix-linux-nvidia-vulkan
vk_stream_buffer: Prevent Vulkan crash in Linux on recent NVIDIA driver
2020-07-10 00:18:44 -03:00
lat9nq 61519c20c3 configuration: implement per-game configurations (#4098)
* Switch game settings to use a pointer

In order to add full per-game settings, we need to be able to tell yuzu to switch
to using either the global or game configuration. Using a pointer makes it easier
to switch.

* configuration: add new UI without changing existing funcitonality

The new UI also adds General, System, Graphics, Advanced Graphics,
and Audio tabs, but as yet they do nothing. This commit keeps yuzu
to the same functionality as originally branched.

* configuration: Rename files

These weren't included in the last commit. Now they are.

* configuration: setup global configuration checkbox

Global config checkbox now enables/disables the appropriate tabs in the game
properties dialog. The use global configuration setting is now saved to the
config, defaulting to true. This also addresses some changes requested in the PR.

* configuration: swap to per-game config memory for properties dialog

Does not set memory going in-game. Swaps to game values when opening the
properties dialog, then swaps back when closing it. Uses a `memcpy` to swap.
Also implements saving config files, limited to certain groups of configurations
so as to not risk setting unsafe configurations.

* configuration: change config interfaces to use config-specific pointers

When a game is booted, we need to be able to open the configuration dialogs
without changing the settings pointer in the game's emualtion. A new pointer
specific to just the configuration dialogs can be used to separate changes
to just those config dialogs without affecting the emulation.

* configuration: boot a game using per-game settings

Swaps values where needed to boot a game.

* configuration: user correct config during emulation

Creates a new pointer specifically for modifying the configuration while
emulation is in progress. Both the regular configuration dialog and the game
properties dialog now use the pointer Settings::config_values to focus edits to
the correct struct.

* settings: split Settings::values into two different structs

By splitting the settings into two mutually exclusive structs, it becomes easier,
as a developer, to determine how to use the Settings structs after per-game
configurations is merged. Other benefits include only duplicating the required
settings in memory.

* settings: move use_docked_mode to Controls group

`use_docked_mode` is set in the input settings and cannot be accessed from the
system settings. Grouping it with system settings causes it to be saved with
per-game settings, which may make transferring configs more difficult later on,
especially since docked mode cannot be set from within the game properties
dialog.

* configuration: Fix the other yuzu executables and a regression

In main.cpp, we have to get the title ID before the ROM is loaded, else the
renderer will reflect only the global settings and now the user's game specific
settings.

* settings: use a template to duplicate memory for each setting

Replaces the type of each variable in the Settings::Values struct with a new
class that allows basic data reading and writing. The new struct
Settings::Setting duplicates the data in memory and can manage global overrides
per each setting.

* configuration: correct add-ons config and swap settings when apropriate

Any add-ons interaction happens directly through the global values struct.
Swapping bewteen structs now also includes copying the necessary global configs
that cannot be changed nor saved in per-game settings. General and System config
menus now update based on whether it is viewing the global or per-game settings.

* settings: restore old values struct

No longer needed with the Settings::Setting class template.

* configuration: implement hierarchical game properties dialog

This sets the apropriate global or local data in each setting.

* clang format

* clang format take 2

can the docker container save this?

* address comments and style issues

* config: read and write settings with global awareness

Adds new functions to read and write settings while keeping the global state in
focus. Files now generated per-game are much smaller since often they only need
address the global state.

* settings: restore global state when necessary

Upon closing a game or the game properties dialog, we need to restore all global
settings to the original global state so that we can properly open the
configuration dialog or boot a different game.

* configuration: guard setting values incorrectly

This disables setting values while a game is running if the setting is
overwritten by a per game setting.

* config: don't write local settings in the global config

Simple guards to prevent writing the wrong settings in the wrong files.

* configuration: add comments, assume less, and clang format

No longer assumes that a disabled UI element means the global state is turned
off, instead opting to directly answer that question. Still however assumes a
game is running if it is in that state.

* configuration: fix a logic error

Should not be negated

* restore settings' global state regardless of accept/cancel

Fixes loading a properties dialog and causing the global config dialog to show
local settings.

* fix more logic errors

Fixed the frame limit would set the global setting from the game properties
dialog. Also strengthened the Settings::Setting member variables and simplified
the logic in config reading (ReadSettingGlobal).

* fix another logic error

In my efforts to guard RestoreGlobalState, I accidentally negated the IsPowered
condition.

* configure_audio: set toggle_stretched_audio to tristate

* fixed custom rtc and rng seed overwriting the global value

* clang format

* rebased

* clang format take 4

* address my own review

Basically revert unintended changes

* settings: literal instead of casting

"No need to cast, use 1U instead"
Thanks, Morph!

Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>

* Revert "settings: literal instead of casting
"

This reverts commit 95e992a87c898f3e882ffdb415bb0ef9f80f613f.

* main: fix status buttons reporting wrong settings after stop emulation

* settings: Log UseDockedMode in the Controls group

This should have happened when use_docked_mode was moved over to the controls group
internally. This just reflects this in the log.

* main: load settings if the file has a title id

In other words, don't exit if the loader has trouble getting a title id.

* use a zero

* settings: initalize resolution factor with constructor instead of casting

* Revert "settings: initalize resolution factor with constructor instead of casting"

This reverts commit 54c35ecb46a29953842614620f9b7de1aa9d5dc8.

* configure_graphics: guard device selector when Vulkan is global

Prevents the user from editing the device selector if Vulkan is the global
renderer backend. Also resets the vulkan_device variable when the users
switches back-and-forth between global and Vulkan.

* address reviewer concerns

Changes function variables to const wherever they don't need to be changed. Sets Settings::Setting to final as it should not be inherited from. Sets ConfigurationShared::use_global_text to static.

Co-Authored-By: VolcaEM <volcaem@users.noreply.github.com>

* main: load per-game settings after LoadROM

This prevents `Restart Emulation` from restoring the global settings *after* the per-game settings were applied. Thanks to BSoDGamingYT for finding this bug.

* Revert "main: load per-game settings after LoadROM"

This reverts commit 9d0d48c52d2dcf3bfb1806cc8fa7d5a271a8a804.

* main: only restore global settings when necessary

Loading the per-game settings cannot happen after the ROM is loaded, so we have to specify when to restore the global state. Again thanks to BSoD for finding the bug.

* configuration_shared: address reviewer concerns except operator overrides

Dropping operator override usage in next commit.

Co-Authored-By: LC <lioncash@users.noreply.github.com>

* settings: Drop operator overrides from Setting template

Requires using GetValue and SetValue explicitly. Also reverts a change that broke title ID formatting in the game properties dialog.

* complete rebase

* configuration_shared: translate "Use global configuration"

Uses ConfigurePerGame to do so, since its usage, at least as of now, corresponds with ConfigurationShared.

* configure_per_game: address reviewer concern

As far as I understand, it prevents the program from unnecessarily copying strings.

Co-Authored-By: LC <lioncash@users.noreply.github.com>

Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
Co-authored-by: VolcaEM <volcaem@users.noreply.github.com>
Co-authored-by: LC <lioncash@users.noreply.github.com>
2020-07-09 22:42:09 -04:00
bunnei 077f353e1b Merge pull request #4281 from RealJohnGalt/linkfix2
cmake: fix fmt linking when found
2020-07-09 22:11:38 -04:00
bunnei d768f68ecc Merge pull request #4248 from Morph1984/CreateManagedDisplaySeparableLayer
AM/ISelfController: Stub CreateManagedDisplaySeparableLayer
2020-07-09 22:09:42 -04:00
lat9nq edab2dcd09 vk_stream_buffer: set allocable_size to 9 MiB
This solves the crash on Linux systems running the current Linux Long Lived branch nVidia driver.
2020-07-09 21:28:32 -04:00
bunnei 55959959c0 Merge pull request #4202 from ReinUsesLisp/scoped-lock
core_timing,scheduler: Use std::scoped_lock when possible
2020-07-09 15:33:41 -04:00
John Galt d01c077810 cmake: fix fmt linking when found
This is a new attempt at #4206 that shouldn't break windows builds.

If someone else could test on windows, it would be much appreciated.
Previously, the build bot passed but the actual builds failed.
2020-07-09 11:35:28 -04:00
Jan Beich 64cab91fac cmake: pass libusb include directory as well
In file included from src/input_common/gcadapter/gc_adapter.cpp:8:
src/./input_common/gcadapter/gc_adapter.h:11:10: fatal error: 'libusb.h' file not found
 #include <libusb.h>
          ^~~~~~~~~~
2020-07-09 15:26:54 +00:00
bunnei 776e484d98 Merge pull request #4219 from ogniK5377/audio-timing
audio: Improving audio timing for multicore/single core
2020-07-08 22:07:17 -04:00
Ameer d875341016 Rebase to master, fix merge conflicts 2020-07-08 21:15:49 -04:00
bunnei b84af2cd28 Merge pull request #4266 from jbeich/freebsd
gcadapter: unbreak build on FreeBSD
2020-07-08 16:30:26 -04:00
bunnei c7a3e1ae74 Merge pull request #4255 from lioncash/copy
configure_graphics: Prevent unnecessary string copies in UpdateDeviceComboBox()
2020-07-08 16:28:10 -04:00
Ameer 6e2876d7da Address comments for better clarity/signed dev count 2020-07-08 14:18:54 -04:00
Ameer 0e21c24052 Add more libusb error checks 2020-07-08 13:19:33 -04:00
CrazyMax 3f446eb9c2 AM: fix GetDesiredLanguage:
try to get a control metadata from application update when is failed to get from the basic version.

Tested on Kirby Star Allies
2020-07-08 19:45:06 +03:00
bunnei 74204f7ba4 Merge pull request #4243 from CrazyMax/display_version
AM: fix GetDisplayVersion
2020-07-08 10:46:56 -04:00
bunnei 1155252211 Merge pull request #4245 from MerryMage/page-table-race
memory: Race-condition in pagetables.
2020-07-08 10:44:33 -04:00
ReinUsesLisp ef1ba82f42 maxwell_dma: Rename registers to match official docs and reorder
Rename registers in the MaxwellDMA class to match Nvidia's official
documentation. This one can be found here:

https://github.com/NVIDIA/open-gpu-doc/blob/master/classes/dma-copy/clb0b5.h

While we are at it, reorganize the code in MaxwellDMA to be separated in
different functions.
2020-07-07 19:19:33 -03:00
MerryMage d6c3391232 cpu_interrupt_handler: Remove #pragma once from .cpp file 2020-07-07 22:47:00 +01:00
Ameer f1790c7b34 Address PR feedback, fix axis button thresholding 2020-07-07 12:20:59 -04:00
bunnei 2c57273505 Merge pull request #4150 from ReinUsesLisp/dynamic-state-impl
vulkan: Use VK_EXT_extended_dynamic_state when available
2020-07-07 10:58:09 -04:00
Jan Beich 9ea600e888 input_common/gcadapter: add missing C++11 header required by libc++
In file included from src/input_common/gcadapter/gc_adapter.cpp:8:
src/./input_common/gcadapter/gc_adapter.h:77:10: error: no template named 'unordered_map' in namespace 'std'
    std::unordered_map<int, bool> buttons;
    ~~~~~^
src/./input_common/gcadapter/gc_adapter.h:78:10: error: no template named 'unordered_map' in namespace 'std'
    std::unordered_map<int, u16> axes;
    ~~~~~^
2020-07-07 10:02:03 +00:00
Ameer 3eeb56e064 Brace the code! Fix compile error due to class member construction order 2020-07-06 23:01:57 -04:00
Ameer 9a989c4ff9 Recalibrate reconnected controllers 2020-07-06 22:09:07 -04:00
Ameer 68a4bc8179 Save origin state of GC controller analog features, compare against origin for input detection 2020-07-06 21:58:31 -04:00
Ameer 7751abe77b change shortcut context for other hotkeys with file open dialog 2020-07-06 19:45:57 -04:00
CrazyMax 5be823e92c GetDisplayVersion should return a null-terminated version string.
also, in case of failed to get of the basic version, we will try get it from application update.
2020-07-07 02:04:24 +03:00
Ameer e12d73f7f8 Fix ss crash on game menu, fix ss on windowed mode 2020-07-06 17:30:28 -04:00
Lioncash 6797deb10f configure_graphics: Make use of qOverload in signals/slots
While we're in the same area, we can make use of qOverload to tidy up
some function pointer casts.
2020-07-06 09:07:21 -04:00
Lioncash bd9df6c070 configure_graphics: Prevent unnecessary string copies in UpdateDeviceComboBox()
Unlikely to impact performance at all, but this is essentially a "free"
transformation, so why not?
2020-07-06 09:07:03 -04:00
MerryMage f0019f2176 memory: Set page-table pointers before setting attribute = Memory 2020-07-05 12:54:19 +01:00
Morph b29024f896 AM/ISelfController: Stub CreateManagedDisplaySeparableLayer
Stub this by sending 1 layer id instead of 2 as yuzu does not support multiple layers per display.
No adverse side effects have been observed.
- Used by Animal Crossing: New Horizons Update 1.3.0
2020-07-05 06:26:21 -04:00
Fernando Sahmkow b2997e5402 Merge pull request #4194 from ReinUsesLisp/fix-shader-cache
shader_cache: Fix use-after-free and orphan invalidation cache entries
2020-07-04 20:49:00 -04:00
Ameer 5c4f797cab Fix merge conflicts? 2020-07-04 00:59:40 -04:00
Ameer e081fb0718 Fix for always firing triggers on some controllers, trigger threshold more universal 2020-07-04 00:40:48 -04:00
Rodrigo Locatti 08a0a98e5d Merge pull request #4218 from ogniK5377/opus-external
externals: Track opus as submodule instead of using conan
2020-07-04 01:32:54 -03:00
Ameer 670614dbf4 Address lioncash feedback: Log formatting, extern const PadButtonArray, little touch ups 2020-07-03 11:52:07 -04:00
bunnei 8df4d1186d Merge pull request #4175 from ReinUsesLisp/read-buffer
gl_buffer_cache: Copy to buffers created as STREAM_READ before downloading
2020-07-02 23:30:08 -04:00
bunnei 4ed74651e2 Merge pull request #3924 from ogniK5377/GetKeyCodeMap
Implement GetKeyCodeMap & GetKeyCodeMap2
2020-07-02 23:03:20 -04:00
bunnei 7186ddb29a Revert "cmake: fix fmt linking" 2020-07-02 22:53:12 -04:00
bunnei 90d6711f4a Merge pull request #4206 from RealJohnGalt/linkfix
cmake: fix fmt linking
2020-07-02 22:23:39 -04:00
bunnei b9821beecc Merge pull request #4193 from ogniK5377/GetIndirectLayerConsumerHandle-stub
am: Stub GetIndirectLayerConsumerHandle
2020-07-02 21:31:20 -04:00
bunnei 67a6a89822 Merge pull request #4192 from ogniK5377/acc-ListOpenContextStoredUsers-stub
acc: ListOpenContextStoredUsers partial stub
2020-07-02 20:36:54 -04:00
Ameer 33c08afba9 Fix unnecessary diffs 2020-07-02 16:51:16 -04:00
Ameer 12e679c39c Add LR triggers as axes, half press to initiate a press, add GC axis id in config, clarify some code blocks for better readability 2020-07-02 15:54:44 -04:00
Rodrigo Locatti d6569215b3 Merge pull request #4082 from Morph1984/mirror-once-clamp
maxwell_to_gl: Implement MirrorOnceClampOGL wrap mode using GL_MIRROR_CLAMP_EXT
2020-07-02 04:57:40 -03:00
VolcaEM 1b4a3851ca Rename two functions in NS
- Rename "GetShellEvent" to "GetShellEventHandle"
- Rename "LaunchApplicationFromHost" to "LaunchApplication"
2020-07-02 09:02:55 +02:00
VolcaEM 940c5932c7 Rename GetApplicationArea2 to GetApplicationAreaSize 2020-07-02 08:58:51 +02:00
Jan Beich c1bbc77b7c cmake: stop linking against QGL after 01a3b4f0de 2020-07-01 22:11:39 +00:00
ReinUsesLisp 308feff898 shader_cache: Fix use-after-free and orphan invalidation cache entries
This fixes some cases where entries could have been removed multiple
times reading freed memory. To address this issue this commit removes
duplicates from entries marked for removal and sorts out the removal
process to fix another use-after-free situation.

Another issue fixed in this commit is orphan invalidation cache entries.
Previously only the entries that were invalidated in the current
operations had its entries removed. This led to more use-after-free
situations when these entries were actually invalidated but referenced
an object that didn't exist.
2020-07-01 18:16:53 -03:00
Ameer 34e6084c8d Reset adapter state on init, fixes errors relating driver hang from unexpected unplug 2020-07-01 12:52:50 -04:00
David Marcec 73ca896cd6 Don't handle cycles late if stretcher is active
Timestretcher seems to be broken
2020-07-01 16:59:42 +10:00
David Marcec f0685697da audio: Improving audio timing for multicore/single core
Fixes the issue with needing the timestretcher for multicore.
2020-07-01 16:52:02 +10:00
David db7181fb16 Merge pull request #4217 from lioncash/prototype
key_manager: Make use of canonical deleted operator=
2020-07-01 16:13:14 +10:00
David Marcec 2961282fae externals: Track opus as submodule instead of using conan
Supersedes #4068 see for details.
2020-07-01 15:09:33 +10:00
LC ebc54570f3 Merge pull request #4208 from jbeich/freebsd
common: unbreak build on BSDs
2020-07-01 00:34:20 -04:00
Lioncash 1e362da176 key_manager: Correct casing of instance()
Our codebase uppercases member function names.
2020-07-01 00:28:50 -04:00
Lioncash 93f1d9435d key_manager: Delete move operations
Prevents the singleton from being moved from.
2020-07-01 00:24:38 -04:00
Lioncash e67ab9a1b7 key_manager: Make use of canonical deleted operator=
operator= typically returns a reference, it's not void.

While we're at it, we can correct the parameter formatting to adhere to the
codebase.
2020-07-01 00:21:31 -04:00
David 9d2a0f5f1a Merge pull request #3967 from FearlessTobi/keys-singleton
crypto: Make KeyManager a singleton class
2020-07-01 14:16:26 +10:00
bunnei 7a7942741f Merge pull request #4153 from ogniK5377/prepo-multibuf
prepo: : Don't read extra buffer from report unless passed
2020-06-30 22:37:13 -04:00
bunnei a23a2102e8 Merge pull request #4063 from FreddyFunk/game-version-in-title
Add game version to window title
2020-06-30 21:42:33 -04:00
bunnei 660954c6de Merge pull request #4166 from VolcaEM/quickstart-faq
Add "Open Quickstart Guide" and "FAQ" buttons to the Help menu
2020-06-30 19:03:47 -04:00
Jan Beich f3c5dda382 common: switch to nullptr for sysctl's empty new value 2020-06-30 23:00:18 +00:00
Ameer 0c6128cc3a Address feedback regarding increments, const vars, and general cleanup 2020-06-30 17:28:02 -04:00
Fernando Sahmkow ba11aa4c74 Merge pull request #4176 from ReinUsesLisp/compatible-formats
texture_cache: Check format compatibility before copying
2020-06-30 15:36:13 -04:00
Fernando Sahmkow 1e93bc33c0 Merge pull request #4157 from ReinUsesLisp/unified-turing
gl_device: Enable NV_vertex_buffer_unified_memory on Turing devices
2020-06-30 14:36:51 -04:00
Ameer ed72085227 fix implicit conversion of size_t type to int 2020-06-30 11:44:55 -04:00
Morph 9e0fd0beb0 maxwell_to_gl: Implement MirrorOnceClampOGL using GL_MIRROR_CLAMP_EXT
Like MirrorOnceBorder, this requires the GL_EXT_texture_mirror_clamp extension. This extension is unfortunately not available on Intel's drivers (both Windows proprietary and Linux Mesa). Use GL_MIRROR_CLAMP_TO_EDGE as a fallback if the extension is unavailable.
2020-06-30 02:40:14 -04:00
Rodrigo Locatti c78f246ebf Merge pull request #4191 from Morph1984/vertex-formats
maxwell_to_gl/vk: Reorder vertex formats
2020-06-30 03:30:00 -03:00
David ac1a57c28a macro: Add support for "middle methods" on the code cache (#4112)
Macro code is just uploaded sequentially from a starting address, however that does not mean the entry point for the macro is at that address. This PR adds preliminary support for executing macros in the middle of our cached code.
2020-06-30 02:32:24 -03:00
bunnei a21d49c9fe Merge pull request #4182 from Kewlan/fullscreen-hotkey-fix
hotkeys: Fix issues caused when changing the fullscreen hotkey
2020-06-29 23:11:57 -04:00
Jan Beich 3c13a49cbf common: add sysconf() fallback
src/common/memory_detect.cpp:15:10: fatal error: 'sys/sysinfo.h' file not found
 #include <sys/sysinfo.h>
          ^~~~~~~~~~~~~~~
2020-06-29 22:41:22 +00:00
Morph e2fb93cb46 maxwell_to_gl: Rename VertexType() to VertexFormat() 2020-06-29 11:48:38 -04:00
John Galt 1eacbe69be cmake: fix fmt linking
On gcc/ld, and clang/lld, fmt::v6 symbols are excluded, so linking
fails. This fixes the issue.

Note: This was included in the FindBoost changes I shared with
BlinkHawk, however only they were merged. I'm not sure if it was missed,
or if there was an issue with this part of the change.
2020-06-29 07:10:07 -04:00
Rodrigo Locatti 1711fe29f2 Merge pull request #4140 from ReinUsesLisp/validation-layers
renderer_vulkan: Update validation layer name and test before enabling
2020-06-29 02:12:38 -03:00
VolcaEM 33f6610f52 Remove duplicate functions 2020-06-29 04:22:38 +02:00
VolcaEM cd893f7ac4 Use decimal instead of hexadecimal
Co-authored-by: David <25727384+ogniK5377@users.noreply.github.com>
2020-06-29 04:21:10 +02:00
VolcaEM 6d7c850936 Fix typo 2020-06-29 04:12:36 +02:00
VolcaEM a82dc6c91d Clang-format 2020-06-29 04:09:38 +02:00
VolcaEM 9338a6a1cf service: Update function tables 2020-06-29 04:01:34 +02:00
ReinUsesLisp a0226819e1 core_timing,scheduler: Use std::scoped_lock when possible
Simplifies the cognitive load of procedures using locks and makes locks
safe against exceptions.
2020-06-28 21:42:57 -03:00
bunnei 58f337e105 Merge pull request #3955 from FernandoS27/prometheus-2b
Remake Kernel Scheduling, CPU Management & Boot Management (Prometheus)
2020-06-28 12:37:50 -04:00
David Marcec 3804c6d1c0 ldr: Cleanup NRO & NRR structs 2020-06-28 20:54:37 +10:00
David 1989977382 Merge pull request #4026 from VolcaEM/ldr
ldr: Update NRR/NRO structs
2020-06-28 20:46:42 +10:00
David 33e9b11261 Merge pull request #4184 from VolcaEM/patch-9
grc: Update function table
2020-06-28 18:49:15 +10:00
David 475c9a1e3c Merge pull request #4185 from VolcaEM/patch-10
lbl: Update function table
2020-06-28 18:48:54 +10:00
David a6374c177a Merge pull request #4186 from VolcaEM/patch-11
ldn: Update function table
2020-06-28 18:48:28 +10:00
David 7b1dba2f84 Merge pull request #4187 from VolcaEM/patch-12
mig: Update function table
2020-06-28 18:48:15 +10:00
David 3d5f77c3cf Merge pull request #4188 from VolcaEM/patch-13
mm: Update function table
2020-06-28 18:47:55 +10:00
David 4abb01de75 Merge pull request #4189 from VolcaEM/patch-14
ncm: Update function table
2020-06-28 18:47:27 +10:00
David 9b9504bb8d Merge pull request #4190 from VolcaEM/patch-15
nfc: Update function table
2020-06-28 18:47:07 +10:00
David 48090dcdba Merge pull request #4183 from VolcaEM/patch-8
friend: Update function table
2020-06-28 18:46:40 +10:00
Morph 3a3949183e maxwell_to_vk: Reorder vertex formats and add A2B10G10R10 for all types except float 2020-06-28 02:57:10 -04:00
David Marcec 2864b1fb41 am: Stub GetIndirectLayerConsumerHandle
Needed by Monster Hunter Generations Ultimate
2020-06-28 16:51:28 +10:00
Morph 4c3146aeb4 maxwell_to_gl: Add 32 bit component sizes to (un)signed scaled formats
Add 32 bit component sizes to (un)signed scaled formats and group (un)signed normalized, scaled, and integer formats together.
2020-06-28 02:51:13 -04:00
David Marcec bbf7b72fbf acc: ListOpenContextStoredUsers partial stub
Needed by Baldur's Gate 1/2
2020-06-28 16:44:36 +10:00
Fernando Sahmkow 94a51e6b21 Core/Common: Address Feedback. 2020-06-27 18:20:06 -04:00
Fernando Sahmkow 7818e2ee11 NvFlinger: Clang Format. 2020-06-27 11:36:30 -04:00
Fernando Sahmkow 8ef375e772 Build System: Fix GCC & MINGW Build. 2020-06-27 11:36:28 -04:00
Fernando Sahmkow 8cd81eb66f SVC: Implement 32-bits wrappers and update Dynarmic. 2020-06-27 11:36:27 -04:00
Fernando Sahmkow 146bbc6189 SVC: Add GetCurrentProcessorNumber32, CreateTransferMemory32, SetMemoryAttribute32 2020-06-27 11:36:27 -04:00
Fernando Sahmkow fd631d72a6 ARM: Update Dynarmic and Setup A32 according to latest interface. 2020-06-27 11:36:26 -04:00
Fernando Sahmkow 75db328166 SVC: Add GetThreadPriority32 & SetThreadPriority32 2020-06-27 11:36:25 -04:00
Fernando Sahmkow a7be2fac83 ArmDynarmic32: Setup CNTPCT correctly 2020-06-27 11:36:24 -04:00
Fernando Sahmkow 78a23536d4 Audio: Correct buffer release for host timing. 2020-06-27 11:36:23 -04:00
Fernando Sahmkow 24e0d393e2 Common/Kernel: Corrections and small bug fixing. 2020-06-27 11:36:21 -04:00
Fernando Sahmkow fda5651072 Services/NvFlinger: Do vSync in a sepparate thread on Multicore. 2020-06-27 11:36:20 -04:00
Fernando Sahmkow 74c9ad1976 Common/NativeClockx86: Reduce native clock accuracy further. 2020-06-27 11:36:18 -04:00
Fernando Sahmkow 4df46e0525 Tests/CoreTiming: Correct host timing tests. 2020-06-27 11:36:17 -04:00
Fernando Sahmkow af0999c735 ARMDynarmicInterface: Correct GCC Build Errors. 2020-06-27 11:36:17 -04:00
Fernando Sahmkow e8d2bf1e17 Common/AtomicOps: Correct GCC Intrinsic argument ordering. 2020-06-27 11:36:16 -04:00
Fernando Sahmkow 555c4c238c Kernel: Correct Host Context on Threads and Scheduler. 2020-06-27 11:36:15 -04:00
Fernando Sahmkow 8d603539a4 YuzuQT: Hide Speed UI on Multicore. 2020-06-27 11:36:14 -04:00
Fernando Sahmkow adc86e3030 Clang Format. 2020-06-27 11:36:14 -04:00
Fernando Sahmkow 6cbdb64f3d ARMInterface/Externals: Update dynarmic and fit to latest version. 2020-06-27 11:36:13 -04:00
Fernando Sahmkow cce90e2672 ARMInterface: Correct rebase errors. 2020-06-27 11:36:12 -04:00
Fernando Sahmkow a4e7d0b106 CoreTiming: Correct rebase bugs and other miscellaneous things. 2020-06-27 11:36:11 -04:00
Fernando Sahmkow d98995c001 Core: Split Microprofile Dynarmic timing per Core 2020-06-27 11:36:10 -04:00
Fernando Sahmkow fb07639438 General: Tune the priority of main emulation threads so they have higher priority than less important helper threads. 2020-06-27 11:36:09 -04:00
Fernando Sahmkow b5f7040175 Dynarmic Interface: don't clear cache if JIT has not been created. 2020-06-27 11:36:08 -04:00
Fernando Sahmkow 543b6b315f General: Correct rebase, sync gpu and context management. 2020-06-27 11:36:08 -04:00
Fernando Sahmkow afb6d31c02 CoreTiming/CycleTimer: Correct Idling. 2020-06-27 11:36:07 -04:00
Fernando Sahmkow 9f7adff3d3 SingleCore: Correct ticks reset to be on preemption. 2020-06-27 11:36:06 -04:00
Fernando Sahmkow 6f0c873d48 General: Cleanup legacy code. 2020-06-27 11:36:05 -04:00
Fernando Sahmkow e95444c05a Kernel/svcBreak: Implement CacheInvalidation for Singlecore and correct svcBreak. 2020-06-27 11:36:04 -04:00
Fernando Sahmkow 1146679de6 Bootmanager/CPU_Manager: Correct shader caches and sync GPU on OpenGL. 2020-06-27 11:36:03 -04:00
Fernando Sahmkow b2109333c6 HLE_IPC: Correct HLE Event behavior on timeout. 2020-06-27 11:36:03 -04:00
Fernando Sahmkow 4132ba96da SingleCore: Improve Cycle timing Behavior and replace mutex in global scheduler for spinlock. 2020-06-27 11:36:02 -04:00
Fernando Sahmkow 3197d72996 FrameLimiting: Enable frame limiting for single core. 2020-06-27 11:36:01 -04:00
Fernando Sahmkow f0f2fc4243 SingleCore: Use Cycle Timing instead of Host Timing. 2020-06-27 11:36:01 -04:00
Fernando Sahmkow 21235cdab1 Scheduler: Correct Reload/Unload 2020-06-27 11:35:59 -04:00
Fernando Sahmkow 720858ba13 Thread: Release the ARM Interface on exitting. 2020-06-27 11:35:58 -04:00
Fernando Sahmkow db60ca2704 General: Move ARM_Interface into Threads. 2020-06-27 11:35:58 -04:00
Fernando Sahmkow 7b3b33a2e6 Core: Refactor ARM Interface. 2020-06-27 11:35:56 -04:00
Fernando Sahmkow 1cc7c426df X64 Clock: Reduce accuracy to be less or equal to guest accuracy. 2020-06-27 11:35:55 -04:00
Fernando Sahmkow c22d3e1e18 ARM/WaitTree: Better track the CallStack for each thread. 2020-06-27 11:35:54 -04:00
Fernando Sahmkow 96c996b6a0 SVC/ARM: Correct svcSendSyncRequest and cache ticks on arm interface. 2020-06-27 11:35:53 -04:00
Fernando Sahmkow 287ea2d3b4 SingleCore: Move Host Timing from a sepparate thread to main cpu thread. 2020-06-27 11:35:52 -04:00
Fernando Sahmkow 1bcceea736 GUI: Make multicore only work with Async and add GUI for multicore. 2020-06-27 11:35:52 -04:00
Fernando Sahmkow fc47857c3b ARM: Addapt to new Exclusive Monitor Interface. 2020-06-27 11:35:50 -04:00
Fernando Sahmkow 5f8acb6397 CPU_Manager: Correct stopping on SingleCore. 2020-06-27 11:35:49 -04:00
Fernando Sahmkow d03d00c9c2 Scheduler: Correct yielding interaction with SetThreadActivity. 2020-06-27 11:35:49 -04:00
Fernando Sahmkow b121009e03 General: Fix microprofile on dynarmic/svc, fix wait tree showing which threads were running. 2020-06-27 11:35:48 -04:00
Fernando Sahmkow cb974be3ce General: Fix Stop function 2020-06-27 11:35:47 -04:00
Fernando Sahmkow 3869e55c27 Kernel: Rewind on SVC change. 2020-06-27 11:35:46 -04:00
Fernando Sahmkow 0963ff1ae9 Kernel: Preempt Single core on redudant yields. 2020-06-27 11:35:45 -04:00
Fernando Sahmkow ebb640e968 CPU_Manager: Unload/Reload threads on preemption on SingleCore 2020-06-27 11:35:43 -04:00
Fernando Sahmkow d2aa227e0d Synchronization: Correct wide Assertion. 2020-06-27 11:35:43 -04:00
Fernando Sahmkow cc2f7dcd08 General: Initial Setup for Single Core. 2020-06-27 11:35:42 -04:00
Fernando Sahmkow 65225cf61b Scheduler: Set last running time on thread. 2020-06-27 11:35:41 -04:00
Fernando Sahmkow 76daf8f672 Kernel: Corrections to TimeManager, Scheduler and Mutex. 2020-06-27 11:35:40 -04:00
Fernando Sahmkow 24bc1f020a Kernel: Fixes, corrections and asserts to scheduler and different svcs. 2020-06-27 11:35:40 -04:00
Fernando Sahmkow 5183094c24 Scheduler: Correct yields. 2020-06-27 11:35:39 -04:00
Fernando Sahmkow d9a0ea22bf Mutex: Revert workaround due to poor exclusive memory. 2020-06-27 11:35:38 -04:00
Fernando Sahmkow 5eac520ae3 ARM/Memory: Correct Exclusive Monitor and Implement Exclusive Memory Writes. 2020-06-27 11:35:37 -04:00
Fernando Sahmkow d2a2c5f57b SVC: WaitSynchronization add Termination Pending Result. 2020-06-27 11:35:36 -04:00
Fernando Sahmkow a9ed059a07 Scheduler: Remove arm_interface lock and a few corrections. 2020-06-27 11:35:35 -04:00
Fernando Sahmkow 119d9844db Yuzu/Debuggers: Correct Wait Tree for Paused threads. 2020-06-27 11:35:34 -04:00
Fernando Sahmkow 87117805c9 SVC: Correct SetThreadActivity. 2020-06-27 11:35:33 -04:00
Fernando Sahmkow c1f6b99653 SCC: Small corrections to CancelSynchronization 2020-06-27 11:35:33 -04:00
Fernando Sahmkow e5454c3665 Scheduler: Correct locking for hle threads. 2020-06-27 11:35:32 -04:00
Fernando Sahmkow 723a909ee9 Scheduler: Fix HLE Threads on guard 2020-06-27 11:35:31 -04:00
Fernando Sahmkow b80f252d11 Scheduler: Protect on closed threads. 2020-06-27 11:35:31 -04:00
Fernando Sahmkow e501cbe5b8 Scheduler: Correct assert. 2020-06-27 11:35:30 -04:00
Fernando Sahmkow c8e62451c6 Core: Correct rebase. 2020-06-27 11:35:29 -04:00
Fernando Sahmkow 8c30c20863 Scheduler: Release old thread fiber before trying to switch to the next thread fiber. 2020-06-27 11:35:28 -04:00
Fernando Sahmkow 7ad6af4bdb NVDRV: Remove frame limiting as Host Timing already takes care. 2020-06-27 11:35:28 -04:00
Fernando Sahmkow 4621b4b37a Mutex: Correct Result writting to clear exclusivity. 2020-06-27 11:35:26 -04:00
Fernando Sahmkow 7270076127 SVC: Correct svcWaitForAddress and svcSignalToAddress. 2020-06-27 11:35:25 -04:00
Fernando Sahmkow a3f7acb149 Scheduler: Correct Select Threads Step 2. 2020-06-27 11:35:24 -04:00
Fernando Sahmkow 47c01e68da Kernel: Corrections to Scheduling. 2020-06-27 11:35:23 -04:00
Fernando Sahmkow 5e26654c5a Kernel: Correct Signal on Thread Death and Setup Sync Objects on Thread for Debugging 2020-06-27 11:35:23 -04:00
Fernando Sahmkow da260b9d2e Core: Correct HLE Event Callbacks and other issues. 2020-06-27 11:35:22 -04:00
Fernando Sahmkow 04cb816f7a Process: Protect TLS region and Modules. 2020-06-27 11:35:21 -04:00
Fernando Sahmkow cd3d1798d8 General: Add Asserts 2020-06-27 11:35:21 -04:00
Fernando Sahmkow 78eeea9f17 General: Add better safety for JIT use. 2020-06-27 11:35:20 -04:00
Fernando Sahmkow 7932cf9617 SVC: Correct races on physical core switching. 2020-06-27 11:35:19 -04:00
Fernando Sahmkow 2c0431e5ed NVFlinger: Lock race condition between CPU, Host Timing, VSync. 2020-06-27 11:35:18 -04:00
Fernando Sahmkow 9140f5d1f3 SVC: Add locks to the memory management. 2020-06-27 11:35:18 -04:00
Fernando Sahmkow 6605f8acfa SVC: Correct WaitSynchronization, WaitProcessWideKey, SignalProcessWideKey. 2020-06-27 11:35:17 -04:00
Fernando Sahmkow 940422fd96 SVC: Cleanup old methods. 2020-06-27 11:35:16 -04:00
Fernando Sahmkow 64fe82af2e CPU_Manager: Reconfigre guest threads for dynamrmic downsides 2020-06-27 11:35:15 -04:00
Fernando Sahmkow 85ca7b2bdb SVC: Correct SendSyncRequest. 2020-06-27 11:35:14 -04:00
Fernando Sahmkow 5c70bfcef7 SVC: Correct ArbitrateUnlock 2020-06-27 11:35:14 -04:00
Fernando Sahmkow 8c9d258e66 SVC: Correct SignalEvent, ClearEvent, ResetSignal, WaitSynchronization, CancelSynchronization, ArbitrateLock 2020-06-27 11:35:13 -04:00
Fernando Sahmkow 71e008a336 SVC: Remove global HLE Lock. 2020-06-27 11:35:13 -04:00
Fernando Sahmkow b2fea85499 SVC: Correct GetThreadPriority, SetThreadPriority, GetThreadCoreMask, SetThreadCoreMask, GetCurrentProcessorNumber 2020-06-27 11:35:12 -04:00
Fernando Sahmkow 451344e9ae SVC: Correct CreateThread, StartThread, ExitThread, SleepThread. 2020-06-27 11:35:11 -04:00
Fernando Sahmkow fb1d75a788 HostTiming: Pause the hardware clock on pause. 2020-06-27 11:35:10 -04:00
Fernando Sahmkow 0fd333a248 AudioCore: Use nanoseconds instead of cycles for buffer time. 2020-06-27 11:35:10 -04:00
Fernando Sahmkow 9846f5822d General: Setup yuzu threads' microprofile, naming and registry. 2020-06-27 11:35:09 -04:00
Fernando Sahmkow 63bd59669f CPU_Manager: remove debugging code. 2020-06-27 11:35:08 -04:00
Fernando Sahmkow 71cb697314 YuzuCMD/Tester: Correct execution 2020-06-27 11:35:07 -04:00
Fernando Sahmkow 7ee76003ad General: Recover Prometheus project from harddrive failure
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host 
Timing, Reworks the Kernel's Scheduler, Introduce Idle State and 
Suspended State, Recreates the bootmanager, Initializes Multicore 
system.
2020-06-27 11:35:06 -04:00
David a83f0b607e Merge pull request #3396 from FernandoS27/prometheus-1
Implement SpinLocks, Fibers and a Host Timer
2020-06-28 01:34:07 +10:00
VolcaEM a1e5cfa4b6 nfc: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/NFC_services
2020-06-27 13:09:36 +02:00
VolcaEM c696867643 ncm: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/NCM_services

ILocationResolver's 16, 17, 18 and 19 have unofficial names
2020-06-27 13:05:22 +02:00
VolcaEM d75e36dca8 mm: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/Display_services
2020-06-27 12:59:01 +02:00
VolcaEM 1df981bf33 mig: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/Migration_services
2020-06-27 12:53:59 +02:00
VolcaEM 66442ce8fd ldn: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/LDN_services
2020-06-27 12:50:56 +02:00
VolcaEM 87f8989359 Oops (fix typo) 2020-06-27 12:45:42 +02:00
VolcaEM 9a04fa1cf8 lbl: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/Backlight_services
2020-06-27 12:43:33 +02:00
VolcaEM 26855d7906 grc: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/GRC_services
2020-06-27 12:41:21 +02:00
VolcaEM ee12f6f61e friend: Update function table 2020-06-27 12:39:10 +02:00
Kewlan eac502f442 Fix issues caused when changing the fullscreen hotkey 2020-06-27 11:30:32 +02:00
bunnei d3c8f5d4c8 Merge pull request #4097 from kevinxucs/kevinxucs/device-pixel-scaling-float
Fix framebuffer size on fractional scaling display
2020-06-27 02:49:07 -04:00
bunnei 286418bf01 Merge pull request #4164 from Kewlan/mute-audio-hotkey
hotkeys: Add a "Mute Audio" hotkey
2020-06-27 02:47:13 -04:00
bunnei c5f5483ee1 Merge pull request #4158 from Morph1984/caps
caps: Use enum classes and check struct sizes on compile time
2020-06-27 00:09:32 -04:00
Ameer J 21ae845d69 left const auto&, comment punctuation.
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2020-06-26 23:46:49 -04:00
bunnei c9acff2600 Merge pull request #4152 from ogniK5377/ipc-err
Mark invalid IPC buffers as ASSERT_OR_EXECUTE_MSG
2020-06-26 23:37:19 -04:00
bunnei 615e5630bf Merge pull request #4154 from ogniK5377/swkbd-nullptr
Prevent nullptr dereference on swkbd error case
2020-06-26 23:25:04 -04:00
bunnei 7048f18d87 Merge pull request #4147 from ReinUsesLisp/hset2-imm
shader/half_set: Implement HSET2_IMM
2020-06-26 23:14:56 -04:00
David f546eac9f3 Merge pull request #4178 from VolcaEM/patch-6
es: Update function table
2020-06-27 13:05:12 +10:00
VolcaEM 92f8bc1bf8 Use better names for "Unknown"s 2020-06-27 02:48:29 +02:00
VolcaEM 70e34fdba0 Update function names 2020-06-27 02:43:22 +02:00
David Marcec b412e8b952 btm: Give better names for unknown functions 2020-06-27 10:42:46 +10:00
VolcaEM 4cf402a109 btdrv: Update function table (#4174)
* btdrv: Update function table
2020-06-26 20:34:29 -04:00
VolcaEM 29e3f101d9 bpc: Update function tables (#4173)
* bpc: Update function tables

This was based on Switchbrew page: https://switchbrew.org/wiki/PCV_services
2020-06-26 20:33:55 -04:00
VolcaEM 866f06f078 bcat: Update function tables and add missing classes (#4172)
* bcat: Update function tables and add missing classes
2020-06-26 20:33:25 -04:00
VolcaEM 690e4b86ae am: Update function tables and add missing classes (#4169)
* am: Update function tables and add missing classes

* Remove comments (1/5)

* Remove comments (2/5)

* Remove comments (3/5)

* Remove comments (4/5)

* Remove comments (5/5)

* Remove unused classes (1/2)

* Remove unused classes (2/2)
2020-06-26 20:32:26 -04:00
VolcaEM 9052b62380 aoc: Update function table (#4170)
* aoc: Update function table

* Remove comments
2020-06-26 20:31:44 -04:00
LC 1b10d314f4 Merge pull request #4177 from VolcaEM/patch-5
btm: Update function tables
2020-06-26 20:30:59 -04:00
VolcaEM 4aa69a35d9 eupld: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/Error_Upload_services
2020-06-27 02:25:04 +02:00
VolcaEM 1824af3f63 es: Update function table
This was based on Switchbrew page: https://switchbrew.org/wiki/ETicket_services
2020-06-27 02:17:51 +02:00
VolcaEM c6e7f72cb1 Update FAQ function name (2/2) 2020-06-27 02:14:29 +02:00
VolcaEM 873e6fc739 Update FAQ function name (1/2) 2020-06-27 02:13:34 +02:00
VolcaEM aa2672fb2c btm: Update function tables
This was based on Switchbrew page: https://switchbrew.org/wiki/BTM_services

"No comment" edition
2020-06-27 01:57:48 +02:00
ReinUsesLisp eab8a5a9db vk_rasterizer: Use nullptr for <pSizes> in CmdBindVertexBuffers2EXT
Disable this temporarily.
2020-06-26 20:57:22 -03:00
ReinUsesLisp b9ac739607 vk_pipeline_cache: Avoid hashing and comparing dynamic state when possible
With extended dynamic states, some bytes don't have to be collected from
the pipeline key, hence we can avoid hashing and comparing them on
lookups.
2020-06-26 20:57:22 -03:00
ReinUsesLisp 031f7b3b26 vulkan/fixed_pipeline_state: Move state out of individual structures 2020-06-26 20:57:22 -03:00
ReinUsesLisp 049837aae0 vk_rasterizer: Use VK_EXT_extended_dynamic_state 2020-06-26 20:57:22 -03:00
ReinUsesLisp 0a32575e27 renderer_vulkan/wrapper: Add VK_EXT_extended_dynamic_state functions 2020-06-26 20:55:15 -03:00
ReinUsesLisp 8e8bfc9365 fixed_pipeline_state: Add requirements for VK_EXT_extended_dynamic_state
This moves dynamic state present in VK_EXT_extended_dynamic_state to a
separate structure in FixedPipelineState. This is structure is at the
bottom allowing us to hash and memcmp only when the extension is not
supported.
2020-06-26 20:55:15 -03:00
ReinUsesLisp bcf4665fb0 vk_device: Enable VK_EXT_extended_dynamic_state when available 2020-06-26 20:55:15 -03:00
ReinUsesLisp 26144f794f texture_cache: Test format compatibility before copying
Avoid illegal copies. This intercepts the last step of a copy to avoid
generating validation errors or corrupting the driver on some instances.

We can create views and emit copies accordingly in future commits and
remove this last-step validation.
2020-06-26 20:52:22 -03:00
bunnei 7fa55a24f2 Merge pull request #4144 from FernandoS27/tt-fix
TextureCache: Fix case where layer goes off bound.
2020-06-26 19:02:39 -04:00
bunnei 2a1df7b66e Merge pull request #4111 from ReinUsesLisp/preserve-contents-vk
vk_rasterizer: Don't preserve contents on full screen clears
2020-06-26 18:48:12 -04:00
ReinUsesLisp 23e0009a41 video_core/compatible_formats: Table to test if two formats are legal to view or copy
Add a flat table to test if it's legal to create a texture view between
two formats or copy betweem them.

This table is based on ARB_copy_image and ARB_texture_view. Copies are
more permissive than views.
2020-06-26 19:28:11 -03:00
ReinUsesLisp 95c7c7db0a gl_buffer_cache: Copy to buffers created as STREAM_READ before downloading
After marking buffers as resident, Nvidia's driver seems to take a
slow path. To workaround this issue, copy to a STREAM_READ buffer and
then call GetNamedBufferSubData on it.

This is a temporary solution until we have asynchronous flushing.
2020-06-26 16:58:40 -03:00
VolcaEM cfd829e6ac Update function name again 2020-06-26 18:51:12 +02:00
VolcaEM c50c165d3c Update function name (2/2) 2020-06-26 18:50:28 +02:00
VolcaEM 032cf4330e Update function name (1/2) 2020-06-26 18:49:57 +02:00
Fernando Sahmkow fda14542cb Common: Fix non-conan build 2020-06-26 12:25:19 -04:00
Morph d8df8d84ae caps_u: Fix GetAlbumContentsFileListForApplication stub 2020-06-26 08:35:21 -04:00
Morph 851a3a8638 caps: Use enum classes and check struct sizes on compile time 2020-06-26 08:35:21 -04:00
Morph 9b4a5f297b caps: Update copyright headers
Updated to "yuzu Emulator Project"
2020-06-26 08:35:21 -04:00
Kewlan 3fcf2f201c Add a "Mute Audio" hotkey 2020-06-26 06:03:29 +02:00
bunnei 257cf13b70 Merge pull request #4159 from ogniK5377/mem-manager-dumb-assert
memory_manager: Remove useless assertion
2020-06-25 22:53:13 -04:00
Rodrigo Locatti f7c871b8ca Merge pull request #4151 from ReinUsesLisp/gl-invalidations
gl_shader_cache: Avoid use after move for program size
2020-06-25 21:05:27 -03:00
Ameer J eb06e3e8bf const& to button in button array
Co-authored-by: VolcaEM <63682805+VolcaEM@users.noreply.github.com>
2020-06-25 19:46:50 -04:00
Ameer 677a07c253 Stop reading loop if error is encountered 2020-06-25 19:31:51 -04:00
VolcaEM 9d72389b35 Clang-format again 2020-06-25 23:44:41 +02:00
VolcaEM b16bfe629d Clang-format 2020-06-25 23:40:53 +02:00
VolcaEM f9233dc922 Remove unnecessary newline 2020-06-25 23:38:38 +02:00
VolcaEM 967cbf1f36 Merge branch 'master' into quickstart-faq 2020-06-25 23:34:37 +02:00
VolcaEM d0647a7ae9 Fix typo 2: electric boogaloo 2020-06-25 23:32:43 +02:00
VolcaEM c8d6e50b05 Use QUrl (2/2) 2020-06-25 23:31:01 +02:00
VolcaEM d82f550d12 Use QUrl (1/2) 2020-06-25 23:28:38 +02:00
VolcaEM 002d762b78 Fix formatting 2020-06-25 23:18:54 +02:00
VolcaEM 5590f4775e Fix typo 2020-06-25 23:07:58 +02:00
VolcaEM a6150263c9 Add "Open Quickstart Guide" and "FAQ" buttons to the Help menu
While we're at it, also refactor the function used by OnOpenModsPage to be compatible with other URLs
2020-06-25 23:02:33 +02:00
bunnei c5dfaa7e9a Merge pull request #4136 from VolcaEM/mods
Add a "Open Mods Page" button to the GUI
2020-06-25 15:10:18 -04:00
Rodrigo Locatti 9587c299f3 Merge pull request #4160 from ogniK5377/IsASTCSupported-fix
gl_device: Fix IsASTCSupported to scan all targets instead of just GL_TEXTURE_2D
2020-06-25 15:58:09 -03:00
David fbc30df353 Merge pull request #4141 from Morph1984/SevenSixAxisSensor
hid: Stub a series of "SevenSixAxisSensor" service commands
2020-06-25 19:37:39 +10:00
David Marcec 589135df53 gl_device: Fix IsASTCSupported
Other targets were never actually checked
2020-06-25 19:12:56 +10:00
David Marcec 442900456e memory_manager: Remove useless assertion
num_pages is an std::size_t. It will always be >= 0
2020-06-25 16:35:58 +10:00
ReinUsesLisp 9f411bbb41 gl_device: Enable NV_vertex_buffer_unified_memory on Turing devices
Once we make sure not to corrupt Nvidia's driver, we can safely use
resident buffers on Turing devices.

See GitHub pull request #4156
2020-06-25 01:28:47 -03:00
Morph 3e0ff59a63 hid: Stub a series of "SevenSixAxisSensor" service commands
- Used by Captain Toad: Treasure Tracker Update 1.3.0

While we're at it, fix the input parameters for SetIsPalmaAllConnectable and SetPalmaBoostMode
2020-06-24 11:57:39 -04:00
bunnei 889171282d Merge pull request #4105 from ReinUsesLisp/resident-buffers
gl_rasterizer: Use NV_vertex_buffer_unified_memory for vertex buffer robustness
2020-06-24 11:40:30 -04:00
Ameer 7c10c568da padbutton enum class and struct initiailization 2020-06-24 11:39:30 -04:00
bunnei 12a5f5af5d Merge pull request #4083 from Morph1984/B10G11R11F
decode/image: Implement B10G11R11F
2020-06-24 11:02:38 -04:00
David Marcec 4b9812e7bb Prevent nullptr dereference on swkbd error case 2020-06-25 00:25:15 +10:00
David Marcec bf4e6b3cba prepo: : Don't read extra buffer from report unless passed
Prepo doesn't always pass a secondary buffer, we assume it always does which leads to a bad read.
2020-06-24 23:01:00 +10:00
Fernando Sahmkow 0aa8c2d9e6 Merge pull request #4046 from ogniK5377/macro-hle-prod
Add support for HLEing Macros
2020-06-24 09:01:00 -04:00
David Marcec df001e73c2 Mark invalid IPC buffers as ASSERT_OR_EXECUTE_MSG
Previously if applications would send faulty buffers(example homebrew) it would lead to us returning uninitalized data. Switching from ASSERT_MSG to ASSERT_OR_EXECUTE_MSG allows us to have a fail safe to prevent crashes but also continue execution without introducing undefined behavior
2020-06-24 22:50:27 +10:00
ReinUsesLisp 3b1a5ead5c buffer_cache: Use buffer methods instead of cache virtual methods 2020-06-24 02:36:14 -03:00
ReinUsesLisp d636cb75f3 gl_stream_buffer: Use InvalidateBufferData instead unmap and map
Making the stream buffer resident increases GPU usage significantly on
some games. This seems to be addressed invalidating the stream buffer
with InvalidateBufferData instead of using a Unmap + Map (with
invalidation flags).
2020-06-24 02:36:14 -03:00
ReinUsesLisp aee540a7c9 gl_rasterizer: Use NV_vertex_buffer_unified_memory for vertex buffer robustness
Switch games are allowed to bind less data than what they use in a
vertex buffer, the expected behavior here is that these values are read
as zero. At the moment of writing this only D3D12, OpenGL and NVN through
NV_vertex_buffer_unified_memory support vertex buffer with a size limit.

In theory this could be emulated on Vulkan creating a new VkBuffer for
each (handle, offset, length) tuple and binding the expected data to it.
This is likely going to be slow and memory expensive when used on the
vertex buffer and we have to do it on all draws because we can't know
without analyzing indices when a game is going to read vertex data out
of bounds.

This is not a problem on OpenGL's BufferAddressRangeNV because it takes
a length parameter, unlike Vulkan's CmdBindVertexBuffers that only takes
buffers and offsets (the length is implicit in VkBuffer). It isn't a
problem on D3D12 either, because D3D12_VERTEX_BUFFER_VIEW on
IASetVertexBuffers takes SizeInBytes as a parameter (although I am not
familiar with robustness on D3D12).

Currently this only implements buffer ranges for vertex buffers,
although indices can also be affected. A KHR_robustness profile is not
created, but Nvidia's driver reads out of bound vertex data as zero
anyway, this might have to be changed in the future.

- Fixes SMO random triangles when capturing an enemy, getting hit, or
looking at the environment on certain maps.
2020-06-24 02:36:14 -03:00
ReinUsesLisp 0669209db6 gl_buffer_cache: Mark buffers as resident
Make stream buffer and cached buffers as resident and query their
address. This allows us to use GPU addresses for several proprietary
Nvidia extensions.
2020-06-24 02:36:14 -03:00
ReinUsesLisp 6a2fd26768 gl_device: Expose NV_vertex_buffer_unified_memory except on Turing
Expose NV_vertex_buffer_unified_memory when the driver supports it.

This commit adds a function the determine if a GL_RENDERER is a Turing
GPU. This is required because on Turing GPUs Nvidia's driver crashes
when the buffer is marked as resident or on DeleteBuffers. Without a
synchronous debug output (single threaded driver), it's likely that
the driver will crash in the first blocking call.
2020-06-24 02:36:14 -03:00
ReinUsesLisp 87a760f000 gl_stream_buffer: Always use a non-coherent buffer 2020-06-24 02:35:33 -03:00
ReinUsesLisp 5ddd3e5df0 gl_stream_buffer: Always use persistent memory maps
yuzu no longer supports platforms without persistent maps.
2020-06-24 02:35:33 -03:00
Rodrigo Locatti ba83472879 Merge pull request #4129 from Morph1984/texture-shadow-lod-workaround
gl_shader_decompiler: Workaround textureLod when GL_EXT_texture_shadow_lod is not available
2020-06-24 01:51:15 -03:00
David Marcec 1dee0b9436 Move GetKeyCodeMapImpl to an anonymous namespace 2020-06-24 13:05:08 +10:00
David Marcec 2ca26e7d61 addressed issues 2020-06-24 12:18:33 +10:00
David Marcec 55161a702b clear mme draw mode
We already draw, so we can clear it
2020-06-24 12:09:04 +10:00
David Marcec da2cbc76fc Addressed issues 2020-06-24 12:09:03 +10:00
David Marcec e5adcda905 Fix constbuffer for 0217920100488FF7 2020-06-24 12:09:02 +10:00
David Marcec 74e48d2a98 Macro HLE support 2020-06-24 12:09:01 +10:00
David Marcec 8ce11701a9 Fixed logging output 2020-06-24 12:07:41 +10:00
David Marcec 55b6b3cada Implement GetKeyCodeMap & GetKeyCodeMap2
Closes #3919
2020-06-24 12:05:52 +10:00
bunnei b465ef400e Merge pull request #4138 from Morph1984/GyroscopeZeroDriftMode
hid: Implement Get/ResetGyroscopeZeroDriftMode
2020-06-23 21:56:16 -04:00
ReinUsesLisp 0c086bfa66 gl_shader_cache: Avoid use after move for program size
All programs had a size of zero due to this bug, skipping invalidations.

While we are at it, remove some unused forward declarations.
2020-06-23 22:54:42 -03:00
bunnei 93d5407c96 Merge pull request #4128 from lioncash/move2
software_keyboard: Eliminate trivial redundant copies
2020-06-23 18:24:15 -04:00
Ameer 39ca7c675c cleanup check access, read, and factory GetNextInput funcs. Use size rather than magic number 2020-06-23 17:37:15 -04:00
bunnei 2fb935ef32 Merge pull request #4127 from lioncash/dst-typo
texture_cache: Fix incorrect address used in a DeduceSurface() call
2020-06-23 15:59:37 -04:00
bunnei 237174d899 Merge pull request #3948 from Morph1984/log-cpu-instructions
main/common: Log/append AVX/FMA to the Host CPU string if available and add AVX512 detection
2020-06-23 15:19:47 -04:00
Ameer ef0b52563d Fix deallocation of GC Adapter 2020-06-23 12:47:58 -04:00
Morph c4ca93ac19 yuzu_tester: Silence type conversion warning 2020-06-22 22:56:15 -04:00
Morph e9bee77481 lm: Silence no return value warning 2020-06-22 22:55:32 -04:00
Ameer e8c8a5bafd Small quality of life indication that mapped button is GC 2020-06-22 22:02:50 -04:00
ReinUsesLisp 43e5214413 shader/half_set: Implement HSET2_IMM
Add HSET2_IMM. Due to the complexity of the encoding avoid using
BitField unions and read the relevant bits from the code itself.
This is less error prone.
2020-06-22 20:51:18 -03:00
Ameer f071a70fec std::array and const reference passing of non-trivial objects 2020-06-22 18:11:59 -04:00
ameerj 14bb562028 Update src/input_common/main.cpp
Co-authored-by: LC <mathew1800@gmail.com>

update libusb submodule (hopefully windows build error fixed)
2020-06-22 17:05:50 -04:00
VolcaEM b9e6687af0 account: Update function tables and add missing classes (#4145)
* account: Update function tables and add missing classes

* clang-format

* Add missing "public"

* Add missing public again

* Add missing final
2020-06-22 16:03:26 -04:00
Fernando Sahmkow 57926f80c0 TextureCache: Fix case where layer goes off bound.
The returned layer is expected to be between 0 and the depth of the
surface, anything larger is off bounds.
2020-06-22 11:37:40 -04:00
unknown c352c30597 Reorder variables to comply with the Auzure build pipeline 2020-06-22 15:56:41 +02:00
Morph 75e120056f arm_dynarmic_64: Log the instruction when an exception is raised 2020-06-22 07:00:24 -04:00
Morph 393197f37c arm_dynarmic_32: Log under Core_ARM instead of HW_GPU 2020-06-22 06:59:41 -04:00
Rodrigo Locatti 5384c348b3 Merge pull request #4110 from ReinUsesLisp/direct-upload-sets
vk_update_descriptor: Upload descriptor sets data directly
2020-06-22 05:02:13 -03:00
ReinUsesLisp ec8465e843 renderer_vulkan: Update validation layer name and test before enabling
Update validation layer string to VK_LAYER_KHRONOS_validation.

While we are at it, properly check for available validation layers
before enabling them.
2020-06-22 04:10:45 -03:00
Ameer 5479427335 Tidy up the pointers, use pair over tuple where appropriate 2020-06-21 23:56:56 -04:00
Ameer a0f8f1dc5e fix for sleep using stl 2020-06-21 22:58:53 -04:00
bunnei d3ac9705d2 Merge pull request #4122 from lioncash/hide
video_core: Eliminate some variable shadowing
2020-06-21 22:38:04 -04:00
bunnei 24f69a8260 Merge pull request #4126 from lioncash/noexcept
vulkan/wrapper: Remove noexcept from GetSurfaceCapabilitiesKHR()
2020-06-21 22:36:14 -04:00
bunnei a14e4ddda9 Merge pull request #4134 from FearlessTobi/port-5322
Port citra-emu/citra#5322: "Fix: fatal error CVT1100 when compiling manifest file"
2020-06-21 22:35:17 -04:00
Ameer 92a812d815 shared_ptr for the GC adapter class, constexpr constants 2020-06-21 21:50:58 -04:00
Ameer 4a54dc6bbf std::arrays where appropriate, clear q in adapter class, other touch ups 2020-06-21 21:17:46 -04:00
Ameer 5ebed7b1bb fix include thread 2020-06-21 21:17:46 -04:00
Ameer eddf2d0f4e Singleton GC Adapter class, remove globals, fix naming convention
Fix clang formatting

Manual fix for configure_input_player formatting

Add missing lib usb cmake command
2020-06-21 21:17:07 -04:00
Morph eaa3067fa8 hid: Implement Get/ResetGyroscopeZeroDriftMode
- Used by Captain Toad Treasure Tracker
2020-06-21 16:25:41 -04:00
Ameer 77ae7fe5dd Clang Formatting 2020-06-21 15:31:57 -04:00
Ameer 243dbee81e Cleanup after linter 2020-06-21 13:02:43 -04:00
Ameer dbe1ad4fe4 GC Adapter Implementation 2020-06-21 12:36:28 -04:00
VolcaEM fc68fb9ff5 Correct function name (2/2) 2020-06-21 18:10:23 +02:00
VolcaEM 7f61427719 Correct function name (1/2) 2020-06-21 18:09:14 +02:00
VolcaEM ba50f8b8e6 Clang-format 2020-06-21 06:17:46 +02:00
VolcaEM 2d1d304a4d Remove unnecessary conversion 2020-06-21 06:16:03 +02:00
VolcaEM 5e324ef05d Address review comment by Lioncash
Co-authored-by: LC <mathew1800@gmail.com>
2020-06-21 06:12:23 +02:00
VolcaEM b453eca31f Add a "Open Mods Page" button to the GUI 2020-06-21 06:09:28 +02:00
Morph 11ea8fa16b gl_shader_decompiler: Enable GL_EXT_texture_shadow_lod if available
Enable GL_EXT_texture_shadow_lod if available. If this extension is not available, such as on Intel/AMD proprietary drivers, use textureGrad as a workaround.
2020-06-20 23:02:29 -04:00
Morph a6aa5f526c gl_device: Check for GL_EXT_texture_shadow_lod 2020-06-20 22:14:32 -04:00
bunnei 02e70bc2b9 Merge pull request #4120 from lioncash/arb
gl_arb_decompiler: Avoid several string copies
2020-06-20 22:11:49 -04:00
FearlessTobi 18fed8039b Fix: fatal error CVT1100 when compiling manifest file
Occurs when doing a local compile in MSVC build. The compiler I'm using is as below:
Microsoft Visual Studio Community 2019 Preview
Version 16.6.0 Preview 5.0

Fixes this error:
CVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

I have put 0 since previous name was 1. If have other names in mind, please let me know.

Co-Authored-By: dragios <dragios@users.noreply.github.com>
2020-06-21 03:11:23 +02:00
MerryMage 0192b77e5b macro_jit_x64: Use ecx for shift register
shl/shr only accept cl as their second argument
2020-06-20 22:24:05 +01:00
Lioncash 096ce9a75e texture_cache: Fix incorrect address used in a DeduceSurface() call
Previously the source was being deduced twice in a row.
2020-06-20 14:11:28 -04:00
merry c71866674a Merge pull request #4125 from lioncash/macro-shift
macro_jit_x64: Amend readability of Compile_ExtractShiftLeftRegister()
2020-06-20 16:08:23 +01:00
merry 86a0258abc Merge pull request #4123 from lioncash/unused-var
macro_jit_x64: Remove unused variable
2020-06-20 16:07:58 +01:00
Lioncash 5f8e8ba92d software_keyboard: Eliminate trivial redundant copies
We can just make use of moves here to get rid of two redundant copies
2020-06-20 01:06:10 -04:00
Morph 9c5847125f main: Append AVX and FMA instructions to cpu string
Append AVX and FMA instructions to cpu string if the host cpu supports them
2020-06-20 00:31:37 -04:00
Morph 5482a4a272 common/telemetry: Add AVX512 to telemetry 2020-06-20 00:31:37 -04:00
Morph d0a762a6a8 common/cpu_detect: Add AVX512 detection 2020-06-20 00:31:37 -04:00
Morph 1e9be249e1 decode/image: Implement B10G11R11F
- Used by Kirby Star Allies
2020-06-20 00:28:30 -04:00
bunnei 7612c56cff Merge pull request #4099 from MerryMage/macOS-build
Fix compilation on macOS
2020-06-19 23:31:04 -04:00
Lioncash 64418ecaee gl_arb_decompiler: Avoid several string copies
Variables that are marked as const cannot have the move constructor
invoked when returning from a function (the move constructor requires a
non-const variable so it can "steal" the resources from it.
2020-06-19 23:09:16 -04:00
Lioncash 9ba25c342f vulkan/wrapper: Remove noexcept from GetSurfaceCapabilitiesKHR()
Check() can throw an exception if the Vulkan result isn't successful.

We remove the check so that std::terminate isn't outright called and
allows for better debugging (should it ever actually fail).
2020-06-19 23:01:59 -04:00
Lioncash 909f289531 macro_jit_x64: Correct readability of Compile_ExtractShiftLeftImmediate()
Previously dst wasn't being used.
2020-06-19 22:57:23 -04:00
Lioncash d7fa20d641 macro_jit_x64: Correct readability of Compile_ExtractShiftLeftRegister()
Previously dst wasn't being used.
2020-06-19 22:56:55 -04:00
Lioncash a99150a132 macro_jit_x64: Remove unused variable
Removes a completely unused label and marks another variable as unused,
given it seems like it has potential uses in the future.
2020-06-19 22:10:45 -04:00
Lioncash 693ec509d7 memory_manager: Eliminate variable shadowing
Renames some variables to prevent ones in inner scopes from shadowing
outer-scoped variables.

The Copy* functions have no shadowing, but we rename them anyways to
remain consistent with the other functions.
2020-06-19 22:02:58 -04:00
bunnei d235ebeaf6 Merge pull request #4113 from ogniK5377/boxcat-disable
Fix compilation when not building with boxcat
2020-06-19 21:59:59 -04:00
David Marcec 55654b5a12 Add translation of "Current Boxcat Events" 2020-06-20 11:57:51 +10:00
Lioncash f8e0f67e22 macro_jit_x64: Eliminate variable shadowing in Compile_ProcessResult()
We can reduce the capture scope so that it's not possible for both "reg"
variables to clash with one another.

While we're at it, we can prevent unnecessary copies while we're at it.
2020-06-19 21:57:44 -04:00
Lioncash 8e0a422ec3 buffer_cache: Eliminate local variable shadowing
We can just make use of the instance in the scope above this one.
2020-06-19 21:55:02 -04:00
bunnei 938e563cd7 Merge pull request #4087 from MerryMage/macrojit-inline-Read
macro_jit_x64: Inline Engines::Maxwell3D::GetRegisterValue
2020-06-19 21:32:07 -04:00
MerryMage b26ff8fa86 input_common/motion_emu: Remove redundant move
Named return value optimization automatically applies here.
2020-06-19 14:29:59 +01:00
MerryMage 38f25284c8 input_common/keyboard: Remove redundant move
Named return value optimization automatically applies here.
2020-06-19 14:29:36 +01:00
MerryMage b8983782ca mii_model: Remove redundant std::move
Named return value optimization automatically applies here.
2020-06-19 14:29:09 +01:00
David Marcec 39ef4c6d57 Fix compilation when not building with boxcat
Fixes compilation when trying to build without boxcat enabled
2020-06-19 22:17:56 +10:00
MerryMage 82b575087f macro_jit_x64: Remove unused function Read 2020-06-19 11:39:41 +01:00
bunnei 8ccd0aa8af Merge pull request #4080 from ogniK5377/audren-RendererInfo
audren: Implement RendererInfo
2020-06-19 01:02:30 -04:00
bunnei 9aecde9446 Merge pull request #4090 from MerryMage/macrojit-bugs
macro_jit_x64: Optimization correctness
2020-06-18 22:28:17 -04:00
ReinUsesLisp 3c9d7c54d9 vk_rasterizer: Don't preserve contents on full screen clears
There's no need to load contents from the CPU when a clear resets all
the contents of the underlying memory. This is already implemented on
OpenGL and the texture cache.
2020-06-18 18:18:33 -03:00
Rodrigo Locatti 1856dc775a Merge pull request #4081 from Morph1984/maxwell-to-gl-vk
maxwell_to_gl/vk: Miscellaneous changes
2020-06-18 17:51:41 -03:00
ReinUsesLisp 31e538de2a vk_update_descriptor: Upload descriptor sets data directly
Instead of copying to a temporary payload before sending the update task
to the worker thread, insert elements to the payload directly.
2020-06-18 17:47:19 -03:00
Fernando Sahmkow 02fe399e26 Tests/HostTiming: Correct GCC Compile error. 2020-06-18 16:29:28 -04:00
Fernando Sahmkow 51a1732324 Common/Fiber: Address Feedback and Correct Memory leaks. 2020-06-18 16:29:27 -04:00
Fernando Sahmkow cffae9c733 Common/Fiber: Implement Rewind on Boost Context. 2020-06-18 16:29:27 -04:00
Fernando Sahmkow f28670cd46 Common/uint128: Correct MSVC Compilation in old versions. 2020-06-18 16:29:26 -04:00
Fernando Sahmkow f39a9f6efa Common/Fiber: Document fiber interexchange. 2020-06-18 16:29:26 -04:00
Fernando Sahmkow 1460bdc5ab Common/Fiber: Implement Rewinding. 2020-06-18 16:29:25 -04:00
Fernando Sahmkow a42b226559 Common/Fiber: Additional corrections to f_context. 2020-06-18 16:29:25 -04:00
Fernando Sahmkow 89c691725c Common/Fiber: Correct f_context based Fibers. 2020-06-18 16:29:24 -04:00
Fernando Sahmkow b71488b850 Host Timing: Correct clang format. 2020-06-18 16:29:23 -04:00
Fernando Sahmkow a427bf72ea HostTiming: Correct rebase and implement AddTicks. 2020-06-18 16:29:22 -04:00
Fernando Sahmkow e7f5b1f1d3 Core/HostTiming: Allow events to be advanced manually. 2020-06-18 16:29:22 -04:00
Fernando Sahmkow 564713fb46 Common/Tests: Address Feedback 2020-06-18 16:29:21 -04:00
Fernando Sahmkow 4e9a9e584c Common: Make MinGW build use Windows Fibers instead of fcontext_t 2020-06-18 16:29:20 -04:00
Fernando Sahmkow 09d2ffa663 Common/Tests: Clang Format. 2020-06-18 16:29:19 -04:00
Fernando Sahmkow 91f138bd19 Common: Correct fcontext fibers. 2020-06-18 16:29:19 -04:00
Fernando Sahmkow 0c789667d9 Common: Refactor & Document Wall clock. 2020-06-18 16:29:18 -04:00
Fernando Sahmkow ee32067b10 Common: Implement WallClock Interface and implement a native clock for x64 2020-06-18 16:29:17 -04:00
Fernando Sahmkow ab76c0e296 Tests: Add base tests to host timing 2020-06-18 16:29:17 -04:00
Fernando Sahmkow e99a10917e Core: Implement a Host Timer. 2020-06-18 16:29:16 -04:00