Lioncash
6e39fa5950
vi: Add std::is_trivially_copyable checks to Read and Write functions
It's undefined behavior to memcpy an object that isn't considered
trivially copyable, so put a compile-time check in to make sure this
doesn't occur.
8 years ago
Lioncash
dab340a3b3
vi: std::move std::vector in constructors where applicable
Allows avoiding unnecessary copies of the vector depending on the
calling code.
While we're at it, remove a redundant no-parameter base constructor call
8 years ago
Lioncash
ec38b938da
hle: Remove config_mem.h/.cpp
This is just an unused hold-over from citra, so we can get rid of this
to trim off an exposed global, among other things.
8 years ago
Lioncash
aba0f5452d
hle: Remove shared_page.h/.cpp
This is a holdover from citra that's essentially unused.
8 years ago
Lioncash
f53d6ee0bc
set: Add missing log call in GetAvailableLanguageCodeCount()
Forgot to include this in 2c22e4be19
8 years ago
Zach Hilman
ac0c52dd5f
NRO Assets and NACP file format
Cleanup
Review fixes
8 years ago
Lioncash
2c22e4be19
set: Implement GetAvailableLanguageCodeCount()
This just returns the size of the language code buffer.
8 years ago
Lioncash
6b4ed7cf2f
set: Correct return code size of value in GetAvailableLanguageCodes()
The return code should be 32-bit in size.
8 years ago
Lioncash
54b477c4f9
string_util: Get rid of separate resize() in CPToUTF16(), UTF16ToUTF8(), CodeToUTF8() and UTF8ToUTF16()
There's no need to perform the resize separately here, since the
constructor allows presizing the buffer.
Also move the empty string check before the construction of the string
to make the early out more straightforward.
8 years ago
Lioncash
cd09896057
string_util: Use emplace_back() in SplitString() instead of push_back()
This is equivalent to doing:
push_back(std::string(""));
which is likely not to cause issues, assuming a decent std::string
implementation with small-string optimizations implemented in its
design, however it's still a little unnecessary to copy that buffer
regardless. Instead, we can use emplace_back() to directly construct the
empty string within the std::vector instance, eliminating any possible
overhead from the copy.
8 years ago
Lioncash
7b00b5c322
string_util: Remove unnecessary std::string instance in TabsToSpaces()
We can just use the variant of std::string's replace() function that can
replace an occurrence with N copies of the same character, eliminating
the need to allocate a std::string containing a buffer of spaces.
8 years ago
Subv
e9639ffafa
Kernel/SVC: Perform atomic accesses in SignalProcessWideKey as per the real kernel.
8 years ago
Subv
555a0638ec
Frontend: Check for more required OpenGL extensions during startup.
8 years ago
MerryMage
34bf2dbf68
Implement exclusive monitor
8 years ago
Lioncash
db185e6950
gl_shader_decompiler: Remove redundant Subroutine construction in AddSubroutine()
We don't need to toss away the Subroutine instance after the find() call
and reconstruct another instance with the same data right after it.
Particularly give Subroutine contains a std::set.
8 years ago
bunnei
392383692c
shader_bytecode: Implement other TEXS masks.
8 years ago
Lioncash
2cbc2717e4
vfs: Correct file_p variable usage within InterpretAsDirectory()
ReplaceFileWithSubdirectory() takes a VirtualFile and a VirtualDir, but
it was being passed a string as one of its arguments. The only reason
this never caused issues is because this template isn't instantiated
anywhere yet.
This corrects an issue before it occurs.
8 years ago
Lioncash
861405d6c0
file_util, vfs: Use std::string_view where applicable
Avoids unnecessary construction of std::string instances where
applicable.
8 years ago
bunnei
e8f619cc71
gl_shader_decompiler: Remove unused state tracking and minor cleanup.
8 years ago
bunnei
3a6bad38b6
gl_shader_decompiler: Implement SEL instruction.
8 years ago
Lioncash
5440a4a9d9
file_util: Remove goto usages from Copy()
We can just leverage std::unique_ptr to automatically close these for us
in error cases instead of jumping to the end of the function to call
fclose on them.
8 years ago
Lioncash
574be087d4
file_util: Use a u64 to represent number of entries
This avoids a truncating cast on size. I doubt we'd ever traverse a
directory this large, however we also shouldn't truncate sizes away.
8 years ago
Lioncash
2684cc586e
file_util: std::move FST entries in ScanDirectoryTree()
Avoids unnecessary copies when building up the FST entries.
8 years ago
bunnei
f4101aeacc
gl_rasterizer_cache: Blit surfaces on recreation instead of flush and load.
8 years ago
bunnei
def372de50
gl_rasterizer_cache: Use GPUVAddr as cache key, not parameter set.
8 years ago
bunnei
b00904f10e
gl_rasterizer_cache: Use zeta_width and zeta_height registers for depth buffer.
8 years ago
bunnei
602ff24d5c
gl_rasterizer: Use zeta_enable register to enable depth buffer.
8 years ago
bunnei
6d96a4fc0a
maxwell_3d: Add depth buffer enable, width, and height registers.
8 years ago
Subv
c4bfd25a6a
GPU: Implement the NVGPU_IOCTL_CHANNEL_KICKOFF_PB ioctl2 command.
This behaves quite similarly to the SubmitGPFIFO command. Referenced from Ryujinx.
Many thanks to @gdkchan for investigating this!
8 years ago
Lioncash
85ca923ed4
file_util: Use an enum class for GetUserPath()
Instead of using an unsigned int as a parameter and expecting a user to
always pass in the correct values, we can just convert the enum into an
enum class and use that type as the parameter type instead, which makes
the interface more type safe.
We also get rid of the bookkeeping "NUM_" element in the enum by just
using an unordered map. This function is generally low-frequency in
terms of calls (and I'd hope so, considering otherwise would mean we're
slamming the disk with IO all the time) so I'd consider this acceptable
in this case.
8 years ago
Lioncash
478a19a774
file_util: Remove explicit type from std::min() in GetPathWithoutTop()
Given both operands are the same type, there won't be an issue with
overload selection that requires making this explicit.
8 years ago
Lioncash
32dde02a89
file_util: Remove redundant duplicate return in GetPathWithoutTop()
8 years ago
Lioncash
8ec2f1b2b7
common: Remove synchronized_wrapper.h
This is entirely unused in the codebase.
8 years ago
Lioncash
25e1111621
file_sys/errors: Remove redundant object constructor calls
Given we're already constructing the error code, we don't need to call
the constructor inside of it.
8 years ago
Lioncash
285dfd1a6d
vfs_real: Remove redundant copying of std::vector instances in GetFiles() and GetSubdirectories()
We already return by value, so we don't explicitly need to make the
copy.
8 years ago
Lioncash
97f7a15e70
partition_filesystem, vfs_real: Add missing standard includes
8 years ago
Lioncash
ed7f23ef32
partition_filesystem, vfs_real: Use std::move in ReplaceFileWithSubdirectory() where applicable
Avoids unnecessary atomic increment and decrement operations.
8 years ago
Lioncash
24fc1a425a
partition_filesystem, vfs_real: Use std::distance() instead of subtraction
This is a little bit more self-documenting on what is being done here.
8 years ago
Lioncash
785d86d181
vfs_offset: Simplify TrimToFit()
We can simply use std::clamp() here, instead of using an equivalent
with std::max() and std::min().
8 years ago
Lioncash
25510961ea
vfs: Make WriteBytes() overload taking a std::vector pass the std::vector by const reference
Given the data is intended to be directly written, there's no need to
take the std::vector by value and copy the data.
8 years ago
Lioncash
e523ab8b03
vfs: Use variable template variants of std::is_trivially_copyable
Provides the same behavior, but with less writing
8 years ago
Lioncash
556aaf9627
vfs: Amend constness on pointers in WriteBytes() and WriteArrays() member functions to be const qualified
These functions don't modify the data being pointed to, so these can be
pointers to const data
8 years ago
Subv
c1cc141fb0
Loader: Only print the module names and addresses if they actually exist.
8 years ago
Subv
196a689d20
CPU: Save and restore the TPIDR_EL0 system register on every context switch.
Note that there's currently a dynarmic bug preventing this register from being written.
8 years ago
Lioncash
f4047ccd48
arm_interface: Remove unused tls_address member of ThreadContext
Currently, the TLS address is set within the scheduler, making this
member unused.
8 years ago
Lioncash
604f780c9d
gl_shader_manager: Replace unimplemented function prototype
This was just a linker error waiting to happen.
8 years ago
Lioncash
d923d8f50c
gpu: Rename Get3DEngine() to Maxwell3D()
This makes it match its const qualified equivalent.
8 years ago
Lioncash
bdfd46e192
video_core: Use nested namespaces where applicable
Compresses a few namespace specifiers to be more compact.
8 years ago
Lioncash
633cba2848
arm_test_common: Get rid of truncation warnings
Explicitly cast the value to a u8 to show that this is intentional.
8 years ago
Lioncash
193e23b12f
arm_test_common: Make file static variable a member variable of the testing environment
Gets rid of file-static behavior.
8 years ago