Commit Graph

982 Commits (200f69d2ffa11bb902c2d9cabb49027f4781fe11)

Author SHA1 Message Date
bunnei 7438d36d0e
Merge pull request #3630 from benru/open-windows-network-files
common/file_util: Allow access to files on network shares
5 years ago
Fernando Sahmkow 775ecc7d05
Merge pull request #3672 from lioncash/null
file_util: Early-exit in WriteArray and ReadArray if specified lengths are zero
5 years ago
bunnei 4c1812ae37 common: page_table: Update to use VirtualBuffer and simplify. 5 years ago
bunnei 4ba2428c86 common: Add VirtualBuffer class, to abstract memory virtualization. 5 years ago
bunnei 4df6ef04ac common: scope_exit: Implement mechanism for canceling a scope exit. 5 years ago
bunnei b838e58d63 common: alignment: Add a helper function for generic alignment checking. 5 years ago
bunnei b11b424a2d common: common_funcs: Add a macro for defining enum flag operators. 5 years ago
Lioncash e77337588e file_util: Early-exit in WriteArray and ReadArray if specified lengths are zero
It's undefined behavior to pass a null pointer to std::fread and
std::fwrite, even if the length passed in is zero, so we must perform
the precondition checking ourselves.

A common case where this can occur is when passing in the data of an
empty std::vector and size, as an empty vector will typically have a
null internal buffer.

While we're at it, we can move the implementation out of line and add
debug checks against passing in nullptr to std::fread and std::fwrite.
5 years ago
bunnei 51c6688e21
Merge pull request #3594 from ReinUsesLisp/vk-instance
yuzu: Drop SDL2 and Qt frontend Vulkan requirements
5 years ago
Ben Russell f98a2c42de
common/file_util: Allow access to files on network shares
On Windows, network shares use paths like \\server\share\file which were
being broken by FileUtil::SanitizePath() removing double slashes.

Changed the code in SanitizePath to permit a double-backslash if it
occurs at the start of a filepath (on Windows only).
5 years ago
ReinUsesLisp 7104e01bb3 common/dynamic_library: Import and adapt helper from Dolphin 5 years ago
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>
5 years ago
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.
5 years ago
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.
5 years ago
ReinUsesLisp 3dcaa84ba4 shader/transform_feedback: Add host API friendly TFB builder 5 years ago
ReinUsesLisp e8efd5a901 video_core: Rename "const buffer locker" to "registry" 5 years ago
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.
5 years ago
ReinUsesLisp e38ed26b98 common/math_util: Support float type rectangles 5 years ago
bunnei 2b1d66eda3
Merge pull request #3326 from FearlessTobi/port-5039
Port citra-emu/citra#5039: "common/logging: don't use regex for path trimming"
5 years ago
BreadFish64 a31ed02ae4 common/logging: don't use regex for path trimming 5 years ago
FearlessTobi bbd85a495a Address second part of review comments 5 years ago
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>
5 years ago
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
5 years ago
James Rowe b429095b61 Fix git version in scm_rev.cpp 5 years ago
bunnei 67b8ecc73e common: SPSCQueue: Notify after incrementing queue size. 5 years ago
Weiyi Wang 49e0a30dbd fix clang-format and lambda capture 5 years ago
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.
5 years ago
ReinUsesLisp 2ac834c722
common/logging: Silence no return value warnings 5 years ago
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.
5 years ago
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.
5 years ago
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.
5 years ago
Zach Hilman 0c8b6b0351 ci: Populate build repository from Azure environment 5 years ago
bunnei 1bdae0fe29 common_func: Use std::array for INSERT_PADDING_* macros.
- Zero initialization here is useful for determinism.
5 years ago
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.
5 years ago
David 4c5731c34f
Merge pull request #2971 from FernandoS27/new-scheduler-v2
Kernel: Implement a New Thread Scheduler V2
5 years ago
Fernando Sahmkow be856a38d6 Shader_IR: Address Feedback. 5 years ago
Fernando Sahmkow 1a58f45d76 VideoCore: Unify const buffer accessing along engines and provide ConstBufferLocker class to shaders. 5 years ago
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.
5 years ago
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.
5 years ago
Fernando Sahmkow 25f8606a6d Kernel Scheduler: Make sure the global scheduler shutdowns correctly. 5 years ago
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.
5 years ago
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.
5 years ago
bunnei deecd7f074
Merge pull request #2942 from ReinUsesLisp/clang-warnings
Silence miscellaneous warnings
5 years ago
bunnei 6f511c8006
Merge pull request #2943 from DarkLordZach/azure-titlebars-v2
ci: Add custom titlebars for mainline and patreon
5 years ago
Zach Hilman 3d4a0b94e3 common: Add additional SCM revision fields 5 years ago
ReinUsesLisp f4417eab8f common/file_util: Silence -Wswitch 5 years ago
Fernando Sahmkow 47e4f6a52c Shader_Ir: Refactor Decompilation process and allow multiple decompilation modes. 5 years ago
Fernando Sahmkow 8be6e1c522 shader_ir: Corrections to outward movements and misc stuffs 5 years ago
Zach Hilman 14248685af cmake: Add SCM detection for Azure 5 years ago
Zach Hilman 470466b31b log: Add logging class for Cheat Engine
This is better than just using something like Common.Filesystem or Common.Memory
5 years ago