Lioncash
1b4d0ac20e
nro: Replace inclusion with a forward declaration
It's sufficient to use a forward declaration instead of a direct
inclusion here.
8 years ago
Lioncash
2b497e5830
nro: Make bracing consistent
Makes the code more uniform, and also braces cases where the body of an
unbraced conditional travels more than one line.
8 years ago
Lioncash
ac8133b9ee
nro: Make constructor explicit
Makes it consistent with the other Apploader constructors, and prevents
implicit conversions.
8 years ago
Lioncash
1c16700372
nro: Remove unused forward declaration
This isn't used anywhere in the header.
8 years ago
Lioncash
3b88ce3dcb
gl_shader_decompiler: Simplify GetCommonDeclarations()
8 years ago
Lioncash
1432912ae8
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
344a0c91f2
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
cbe841c9c9
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
1f3889a290
hle: Remove shared_page.h/.cpp
This is a holdover from citra that's essentially unused.
8 years ago
Lioncash
e85308cd90
set: Add missing log call in GetAvailableLanguageCodeCount()
Forgot to include this in 22f448b632
8 years ago
Zach Hilman
e8f641a52d
NRO Assets and NACP file format
Cleanup
Review fixes
8 years ago
Lioncash
22f448b632
set: Implement GetAvailableLanguageCodeCount()
This just returns the size of the language code buffer.
8 years ago
Lioncash
37aeecd29f
set: Correct return code size of value in GetAvailableLanguageCodes()
The return code should be 32-bit in size.
8 years ago
Lioncash
9d33122197
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
26a157cd31
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
cd46b267f5
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
7841447cf0
Kernel/SVC: Perform atomic accesses in SignalProcessWideKey as per the real kernel.
8 years ago
Subv
ba2fb83d60
Frontend: Check for more required OpenGL extensions during startup.
8 years ago
MerryMage
0b1c2e5505
Implement exclusive monitor
8 years ago
Lioncash
0797657bc0
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
148a5bef7e
shader_bytecode: Implement other TEXS masks.
8 years ago
Lioncash
0081252d31
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
398444e676
file_util, vfs: Use std::string_view where applicable
Avoids unnecessary construction of std::string instances where
applicable.
8 years ago
bunnei
f5a2944ab6
gl_shader_decompiler: Remove unused state tracking and minor cleanup.
8 years ago
bunnei
c43eaa94f3
gl_shader_decompiler: Implement SEL instruction.
8 years ago
Lioncash
c5de0a67a8
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
0ba7fe4ab1
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
964154ce44
file_util: std::move FST entries in ScanDirectoryTree()
Avoids unnecessary copies when building up the FST entries.
8 years ago
bunnei
63fbf9a7d3
gl_rasterizer_cache: Blit surfaces on recreation instead of flush and load.
8 years ago
bunnei
4301f0b539
gl_rasterizer_cache: Use GPUVAddr as cache key, not parameter set.
8 years ago
bunnei
cd47391c2d
gl_rasterizer_cache: Use zeta_width and zeta_height registers for depth buffer.
8 years ago
bunnei
d8c60029d6
gl_rasterizer: Use zeta_enable register to enable depth buffer.
8 years ago
bunnei
5287991a36
maxwell_3d: Add depth buffer enable, width, and height registers.
8 years ago
Subv
5c49e56d41
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
d66b43dadf
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
34d6a1349c
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
41660c8923
file_util: Remove redundant duplicate return in GetPathWithoutTop()
8 years ago
Lioncash
973fdce79b
common: Remove synchronized_wrapper.h
This is entirely unused in the codebase.
8 years ago
Lioncash
459e158340
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
b46c0ed1fa
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
ec71915ede
partition_filesystem, vfs_real: Add missing standard includes
8 years ago
Lioncash
d36e327ba6
partition_filesystem, vfs_real: Use std::move in ReplaceFileWithSubdirectory() where applicable
Avoids unnecessary atomic increment and decrement operations.
8 years ago
Lioncash
2b91386e15
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
3e0727df1b
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
894b0de0f2
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
dd09439fee
vfs: Use variable template variants of std::is_trivially_copyable
Provides the same behavior, but with less writing
8 years ago
Lioncash
05231d8b08
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
966874e357
Loader: Only print the module names and addresses if they actually exist.
8 years ago
Subv
d84eb9dac6
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
ae09adfcb3
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