Commit graph

973 commits

Author SHA1 Message Date
bunnei 51c6688e21
Merge pull request #3594 from ReinUsesLisp/vk-instance
yuzu: Drop SDL2 and Qt frontend Vulkan requirements
2020-04-10 20:06:55 -04:00
ReinUsesLisp 7104e01bb3 common/dynamic_library: Import and adapt helper from Dolphin 2020-04-07 02:23:23 -03:00
Vitor K bd0c56c6e7 common: Port some changes from dolphin (#5127)
* IOFile: Make the move constructor and move assignment operator noexcept

Certain parts of the standard library try to determine whether or not a
transfer operation should either be a copy or a move. The prevalent notion
of move constructors/assignment operators is that they should not throw,
they simply move an already existing resource somewhere else.

This is typically done with 'std::move_if_noexcept'. Like the name says,
if a type's move constructor is noexcept, then the functions retrieves an
r-value reference (for move semantics), or an l-value (for copy semantics)
if it is not noexcept.

As IOFile deletes the copy constructor and copy assignment operators,
using IOFile with certain parts of the standard library can fail in
unexcepted ways (especially when used with various container
implementations). This prevents that.

* fix various instances of -1 being assigned to unsigned types

* do not assign in conditional statements

* File/IOFile: Check _tfopen_s properly

* common/file_util.cpp: address review comments

Co-authored-by: Lioncash <mathew1800@gmail.com>
Co-authored-by: Shawn Hoffman <godisgovernment@gmail.com>
Co-authored-by: Sepalani <sepalani@hotmail.fr>
2020-04-01 02:58:42 +02:00
bunnei 4dfd5c84ea
Merge pull request #3508 from FernandoS27/page-table
PageTable: move backing addresses to a children class as the CPU page table does not need them.
2020-03-14 16:50:27 -04:00
Fernando Sahmkow 27cbb75e7c PageTable: move backing addresses to a children class as the CPU page table does not need them.
This PR aims to reduce the memory usage in the CPU page table by moving
GPU specific parameters into a child class. This saves 1Gb of Memory for
most games.
2020-03-14 09:43:57 -04:00
ReinUsesLisp 3dcaa84ba4 shader/transform_feedback: Add host API friendly TFB builder 2020-03-13 18:33:04 -03:00
ReinUsesLisp e8efd5a901 video_core: Rename "const buffer locker" to "registry" 2020-03-09 18:40:06 -03:00
ReinUsesLisp bd8b9bbcee gl_shader_cache: Rework shader cache and remove post-specializations
Instead of pre-specializing shaders and then post-specializing them,
drop the later and only "specialize" the shader while decoding it.
2020-03-09 18:40:06 -03:00
ReinUsesLisp e38ed26b98 common/math_util: Support float type rectangles 2020-02-28 16:22:11 -03:00
bunnei 2b1d66eda3
Merge pull request #3326 from FearlessTobi/port-5039
Port citra-emu/citra#5039: "common/logging: don't use regex for path trimming"
2020-01-24 20:59:57 -05:00
BreadFish64 a31ed02ae4 common/logging: don't use regex for path trimming 2020-01-23 23:08:05 +01:00
FearlessTobi bbd85a495a Address second part of review comments 2020-01-23 20:55:26 +01:00
fearlessTobi ac3690f205 Input: UDP Client to provide motion and touch controls
An implementation of the cemuhook motion/touch protocol, this adds the
ability for users to connect several different devices to citra to send
direct motion and touch data to citra.

Co-Authored-By: jroweboy <jroweboy@gmail.com>
2020-01-23 20:55:26 +01:00
James Rowe 4512a6bbfc Remove unused CPU Vendor string and telemtry field
The information is duplicated in the brand string and the telemetry field is unused
2020-01-17 18:41:18 -07:00
James Rowe b429095b61 Fix git version in scm_rev.cpp 2020-01-16 00:12:50 -07:00
bunnei 67b8ecc73e common: SPSCQueue: Notify after incrementing queue size. 2019-12-16 20:39:53 -05:00
Weiyi Wang 49e0a30dbd fix clang-format and lambda capture 2019-11-23 01:30:06 +01:00
Weiyi Wang 9a60d8a430 unfold UNREACHABLE implementation for dumb compilers
We relies on UNREACHABLE's noreturn attribute to eliminate parent's "no return value" warning. However, this was wrapped in a `if(!false)` block, which compilers may not unfold to recognize the noreturn nature.
2019-11-23 01:30:06 +01:00
ReinUsesLisp 2ac834c722
common/logging: Silence no return value warnings 2019-11-15 18:43:35 -03:00
Lioncash f2e34efcbb common_funcs: Remove semicolons from INSERT_PADDING_* macros
Makes code that uses the macros consistent by requiring the lines to be
terminated with a semicolon.
2019-11-14 17:05:27 -05:00
Lioncash c5c89a4d5c common/hash: Remove unused HashableStruct
This is unused, so it can be removed. There's better ways of ensuring
zeroed out padding bits, like using zero-initialization, anyhow.
2019-11-13 14:58:43 -05:00
Lioncash 61f6eaad45 common_funcs: silence sign-conversion warnings in MakeMagic()
We can trivially resolve these by casting the characters to unsigned
values and then shifting the bits.
2019-11-13 06:53:19 -05:00
Zach Hilman 0c8b6b0351 ci: Populate build repository from Azure environment 2019-11-05 21:37:27 -05:00
bunnei 1bdae0fe29 common_func: Use std::array for INSERT_PADDING_* macros.
- Zero initialization here is useful for determinism.
2019-11-03 22:22:41 -05:00
Tobias a81987a7cb
common/bit_field: Remove FORCE_INLINE calls
See bunneis comment here https://github.com/citra-emu/citra/pull/4629#discussion_r258533167.
They were supposed to be removed by him, but he missed them.
2019-11-03 08:25:37 +01:00
David 4c5731c34f
Merge pull request #2971 from FernandoS27/new-scheduler-v2
Kernel: Implement a New Thread Scheduler V2
2019-10-28 10:53:27 +11:00
Fernando Sahmkow be856a38d6 Shader_IR: Address Feedback. 2019-10-26 15:38:30 -04:00
Fernando Sahmkow 1a58f45d76 VideoCore: Unify const buffer accessing along engines and provide ConstBufferLocker class to shaders. 2019-10-25 09:01:29 -04:00
Lioncash d5706346d7 common/algorithm: Add description comment indicating intended algorithms
Makes it explicit that the header is intended for iterator-based
algorithms that can ideally operate on any type.
2019-10-15 15:25:23 -04:00
Lioncash ac4dbd3b25 common: Rename binary_find.h to algorithm.h
Makes the header more general for other potential algorithms in the
future. While we're at it, include a missing <functional> include to
satisfy the use of std::less.
2019-10-15 15:24:50 -04:00
Fernando Sahmkow 25f8606a6d Kernel Scheduler: Make sure the global scheduler shutdowns correctly. 2019-10-15 11:55:24 -04:00
Lioncash 57ffada746 alignment: Resolve allocator construction issues on debug
This was related to the source allocator being passed into the
constructor potentially having a different type than allocator being
constructed.

We simply need to provide a constructor to handle this case.

This resolves issues related to the allocator causing debug builds on
MSVC to fail.
2019-10-06 18:49:49 -04:00
Lioncash 9aafb2a277 alignment: Specify trait definitions within the allocator
Allows containers and other data structures to consider optimizations
based off of them. We satisfy all of these requirements anyways.
2019-10-06 18:48:05 -04:00
bunnei deecd7f074
Merge pull request #2942 from ReinUsesLisp/clang-warnings
Silence miscellaneous warnings
2019-10-05 20:41:20 -04:00
bunnei 6f511c8006
Merge pull request #2943 from DarkLordZach/azure-titlebars-v2
ci: Add custom titlebars for mainline and patreon
2019-10-05 19:29:35 -04:00
Zach Hilman 3d4a0b94e3 common: Add additional SCM revision fields 2019-10-05 00:09:49 -04:00
ReinUsesLisp f4417eab8f common/file_util: Silence -Wswitch 2019-10-04 23:28:34 +00:00
Fernando Sahmkow 47e4f6a52c Shader_Ir: Refactor Decompilation process and allow multiple decompilation modes. 2019-10-04 18:52:50 -04:00
Fernando Sahmkow 8be6e1c522 shader_ir: Corrections to outward movements and misc stuffs 2019-10-04 18:52:48 -04:00
Zach Hilman 14248685af cmake: Add SCM detection for Azure 2019-09-22 17:23:10 -04:00
Zach Hilman 470466b31b log: Add logging class for Cheat Engine
This is better than just using something like Common.Filesystem or Common.Memory
2019-09-21 21:44:22 -04:00
ReinUsesLisp 4e35177e23 shader_ir: Implement VOTE
Implement VOTE using Nvidia's intrinsics. Documentation about these can
be found here
https://developer.nvidia.com/reading-between-threads-shader-intrinsics

Instead of using portable ARB instructions I opted to use Nvidia
intrinsics because these are the closest we have to how Tegra X1
hardware renders.

To stub VOTE on non-Nvidia drivers (including nouveau) this commit
simulates a GPU with a warp size of one, returning what is meaningful
for the instruction being emulated:

* anyThreadNV(value) -> value
* allThreadsNV(value) -> value
* allThreadsEqualNV(value) -> true

ballotARB, also known as "uint64_t(activeThreadsNV())", emits

VOTE.ANY Rd, PT, PT;

on nouveau's compiler. This doesn't match exactly to Nvidia's code

VOTE.ALL Rd, PT, PT;

Which is emulated with activeThreadsNV() by this commit. In theory this
shouldn't really matter since .ANY, .ALL and .EQ affect the predicates
(set to PT on those cases) and not the registers.
2019-08-21 14:50:38 -03:00
Fernando Sahmkow febb88efc4 Common/Alignment: Add noexcept where required. 2019-07-19 21:49:54 -04:00
Fernando Sahmkow 024b5fe91a Kernel: Address Feedback 2019-07-19 11:28:57 -04:00
Fernando Sahmkow 0901c33753 Common: Correct alignment allocator to work on C++14 or higher. 2019-07-19 11:11:42 -04:00
Fernando Sahmkow 9bede4eeed VM_Manager: Align allocated memory to 256bytes
This commit ensures that all backing memory allocated for the Guest CPU
is aligned to 256 bytes. This due to how gpu memory works and the heavy
constraints it has in the alignment of physical memory.
2019-07-19 10:06:08 -04:00
Fernando Sahmkow 8af6e6a052 shader_ir: Implement a new shader scanner 2019-07-09 08:14:36 -04:00
Fernando Sahmkow 3b9d89839d texture_cache: Address Feedback 2019-07-05 09:46:53 -04:00
ReinUsesLisp de982deb25 common/alignment: Address feedback 2019-06-24 01:47:09 -03:00
ReinUsesLisp 06c4ce8645 shader: Decode SUST and implement backing image functionality 2019-06-20 21:38:33 -03:00