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
Lioncash
d5bc9aef4e
gl_shader_manager: Replace unimplemented function prototype
This was just a linker error waiting to happen.
8 years ago
Lioncash
863579736c
gpu: Rename Get3DEngine() to Maxwell3D()
This makes it match its const qualified equivalent.
8 years ago
Lioncash
bb960c8cb4
video_core: Use nested namespaces where applicable
Compresses a few namespace specifiers to be more compact.
8 years ago
Lioncash
48733744bb
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
a8bb1eb39f
arm_test_common: Make file static variable a member variable of the testing environment
Gets rid of file-static behavior.
8 years ago
Lioncash
a44475207c
arm_test_common: Add missing header guard
8 years ago
Lioncash
3268321f4b
param_package: Take std::string by value in string-based Set() function
Allows avoiding string copies by letting the strings be moved into the
function calls.
8 years ago
Lioncash
6279c2dcf4
param_package: Use std::unordered_map's insert_or_assign instead of map indexing
This avoids a redundant std::string construction if a key doesn't exist
in the map already.
e.g.
data[key] requires constructing a new default instance of the value in
the map (but this is wasteful, since we're already setting something
into the map over top of it).
8 years ago
Lioncash
474ec2ee5f
param_package: Get rid of file-static std::string construction
Avoids potential dynamic allocation occuring during program launch
8 years ago
Lioncash
f63ccbd936
logging/filter: Use std::string_view in ParseFilterString()
Allows avoiding constructing std::string instances, since this only
reads an arbitrary sequence of characters.
We can also make ParseFilterRule() internal, since it doesn't depend on
any private instance state of Filter
8 years ago
Lioncash
7a1a860abe
logging/backend: Add missing standard includes
A few inclusions were being satisfied indirectly. To prevent breakages
in the future, include these directly.
8 years ago
Lioncash
457d1b4490
logging/backend: Use std::string_view in RemoveBackend() and GetBackend()
These can just use a view to a string since its only comparing against
two names in both cases for matches. This avoids constructing
std::string instances where they aren't necessary.
8 years ago
bunnei
dffd154d6d
apm: Improve stub for GetPerformanceConfiguration.
8 years ago
Lioncash
0a0b3c4b9f
ipc_helpers: Add PushEnum() member function to ResponseBuilder
Allows pushing strongly-typed enum members without the need to always
cast them at the call sites.
Note that we *only* allow strongly-typed enums in this case. The reason
for this is that strongly typed enums have a guaranteed defined size, so
the size of the data being pushed is always deterministic. With regular
enums this can be a little more error-prone, so we disallow them.
This function simply uses the underlying type of the enum to determine
the size of the data. For example, if an enum is defined as:
enum class SomeEnum : u16 {
SomeEntry
};
if PushEnum(SomeEnum::SomeEntry); is called, then it will push a
u16-size amount of data.
8 years ago
Subv
9c7321fe6d
HLE/ACC: Stub IManagerForApplication::GetAccountId to return an error.
And make IManagerForApplication::CheckAvailability always return false.
Returning a bogus id from GetAccountId causes games to crash on boot.
We should investigate this with a hwtest and either stub it properly or implement it.
8 years ago
Lioncash
0faa13baeb
gl_state: Make references const where applicable in Apply()
8 years ago
Lioncash
e6b3d3a9ea
gl_state: Get rid of mismatched sign conversions
While we're at it, amend the loop variable type to be the same width as
that returned by the .size() call.
8 years ago
Lioncash
8874d0e657
loader/{nca, nro}: std::move VirtualFile in the constructors where applicable
This avoids unnecessary atomic reference count increments and decrements
8 years ago
Lioncash
0e9d58e82a
vfs_offset: std::move file and name parameters of OffsetVfsFile
Avoids potentially unnecessary atomic reference count incrementing and
decrementing, as well as string copying.
8 years ago
Lioncash
40c9c5a55c
audren_u: Use a std::array instead of std::string for holding the audio interface/device name
std::string doesn't include the null-terminator in its data() + size()
range. This ensures that the null-terminator will also be written to the buffer
8 years ago
Lioncash
c20cea118b
audout_u: Use a std::array instead of std::string for holding the audio interface name
Uses a type that doesn't potentially dynamically allocate, and ensures
that the name of the interface is properly null-terminated when writing
it to the buffer.
8 years ago
Lioncash
8b08f82dc7
maxwell_3d: Remove unused variable within GetStageTextures()
8 years ago
Lioncash
dbfe82773d
thread: Convert ThreadStatus into an enum class
Makes the thread status strongly typed, so implicit conversions can't
happen. It also makes it easier to catch mistakes at compile time.
8 years ago