Commit graph

7842 commits

Author SHA1 Message Date
Lioncash 1c25b997e8 ipc_helpers: Make member variables of ResponseBuilder private
These aren't used externally at all, so they can be made private.
2018-07-23 22:29:07 -04:00
bunnei 3bf9b59021 Merge pull request #787 from bunnei/tlds
gl_shader_decompiler: Implement shader instruction TLDS.
2018-07-23 19:14:01 -07:00
bunnei a7b90e00bf Merge pull request #786 from lioncash/exclusive
exclusive_monitor: Use consistent type alias for u64
2018-07-23 19:11:05 -07:00
bunnei a96c899ec9 Merge pull request #784 from lioncash/loader
loader: Minor cleanup
2018-07-23 19:08:12 -07:00
bunnei 77c1923b40 Merge pull request #783 from lioncash/linker
linker: Remove unused parameter from WriteRelocations()
2018-07-23 19:07:22 -07:00
bunnei 4dae32a7b9 Merge pull request #782 from lioncash/file
loader/nro: Minor changes
2018-07-23 19:06:30 -07:00
bunnei 567ae2ae9c gl_shader_decompiler: Implement shader instruction TLDS. 2018-07-23 22:02:51 -04:00
bunnei 9981de78e8 Merge pull request #781 from lioncash/decl
gl_shader_decompiler: Simplify GetCommonDeclarations()
2018-07-23 18:30:23 -07:00
bunnei 1a6fe993da Merge pull request #780 from lioncash/move
vi: Minor changes
2018-07-23 18:29:11 -07:00
bunnei 85a40f8fef Merge pull request #779 from lioncash/shared
hle: Remove unused config_mem and shared_page source files
2018-07-23 18:28:45 -07:00
bunnei 889da74c9d gl_rasterizer_cache: Implement RenderTargetFormat RG32_FLOAT. 2018-07-23 21:22:54 -04:00
bunnei c8cb44909a gl_rasterizer_cache: Implement RenderTargetFormat RGBA32_FLOAT. 2018-07-23 21:22:53 -04:00
bunnei e1ffcc6817 gl_rasterizer_cache: Implement RenderTargetFormat BGRA8_UNORM. 2018-07-23 21:22:44 -04:00
bunnei ff355e7684 gl_rasterizer_cache: Add missing log statements. 2018-07-23 21:20:09 -04:00
bunnei 04cf719b92 gl_shader_decompiler: Print instruction value in shader comments. 2018-07-23 21:11:05 -04:00
bunnei 658f096c03 gl_shader_decompiler: Check if SetRegister result is ZeroIndex. 2018-07-23 21:08:40 -04:00
Lioncash 78051d5378 exclusive_monitor: Use consistent type alias for u64
Uses the same type aliases we use for virtual addresses, and converts
one lingering usage of std::array<uint64_t, 2> to u128 for consistency.
2018-07-23 20:54:57 -04:00
Lioncash 6904f9f6b1 partition_filesystem: Use std::move where applicable
Avoids copying a std::string instance and avoids unnecessary atomic
reference count incrementing and decrementing.
2018-07-23 20:27:11 -04:00
Lioncash 204ed73e8c loader: Remove unnecessary constructor call in IdentifyFile()
RealVfsFile inherits from VfsFile, the instance from std::make_shared is
already compatible with the function argument type, making the copy
constructor call unnecessary.
2018-07-23 17:44:58 -04:00
Lioncash d5a96f2c94 linker: Remove unused parameter from WriteRelocations()
is_jump_relocation is never used within the function, so we can just
remove it.
2018-07-23 17:40:12 -04:00
Lioncash 3a72ee5fec nro: Replace inclusion with a forward declaration
It's sufficient to use a forward declaration instead of a direct
inclusion here.
2018-07-23 17:29:02 -04:00
Lioncash a2c69eb949 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.
2018-07-23 17:24:29 -04:00
Lioncash 6fd1615b93 nro: Make constructor explicit
Makes it consistent with the other Apploader constructors, and prevents
implicit conversions.
2018-07-23 17:20:33 -04:00
Lioncash df82410454 nro: Remove unused forward declaration
This isn't used anywhere in the header.
2018-07-23 17:19:42 -04:00
bunnei de2a8eb52f Merge pull request #695 from DarkLordZach/nro-asset
NRO Assets and NACP File Format
2018-07-23 14:14:11 -07:00
Lioncash 71c3648ad6 gl_shader_decompiler: Simplify GetCommonDeclarations() 2018-07-23 17:11:18 -04:00
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.
2018-07-23 14:53:54 -04:00
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
2018-07-23 14:49:54 -04:00
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.
2018-07-23 12:57:34 -04:00
Lioncash aba0f5452d hle: Remove shared_page.h/.cpp
This is a holdover from citra that's essentially unused.
2018-07-23 12:53:07 -04:00
Lioncash f53d6ee0bc set: Add missing log call in GetAvailableLanguageCodeCount()
Forgot to include this in 2c22e4be19
2018-07-23 12:37:42 -04:00
bunnei 112b7d1ee6 Merge pull request #775 from lioncash/str
string_util: Minor changes
2018-07-23 09:34:41 -07:00
Zach Hilman ac0c52dd5f NRO Assets and NACP file format
Cleanup

Review fixes
2018-07-23 12:34:26 -04:00
bunnei b9cd9365c6 Merge pull request #777 from lioncash/lang
set: Amend return value of GetAvailableLanguageCodes()
2018-07-23 09:34:08 -07:00
Lioncash 2c22e4be19 set: Implement GetAvailableLanguageCodeCount()
This just returns the size of the language code buffer.
2018-07-23 00:29:40 -04:00
Lioncash 6b4ed7cf2f set: Correct return code size of value in GetAvailableLanguageCodes()
The return code should be 32-bit in size.
2018-07-23 00:29:22 -04:00
bunnei ee26b9541e Merge pull request #769 from bunnei/shader-mask-fixes
shader_bytecode: Implement other TEXS masks.
2018-07-22 18:03:31 -07:00
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.
2018-07-22 16:39:21 -04:00
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.
2018-07-22 15:36:32 -04:00
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.
2018-07-22 15:35:48 -04:00
bunnei fd7888e3f5 Merge pull request #774 from Subv/atomic_signal
Kernel/SVC: Perform atomic accesses in SignalProcessWideKey as per the real kernel.
2018-07-22 12:26:03 -07:00
bunnei 5ae803cdab Merge pull request #773 from Subv/gl_ext_check
Frontend: Check for more required OpenGL extensions during startup.
2018-07-22 11:47:07 -07:00
bunnei 349e7974a5 Merge pull request #768 from lioncash/string-view
file_util, vfs: Use std::string_view where applicable
2018-07-22 11:32:28 -07:00
Subv e9639ffafa Kernel/SVC: Perform atomic accesses in SignalProcessWideKey as per the real kernel. 2018-07-22 12:27:24 -05:00
bunnei 8a3ae169e9 Merge pull request #770 from lioncash/construct
gl_shader_decompiler: Remove redundant Subroutine construction in AddSubroutine()
2018-07-22 10:24:20 -07:00
Subv 555a0638ec Frontend: Check for more required OpenGL extensions during startup. 2018-07-22 12:05:38 -05:00
MerryMage 34bf2dbf68 Implement exclusive monitor 2018-07-22 15:55:17 +01:00
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.
2018-07-22 03:30:35 -04:00
bunnei 392383692c shader_bytecode: Implement other TEXS masks. 2018-07-22 03:23:15 -04:00
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.
2018-07-22 03:22:28 -04:00
Lioncash 861405d6c0 file_util, vfs: Use std::string_view where applicable
Avoids unnecessary construction of std::string instances where
applicable.
2018-07-22 03:22:21 -04:00
bunnei 0605fbbfeb Merge pull request #765 from lioncash/file
file_util: Remove goto usages from Copy()
2018-07-22 00:03:35 -07:00
bunnei 30b1afcf99 Merge pull request #767 from bunnei/shader-cleanup
gl_shader_decompiler: Remove unused state tracking and minor cleanup.
2018-07-22 00:03:17 -07:00
bunnei e04ea2bcef Merge pull request #766 from bunnei/shader-sel
gl_shader_decompiler: Implement SEL instruction.
2018-07-21 23:13:27 -07:00
bunnei aaac8c5a00 Merge pull request #764 from lioncash/move
file_util: Minor changes to ScanDirectoryTree() and ForeachDirectoryEntry()
2018-07-21 22:05:30 -07:00
bunnei e8f619cc71 gl_shader_decompiler: Remove unused state tracking and minor cleanup. 2018-07-22 01:00:44 -04:00
bunnei 3a6bad38b6 gl_shader_decompiler: Implement SEL instruction. 2018-07-22 00:37:12 -04:00
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.
2018-07-21 23:08:55 -04:00
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.
2018-07-21 22:42:08 -04:00
Lioncash 2684cc586e file_util: std::move FST entries in ScanDirectoryTree()
Avoids unnecessary copies when building up the FST entries.
2018-07-21 22:31:44 -04:00
bunnei f4101aeacc gl_rasterizer_cache: Blit surfaces on recreation instead of flush and load. 2018-07-21 21:51:06 -04:00
bunnei def372de50 gl_rasterizer_cache: Use GPUVAddr as cache key, not parameter set. 2018-07-21 21:51:06 -04:00
bunnei b00904f10e gl_rasterizer_cache: Use zeta_width and zeta_height registers for depth buffer. 2018-07-21 21:51:06 -04:00
bunnei 602ff24d5c gl_rasterizer: Use zeta_enable register to enable depth buffer. 2018-07-21 21:51:06 -04:00
bunnei 6d96a4fc0a maxwell_3d: Add depth buffer enable, width, and height registers. 2018-07-21 21:51:05 -04:00
bunnei 6602b23676 Merge pull request #759 from lioncash/redundant
file_util: Remove redundant duplicate return in GetPathWithoutTop()
2018-07-21 18:50:38 -07:00
bunnei 9ae3e4413f Merge pull request #748 from lioncash/namespace
video_core: Use nested namespaces where applicable
2018-07-21 18:50:14 -07:00
bunnei fae0eaf7c6 Merge pull request #758 from lioncash/sync
common: Remove synchronized_wrapper.h
2018-07-21 18:30:31 -07:00
bunnei 0bb774f069 Merge pull request #760 from lioncash/path
file_util: Use an enum class for GetUserPath()
2018-07-21 18:30:04 -07:00
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!
2018-07-21 15:50:02 -05:00
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.
2018-07-21 16:21:19 -04:00
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.
2018-07-21 15:19:32 -04:00
Lioncash 32dde02a89 file_util: Remove redundant duplicate return in GetPathWithoutTop() 2018-07-21 15:18:23 -04:00
Lioncash 8ec2f1b2b7 common: Remove synchronized_wrapper.h
This is entirely unused in the codebase.
2018-07-21 14:51:44 -04:00
bunnei 8623af5453 Merge pull request #754 from lioncash/part
partition_filesystem, vfs_real: Minor changes
2018-07-21 11:38:52 -07:00
bunnei 51ba7c8827 Merge pull request #750 from lioncash/ctx
arm_interface: Remove unused tls_address member of ThreadContext
2018-07-21 11:38:16 -07:00
bunnei 09837fe5ff Merge pull request #746 from lioncash/tests
tests/arm_test_common: Minor changes
2018-07-21 10:55:29 -07:00
bunnei 039c35ddeb Merge pull request #747 from lioncash/unimplemented
gl_shader_manager: Remove unimplemented function prototype
2018-07-21 10:54:58 -07:00
bunnei 376ef08be7 Merge pull request #755 from lioncash/ctor
file_sys/errors: Remove redundant object constructor calls
2018-07-21 10:53:53 -07:00
bunnei f3f12b09ad Merge pull request #749 from lioncash/consistency
gpu: Rename Get3DEngine() to Maxwell3D()
2018-07-21 10:51:00 -07:00
bunnei 6458900d74 Merge pull request #751 from Subv/tpidr_el0
CPU: Save and restore the TPIDR_EL0 system register on every context switch
2018-07-21 10:48:30 -07:00
bunnei 58911f4ec5 Merge pull request #753 from lioncash/const
vfs: Minor changes
2018-07-21 10:44:08 -07:00
bunnei bd9786a6ff Merge pull request #752 from Subv/vfs_load
Loader: Only print the module names and addresses if they actually exist.
2018-07-20 22:57:18 -07:00
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.
2018-07-20 22:37:54 -04:00
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.
2018-07-20 22:30:22 -04:00
Lioncash 97f7a15e70 partition_filesystem, vfs_real: Add missing standard includes 2018-07-20 22:28:35 -04:00
Lioncash ed7f23ef32 partition_filesystem, vfs_real: Use std::move in ReplaceFileWithSubdirectory() where applicable
Avoids unnecessary atomic increment and decrement operations.
2018-07-20 22:23:58 -04:00
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.
2018-07-20 22:19:17 -04:00
Lioncash 785d86d181 vfs_offset: Simplify TrimToFit()
We can simply use std::clamp() here, instead of using an equivalent
with std::max() and std::min().
2018-07-20 22:04:37 -04:00
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.
2018-07-20 21:51:30 -04:00
Lioncash e523ab8b03 vfs: Use variable template variants of std::is_trivially_copyable
Provides the same behavior, but with less writing
2018-07-20 21:47:19 -04:00
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
2018-07-20 21:40:15 -04:00
Subv c1cc141fb0 Loader: Only print the module names and addresses if they actually exist. 2018-07-20 19:59:15 -05:00
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.
2018-07-20 19:57:45 -05:00
bunnei 8333b9afd0 Merge pull request #743 from lioncash/view
logging: Use std::string_view where applicable
2018-07-20 17:17:04 -07:00
bunnei a140792144 Merge pull request #745 from lioncash/package
param_package: Minor changes
2018-07-20 17:16:54 -07:00
Lioncash f4047ccd48 arm_interface: Remove unused tls_address member of ThreadContext
Currently, the TLS address is set within the scheduler, making this
member unused.
2018-07-20 18:57:40 -04:00
Lioncash 604f780c9d gl_shader_manager: Replace unimplemented function prototype
This was just a linker error waiting to happen.
2018-07-20 18:39:54 -04:00
Lioncash d923d8f50c gpu: Rename Get3DEngine() to Maxwell3D()
This makes it match its const qualified equivalent.
2018-07-20 18:34:49 -04:00
Lioncash bdfd46e192 video_core: Use nested namespaces where applicable
Compresses a few namespace specifiers to be more compact.
2018-07-20 18:23:54 -04:00
bunnei 2a56f71e58 Merge pull request #742 from bunnei/misc-apm
apm: Improve stub for GetPerformanceConfiguration.
2018-07-20 15:01:19 -07:00
Lioncash 633cba2848 arm_test_common: Get rid of truncation warnings
Explicitly cast the value to a u8 to show that this is intentional.
2018-07-20 17:53:53 -04:00
Lioncash 193e23b12f arm_test_common: Make file static variable a member variable of the testing environment
Gets rid of file-static behavior.
2018-07-20 17:52:37 -04:00
Lioncash c45b86bbb4 arm_test_common: Add missing header guard 2018-07-20 17:48:43 -04:00
Lioncash a2e090303f 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.
2018-07-20 17:24:06 -04:00
Lioncash 3c613decdf 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).
2018-07-20 17:24:06 -04:00
Lioncash 48ea3bc5fb param_package: Get rid of file-static std::string construction
Avoids potential dynamic allocation occuring during program launch
2018-07-20 17:24:02 -04:00
Lioncash e107471e08 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
2018-07-20 15:58:46 -04:00
Lioncash aa199be9d0 logging/backend: Add missing standard includes
A few inclusions were being satisfied indirectly. To prevent breakages
in the future, include these directly.
2018-07-20 15:31:27 -04:00
Lioncash 943584ff42 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.
2018-07-20 15:27:20 -04:00
bunnei 1c43ebbdec apm: Improve stub for GetPerformanceConfiguration. 2018-07-20 15:20:01 -04:00
Lioncash 9e7e0ed9f0 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.
2018-07-20 15:00:58 -04:00
bunnei b82c160eff Merge pull request #740 from Subv/acc_crash
HLE/ACC: Stub IManagerForApplication::GetAccountId to return an error.
2018-07-20 09:47:47 -07:00
bunnei 16888f7cb9 Merge pull request #738 from lioncash/sign
gl_state: Get rid of mismatched sign conversions in Apply()
2018-07-20 09:21:57 -07:00
bunnei 083b638e85 Merge pull request #737 from lioncash/move
filesys/loader: std::move VirtualFile instances in constructors where applicable
2018-07-20 09:21:15 -07:00
bunnei 059fa4330e Merge pull request #736 from lioncash/null
audout_u/audren_u: Ensure null terminators are written out in ListAudioOutsImpl(), ListAudioDeviceName(), and GetActiveAudioDeviceName()
2018-07-20 09:17:07 -07:00
bunnei e85b4f8c75 Merge pull request #735 from lioncash/video-unused
maxwell_3d: Remove unused variable within GetStageTextures()
2018-07-20 09:16:15 -07:00
bunnei 8774a9b207 Merge pull request #734 from lioncash/thread
thread: Convert ThreadStatus into an enum class
2018-07-20 09:15:52 -07:00
bunnei 70cd34a4a8 Merge pull request #733 from lioncash/dirs
partition_filesystem: Return pfs_dirs member variable within GetSubdirectories()
2018-07-20 09:15:16 -07:00
bunnei 52fcd2e880 Merge pull request #732 from lioncash/unused
nso: Minor changes
2018-07-20 09:14:10 -07:00
bunnei 133c99fb4a Merge pull request #731 from lioncash/shadow
gl_shader_decompiler: Eliminate variable and declaration shadowing
2018-07-20 09:13:36 -07:00
Subv 34d18dac20 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.
2018-07-20 11:02:25 -05:00
Lioncash f53a9138bb gl_state: Make references const where applicable in Apply() 2018-07-20 01:12:29 -04:00
Lioncash 80a916dc0a 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.
2018-07-20 01:11:20 -04:00
Lioncash c9b1340d3d loader/{nca, nro}: std::move VirtualFile in the constructors where applicable
This avoids unnecessary atomic reference count increments and decrements
2018-07-20 00:10:24 -04:00
Lioncash 02e5e6fba3 vfs_offset: std::move file and name parameters of OffsetVfsFile
Avoids potentially unnecessary atomic reference count incrementing and
decrementing, as well as string copying.
2018-07-20 00:04:54 -04:00
bunnei 66808c8489 Merge pull request #730 from lioncash/string
gl_shader_decompiler: Remove unnecessary const from return values
2018-07-19 20:46:43 -07:00
Lioncash 2ce4fde1ef 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
2018-07-19 23:15:27 -04:00
Lioncash 516bc05b15 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.
2018-07-19 23:15:00 -04:00
Lioncash 10a91d9b9a maxwell_3d: Remove unused variable within GetStageTextures() 2018-07-19 22:38:28 -04:00
Lioncash 059d0017f1 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.
2018-07-19 22:08:56 -04:00
Lioncash 3fbde66789 partition_filesystem: Return pfs_dirs member variable within GetSubdirectories()
This should be returned here, otherwise pfs_dirs is effectively only
ever added to, but never read.
2018-07-19 21:08:50 -04:00
Lioncash 3bc310cb92 nso: Silence implicit sign conversion warnings 2018-07-19 20:51:15 -04:00
Lioncash d0dd836d53 nso: Remove unused function ReadSegment() 2018-07-19 20:49:27 -04:00
Lioncash 41a8990ba7 gl_shader_decompiler: Eliminate variable and declaration shadowing
Ensures that no identifiers are being hidden, which also reduces
compiler warnings.
2018-07-19 20:32:49 -04:00
Lioncash 5b433431aa gl_shader_decompiler: Remove unnecessary const from return values
This adds nothing from a behavioral point of view, and can inhibit the
move constructor/RVO
2018-07-19 20:11:04 -04:00
Lioncash 433c9c7bac pl_u: Simplify WriteBuffer() calls in GetSharedFontInOrderOfPriority()
With the new overload, we can simply pass the container directly.
2018-07-19 19:50:30 -04:00
bunnei b55fa06eef Merge pull request #726 from lioncash/overload
hle_ipc: Introduce generic WriteBuffer overload for multiple container types
2018-07-19 16:18:38 -07:00
bunnei a5427ba87a Merge pull request #725 from lioncash/bytes
pl_u: Specify correct size for buffers in GetSharedFontInOrderOfPriority()
2018-07-19 16:16:30 -07:00
bunnei 9cdfa3a942 Merge pull request #728 from Subv/acc_profile
HLE/ACC: Change the default user id and small improvements to the way we handle profiles
2018-07-19 16:15:01 -07:00
bunnei ae40418f2e Merge pull request #727 from Subv/acc_users
HLE/ACC: Write a single whole user id in ListAllUsers and ListOpenUsers.
2018-07-19 16:13:45 -07:00
bunnei 98ebfedfa9 Merge pull request #724 from lioncash/printf
pl_u: Remove printf specifier in log call in a log call in GetSharedFontInOrderOfPriority()
2018-07-19 16:13:07 -07:00
bunnei 0e5f6180db Merge pull request #723 from lioncash/gdb
gdbstub: Get rid of a few signed/unsigned comparisons
2018-07-19 16:12:40 -07:00
bunnei 9d65a4481e Merge pull request #722 from lioncash/signed
hid: Resolve a signed/unsigned comparison warning
2018-07-19 16:12:15 -07:00
bunnei e9c9207523 Merge pull request #721 from lioncash/svc
svc: Correct always true assertion case in SetThreadCoreMask
2018-07-19 16:11:40 -07:00
bunnei fdf72b6b60 Merge pull request #719 from lioncash/docs
loader: Amend Doxygen comments
2018-07-19 16:11:09 -07:00
bunnei b4e1375e78 Merge pull request #718 from lioncash/read
loader/nso: Check if read succeeded in IdentifyFile() before checking magic value
2018-07-19 16:10:29 -07:00
bunnei dbb4596293 Merge pull request #717 from lioncash/explicit
hle/service: Make constructors explicit where applicable
2018-07-19 16:08:07 -07:00
Subv 5bad464f7b HLE/ACC: Return an IProfile that is consistent with what was requested.
The default username for now is "yuzu".
We should eventually allow the creation of users in the emulator and have the ability to modify their parameters.
2018-07-19 16:53:42 -05:00
Subv 791d6b8b3a HLE/ACC: Change the default user id to be consistent with what we tell games on startup.
In IApplicationFunctions::PopLaunchParameter we tell the games that they were launched as user id 1.
2018-07-19 16:51:55 -05:00
Subv 3c8e295c50 HLE/ACC: Write a single whole user id in ListAllUsers and ListOpenUsers.
We only emulate a single user id for now.
2018-07-19 16:19:46 -05:00
bunnei b4a4383fb5 Merge pull request #716 from lioncash/construct
nvflinger: Emplace Display instances directly
2018-07-19 14:18:29 -07:00
Lioncash 2b158ebd25 hle_ipc: Introduce generic WriteBuffer overload for multiple container types
This introduces a slightly more generic variant of WriteBuffer().
Notably, this variant doesn't constrain the arguments to only accepting
std::vector instances. It accepts whatever adheres to the
ContiguousContainer concept in the C++ standard library.

This essentially means, std::array, std::string, and std::vector can be
used directly with this interface. The interface no longer forces you to
solely use containers that dynamically allocate.

To ensure our overloads play nice with one another, we only enable the
container-based WriteBuffer if the argument is not a pointer, otherwise
we fall back to the pointer-based one.
2018-07-19 17:05:12 -04:00
bunnei a5d3565cd8 Merge pull request #715 from lioncash/const-ref
nvdrv: Take std::string by const reference in GetDevice()
2018-07-19 13:27:48 -07:00
Sebastian Valle ee244af2f4 Merge pull request #720 from Subv/getentrytype_root
Filesystem: Return EntryType::Directory for the root directory.
2018-07-19 15:23:32 -05:00
Lioncash 0dcaa4485b pl_u: Specify correct size for buffers in GetSharedFontInOrderOfPriority()
This WriteBuffer overload expects its size argument to be in bytes, not
elements.
2018-07-19 15:57:58 -04:00
Lioncash 9ee475f731 svc: Correct always true assertion case in SetThreadCoreMask
The reason this would never be true is that ideal_processor is a u8 and
THREADPROCESSORID_DEFAULT is an s32. In this case, it boils down to how
arithmetic conversions are performed before performing the comparison.

If an unsigned value has a lesser conversion rank (aka smaller size)
than the signed type being compared, then the unsigned value is promoted
to the signed value (i.e. u8 -> s32 happens before the comparison). No
sign-extension occurs here either.

An alternative phrasing:

Say we have a variable named core and it's given a value of -2.

u8 core = -2;

This becomes 254 due to the lack of sign. During integral promotion to
the signed type, this still remains as 254, and therefore the condition
will always be true, because no matter what value the u8 is given it
will never be -2 in terms of 32 bits.

Now, if one type was a s32 and one was a u32, this would be entirely
different, since they have the same bit width (and the signed type would
be converted to unsigned instead of the other way around) but would
still have its representation preserved in terms of bits, allowing the
comparison to be false in some cases, as opposed to being true all the
time.

---

We also get rid of two signed/unsigned comparison warnings while we're
at it.
2018-07-19 15:46:17 -04:00
Lioncash 2783d58ab3 pl_u: Remove printf specifier in log call in a log call in GetSharedFontInOrderOfPriority()
This can just use the fmt specifiers and be type-agnostic.
2018-07-19 15:44:04 -04:00
Sebastian Valle 9017666b6f Merge pull request #714 from lioncash/index
hle_ipc: Amend usage of buffer_index within one of HLERequestContext's WriteBuffer() overloads
2018-07-19 14:36:34 -05:00
bunnei 1f2644b474 Merge pull request #712 from lioncash/fsp
fsp_srv: Misc individual changes
2018-07-19 12:31:33 -07:00
Lioncash 19be3828b6 gdbstub: Get rid of a few signed/unsigned comparisons
Ensures both operands in comparisons are the same signedness.
2018-07-19 15:27:01 -04:00
Lioncash 60eab9b720 hid: Use a ranged-for loops in UpdatePadCallback
Modernizes the loops themselves while also getting rid of a signed/unsigned
comparison in a loop condition.
2018-07-19 15:11:08 -04:00
Lioncash 68b6099706 hid: Use HID_NUM_LAYOUTS constant for indicating size of the layouts array
Gets rid of the use of a magic constant
2018-07-19 15:07:36 -04:00
bunnei 153756ced5 Merge pull request #713 from lioncash/filesys
filesystem: Minor changes
2018-07-19 11:49:06 -07:00
bunnei 9f6fe39602 Merge pull request #711 from lioncash/swap
common/swap: Minor changes
2018-07-19 11:48:16 -07:00
bunnei a8139e0c59 Merge pull request #710 from lioncash/unused
common/common_funcs: Remove unused rotation functions
2018-07-19 11:43:41 -07:00
bunnei fb8a2dd552 Merge pull request #694 from lioncash/warn
loader/{nro, nso}: Resolve compilation warnings
2018-07-19 11:43:14 -07:00
Subv c1b5369f60 Filesystem: Return EntryType::Directory for the root directory.
It is unknown if this is correct behavior, but it makes sense and fixes a regression with Stardew Valley.
2018-07-19 13:11:09 -05:00
Lioncash ebefc0f080 loader: Amend Doxygen comments
These weren't adjusted when VFS was introduced
2018-07-19 14:04:33 -04:00
bunnei b2d1d18681 Merge pull request #709 from lioncash/thread-local
common/misc: Deduplicate code in GetLastErrorMsg()
2018-07-19 10:00:48 -07:00
Lioncash 71dc75b71e loader/nso: Check if read succeeded in IdentifyFile() before checking magic value
We should always assume the filesystem is volatile and check each IO
operation. While we're at it reorganize checks so that early-out errors
are near one another.
2018-07-19 12:43:21 -04:00
Lioncash e664bf00ed hle/service: Make constructors explicit where applicable
Prevents implicit construction and makes these lingering non-explicit
constructors consistent with the rest of the other classes in services.
2018-07-19 12:25:02 -04:00
Lioncash f31b335a27 nvflinger: Emplace Display instances directly
We can use emplace_back to construct the Display instances directly,
instead of constructing them separately and copying them, avoiding the
need to copy std::string and std::vector instances that are part of the
Display struct.
2018-07-19 11:50:12 -04:00
bunnei 4b6bc818bf Merge pull request #705 from lioncash/string-ref
file_util: return string by const reference for GetExeDirectory()
2018-07-19 08:47:06 -07:00
bunnei 232392968f Merge pull request #704 from lioncash/string
string_util: Remove AsciiToHex()
2018-07-19 08:46:40 -07:00
bunnei 280f1100b6 Merge pull request #703 from lioncash/const
savedata_factory: Make SaveDataDescriptor's DebugInfo() function a const member function
2018-07-19 08:46:15 -07:00
bunnei bdf9a9c044 Merge pull request #702 from lioncash/initialize
partition_filesystem: Ensure all class members of PartitionFilesystem are initialized
2018-07-19 08:45:54 -07:00
bunnei a0c32fc161 Merge pull request #701 from lioncash/moving
content_archive: Minor changes
2018-07-19 08:41:42 -07:00
Lioncash 6b1043fab4 nvdrv: Take std::string by const reference in GetDevice()
This is only ever used as a lookup into the device map, so we don't need to
take the std::string instance by value here.
2018-07-19 11:40:36 -04:00
Lioncash a52cb33af2 hle_ipc: Amend usage of buffer_index within one of HLERequestContext's WriteBuffer() overloads
Previously, the buffer_index parameter was unused, causing all writes to
use the buffer index of zero, which is not necessarily what is wanted
all the time.

Thankfully, all current usages don't use a buffer index other than zero,
so this just prevents a bug before it has a chance to spring.
2018-07-19 11:10:16 -04:00
Lioncash 6fff93da5f fsp_srv: Remove unnecessary vector construction in IFile's Write() function
We can avoid constructing a std::vector here by simply passing a pointer
to the original data and the size of the copy we wish to perform to the
backend's Write() function instead, avoiding copying the data where it's
otherwise not needed.
2018-07-19 11:01:07 -04:00
Lioncash 45e747beaa fsp_srv: Remove unnecessary std::vector construction in IDirectory's Read() function
We were using a second std::vector as a buffer to convert another
std::vector's data into a byte sequence, however we can just use
pointers to the original data and use them directly with WriteBuffer,
which avoids copying the data at all into a separate std::vector.

We simply cast the pointers to u8* (which is allowed by the standard,
given std::uint8_t is an alias for unsigned char on platforms that we
support).
2018-07-19 10:46:54 -04:00
bunnei f15104730f Merge pull request #699 from lioncash/vfs
vfs: Deduplicate accumulation code in VfsDirectory's GetSize()
2018-07-19 07:38:45 -07:00
bunnei ca8697b7d9 Merge pull request #697 from bunnei/disable-depth-cull
gl_state: Temporarily disable culling and depth test.
2018-07-19 07:38:00 -07:00
Lioncash 043ab179b5 filesystem: std::move VirtualDir instance in VfsDirectoryServiceWrapper's constructor
Avoids unnecessary atomic reference count incrementing and decrementing
2018-07-19 10:34:11 -04:00
Lioncash 7ab5eb948c filesystem: Use std::string's empty() function instead of comparing against a literal
This is simply a basic value check as opposed to potentially doing
string based operations (unlikely, but still, avoiding it is free).
2018-07-19 10:32:23 -04:00
Lioncash 9dccecb6b0 filesystem: Remove pragma disabling global optimizations
This was just an artifact missed during PR review.
2018-07-19 10:30:53 -04:00
Lioncash b9758eeb2f fsp_srv: Make IStorage constructor explicit
Prevents implicit conversions.
2018-07-19 10:04:16 -04:00
Lioncash c835e6f941 fsp_srv: Add missing includes
Gets rid of relying on indirect inclusions.
2018-07-19 10:03:17 -04:00
Lioncash b4efdeb80b fsp_srv: Resolve sign-mismatch warnings in assertion comparisons 2018-07-19 09:58:32 -04:00
Lioncash 106207e2ca fsp_srv: Respect write length in Write()
Previously we were just copying the data whole-sale, even if the length
was less than the total data size. This effectively makes the
actual_data vector useless, which is likely not intended.

Instead, amend this to only copy the given length amount of data.

At the same time, we can avoid zeroing out the data before using it by
passing iterators to the constructor instead of a size.
2018-07-19 09:57:48 -04:00
Lioncash 5edccd695c common/swap: Remove unnecessary const on return value of swap() 2018-07-19 09:35:54 -04:00
Lioncash f66d29acf2 common/swap: Use static_cast where applicable 2018-07-19 09:35:13 -04:00
Lioncash d7ebfa40a1 common/swap: Use using aliases where applicable 2018-07-19 09:32:13 -04:00
Lioncash 3ec8aa2bb9 common/common_funcs: Remove unused rotation functions
These are unused and essentially don't provide much benefit either. If
we ever need rotation functions, these can be introduced in a way that
they don't sit in a common_* header and require a bunch of ifdefing to
simply be available
2018-07-19 09:21:23 -04:00
Lioncash 03d8c78199 common/misc: Deduplicate code in GetLastErrorMsg()
Android and macOS have supported thread_local for quite a while, but
most importantly is that we don't even really need it. Instead of using
a thread-local buffer, we can just return a non-static buffer as a
std::string, avoiding the need for that quality entirely.
2018-07-19 09:15:38 -04:00
Lioncash ba015f825f file_util: return string by const reference for GetExeDirectory()
This disallows modifying the internal string buffer (which shouldn't be
modified anyhow).
2018-07-19 01:27:29 -04:00
Lioncash 7ad7ee1411 string_util: Remove AsciiToHex()
Easy TODO
2018-07-18 23:57:15 -04:00
bunnei 25c34badfa Merge pull request #692 from lioncash/assign
address_arbiter: Correct assignment within an assertion statement in WakeThreads()
2018-07-18 20:56:28 -07:00
bunnei 90042f35a5 Merge pull request #690 from lioncash/move
core/memory, core/hle/kernel: Use std::move where applicable
2018-07-18 20:55:55 -07:00
Lioncash f92bb43138 savedata_factory: Make SaveDataDescriptor's DebugInfo() function a const member function
This function doesn't alter class state.
2018-07-18 23:50:07 -04:00
Lioncash a9b596c444 partition_filesystem: Ensure all class members of PartitionFilesystem are initialized
Previously is_hfs and pfs_header members wouldn't be initialized in the
constructor, as they were stored in locals instead. This would result in
things like GetName() and PrintDebugInfo() behaving incorrectly.

While we're at it, initialize the members to deterministic values as
well, in case loading ever fails.
2018-07-18 23:45:22 -04:00
bunnei 9a4fa973c8 gl_state: Temporarily disable culling and depth test. 2018-07-18 23:21:43 -04:00
Lioncash 9eb43dc910 content_archive: Make IsDirectoryExeFS() take a shared_ptr as a const reference
There's no need to take this by value when it's possible to avoid
unnecessary copies entirely like this.
2018-07-18 23:19:28 -04:00
Lioncash 701bdfd753 content_archive: Add missing standard includes 2018-07-18 23:18:59 -04:00
Lioncash bff53f234d content_archive: std::move VirtualFile in NCA's constructor
Gets rid of unnecessary atomic reference count incrementing and
decrementing.
2018-07-18 23:13:25 -04:00
Lioncash 47858aed98 vfs: Deduplicate accumulation code in VfsDirectory's GetSize()
We can just use a generic lambda to avoid writing the same thing twice.
2018-07-18 23:03:27 -04:00
bunnei f6f77b403e Merge pull request #691 from lioncash/guard
service/prepo: Add missing header guard
2018-07-18 19:46:14 -07:00
bunnei 35b7d6ec37 Merge pull request #686 from lioncash/fmt
externals: update fmt to version 5.1.0
2018-07-18 19:44:44 -07:00
Lioncash d0f53d27e0 loader/nro: Resolve sign mismatch warnings 2018-07-18 22:27:22 -04:00
Lioncash b20bac710d loader/nso: Remove unnecessary vector resizes
We can just initialize these vectors directly via their constructor.
2018-07-18 22:26:41 -04:00
Lioncash 0a48b45954 loader/nso: Resolve sign mismatch warnings 2018-07-18 22:26:37 -04:00
bunnei 6f120be510 Merge pull request #688 from lioncash/comma
vm_manager: Add missing commas to string literal array elements in GetMemoryStateName()
2018-07-18 18:59:09 -07:00
bunnei 8387313266 Merge pull request #693 from lioncash/unused
core/memory: Remove unused function GetSpecialHandlers() and an unused variable in ZeroBlock()
2018-07-18 18:57:13 -07:00
bunnei 5ab4dc3e1e Merge pull request #687 from lioncash/instance
core: Don't construct instance of Core::System, just to access its live instance
2018-07-18 18:55:58 -07:00
bunnei c2109ba58e Merge pull request #680 from bunnei/fix-swizz
decoders: Fix calc of swizzle image_width_in_gobs.
2018-07-18 18:55:37 -07:00
bunnei 55ef6c6686 Merge pull request #684 from lioncash/nonmember
game_list: Make ContainsAllWords an internally linked non-member function
2018-07-18 18:55:00 -07:00
bunnei 47a305ed54 decoders: Fix calc of swizzle image_width_in_gobs. 2018-07-18 21:42:52 -04:00
Zach Hilman 82150bd5c1 Virtual Filesystem 2: Electric Boogaloo (#676)
* Virtual Filesystem

* Fix delete bug and documentate

* Review fixes + other stuff

* Fix puyo regression
2018-07-18 18:07:11 -07:00
Lioncash b7e7ddbdfc core/memory: Remove unused function GetSpecialHandlers() and an unused variable in ZeroBlock() 2018-07-18 19:55:46 -04:00
Lioncash 76a9fc2f85 address_arbiter: Correct assignment within an assertion statement in WakeThreads()
This was introduced within d12af72c8f, and
considering there's no comment indicating that this is intentional, this
is very likely a bug.
2018-07-18 19:46:46 -04:00
Lioncash 26e188d074 service/prepo: Add missing header guard 2018-07-18 19:43:28 -04:00
Lioncash 81bf614695 vm_manager: Add missing commas to string literal array elements in GetMemoryStateName()
Without these, this would perform concatenation, which is definitely not
what we want here.
2018-07-18 19:37:19 -04:00
Lioncash b1b1c60009 core/memory, core/hle/kernel: Use std::move where applicable
Avoids pointless copies
2018-07-18 19:34:31 -04:00
Lioncash 74185c108e core: Make System's default constructor private
This makes it a compilation error to construct additional instances of
the System class directly, preventing accidental wasteful constructions
over and over.
2018-07-18 18:18:27 -04:00
Lioncash e72928762f core: Don't construct instance of Core::System, just to access its live instance
This would result in a lot of allocations and related object
construction, just to toss it all away immediately after the call.

These are definitely not intentional, and it was intended that all of
these should have been accessing the static function GetInstance()
through the name itself, not constructed instances.
2018-07-18 18:18:27 -04:00
Lioncash d284e38814 externals: update fmt to version 5.1.0
Previously, we were on 4.1.0, which was a major version behind.
2018-07-18 17:46:17 -04:00
Lioncash 2b547cda84 game_list: Make ContainsAllWords an internally linked non-member function
This function actually depends on no internal class state, so it doesn't
even need to be a part of the class interface.
2018-07-18 16:52:14 -04:00
Zach Hilman 03480ff436 Fill in more fields in TouchScreenEntryTouch 2018-07-18 16:33:11 -04:00
Zach Hilman 25becb080e Single touch support 2018-07-18 14:06:33 -04:00
bunnei 21fe5fa391 Merge pull request #681 from lioncash/const
game_list: Make containsAllWords a const member function
2018-07-18 10:02:58 -07:00
bunnei 988d752729 Merge pull request #682 from lioncash/telemetry
Telemetry: Minor changes
2018-07-18 10:02:46 -07:00
bunnei 2787ea8c3a Merge pull request #679 from lioncash/ctor
game_list: Remove unnecessary QString initialization in KeyReleaseEater
2018-07-17 22:18:39 -07:00
bunnei 8a6b2b17de Merge pull request #678 from lioncash/astc
astc: Minor changes
2018-07-17 22:06:20 -07:00
Lioncash 4fee2216fc telemetry: Remove unnecessary Field constructor
We can just take the value parameter by value which allows both moving
into it, and copies at the same time, depending on the calling code.
2018-07-18 00:32:35 -04:00
Lioncash 2df4be6f25 telemetry: Make operator== and operator!= const member functions of Field
These operators don't modify internal class state, so they can be made
const member functions. While we're at it, drop the unnecessary inline
keywords. Member functions that are defined in the class declaration are
already inline by default.
2018-07-18 00:28:47 -04:00
Lioncash c66555a28f telemetry: Default copy/move constructors and assignment operators
This provides the equivalent behavior, but without as much boilerplate.
While we're at it, explicitly default the move constructor, since we
have a move-assignment operator defined.
2018-07-18 00:25:12 -04:00
Lioncash 80b03cb214 game_list: Upper-case containsAllWords to ContainsAllWords()
This makes it consistent with most of the other private utility
functions.
2018-07-18 00:15:48 -04:00
Lioncash 75eba5fdb9 game_list: Make containsAllWords a const member function
This doesn't actually modify the internal class state, so it can be a
const member function. While we're at it, amend the function to take
its arguments by const reference.
2018-07-18 00:13:04 -04:00
Lioncash 308205980e game_list: Remove unnecessary QString initialization in KeyReleaseEater
QString initializes to an empty string by default, so this does nothing
meaningful. While we're at it, use a constructor initializer list for
initializing the gamelist member variable.
2018-07-18 00:07:47 -04:00
Lioncash e0c31daa57 astc: Initialize vector size directly in Decompress
There's no need to perform a separate resize.
2018-07-17 23:58:14 -04:00
Lioncash fa13cedc7a astc: Mark functions as internally linked where applicable 2018-07-17 23:58:14 -04:00
Lioncash 03f1f17552 astc: const-correctness changes where applicable
A few member functions didn't actually modify class state, so these can
be amended as necessary.
2018-07-17 23:58:14 -04:00
Lioncash 62eb3b3ede astc: Delete Bits' copy contstructor and assignment operator
This also potentially avoids warnings, considering the copy assignment
operator is supposed to have a return value.
2018-07-17 23:58:14 -04:00
Lioncash 6b32ef1d9e astc: In-class initialize member variables where appropriate 2018-07-17 23:58:10 -04:00
bunnei 6143bfd58a settings: Turn docked mode off by default. 2018-07-17 22:52:25 -04:00
bunnei ad40c27409 vi: Change TransactionId::CancelBuffer to LOG_CRITICAL. 2018-07-17 22:47:35 -04:00
bunnei 3ff59a95d5 vi: Fix size for ListDisplays default display. 2018-07-17 22:18:14 -04:00
bunnei 42b866afc5 vi: Partially implement buffer crop parameters. 2018-07-17 20:13:17 -04:00
bunnei 8931dadcf7 Merge pull request #675 from Subv/stencil
GPU: Added register definitions for the stencil parameters.
2018-07-17 15:53:00 -07:00
Subv 8335e656bb GPU: Added register definitions for the stencil parameters. 2018-07-17 15:00:21 -05:00
Zach Hilman 753d85fb0c General Filesystem and Save Data Fixes (#670) 2018-07-17 12:42:15 -07:00
bunnei 5dde645197 Merge pull request #671 from MerryMage/clear-exclusive-state
scheduler: Clear exclusive state when switching contexts
2018-07-17 07:33:32 -07:00
bunnei 430c52b249 Merge pull request #672 from SciresM/to_address_fix
svc:: Fix bug in svcWaitForAddress
2018-07-17 07:32:42 -07:00
bunnei df66fadc12 nvflinger: Fix for BufferQueue event handling. 2018-07-17 00:26:23 -04:00
Michael Scire 045893374f Kernel/Arbiter: Fix bug in WaitIfLessThan 2018-07-16 20:55:53 -06:00
MerryMage bd97579188 scheduler: Clear exclusive state when switching contexts 2018-07-16 11:24:00 +01:00
bunnei 0677b5e281 Merge pull request #668 from jroweboy/controller-lag
HID: Update controllers less often
2018-07-15 13:06:28 -07:00
bunnei f804c21cc8 Merge pull request #664 from jroweboy/logging-stuff
Minor logging improvements
2018-07-15 12:58:52 -07:00
James Rowe 12e7a3065a HID: Update controllers less often 2018-07-15 13:47:41 -06:00
James Rowe 9e5bc967de Logging: Dump all logs in the queue on close in debug mode 2018-07-15 13:02:09 -06:00
bunnei efc5bbb9ab gl_rasterizer_cache: Implement texture format G8R8. 2018-07-15 01:33:42 -04:00
bunnei bba5e84efc Merge pull request #665 from bunnei/fix-z24-s8
gl_rasterizer_cache: Fix incorrect offset in ConvertS8Z24ToZ24S8.
2018-07-14 22:18:55 -07:00
bunnei 50037e0c4f gl_rasterizer_cache: Fix incorrect offset in ConvertS8Z24ToZ24S8. 2018-07-15 00:02:05 -04:00
bunnei f5feb89c86 gl_rasterizer_cache: Implement depth format Z16_UNORM. 2018-07-14 23:43:28 -04:00
bunnei c503bd852d Merge pull request #598 from bunnei/makedonecurrent
OpenGL: Use MakeCurrent/DoneCurrent for multithreaded rendering.
2018-07-14 20:18:11 -07:00
bunnei 062a6e2f5a Merge pull request #663 from Subv/bsd
Services/BSD: Corrected the return for StartMonitoring according to SwIPC
2018-07-14 19:40:34 -07:00
bunnei d86d300744 Merge pull request #662 from Subv/delete_file
FileSys: Append the requested path to the filesystem base path in DeleteFile
2018-07-14 13:11:58 -07:00
James Rowe ada0d38ca9 Logging: Don't lock the queue for the duration of the write 2018-07-14 11:57:13 -06:00
Subv a4f321da14 Services/BSD: Corrected the return for StartMonitoring according to SwIPC. 2018-07-14 12:34:07 -05:00
Subv d4a639a08e FileSys: Append the requested path to the filesystem base path in DeleteFile.
We were trying to delete things in the current directory instead of the actual filesystem directory. This may fix some savedata issues in some games.
2018-07-14 10:57:22 -05:00
David Marcec 66bd4de380 No need to use ASSERT_MSG with an empty message 2018-07-14 23:13:16 +10:00
bunnei 91e048cce7 OpenGL: Use MakeCurrent/DoneCurrent for multithreaded rendering. 2018-07-14 02:50:35 -04:00
Subv 021731e42a GPU: Always enable the depth write when clearing the depth buffer.
The GPU ignores that register when clearing, but OpenGL obeys the glDepthMask parameter, so we set the depth mask to GL_TRUE when clearing the depth buffer. It will be restored to the correct value automatically on the next draw call.
2018-07-14 00:52:23 -05:00
bunnei 8e9285f679 Merge pull request #657 from bunnei/dual-vs
gl_shader_gen: Implement dual vertex shader mode.
2018-07-13 07:08:54 -07:00
Hedges d8d8be6ac0 More improvements to GDBStub (#653)
* More improvements to GDBStub
- Debugging of threads should work correctly with source and assembly level stepping and modifying registers and memory, meaning threads and callstacks are fully clickable in VS.
- List of modules is available to the client, with assumption that .nro and .nso are backed up by an .elf with symbols, while deconstructed ROMs keep N names.
- Initial support for floating point registers.

* Tidy up as requested in PR feedback

* Tidy up as requested in PR feedback
2018-07-12 20:22:59 -07:00
bunnei e904e1f785 gl_rasterizer: Fix check for if a shader stage is enabled. 2018-07-12 22:57:57 -04:00
bunnei 6e04dd24fe gl_shader_gen: Implement dual vertex shader mode.
- When VertexA shader stage is enabled, we combine with VertexB program to make a single Vertex Shader stage.
2018-07-12 22:25:36 -04:00
bunnei 30b352bfc4 Merge pull request #656 from ogniK5377/audren-mem-init
Initialized memory for RequestUpdateAudioRenderer and fixed MemoryPoolSection to be more accurate
2018-07-12 19:12:47 -07:00
bunnei 7fa10a188d Merge pull request #655 from bunnei/pred-lt-nan
gl_shader_decompiler: Implement PredCondition::LessThanWithNan.
2018-07-12 18:59:15 -07:00
David Marcec 0b2adb2672 We only need to alert for memory pool changes 2018-07-13 10:36:28 +10:00
David Marcec 761d44eea4 initialized voice status and unused sizes in the update data header 2018-07-13 10:35:44 +10:00
bunnei 50e6ef98e2 gl_shader_decompiler: Implement PredCondition::LessThanWithNan. 2018-07-12 20:04:35 -04:00
bunnei fef7eb92de gl_shader_decompiler: Use FlowCondition field in EXIT instruction. 2018-07-12 20:00:37 -04:00
Sebastian Valle d1bd94351c Merge pull request #652 from Subv/fadd32i
GPU: Implement the FADD32I shader instruction.
2018-07-12 17:36:51 -05:00
bunnei ba0665c397 Merge pull request #651 from Subv/ffma_decode
GPU: Corrected the decoding of FFMA for immediate operands.
2018-07-12 12:42:58 -07:00
Subv 555dd2f793 GPU: Implement the FADD32I shader instruction. 2018-07-12 12:00:31 -05:00
Tobias 7bf3ea7dcc Port #3335 and #3373 from Citra: "Small SDL fixes" and "Print the actual error preventing SDL from working" (#637)
* Port #3335 and #3373 from Citra

* Fixup: Use the new logging placeholders
2018-07-12 09:26:27 -07:00
Subv d87962405b GPU: Corrected the decoding of FFMA for immediate operands. 2018-07-12 10:15:48 -05:00
bunnei 9ce122e047 Merge pull request #648 from ogniK5377/no-net
Let games/application know that we're offline
2018-07-12 06:44:15 -07:00
bunnei 855a9e2fdc Merge pull request #649 from ogniK5377/audout-auto
Audout "Auto" functions
2018-07-12 06:43:37 -07:00
James Rowe ca04901b0f yuzu - Fix duplicate logs 2018-07-12 01:11:43 -06:00
James Rowe bed23a6e25 yuzu-cmd Apply the filter string from settings 2018-07-12 01:09:03 -06:00
David Marcec 7d5403fc89 Audout "Auto" functions
Audout autos are identical to their counterpart except for the buffer type which yuzu already handles for us.
2018-07-12 16:57:31 +10:00
David Marcec 3fcb7978f0 Added IsWirelessCommunicationEnabled, IsEthernetCommunicationEnabled, IsAnyInternetRequestAccepted
Since we have no socket implementation we should be returning 0 to indicate we're currently offline.
2018-07-12 16:40:17 +10:00
bunnei c2ade32fad Merge pull request #559 from Subv/mount_savedata
Services/FS: Return the correct error code when trying to mount a nonexistent savedata.
2018-07-11 20:21:52 -07:00
bunnei d613d8ee52 hid: Fix timestamps and controller type.
- This fixes user input in SMO.
2018-07-10 22:55:13 -04:00
bunnei 094bac5413 Merge pull request #644 from ogniK5377/getconfig-err
NvOsGetConfigU32 production impl
2018-07-10 15:44:23 -07:00
bunnei 9ae6aa8a2e Merge pull request #633 from FearlessTobi/port-defines
Port #3579 from Citra: Clean up architecture-specific defines
2018-07-10 09:12:52 -07:00
bunnei e73ad0c7bb Merge pull request #642 from bunnei/create-save-dir
savedata_factory: Always create a save directory for games.
2018-07-10 09:09:58 -07:00
David Marcec bc85c649c1 NvOsGetConfigU32 production impl
Settings are only  used when RMOS_SET_PRODUCTION_MODE is set to 0.
If production mode is set, the error code 0x30006 is returned instead
2018-07-10 14:10:17 +10:00
bunnei 9816ce67a5 Merge pull request #635 from FearlessTobi/port-crashfix
Port #3474 from Citra: Do not crash on unimplemented code in debug build
2018-07-09 17:08:25 -07:00
bunnei 082fb5a8a8 Merge pull request #634 from FearlessTobi/port-viewport-fix
Port #3505 from Citra: Fix QGLWidget viewport resize on macOS
2018-07-09 17:07:30 -07:00
bunnei c6703bb009 Merge pull request #640 from bunnei/flip-tris-viewport
gl_rasterizer: Flip triangles when regs.viewport_transform[0].scale_y is negative.
2018-07-09 14:32:35 -07:00
bunnei 99a359777c savedata_factory: Always create a save directory for games. 2018-07-08 17:05:13 -04:00
bunnei 8924486715 nvhost_ctrl: Fix NvOsGetConfigU32 for Snipper Clips. 2018-07-08 17:01:46 -04:00
bunnei 9d9375e109 gl_rasterizer: Flip triangles when regs.viewport_transform[0].scale_y is negative.
- Fixes a regression with Binding of Isaac.
2018-07-08 16:16:24 -04:00
bunnei fb664990a3 Merge pull request #625 from Subv/imnmx
GPU: Implemented the IMNMX shader instruction.
2018-07-07 19:33:50 -07:00
bunnei 709d855436 Merge pull request #627 from Subv/bc7u
GPU: Implemented the BC7U texture format.
2018-07-07 19:33:18 -07:00
bunnei 0c22a8d514 Revert "Virtual Filesystem (#597)"
This reverts commit 12e9522b32.
2018-07-07 20:24:51 -07:00
Subv 3c86a705ba GPU: Implemented the BC7U texture format.
Note: Our version of glad exports GL_COMPRESSED_RGBA_BPTC_UNORM as GL_COMPRESSED_RGBA_BPTC_UNORM_ARB, maybe it's time we update it.
2018-07-07 09:17:48 -05:00
fearlessTobi 8f74246cb1 Port #3474 from Citra 2018-07-07 14:17:44 +02:00
fearlessTobi fa8a9656a9 Port #3505 from CItra 2018-07-07 14:11:49 +02:00
fearlessTobi 365753a98c Port #3579 from Citra 2018-07-07 13:59:18 +02:00
bunnei c754485cda Merge pull request #630 from FearlessTobi/remove-citra-references
Remove some references to Citra
2018-07-06 11:13:50 -04:00
Zach Hilman 12e9522b32 Virtual Filesystem (#597)
* Add VfsFile and VfsDirectory classes

* Finish abstract Vfs classes

* Implement RealVfsFile (computer fs backend)

* Finish RealVfsFile and RealVfsDirectory

* Finished OffsetVfsFile

* More changes

* Fix import paths

* Major refactor

* Remove double const

* Use experimental/filesystem or filesystem depending on compiler

* Port partition_filesystem

* More changes

* More Overhaul

* FSP_SRV fixes

* Fixes and testing

* Try to get filesystem to compile

* Filesystem on linux

* Remove std::filesystem and document/test

* Compile fixes

* Missing include

* Bug fixes

* Fixes

* Rename v_file and v_dir

* clang-format fix

* Rename NGLOG_* to LOG_*

* Most review changes

* Fix TODO

* Guess 'main' to be Directory by filename
2018-07-06 10:51:32 -04:00
fearlessTobi 08acefbaab Remove some references to Citra 2018-07-06 15:47:06 +02:00
bunnei 0ea724e06b Merge pull request #629 from Subv/depth_test
GPU: Allow using the old NV04 values for the depth test function.
2018-07-05 16:43:10 -04:00
Subv c44c0078cc GPU: Allow using the old NV04 values for the depth test function.
These seem to be just a valid as the GL token values. Thanks @ReinUsesLisp

This restores graphical output to Disgaea 5
2018-07-05 13:01:31 -05:00
bunnei aaf0e0a73e Merge pull request #626 from Subv/shader_sync
GPU: Stub the shader SYNC and DEPBAR instructions.
2018-07-05 12:54:19 -04:00
bunnei ffdd37675f Merge pull request #624 from Subv/f2f_round
GPU: Implemented the F2F 'round' rounding mode.
2018-07-05 11:30:29 -04:00
bunnei 159deaa00f Merge pull request #623 from Subv/vertex_types
GPU: Implement the Size_16_16 and Size_10_10_10_2 vertex attribute types
2018-07-05 11:30:01 -04:00
bunnei 9bfeacb59a Merge pull request #622 from Subv/unused_tex
GPU: Ignore unused textures and corrected the TEX shader instruction decoding.
2018-07-05 11:29:17 -04:00
bunnei a45206c2b2 Merge pull request #621 from Subv/psetp_
GPU: Implemented the PSETP shader instruction.
2018-07-05 11:28:50 -04:00
bunnei 21f8cd6e8c Merge pull request #620 from Subv/depth_z32f
GPU: Implemented the 32 bit float depth buffer format.
2018-07-05 11:09:15 -04:00
Subv cc56ecc097 GPU: Implemented the IMNMX shader instruction.
It's similar to the FMNMX instruction but it works on integers.
2018-07-04 15:44:37 -05:00
Subv c4268c13c6 GPU: Implemented the F2F 'round' rounding mode.
It's implemented via the GLSL 'roundEven()' function.
2018-07-04 15:43:21 -05:00
Subv 56a5e7ba50 GPU: Stub the shader SYNC and DEPBAR instructions.
It is unknown at this moment if we actually need to do something with these instructions or if the GLSL compiler takes care of that for us.
2018-07-04 15:29:51 -05:00
Subv 25e08cf116 GPU: Implement the Size_16_16 and Size_10_10_10_2 vertex attribute types.
Both signed and unsigned variants.
2018-07-04 15:22:34 -05:00
Subv 36822431cc GPU: Ignore textures that the GLSL compiler deemed unused when binding textures to the shaders. 2018-07-04 15:20:12 -05:00
Subv 673600656c GPU: Corrected the decoding for the TEX shader instruction. 2018-07-04 15:19:20 -05:00
Subv 9ba997d4f0 GPU: Implemented the PSETP shader instruction.
It's similar to the isetp and fsetp instructions but it works on predicates instead.
2018-07-04 15:15:03 -05:00
Subv 910af4676c GPU: Implemented the 32 bit float depth buffer format. 2018-07-04 10:42:33 -05:00
Subv 70f55cf738 GPU: Flip the triangle front face winding if the GPU is configured to not flip the triangles.
OpenGL's default behavior is already correct when the GPU is configured to flip the triangles.

This fixes 1-2 Switch's splash screen.
2018-07-04 10:26:46 -05:00
Subv 53e622f91d GPU: Only configure the used framebuffers during clear.
Don't try to configure the color buffer if it is not being cleared, it may not be completely valid at this point.
2018-07-03 22:32:59 -05:00
bunnei 3c4a5817c2 Merge pull request #609 from Subv/clear_buffers
GPU: Implemented the CLEAR_BUFFERS register.
2018-07-03 19:34:34 -04:00
Subv bb62c6dde3 GPU: Factor out the framebuffer configuration code for both Clear and Draw commands. 2018-07-03 16:56:47 -05:00
Subv 20afd1187d GPU: Support clears that don't clear the color buffer. 2018-07-03 16:56:47 -05:00
Subv fd4699c84f GPU: Bind and clear the render target when the CLEAR_BUFFERS register is written to. 2018-07-03 16:56:44 -05:00
Subv be5f1dde73 GPU: Added registers for the CLEAR_BUFFERS and CLEAR_COLOR methods. 2018-07-03 16:56:31 -05:00
bunnei 8a717606e4 gl_rasterizer_cache: Implement PixelFormat S8Z24. 2018-07-03 14:58:13 -04:00
David 051040caaf Update AudioRenderer Voice Sections (#614)
* voice section updating

* fixed slight offset miscalculation

* fixed overflow
2018-07-03 13:09:10 -04:00
bunnei 1a67d370cf Merge pull request #607 from jroweboy/logging
Logging - Customizable backends
2018-07-03 00:26:45 -04:00
bunnei 6bc04e4fed Merge pull request #612 from bunnei/fix-cull
gl_rasterizer: Only set cull mode and front face if enabled.
2018-07-02 23:48:52 -04:00
bunnei 616c64f56d Merge pull request #611 from Subv/enabled_depth_test
GPU: Don't try to parse the depth test function if the depth test is disabled and use only the least significant 3 bits in the depth test func
2018-07-02 23:47:11 -04:00
bunnei 0dcdf918d9 Merge pull request #610 from Subv/mufu_8
GPU: Implemented MUFU suboperation 8, sqrt.
2018-07-02 22:26:42 -04:00
bunnei e702550809 gl_rasterizer: Only set cull mode and front face if enabled. 2018-07-02 22:22:25 -04:00
Subv 40fd6504e2 GPU: Use only the least significant 3 bits when reading the depth test func.
Some games set the full GL define value here (including nouveau), but others just seem to set those last 3 bits.
2018-07-02 21:06:36 -05:00
Subv f6e05eac41 GPU: Don't try to parse the depth test function if the depth test is disabled. 2018-07-02 21:02:46 -05:00
bunnei 0afb4ff542 Fix build and address review feedback 2018-07-02 21:45:48 -04:00
James Rowe 7af1a786d5 Add configurable logging backends 2018-07-02 21:45:47 -04:00
James Rowe d74d2a77cb Update clang format 2018-07-02 21:45:47 -04:00
James Rowe e159c550d8 Rename logging macro back to LOG_* 2018-07-02 21:45:47 -04:00
bunnei 0b05c9abc8 Merge pull request #608 from Subv/depth
GPU: Implemented the depth buffer and depth test + culling
2018-07-02 21:24:43 -04:00
Subv 629b9090ff GPU: Set up the culling configuration on each draw. 2018-07-02 19:51:29 -05:00
Subv 6880dd7352 GPU: Implemented MUFU suboperation 8, sqrt. 2018-07-02 19:48:15 -05:00
Sebastian Valle 5809a9bc82 Merge pull request #606 from Subv/base_vertex
GPU: Fixed the index offset and implement BaseVertex when doing indexed rendering.
2018-07-02 14:07:38 -05:00
Sebastian Valle 9d3f6e86cf Merge pull request #603 from Subv/nvmap_free
GPU: Remove unmapped surfaces from the rasterizer cache and fix our nvmap::Free behavior.
2018-07-02 14:07:17 -05:00
Sebastian Valle 8bb96959c0 Merge pull request #605 from Subv/dma_copy
GPU: Directly copy the pixels when performing a same-layout DMA.
2018-07-02 14:06:56 -05:00
Subv 65439518d8 GPU: Set up the depth test state on every draw. 2018-07-02 13:33:06 -05:00
Subv fb733c02bd MaxwellToGL: Added conversion functions for depth test and cull mode. 2018-07-02 13:31:49 -05:00
Subv dfe650f7bd GPU: Added registers for depth test and cull mode. 2018-07-02 13:31:20 -05:00
Subv 62068f723a GPU: Implemented the Z24S8 depth format and load the depth framebuffer. 2018-07-02 12:42:04 -05:00
Subv 95a7f92998 GPU: Implement offsetted rendering when using non-indexed drawing. 2018-07-02 11:23:36 -05:00
Subv 1f6139aa58 GPU: Fixed the index offset rendering, and implemented the base vertex functionality.
This fixes Stardew Valley.
2018-07-02 11:22:17 -05:00
Subv 270358e666 GPU: Added register definitions for the vertex buffer base element. 2018-07-02 11:21:23 -05:00
bunnei 9bef775227 Merge pull request #604 from Subv/invalid_textures
GPU: Ignore invalid and disabled textures when drawing.
2018-07-02 11:48:18 -04:00
Subv 70196aa935 GPU: Directly copy the pixels when performing a same-layout DMA. 2018-07-02 09:46:33 -05:00
Subv 9819aa1298 GPU: Ignore disabled textures and textures with an invalid address. 2018-07-02 09:43:38 -05:00
Subv 40d52181c3 GPU: Allow GpuToCpuAddress to return boost::none for unmapped addresses. 2018-07-02 09:42:48 -05:00
Subv 4c6cb7161a GPU: Remove a surface from the cache when its backing memory is being unmapped from the GPU's MMU. 2018-07-01 10:50:06 -05:00
Subv a90bbff826 nvmap: Return the address of the nvmap object when Freeing it for the last time.
This behavior is confirmed by reverse engineering.
2018-07-01 10:48:50 -05:00
bunnei eac897d583 Merge pull request #602 from Subv/mufu_subop
GPU: Corrected the size of the MUFU subop field, and removed incorrect "min" operation.
2018-07-01 11:06:04 -04:00
bunnei 7eb7b100a8 Merge pull request #601 from Subv/rgba32_ui
GPU: Implement the RGBA32_UINT rendertarget format.
2018-07-01 03:22:38 -04:00
Subv b9e6f48dbb GPU: Corrected the size of the MUFU subop field, and removed incorrect "min" operation. 2018-06-30 14:48:25 -05:00
Subv 8bfac40a92 GPU: Implemented the RGBA32_UINT rendertarget format. 2018-06-30 14:23:13 -05:00
Subv d72f74483c GLCache: Specify the component type along the texture type in the format tuple. 2018-06-30 14:08:51 -05:00
bunnei 4406d9b84c gl_shader_decompiler: Implement predicate NotEqualWithNan. 2018-06-30 03:01:25 -04:00
bunnei a900f81bdb Merge pull request #595 from bunnei/raster-cache
Rewrite the OpenGL rasterizer cache
2018-06-29 14:07:28 -04:00
bunnei bf95fca386 gl_rasterizer_cache: Only dereference color_surface/depth_surface if valid. 2018-06-29 13:08:08 -04:00
bunnei 9500a18c52 Merge pull request #588 from mailwl/hwopus
Service/Audio: add hwopus service, stub GetWorkBufferSize function
2018-06-27 21:57:21 -04:00
bunnei 147286048e gl_shader_decompiler: Add a return path for unknown instructions. 2018-06-27 01:14:34 -04:00
bunnei bdba4b6c83 gl_rasterizer_cache: Implement caching for texture and framebuffer surfaces.
gl_rasterizer_cache: Improved cache management based on Citra's implementation.

gl_surface_cache: Add some docstrings.
2018-06-27 00:15:44 -04:00
bunnei fb731b0a5a gl_rasterizer_cache: Various fixes for ASTC handling. 2018-06-27 00:08:04 -04:00
bunnei 796f775771 gl_rasterizer_cache: Use SurfaceParams as a key for surface caching. 2018-06-27 00:08:04 -04:00
bunnei 1576d41c0f maxwell_3d: Add a struct for RenderTargetConfig. 2018-06-27 00:08:04 -04:00
bunnei 47ba060950 settings: Add a configuration for use_accurate_framebuffers. 2018-06-27 00:08:04 -04:00
bunnei bd86248eae gl_rasterizer: Implement AccelerateDisplay to forward textures to framebuffers. 2018-06-27 00:08:03 -04:00
bunnei 09150adc15 gl_rasterizer_cache: Cache size_in_bytes as a const per surface. 2018-06-27 00:08:03 -04:00
bunnei 022b5b7630 gl_rasterizer_cache: Refactor to make SurfaceParams members const. 2018-06-27 00:08:03 -04:00
bunnei e250313bcf gl_rasterizer_cache: Remove Citra's rasterizer cache, always load/flush surfaces. 2018-06-27 00:08:03 -04:00
bunnei e210287624 gl_rasterizer: Workaround for when exceeding max UBO size. 2018-06-26 23:07:34 -04:00
bunnei 5366e91b51 Merge pull request #593 from bunnei/fix-swizzle
gl_state: Fix state management for texture swizzle.
2018-06-26 22:05:49 -04:00
bunnei 8151dfed79 Merge pull request #592 from bunnei/cleanup-gl-state
gl_state: Remove unused state management from 3DS.
2018-06-26 22:05:03 -04:00
bunnei 11c391a914 gl_state: Fix state management for texture swizzle. 2018-06-26 17:15:58 -04:00
bunnei 93a4bb20dc gl_state: Remove unused state management from 3DS. 2018-06-26 17:09:25 -04:00
bunnei b856c6d1c2 gl_rasterizer_cache: Fix inverted B5G6R5 format. 2018-06-26 17:07:36 -04:00
bunnei 78ce5a7026 yuzu: Remove SSBOs check from Qt frontend. 2018-06-26 11:28:56 -04:00
bunnei ef66c36936 Merge pull request #554 from Subv/constbuffer_ubo
Rasterizer: Use UBOs instead of SSBOs for uploading const buffers.
2018-06-26 10:25:56 -04:00
bunnei 8bd9579984 Merge pull request #589 from mailwl/fix-crash
Fix crash at exit
2018-06-26 01:01:10 -04:00
mailwl 52b73904e8 Fix crash at exit 2018-06-25 18:01:08 +03:00
David e4479c5b55 Send the correct RequestUpdateAudioRenderer revision in the output header (#587)
* We should be returning our revision instead of what is requested.

Hardware test on a 5.1.0 console

* Added sysversion comment
2018-06-25 10:34:41 -04:00
mailwl 5ffac05099 Service/Audio: add hwopus service, stub GetWorkBufferSize function 2018-06-25 16:44:17 +03:00
David 1a6e4c3a2e Removed duplicate structs, changed AudioRendererResponse -> UpdateDataHeader (#583)
* Removed duplicate structs, changed AudioRendererResponse -> UpdateDataHeader

According to game symbols(SMO), there's references to UpdateDataHeader which seems to be what AudioRendererResponse actually is

* oops

* AudioRendererParameters should be AudioRendererParameter according to SMO
2018-06-23 20:46:29 -04:00
David a86258dfc1 Fixed RequestUpdateAudioRenderer deadlocks and calculated section sizes properly (#580)
* Fixed RequestUpdateAudioRenderer deadlocks and calculated section sizes properly

This fixes RequestUpdateAudioRenderer deadlocks in games like Puyo Puyo Tetris and games which require a proper section size in games such as Retro City Rampage. This fixes causes various games to start rendering or trying to render
2018-06-22 22:22:33 -04:00
bunnei 55d7d4afa4 Merge pull request #579 from SciresM/master
svc: Fully implement svcSignalToAddress and svcWaitForAddress
2018-06-22 12:08:39 -04:00
mailwl 29f156eb60 IPC: skip empty buffer write
prevent yuzu crash, if games, like Axiom Verge, trying to read 0 bytes from file
2018-06-22 11:28:10 +03:00
Michael Scire a3509a9e74 Kernel/Arbiters: Fix casts, cleanup comments/magic numbers 2018-06-22 00:47:59 -06:00
Michael Scire 28fe461cd3 Add additional missing format. 2018-06-21 21:09:51 -06:00
Michael Scire 96617f16ed Run clang-format on PR. 2018-06-21 21:05:34 -06:00
bunnei dc28738bc9 Merge pull request #577 from mailwl/audren-update
Service/Audio: update audren:u service
2018-06-21 22:40:37 -04:00
Michael Scire 9d83964c1b Kernel/Arbiters: HLE is atomic, adjust code to reflect that. 2018-06-21 20:25:57 -06:00
Zach Hilman a47f36da7b Add support for decrypted NCA files (#567)
* Start to add NCA support in loader

* More nca stuff

* More changes to nca.cpp

* Now identifies decrypted NCA cont.

* Game list fixes and more structs and stuff

* More updates to Nca class

* Now reads ExeFs (i think)

* ACTUALLY LOADS EXEFS!

* RomFS loads and games execute

* Cleanup and Finalize

* plumbing, cleanup and testing

* fix some things that i didnt think of before

* Preliminary Review Changes

* Review changes for bunnei and subv
2018-06-21 11:16:23 -04:00
Michael Scire 2a0ea82fec Kernel/Arbiters: Initialize arb_wait_address in thread struct. 2018-06-21 05:13:06 -06:00
Michael Scire 3aa03cca5a Kernel/Arbiters: Clear WaitAddress in SignalToAddress 2018-06-21 04:20:39 -06:00
Michael Scire d12af72c8f Kernel/Arbiters: Mostly implement SignalToAddress 2018-06-21 04:10:11 -06:00
Michael Scire 3119b64d86 Kernel/Arbiters: Implement WaitForAddress 2018-06-21 01:40:29 -06:00
mailwl 40eb06288c Service/Audio: update audren:u service 2018-06-21 10:26:24 +03:00
Michael Scire 6e9b11ffa0 Kernel/Arbiters: Add stubs for 4.x SignalToAddress/WaitForAddres SVCs. 2018-06-21 00:49:43 -06:00
Subv cb4ff57322 Build: Fixed some MSVC warnings in various parts of the code. 2018-06-20 11:39:10 -05:00
greggameplayer 1092153a6a Implement GetAvailableLanguageCodes2 (#575)
* Implement GetAvailableLanguageCodes2

* Revert "Implement GetAvailableLanguageCodes2"

This reverts commit caadd9eea3497ae2a13382aecb8ca29e1c02c5af.

* Implement GetAvailableLanguageCodes2

* Implement GetAvailableLanguageCodes2
2018-06-19 11:29:04 -04:00
bunnei 62f02e6bd0 Merge pull request #574 from Subv/shader_abs_neg
GPU: Perform negation after absolute value in the float shader instructions.
2018-06-18 22:24:57 -04:00
bunnei 9571906188 Merge pull request #561 from DarkLordZach/fix-odyssey-input-crash
Avoid initializing single-joycon layouts with handheld controller
2018-06-18 22:06:11 -04:00
Subv 29bddf03f7 GPU: Perform negation after absolute value in the float shader instructions. 2018-06-18 19:56:29 -05:00
Subv cd61616ddb GPU: Don't mark uniform buffers and registers as used for instructions which don't have them.
Like the MOV32I and FMUL32I instructions.
This fixes a potential crash when using these instructions.
2018-06-18 19:50:35 -05:00
Subv 62a67fbd0a Services/FS: Return the correct error code when trying to mount a nonexistent savedata. 2018-06-18 19:26:01 -05:00
bunnei f87da98ff7 Merge pull request #570 from bunnei/astc
gl_rasterizer: Implement texture format ASTC_2D_4X4.
2018-06-18 19:08:49 -04:00
bunnei 25c140c5e0 Merge pull request #562 from DarkLordZach/extracted-ncas-ui
Add UI support for extracted NCA folders
2018-06-18 16:09:46 -04:00
bunnei 149fef99a0 Merge pull request #572 from Armada651/user-except-stub
svc: Add a stub for UserExceptionContextAddr.
2018-06-18 11:37:13 -04:00
bunnei 1abca5bc0c Merge pull request #571 from Armada651/loose-blend
gl_rasterizer: Get loose on independent blending.
2018-06-18 11:36:50 -04:00
Jules Blok 5614c1329e svc: Add a stub for UserExceptionContextAddr. 2018-06-18 09:29:11 +02:00
Jules Blok 55e69c1cf2 gl_rasterizer: Get loose on independent blending. 2018-06-18 09:27:06 +02:00
bunnei 9feb7f7a63 gl_rasterizer: Implement texture format ASTC_2D_4X4. 2018-06-18 01:56:59 -04:00
bunnei 5fb04f7c6d gl_rasterizer_cache: Loosen things up a bit. 2018-06-18 00:55:59 -04:00
bunnei a72b4c358d gl_shader_decompiler: Implement LOP instructions. 2018-06-17 15:27:48 -04:00
bunnei b071232a75 gl_shader_decompiler: Refactor LOP32I instruction a bit in support of LOP. 2018-06-17 13:31:39 -04:00
bunnei dc1808fa4a gl_shader_decompiler: Implement integer size conversions for I2I/I2F/F2I. 2018-06-15 22:42:02 -04:00
bunnei 288b9170c5 Merge pull request #564 from bunnei/lop32i_passb
gl_shader_decompiler: Implement LOP32I LogicOperation PassB.
2018-06-15 22:04:03 -04:00
bunnei bb1e655f2d gl_shader_gen: Set position.w to 1. 2018-06-15 20:47:04 -04:00
bunnei fb8823d10d gl_shader_decompiler: Implement LOP32I LogicOperation PassB. 2018-06-15 20:43:33 -04:00
Zach Hilman 044ed8717e Bug fixes, testing, and review changes 2018-06-14 17:25:40 -04:00
Zach Hilman ad8d79aade Add 'Load Folder' menu option 2018-06-14 12:27:29 -04:00
Zach Hilman ba498ab930 Add support for main files in file picker 2018-06-14 12:16:56 -04:00
Zach Hilman ea7301923c Recognize main files in game list 2018-06-14 12:02:32 -04:00
Zach Hilman 3898d6b54c Narrow down filter of layout configs 2018-06-13 20:03:12 -04:00
Zach Hilman 42701153c7 Move loop condition to free function 2018-06-13 13:44:46 -04:00
Zach Hilman 93c0478c5c Avoid initializing single-joycon layouts with handheld controller 2018-06-13 13:01:05 -04:00
bunnei 6f0b2ba7cf Merge pull request #560 from Subv/crash_widget
Qt: Removed the Registers widget.
2018-06-13 10:15:00 -04:00
Subv de53649e61 Qt: Removed the Registers widget.
It was crashing and nobody actually uses this.
2018-06-12 20:33:32 -05:00
bunnei 84e9756197 Merge pull request #556 from Subv/dma_engine
GPU: Partially implemented the Maxwell DMA engine.
2018-06-12 14:25:17 -04:00
bunnei e11428e17e Merge pull request #558 from Subv/iadd32i
GPU: Implemented the iadd32i shader instruction.
2018-06-12 14:19:25 -04:00
Subv 1a0c6910ce GPU: Implemented the iadd32i shader instruction. 2018-06-12 11:46:45 -05:00
Subv df214db493 GPU: Partially implemented the Maxwell DMA engine.
Only tiled->linear and linear->tiled copies that aren't offsetted are supported for now. Queries are not supported. Swizzled copies are not supported.
2018-06-12 11:27:36 -05:00
bunnei 205556d5f0 Merge pull request #557 from shinyquagsire23/libnx-hid-fix
hid: Update all layouts and only show handheld as connected, fixes libnx input for P1_AUTO
2018-06-12 09:07:38 -04:00
bunnei 37110bbc02 gl_shader_decompiler: Implement saturate for float instructions. 2018-06-11 21:46:34 -04:00
shinyquagsire23 a02f67160c hid: Update all layouts and only show handheld as connected, fixes libnx input for P1_AUTO 2018-06-11 19:41:29 -06:00
Subv cf9e8fbc13 GPU: Convert the gl_InstanceId and gl_VertexID variables to floats when reading from them.
This corrects the invalid position values in some games when doing attribute-less rendering.
2018-06-10 13:50:19 -05:00
Subv aa4d2cac1b Rasterizer: Use UBOs instead of SSBOs for uploading const buffers.
This should help a bit with GPU performance once we're GPU-bound.
2018-06-09 18:02:05 -05:00
Subv 297a99944e GPU: Implement the iset family of shader instructions. 2018-06-09 16:19:13 -05:00
Subv f387d11882 GPU: Added decodings for the ISET family of instructions. 2018-06-09 15:56:50 -05:00
bunnei ede185a446 Merge pull request #550 from Subv/ssy
GPU: Stub the SSY shader instruction.
2018-06-09 00:42:53 -04:00
bunnei 5f2f250915 Merge pull request #551 from bunnei/shr
gl_shader_decompiler: Implement SHR instruction.
2018-06-09 00:42:44 -04:00
bunnei 9c12d989c3 gl_shader_decompiler: Implement SHR instruction. 2018-06-09 00:01:17 -04:00
Subv 6d7be6fc08 GPU: Stub the SSY shader instruction.
This instruction tells the GPU where the flow reconverges in a non-uniform control flow scenario, we can ignore this when generating GLSL code.
2018-06-08 22:46:10 -05:00
bunnei 179623a99c gl_shader_decompiler: Implement IADD instruction. 2018-06-08 23:25:22 -04:00
bunnei 54408c16a8 gl_shader_decompiler: Add missing asserts for saturate_a instructions. 2018-06-08 23:24:10 -04:00
bunnei 7ff5d3ef92 Merge pull request #533 from mailwl/array-to-buffer
Common/string_util: add StringFromBuffer() function
2018-06-08 18:51:00 -04:00
Subv 158cd05fd3 GPU: Synchronize the blend state on every draw call.
Only independent blending on render target 0 is implemented for now.

This fixes the elongated squids in Splatoon 2's boot screen.
2018-06-08 17:05:52 -05:00
Subv 3e48928bf2 GPU: Added registers for normal and independent blending. 2018-06-08 17:04:41 -05:00
bunnei 0aac4935af Merge pull request #547 from Subv/compressed_alignment
GLCache: Align compressed texture sizes to their compression ratio, and then align that compressed size to the block height for tiled textures.
2018-06-08 16:40:49 -04:00
Subv 5f3afad871 GLCache: Align compressed texture sizes to their compression ratio, and then align that compressed size to the block height for tiled textures.
This fixes issues with retrieving non-block-aligned tiled compressed textures from the cache.
2018-06-08 12:27:19 -05:00
Subv b834631438 Rasterizer: Flush the written region when writing shader uniform data before copying it to the uniform buffers.
This fixes the flip_viewport uniform having invalid values when drawing.
2018-06-08 12:22:39 -05:00
bunnei 48cb11e6b7 Merge pull request #543 from Subv/uniforms
GLRenderer: Write the shader stage configuration UBO data *before* copying it to the GPU.
2018-06-07 11:21:36 -04:00
Subv f84d419248 GLRenderer: Write the shader stage configuration UBO data *before* copying it to the GPU.
This should fix the bug with the vs_config UBO being uninitialized during shader execution.
2018-06-07 08:33:23 -05:00
mailwl b70838ca60 Common/string_util: add StringFromBuffer function
convert input buffer (std::vector<u8>) to string, stripping zero chars
2018-06-07 09:59:47 +03:00
bunnei 5d0f6acd9b Merge pull request #522 from mailwl/mm-u
Service/MM: add service and stub some functions
2018-06-07 02:00:04 -04:00
bunnei c153e1a326 Merge pull request #542 from bunnei/bfe_imm
gl_shader_decompiler: Implement BFE_IMM instruction.
2018-06-07 01:49:45 -04:00
bunnei 3a347d9be8 Merge pull request #541 from Subv/blittextures
GLCache: Fixed copying compressed textures in the rasterizer cache.
2018-06-07 01:35:01 -04:00
bunnei 221a29f0fd gl_shader_decompiler: Implement BFE_IMM instruction. 2018-06-07 00:58:12 -04:00
Subv f5ef6f5e8e GLCache: Use the full uncompressed size when blitting from one texture to another.
This avoids the problem of only copying a tiny piece of the textures when they are compressed.
2018-06-06 23:26:36 -05:00
Subv 6c016a6844 GLCache: Simplify the logic to copy from one texture to another in BlitTextures.
We now use glCopyImageSubData, this should avoid errors with trying to attach a compressed texture as a framebuffer's color attachment and then blitting to it.

Maybe in the future we can change this to glCopyTextureSubImage which only requires GL_ARB_direct_state_access.
2018-06-06 23:25:24 -05:00
bunnei 80cdb05930 Merge pull request #539 from bunnei/f2f-rounding
gl_shader_decompiler: F2F: Implement rounding modes.
2018-06-07 00:10:09 -04:00
bunnei dc43864d0a Merge pull request #503 from mailwl/nfp-stubs
Service/nfp:user : stub some functions.
2018-06-06 22:36:53 -04:00
bunnei 1586ee87ae gl_shader_decompiler: F2F: Implement rounding modes. 2018-06-06 22:21:29 -04:00
bunnei 738888debe Merge pull request #537 from bunnei/misc-shader
gl_shader_decompiler: Additional decodings, remove unused stuff from TEX
2018-06-06 21:44:37 -04:00
bunnei b315b20e8d Merge pull request #535 from Subv/gpu_swizzle
GPU: Support changing the texture swizzles for Maxwell textures.
2018-06-06 21:39:47 -04:00
bunnei ec2cad04ef gl_shader_decompiler: Remove some attribute stuff that has nothing to do with TEX/TEXS. 2018-06-06 19:47:41 -04:00
bunnei 8160467a6d shader_bytecode: Add instruction decodings for BFE, IMNMX, and XMAD. 2018-06-06 19:47:34 -04:00
bunnei 16f739f695 gl_shader_decompiler: Implement ISETP_IMM instruction. 2018-06-06 19:45:58 -04:00
Subv d97b2711ac GPU: Support changing the texture swizzles for Maxwell textures. 2018-06-06 18:36:15 -05:00
Subv 23f87f342b GLState: Support changing the GL_TEXTURE_SWIZZLE parameter of each texture unit. 2018-06-06 18:36:13 -05:00
bunnei 1a47f755f3 Merge pull request #534 from Subv/multitexturing
GPU: Implement sampling multiple textures in the generated glsl shaders.
2018-06-06 19:12:52 -04:00
bunnei 8ff7558d0c gl_shader_decompiler: Implement LD_C instruction. 2018-06-06 18:09:06 -04:00
bunnei 802a4febed gl_shader_gen: Add uniform handling for indirect const buffer access. 2018-06-06 18:09:05 -04:00
bunnei dbdf703c20 gl_shader_decompiler: Refactor uniform handling to allow different decodings. 2018-06-06 17:57:15 -04:00
Subv 411f04b5a4 GPU: Implement sampling multiple textures in the generated glsl shaders.
All tested games that use a single texture show no regression.

Only Texture2D textures are supported right now, each shader gets its own "tex_fs/vs/gs" sampler array to maintain independent textures between shader stages, the textures themselves are reused if possible.
2018-06-06 12:58:16 -05:00
mailwl 829613e51c Stub IUser::AttachAvailabilityChangeEvent 2018-06-06 19:05:11 +03:00
greggameplayer 186abe2652 nvdrv/devices/nvidia_ctrl_gpu : add IoctlCommands with their params (#524)
* add IoctlCommands with their params in nvidia_ctrl_gpu.h

* add function related to the changes done previously

* fix clang-format

* delete trailing whitespace

* correct mistake
2018-06-06 08:31:17 -05:00
Sebastian Valle 9a03ab70a9 Merge pull request #529 from bunnei/am-nifm-stubs
Stub SetConnectionConfirmationOption, GetPseudoDeviceId
2018-06-06 08:29:12 -05:00
Sebastian Valle 6dccfac7ff Merge pull request #531 from bunnei/fix-shl
gl_shader_decompiler: Fix un/signed mismatch with SHL.
2018-06-06 08:28:42 -05:00
Sebastian Valle 820cd30074 Merge pull request #530 from bunnei/wrap-mirror
maxwell_to_gl: Implement WrapMode Mirror.
2018-06-06 08:28:27 -05:00
mailwl 9071812e94 Remove unused header files 2018-06-06 09:10:48 +03:00
bunnei ed2198bec9 Merge pull request #527 from Subv/rgba32f_texcopy
GPU: Allow the usage of RGBA32_FLOAT and RGBA16_FLOAT in the texture copy engine.
2018-06-06 00:24:13 -04:00
bunnei 98df70ed5f Merge pull request #528 from Subv/rg11b10f
GPU: Implemented the R11FG11FB10F texture and rendertarget formats.
2018-06-06 00:22:54 -04:00
Hedges 6c4b650ae7 GDB Stub Improvements (#508)
* GDB Stub should work now.

* Applied clang-format.

* Replaced htonll with swap64.

* Tidy up.
2018-06-06 00:20:47 -04:00
bunnei 3ab3dd166a gl_shader_decompiler: Fix un/signed mismatch with SHL. 2018-06-05 23:58:06 -04:00
bunnei 0f76311842 maxwell_to_gl: Implement WrapMode Mirror. 2018-06-05 23:56:45 -04:00
bunnei abad9d77d7 nifm: Stub out IRequest::SetConnectionConfirmationOption. 2018-06-05 23:54:13 -04:00
bunnei d240fb32da am: Stub out IApplicationFunctions::GetPseudoDeviceId. 2018-06-05 23:54:02 -04:00
Subv d91fc15ea4 GPU: Allow the usage of RGBA16_FLOAT in the texture copy engine. 2018-06-05 22:01:20 -05:00
Subv 1ab5441d54 GPU: Implemented the R11FG11FB10F texture and rendertarget formats. 2018-06-05 21:57:16 -05:00
Subv 484b63fe34 GPU: Fixed the compression factor for RGBA16F textures.
They're not compressed.
2018-06-05 21:55:17 -05:00
Subv f13edfd80b GPU: Allow the usage of RGBA32_FLOAT in the texture copy engine. 2018-06-05 21:07:40 -05:00
bunnei ddee657fc4 Merge pull request #516 from Subv/f2i_r
GPU: Implemented the F2I_R shader instruction.
2018-06-05 22:01:29 -04:00
bunnei f7e6573241 Merge pull request #521 from Subv/bra
GPU: Corrected the branch targets for the shader bra instruction.
2018-06-05 10:09:35 -04:00
bunnei 4ec9f8d6ae Merge pull request #520 from bunnei/shader-shl
gl_shader_decompiler: Implement SHL instruction.
2018-06-05 10:08:42 -04:00
mailwl 2870d37714 Small fixes 2018-06-05 15:34:01 +03:00
mailwl 7dee92618f Service/MM: add service and stub some functions 2018-06-05 12:19:29 +03:00
Subv 18d020ae81 GPU: Corrected the branch targets for the shader bra instruction. 2018-06-04 22:56:28 -05:00
Subv 1476b79308 GPU: Implemented the F2I_R shader instruction. 2018-06-04 22:06:50 -05:00
bunnei fdb75599cc Merge pull request #518 from Subv/incomplete_shaders
GPU: Implemented predicated exit instructions in the shader programs.
2018-06-04 22:43:46 -04:00
bunnei 732dd3fa03 gl_shader_decompiler: Fix typo with ISCADD instruction. 2018-06-04 22:41:10 -04:00
bunnei 3ffb26b0a6 gl_shader_decompiler: Implement SHL instruction. 2018-06-04 22:36:49 -04:00
bunnei d9b029ff99 gl_shader_decompiler: Implement PredCondition::NotEqual. 2018-06-04 22:00:47 -04:00
Subv 368be6ae32 GPU: Implement the ISCADD shader instructions. 2018-06-04 20:17:41 -05:00
Subv 4e153d2bd6 GPU: Added decodings for the ISCADD instructions. 2018-06-04 20:17:39 -05:00
bunnei 2321fe4ec7 Merge pull request #514 from Subv/lop32i
GPU: Implemented the LOP32I instruction.
2018-06-04 20:48:15 -04:00
bunnei 6dd400647a Merge pull request #510 from Subv/isetp
GPU: Implemented the ISETP_R and ISETP_C instructions
2018-06-04 20:47:11 -04:00
Subv aa486a9eb2 GPU: Implement predicated exit instructions in the shader programs. 2018-06-04 19:18:11 -05:00
Subv 9e1ef025cb GPU: Take into account predicated exits when performing shader control flow analysis. 2018-06-04 19:14:23 -05:00
bunnei 8279e1205d Merge pull request #512 from Subv/fset
GPU: Corrected the FSET and I2F instructions.
2018-06-04 19:04:20 -04:00
bunnei 71bbea4a0d Merge pull request #501 from Subv/shader_bra
GPU: Partially implemented the bra shader instruction
2018-06-04 18:31:07 -04:00
bunnei c26ae19983 Merge pull request #515 from Subv/viewport_fix
GPU: Calculate the correct viewport dimensions based on the scale and translate registers.
2018-06-04 18:11:36 -04:00
Subv 3e3e3274c7 GPU: Use the bf bit in FSET to determine whether to write 0xFFFFFFFF or 1.0f. 2018-06-04 16:41:28 -05:00
Subv 45a000239d GPU: Corrected the I2F_R implementation. 2018-06-04 16:41:27 -05:00
Subv a58a06a218 GPU: Calculate the correct viewport dimensions based on the scale and translate registers.
This is how nouveau calculates the viewport width and height. For some reason some games set 0xFFFF in the VIEWPORT_HORIZ and VIEWPORT_VERT registers, maybe those are a misnomer and actually refer to something else?
2018-06-04 16:36:54 -05:00
bunnei f1ddf6c1ee Merge pull request #490 from BreadFish64/extension-check
Add checks for OpenGL extension support
2018-06-04 16:13:55 -04:00
bunnei 460a2abe70 Merge pull request #513 from Subv/cache_alignment
GLCache: Corrected a mismatch between storing compressed sizes and verifying the uncompressed alignment in GetSurface.
2018-06-04 16:12:55 -04:00
greggameplayer 2de6a09da6 Nvdrv/devices/nvhost_gpu : Add some IoctlCommands with their params (#511)
* Add some IoctlCommand with their params to nvhost_gpu

* fix clang-format

* delete trailing whitespace

* fix some clang-format

* delete one other trailing whitespace

* last clang-format fix
2018-06-04 16:12:02 -04:00
Subv 7caec68586 GPU: Implemented the LOP32I instruction. 2018-06-04 13:56:31 -05:00
Subv a2117df8e6 GLCache: Corrected a mismatch between storing compressed sizes and verifying the uncompressed alignment in GetSurface. 2018-06-04 13:01:53 -05:00
BreadFish64 8a956adf8c sdl: add check for GL extension support 2018-06-04 12:26:41 -05:00
BreadFish64 a7e6cadc81 qt: add check for GL extension support 2018-06-04 12:26:30 -05:00
Subv 0e337430f5 GPU: Use explicit types when retrieving the uniform values for fsetp/fset and isetp instead of the type of an invalid output register. 2018-06-04 11:22:26 -05:00
Subv c330734536 GPU: Implemented the ISETP_R and ISETP_C shader instructions. 2018-06-04 11:12:03 -05:00
mailwl 0e922be408 Correct function results 2018-06-04 14:43:02 +03:00
mailwl 18798ad061 Service/nfp:user : stub some functions.
Used by Zelda: BoTW
2018-06-04 12:39:43 +03:00
bunnei b9e0c0495a am: Implement ILibraryAppletAccessor::PopOutData. 2018-06-03 23:44:23 -04:00
bunnei 6c8ab7e431 am: ISelfController:LaunchableEvent should be sticky. 2018-06-03 23:44:22 -04:00
bunnei 96b4c99a7a am: Stub out ILibraryAppletAccessor Start and GetResult methods. 2018-06-03 23:44:22 -04:00
bunnei 8691aa8cd7 Merge pull request #499 from bunnei/am-stuff
am: Implement CreateStorage, PushInData, etc.
2018-06-03 23:43:52 -04:00
Subv 54a12f1b84 GPU: Partially implemented the shader BRA instruction. 2018-06-03 22:26:36 -05:00
Subv d75c79b61a GPU: Added decoding for the BRA instruction. 2018-06-03 22:14:00 -05:00
bunnei 129f945c77 am: Implement ILibraryAppletAccessor::PushInData. 2018-06-03 22:10:06 -04:00
bunnei 43ce8b93f0 am: Implement IStorageAccessor::Write. 2018-06-03 22:10:06 -04:00
bunnei d29b7b48eb am: Cleanup IStorageAccessor::Read. 2018-06-03 22:10:06 -04:00
bunnei 1597b12861 am: Implement ILibraryAppletCreator::CreateStorage. 2018-06-03 22:10:05 -04:00
bunnei d7b6e69400 Merge pull request #500 from Subv/long_queries
GPU: Partial implementation of long GPU queries.
2018-06-03 21:24:50 -04:00
Subv 315e5e6cf3 GPU: Partial implementation of long GPU queries.
Long queries write a 128-bit result value to memory, which consists of a 64 bit query value and a 64 bit timestamp.

In this implementation, only select=Zero of the Crop unit is implemented, this writes the query sequence as a 64 bit value, and a 0u64 value for the timestamp, since we emulate an infinitely fast GPU.

This specific type was hwtested, but more rigorous tests should be performed in the future for the other types.
2018-06-03 19:17:31 -05:00
bunnei 94b620a89e gl_shader_decompiler: Implement TEXS component mask. 2018-06-03 12:08:17 -04:00
bunnei 2ceba3716b Merge pull request #494 from bunnei/shader-tex
gl_shader_decompiler: Implement TEX, fixes for TEXS.
2018-06-03 12:05:38 -04:00
bunnei 6edd4ebde8 Merge pull request #495 from bunnei/improve-rro
gl_shader_decompiler: Implement RRO as a register move.
2018-06-03 12:05:26 -04:00
bunnei a5360ee1b9 Merge pull request #484 from mailwl/nvhost-nvdec
Services/nvdrv: add '/dev/nvhost-nvdec' device
2018-06-03 11:18:00 -04:00
bunnei d673e26129 Merge pull request #496 from Subv/waitprocesswidekey_timeout
Kernel/Threads: A thread waking up by timeout from a WaitProcessWideKey may already have an assigned lock owner.
2018-06-03 11:15:49 -04:00
bunnei 76da1f526a gl_shader_decompiler: Implement RRO as a register move. 2018-06-03 11:14:31 -04:00
Subv dd9a1fd943 Kernel/Threads: A thread waking up by timeout from a WaitProcessWideKey may already have an assigned lock owner.
This situation may happen like so:
Thread 1 with low priority calls WaitProcessWideKey with timeout.
Thread 2 with high priority calls WaitProcessWideKey without timeout.
Thread 3 calls SignalProcessWideKey
- Thread 2 acquires the lock and awakens.
- Thread 1 can't acquire the lock and is put to sleep with the lock owner being Thread 2.
Thread 1's timeout expires, with the lock owner still being set to Thread 2.
2018-06-02 14:06:35 -05:00
Subv c00fc04a65 GPU: Implemented the DXN1 (BC4) texture format. 2018-06-02 13:17:09 -05:00
mailwl caf7d55de4 Service/time: implement posix time to calendar conversion 2018-06-01 09:40:28 +03:00
bunnei 20fa6379f6 gl_shader_decompiler: Implement TEX instruction. 2018-05-31 23:36:45 -04:00
bunnei fc2f5b93c3 gl_shader_decompiler: Support multi-destination for TEXS. 2018-05-31 22:57:32 -04:00
bunnei baf0b86ac3 Merge pull request #488 from Subv/thread_masks
Kernel/SVC: Corrected the behavior of svcSetThreadCoreMask for core values -2 and -3.
2018-05-31 18:22:18 -04:00
bunnei a8c1e58d23 gl_rasterizer_cache: Assert that component type is UNorm or format is RGBA16F. 2018-05-30 22:50:41 -04:00
Subv 2a690458b5 Kernel/Thread: Corrected a typo that caused the affinity mask to never be changed. 2018-05-30 21:36:29 -05:00
Subv 40c82fc9c5 Kernel/SVC: Support special core values -2 and -3 in svcSetThreadCoreMask.
Also added some proper error handling.
2018-05-30 21:36:29 -05:00
bunnei 995f57bbc1 gl_rasterizer_cache: Implement PixelFormat RGBA16F. 2018-05-30 22:24:07 -04:00
bunnei 4b027ee9f3 Merge pull request #489 from Subv/vertexid
Shaders: Implemented reading the gl_InstanceID and gl_VertexID variables in the vertex shader.
2018-05-30 14:10:48 -04:00
greggameplayer 339fd812b3 add IPC CommandType & Some HID FunctionInfo (#487)
* add some CommandType

* add some hid FunctionInfo

* add some other HID FunctionInfo

* delete non useful comments
2018-05-30 14:09:21 -04:00
Subv bcae826522 Kernel/Thread: Corrected a typo in an assert about the processor id. 2018-05-30 11:32:46 -05:00
Subv 455e14b8e3 Shaders: Implemented reading the gl_InstanceID and gl_VertexID variables in the vertex shader. 2018-05-30 10:58:03 -05:00
Sebastian Valle 016195f9a8 Merge pull request #483 from bunnei/sonic
Several GPU fixes to boot Sonic Mania
2018-05-30 07:31:46 -05:00
mailwl c333f12eae Services/nvdrv: add '/dev/nvhost-nvdec' device 2018-05-30 12:49:28 +03:00
bunnei c99c03fe38 gl_shader_decompiler: F2F_R instruction: Implement abs. 2018-05-29 23:52:54 -04:00
bunnei ed61b578d9 gl_shader_decompiler: Partially implement F2F_R instruction. 2018-05-29 23:10:44 -04:00
Subv 9631ae2fa4 GPU: Implemented the R8 texture format (0x1D) 2018-05-29 21:49:37 -05:00
bunnei 16a06abf97 nvhost_ctrl: Stub out IocCtrlEventRegister. 2018-05-29 22:39:31 -04:00
bunnei fb8aa21fa5 nvhost_ctrl: Stub out IocCtrlEventWaitAsyncCommand. 2018-05-29 22:35:41 -04:00
bunnei 29c345982a gl_rasterize_cache: Invert order of tex format RGB565. 2018-05-29 22:16:18 -04:00
bunnei 873a266a3d Merge pull request #480 from mailwl/bcat
Service/BCAT: add module and services
2018-05-29 19:45:23 -04:00
greggameplayer 4786f69570 add all the known TextureFormat (#474) 2018-05-28 19:26:17 -04:00
mailwl 3c612dea08 Service/BCAT: add module and services 2018-05-28 16:46:56 +03:00
bunnei 5653710cf8 Merge pull request #472 from bunnei/greater-equal
gl_shader_decompiler: Implement GetPredicateComparison GreaterEqual.
2018-05-27 12:14:30 -04:00
bunnei d24bc4edf8 Merge pull request #476 from Subv/a1bgr5
GPU: Implemented the A1B5G5R5 texture format (0x14)
2018-05-27 12:14:08 -04:00
bunnei 03938c6ea5 Merge pull request #475 from ogniK5377/nvos-getconfig
NvOsGetConfigU32 should return null instead of 0 for default output value
2018-05-27 12:10:07 -04:00
bunnei 8dcf608429 Merge pull request #473 from bunnei/get-display-version
am: Stub IApplicationFunctions GetDisplayVersion.
2018-05-27 12:00:32 -04:00
Subv 110515404c GPU: Implemented the A1B5G5R5 texture format (0x14) 2018-05-27 09:02:05 -05:00
David Marcec 003023a669 NvOsGetConfigU32 should return null instead of 0 for default output 2018-05-26 17:48:09 -07:00
bunnei 678ff27162 am: Stub IApplicationFunctions GetDisplayVersion. 2018-05-26 00:21:59 -04:00
bunnei 7bbda2a975 gl_shader_decompiler: Implement GetPredicateComparison GreaterEqual. 2018-05-25 23:21:29 -04:00
bunnei 502fc1c4b3 shader_bytecode: Implement other variants of FMNMX. 2018-05-25 23:18:50 -04:00
greggameplayer 4201782cea Add & correct miscellaneous things (#470)
* add some InfoType

* correct OpenApplicationProxy cmd number

* add IDisplayController functions

* fix clang-format

* add more system languages
2018-05-25 22:31:54 -04:00
bunnei 7ed3f94905 Merge pull request #466 from mailwl/nv-timeout
Stub NVGPU_IOCTL_CHANNEL_SET_TIMEOUT
2018-05-25 22:31:06 -04:00
David a89f219336 GetAudioRendererWorkBufferSize impl (#465)
* GetAudioRendererWorkBufferSize impl

Impl of GetAudioRendererWorkBufferSize based on RE, if this can be cleaned up, please contribute!

* Naming conventions

* Removed unneeded placeholder

* lioncache changes

* fixed const

* switched to Common::AlignUp
2018-05-25 22:30:02 -04:00
bunnei 68fffea7d2 Merge pull request #468 from Subv/compound_preds
Shader: Implemented compound predicates in the fset and fsetp instructions
2018-05-25 22:28:47 -04:00
bunnei b5695873aa Merge pull request #469 from Subv/channel_rebind
GPU: Allow command lists to rebind a channel to another engine in the middle of the command list.
2018-05-25 22:27:58 -04:00
Subv 8131e8cc3a Shader: Implemented compound predicates in fset.
You can specify a predicate in the fset instruction:

Result = ((Value1 Comp Value2) OP P0) ? 1.0 : 0.0;
2018-05-24 17:39:59 -05:00
David 7787653dad Stubbed NVGPU_GPU_IOCTL_ZBC_SET_TABLE (#463)
We have no clue on what this actually does yet so stubbing it since it's just input only should be fine for now
2018-05-24 18:36:12 -04:00
Subv 91f05992e4 GPU: Allow command lists to rebind a channel to another engine in the middle of the command list. 2018-05-24 17:32:46 -05:00
Subv 216d47b066 Shader: Implemented compound predicates in fsetp.
You can specify three predicates in an fsetp instruction:

P1 = (Value1 Comp Value2) OP P0;
P2 = !(Value1 Comp Value2) OP P0;
2018-05-24 17:22:36 -05:00
mailwl 2fd168729a Stub NVGPU_IOCTL_CHANNEL_SET_TIMEOUT
Used in Nintendo Labo ToyCon 1&2
2018-05-24 16:49:34 +03:00
bunnei cd93d74b16 yuzu_cmd: Fix project for latest msvc. 2018-05-23 21:51:49 -04:00
David Marcec 8ba0ecb303 Fix deadlocks caused from HID having too many layouts
Games such as SMO deadlock if we have more than 2 layouts
2018-05-23 16:00:25 -07:00
bunnei 8247c92a8e Merge pull request #460 from greggameplayer/patch-6
Add & correct some error modules
2018-05-23 17:13:18 -04:00
bunnei b28cea1cae Merge pull request #459 from greggameplayer/patch-5
Add ioctl commands with their params and size check
2018-05-23 17:12:56 -04:00
bunnei 11597c4ab2 Merge pull request #454 from Subv/signal_processwide
Kernel/SVC: Signal the highest priority threads first in svcSignalProcessWideKey
2018-05-23 10:28:23 -04:00
greggameplayer 90fa34e30c Add & correct some error modules 2018-05-23 14:22:42 +02:00
greggameplayer bace166b2b change some functions
according to the changes made previously
2018-05-23 14:09:24 +02:00
greggameplayer 7f5e8a533a correct placement and add size check 2018-05-23 12:34:42 +02:00
greggameplayer c4f1216df1 Add ioctl commands with their params and size check 2018-05-23 12:32:37 +02:00
David ccfff97269 Implemented NVHOST_IOCTL_CHANNEL_GET_WAITBASE (#440)
* Implemented NVHOST_IOCTL_CHANNEL_GET_WAITBASE

struct + 4 seems to be hard coded at 0 and struct + 0 seems to be ignored?

* IocGetWaitbase -> IocChannelGetWaitbaseCommand

* Added super late fixes
2018-05-22 17:41:19 -04:00
bunnei c19f27c0c1 Merge pull request #456 from Subv/unmap_buffer
Implemented nvhost-as-gpu's UnmapBuffer and nvmap's Free ioctls.
2018-05-20 23:54:50 -04:00
greggameplayer f79c96c560 Correct audio command numbers & add or rename some functions (#455)
* Add unknown function at the number command 2

* correct audout:u commands numbers

* correct audrec:u cmd number & add Unknown function

* correct IAudioDevice command numbers

* correct codecctl cmd numbers & rename the 8 function

* correct place of unknown function & fix clang-format
2018-05-20 23:48:44 -04:00
bunnei 613a6d661e Merge pull request #457 from Subv/mutex_waiters
Mutex: Do not assert when the mutex waiting threads list isn't empty on mutex release.
2018-05-20 23:44:44 -04:00
bunnei 6a1c36f801 Merge pull request #458 from Subv/fmnmx
Shaders: Implemented the FMNMX shader instruction.
2018-05-20 23:44:07 -04:00
bunnei 3b6d2ee8fb Merge pull request #445 from greggameplayer/patch-2
Properly rename functions of Fatal Module & add ThrowFatal to this module
2018-05-20 23:42:57 -04:00
Sebastian Valle 3cad22b393 Merge pull request #453 from Subv/thread_callstack
Qt/WaitTree: Display the callstack for each thread in the wait tree widget
2018-05-20 20:01:08 -05:00
Sebastian Valle 0d17e04b24 Merge pull request #452 from Subv/psetp
ShadersDecompiler: Added decoding for the PSETP instruction.
2018-05-20 20:00:55 -05:00
Sebastian Valle 11b51bc488 Merge pull request #451 from Subv/gl_array_size
GLRenderer: Remove unused vertex buffer and increase the size of the stream buffer to 128 MB.
2018-05-20 20:00:40 -05:00
Subv 12d6b53e60 Shaders: Implemented the FMNMX shader instruction. 2018-05-20 17:53:06 -05:00
Subv fe463e2a1c Mutex: Do not assert when the mutex waiting threads list isn't empty on mutex release.
A thread may own multiple mutexes at the same time, and only release one of them while other threads are waiting for the other mutexes.
2018-05-20 14:41:58 -05:00
Subv 722736e4c9 GPU: Implemented the nvmap Free ioctl.
It releases a reference to an nvmap object
2018-05-20 14:25:57 -05:00
Subv 9abfc3df7b GPU: Implemented nvhost-as-gpu's UnmapBuffer ioctl.
It removes a mapping previously created with the MapBufferEx ioctl.
2018-05-20 14:25:56 -05:00
Sebastian Valle 3125d9c69f Merge pull request #450 from Subv/shader_link_error
GLRenderer: Log the shader source code when program linking fails.
2018-05-20 12:57:32 -05:00
Sebastian Valle a8f75a0224 Merge pull request #443 from ogniK5377/ipc-500
Added IPC RequestWithContext & ControlWithContext
2018-05-19 17:03:30 -05:00
greggameplayer c97505ad44 Add and correct some Error Modules (#444)
* Add and correct some Error Modules
2018-05-19 17:02:24 -05:00
Subv e3e8902d40 Kernel/SVC: Signal the highest priority threads first in svcSignalProcessWideKey. 2018-05-19 16:58:30 -05:00
Subv 8ce8160ce3 Kernel/Threads: Reschedule the proper core when operating on that core's threads. 2018-05-19 16:57:44 -05:00
Subv 8935ca8e11 SVC: Removed unused WaitSynchronization1 function 2018-05-19 16:56:33 -05:00
Subv 5647fa35ff Qt/WaitTree: Display the callstack for each thread in the wait tree widget. 2018-05-19 16:52:49 -05:00
Subv 062b1fb17c ShadersDecompiler: Added decoding for the PSETP instruction. 2018-05-19 11:41:14 -05:00
Subv 1a6aabdb1f GLRenderer: Remove unused hw_vao_enabled_attributes variable. 2018-05-19 11:36:38 -05:00
Subv 891762da58 GLRenderer: Remove unused vertex buffer and increase the size of the stream buffer to 128 MB.
The stream buffer is where all the vertex data is copied, some games require this to be much bigger than the 4 MB we used to have.
2018-05-19 11:36:09 -05:00
Subv fe167421d1 GLRenderer: Log the shader source code when program linking fails. 2018-05-19 11:19:34 -05:00
greggameplayer 357c048a07 rename fatal:u functions & add ThrowFatal 2018-05-18 23:32:22 +02:00
greggameplayer 72725e1599 Properly update fatal.h void name 2018-05-18 23:30:56 +02:00
greggameplayer 63735e7339 Properly rename fatal module functions 2018-05-18 23:28:30 +02:00
David Marcec 75bd5bf8be Added RequestWithContext & ControlWithContext 2018-05-17 14:03:52 -07:00
Hexagon12 44797f150c Updated nfp with more service names 2018-05-13 13:08:58 +03:00
bunnei 60644b9655 Merge pull request #436 from bunnei/multi-core
Initial support for multi-core
2018-05-11 12:59:23 -04:00
David Marcec 3a41706e7f More accurate GetTPCMasks impl 2018-05-10 21:01:39 -07:00
bunnei 6136866f8e core: Add several missing docstrings. 2018-05-10 19:34:54 -04:00
bunnei ce7d89cb0e thread: Rename mask to affinity_masks. 2018-05-10 19:34:53 -04:00
bunnei 4b895995ab core: Run all CPU cores separately, even in single-thread mode. 2018-05-10 19:34:53 -04:00
bunnei d96be9b56b thread: Support core change on ResumeFromWait and improve ChangeCore. 2018-05-10 19:34:53 -04:00
bunnei eabfdfe4ec scheduler: Protect scheduling functions with a global mutex. 2018-05-10 19:34:52 -04:00
bunnei f006872017 wait_tree: Add ideal core and affinity mask. 2018-05-10 19:34:52 -04:00
bunnei 82bb8701ea thread: Initialize ideal_core and mask members. 2018-05-10 19:34:52 -04:00
bunnei 5a5850af69 threading: Reschedule only on cores that are necessary. 2018-05-10 19:34:52 -04:00
bunnei 9e559ceb09 svc: Implement GetThreadCoreMask and SetThreadCoreMask. 2018-05-10 19:34:51 -04:00
bunnei 922b5c326e thread: Implement ChangeCore function. 2018-05-10 19:34:50 -04:00
bunnei 7b6dd22605 svc: SignalProcessWideKey should apply to all cores. 2018-05-10 19:34:49 -04:00
bunnei 6c4f161ba2 svc: Implement GetCurrentProcessorNumber. 2018-05-10 19:34:49 -04:00
bunnei 26a22031aa wait_tree: Show all threads on all schedulers. 2018-05-10 19:34:48 -04:00
bunnei bbd273e7ce core: Add a configuration setting for use_multi_core. 2018-05-10 19:34:47 -04:00
bunnei 6eacbd693d core: Support session close with multicore. 2018-05-10 19:34:47 -04:00
bunnei 44c565aeca core: Implement multicore support. 2018-05-10 19:34:46 -04:00
bunnei fc8b0d9d2b core: Create a thread for each CPU core, keep in lock-step with a barrier. 2018-05-10 19:34:46 -04:00
bunnei 0867e78c8a core: Move common CPU core things to its own class. 2018-05-10 19:34:46 -04:00
Hexagon12 e37fc58ae6 Stubs for QLaunch (#428)
* Stubs for QLaunch

* Wiped unrelated stuff

* Addressed comment

* Dropped GetPopFromGeneralChannelEvent
2018-05-07 11:27:30 -04:00
Max Thomas a12f45de82 hid: Tweaks, Analog Sticks (#435)
* hid: Update mouse/keyboard state

* hid: Working analog sticks

* hid: Nits

* hid: Nits

* hid: Update mystery sections

* hid: Tweaks
2018-05-07 11:06:02 -04:00
bunnei 77c9b241ce Merge pull request #434 from lioncash/vdtor
memory_hook: Default virtual destructor in the cpp file
2018-05-03 15:09:14 -04:00
Lioncash f9b42fa139 memory_hook: Default virtual destructor in the cpp file
Prevents creating multiple copies of the vtable in every translation unit that uses the class.
Also silences a -Wweak-vtables warning
2018-05-03 08:12:16 -04:00
Lioncash 2403aef8e9 core_timing: Don't include the log header in core timing's header
Avoids propagating logging macros and facilities to files that may not need them.
This also allows hiding an internal constant.
2018-05-03 08:00:15 -04:00
bunnei 618cce3172 Merge pull request #431 from lioncash/fmt
general: Make formatting of logged hex values more straightforward
2018-05-02 15:24:41 -04:00
bunnei 7d3a42dccd Merge pull request #430 from lioncash/vec
vector_math: Ensure members are always initialized
2018-05-02 09:55:32 -04:00
Lioncash 1b310cbb3a general: Make formatting of logged hex values more straightforward
This makes the formatting expectations more obvious (e.g. any zero padding specified
is padding that's entirely dedicated to the value being printed, not any pretty-printing
that also gets tacked on).
2018-05-02 09:49:36 -04:00
bunnei 5e4d01f80c ipc: Add support for PopIpcInterface() method.
- This can be used for domain objects as inputs to service functions.
2018-05-01 21:57:44 -04:00
Lioncash 7bee2c9d13 vector_math: Ensure members are always initialized
Ensures that values are always in a well-defined state.
2018-05-01 21:25:25 -04:00
bunnei 6314eaaa8c Merge pull request #429 from Subv/ioctl_corruption
GPU: Don't write to invalid memory locations when handling ioctls that don't have an output.
2018-05-01 16:28:54 -04:00
David 3a3b58df8b GetSharedFontInOrderOfPriority (#381)
* GetSharedFontInOrderOfPriority

* Update pl_u.cpp

* Ability to use ReadBuffer and WriteBuffer with different buffer indexes, fixed up GetSharedFontInOrderOfPriority

* switched to NGLOG

* Update pl_u.cpp

* Update pl_u.cpp

* language_code is actually language code and not index

* u32->u64

* final cleanups
2018-05-01 16:28:36 -04:00
Subv a16f48e0d7 GPU: Don't write to invalid memory locations when handling ioctls that don't have an output. 2018-05-01 14:54:15 -05:00
Lioncash 3873211738 core_timing: Namespace all functions and constants in core_timing's header
All of these variables and functions are related to timings and should be within the namespace.
2018-04-30 03:32:59 -04:00
bunnei 2c2d114a15 Merge pull request #424 from lioncash/string
string_util: Remove StringFromFormat() and related functions
2018-04-29 21:49:13 -04:00
bunnei 37b67d8161 Merge pull request #422 from bunnei/shader-mov
Shader instructions MOV_C, MOV_R, and several minor GPU things
2018-04-29 21:47:42 -04:00
Lioncash d1e3e0eb42 string_util: Remove StringFromFormat() and related functions
Given we utilize fmt, we don't need to provide our own functions for formatting anymore
2018-04-29 18:52:33 -04:00
Lioncash 22b7e4fcf6 file_util: Make move constructor/assignment operator and related functions noexcept
Without this, it's possible to get compilation failures in the (rare) scenario where
a container is used to store a bunch of live IOFile instances, as they may be using
std::move_if_noexcept under the hood. Given these definitely don't throw exceptions
this is also not incorrect to add either.
2018-04-29 18:34:09 -04:00
Lioncash 1c77c732e6 file_util: Add static assertions to ReadBytes() and WriteBytes()
Ensure that the actual types being passed in are trivially copyable. The internal
call to ReadArray() and WriteArray() will always succeed, since they're passed a pointer to char*
which is always trivially copyable.
2018-04-29 18:24:12 -04:00
bunnei fc0fcbe9cc maxwell_3d: Reset vertex counts after drawing. 2018-04-29 16:23:31 -04:00
bunnei abb893aefe gl_shader_decompiler: Implement MOV_R. 2018-04-29 16:05:18 -04:00
bunnei d01e76720d maxwell_to_gl: Implement type SignedNorm, Size_8_8_8_8. 2018-04-29 16:05:17 -04:00
bunnei 1bd065fb8e shader_bytecode: Add decoding for FMNMX instruction. 2018-04-29 16:05:17 -04:00
Subv 87389ce295 Shaders: Implemented predicate condition 3 (LessEqual) in the fset and fsetp instructions. 2018-04-29 12:49:41 -05:00
bunnei 0ee1a0e698 gl_shader_decompiler: Implement MOV_C. 2018-04-29 13:13:13 -04:00
bunnei 91e7d1deb2 Merge pull request #416 from bunnei/shader-ints-p3
gl_shader_decompiler: Implement MOV32I, partially implement I2I, I2F
2018-04-29 12:56:16 -04:00
bunnei ef8fed3d3a Merge pull request #417 from bunnei/lang-codes
set/am: Fix code for getting language codes
2018-04-29 12:55:43 -04:00
bunnei 5f2d36726c am: Fix GetDesiredLanguage implementation. 2018-04-29 11:07:07 -04:00
bunnei dea2d271a9 set: Fix GetAvailableLanguageCodes implementation. 2018-04-29 11:07:06 -04:00
bunnei f2da134385 fermi_2d: Fix surface copy block height. 2018-04-28 20:40:03 -04:00
bunnei aaa3d91e7c gl_shader_decompiler: Partially implement I2I_R, and I2F_R. 2018-04-28 20:03:19 -04:00
bunnei 327e24bb8f gl_shader_decompiler: More cleanups, etc. with how we handle register types. 2018-04-28 20:03:19 -04:00
bunnei 543d4a680f GLSLRegister: Simplify register declarations, etc. 2018-04-28 20:03:19 -04:00
bunnei 8c6970d20d shader_bytecode: Add decodings for i2i instructions. 2018-04-28 20:03:18 -04:00
bunnei f252169fa6 gl_shader_decompiler: Implement MOV32_IMM instruction. 2018-04-28 20:03:18 -04:00
Lioncash 5155b90870 file_util: Remove compiler version checks around is_trivially_copyable()
The minimum clang/GCC versions we support already support this. We can also
remove is_standard_layout(), as fread and fwrite only require the type to be
trivially copyable.
2018-04-28 15:31:23 -04:00
Lioncash ea0bac3599 log: Remove old logging macros and functions
Now that the old macros are no longer used, we can remove all functionality related to them.
2018-04-27 16:18:34 -04:00
bunnei 87617c3eb8 Merge pull request #408 from bunnei/shader-ints-p2
gl_shader_decompiler: Add GLSLRegisterManager class to track register state.
2018-04-27 16:06:09 -04:00
Lioncash cfd0e7f2d9 renderer_opengl: Replace usages of LOG_GENERIC with fmt-capable equivalents 2018-04-27 12:09:35 -04:00
Lioncash 44d2f427d4 core: Replace usages of LOG_GENERIC with new fmt-capable equivalents 2018-04-27 11:57:52 -04:00
bunnei 2dbd239ed5 gl_shader_decompiler: Add GLSLRegisterManager class to track register state. 2018-04-27 11:49:26 -04:00
Lioncash 324ee31fc3 general: Convert assertion macros over to be fmt-compatible 2018-04-27 10:04:02 -04:00
bunnei 327fd2c31e Merge pull request #380 from ogniK5377/service-impl
Implemented some useful interfaces needed for games.
2018-04-27 00:49:40 -04:00
David Marcec 2810310018 Switched to NGLOG_WARNING 2018-04-26 20:03:12 -07:00
bunnei f838e665b8 Merge pull request #406 from lioncash/frontend
frontends: Move logging macros over to new fmt-capable ones
2018-04-26 22:53:42 -04:00
bunnei a5f551ff76 Merge pull request #407 from lioncash/common
common: Move logging macros over to new fmt-capable macros where applicable
2018-04-26 22:53:14 -04:00
Lioncash f4cc29c07c common: Move logging macros over to new fmt-capable macros where applicable 2018-04-26 20:09:58 -04:00
Lioncash ef3129bf7a frontends: Move logging macros over to new fmt-capable ones 2018-04-26 19:14:48 -04:00
Lioncash db4f7293fd input_common: Move old logging macros over to fmt-capable ones 2018-04-26 19:09:25 -04:00
bunnei dbf7f53899 Merge pull request #402 from lioncash/core
core: Replace remaining old non-generic logger usages with fmt-capable equivalents
2018-04-26 18:45:10 -04:00
bunnei 7fd3730e5a Merge pull request #399 from bunnei/shader-ints
Shader decompiler prep for integer instructions
2018-04-26 18:43:51 -04:00
David Marcec a210abc3c1 Merge branch 'master' of https://github.com/yuzu-emu/yuzu into service-impl 2018-04-26 14:28:54 -07:00
David Marcec 6f6cac9366 Added PREPO to logging backend, Removed comments from SaveReportWithUser 2018-04-26 14:19:34 -07:00
Lioncash 0a1e044322 core: Replace remaining old non-generic logger usages with fmt-capable equivalents
LOG_GENERIC usages will be amended in a follow-up to keep API changes separate from
interface changes, as it will require removing a parameter from the relevant function
in the VMManager class.
2018-04-26 15:37:16 -04:00
Lioncash 67e3bb3e87 common: Remove chunk_file.h and linear_disk_cache.h
These are unused (and given chunk_file references Dolphin's >SVN< I doubt they were going to be used).
2018-04-26 14:59:32 -04:00
bunnei 8e661859a8 gl_shader_decompiler: Boilerplate for handling integer instructions. 2018-04-26 14:38:42 -04:00
bunnei 02771faf4e gl_shader_decompiler: Move color output to EXIT instruction. 2018-04-26 14:38:41 -04:00
Lioncash 6d0f299ed9 core/gdbstub: Move logging macros to new fmt-compatible ones 2018-04-26 12:04:50 -04:00
Lioncash ca674a999b core/hw: Move logging macros over to fmt-capable ones 2018-04-26 09:32:45 -04:00
bunnei 3de43829ee Merge pull request #396 from Subv/shader_ops
Shaders: Implemented the FSET instruction.
2018-04-25 22:42:54 -04:00
bunnei 903505ed5f Merge pull request #398 from lioncash/kernel
kernel: Migrate logging macros to fmt-compatible ones
2018-04-25 22:42:34 -04:00
bunnei 9176319a5c Merge pull request #387 from Subv/maxwell_2d
GPU: Partially implemented the 2D surface copy engine
2018-04-25 20:40:17 -04:00
bunnei d64b6bca07 Merge pull request #395 from lioncash/file-sys
file-sys: Move logging macros over to the new fmt-capable ones
2018-04-25 20:39:08 -04:00
Lioncash 871e6c0041 kernel/shared_memory: Remove unnecessary semicolon at end of ConvertPermissions()
Functions don't need to be terminated by semicolons.
2018-04-25 20:32:16 -04:00
Lioncash bd9414dd31 kernel: Migrate logging macros to fmt-compatible ones 2018-04-25 20:32:09 -04:00
bunnei 50a4a480f0 Merge pull request #390 from mailwl/pctl-module
Service/PCTL: convert to module, add services, stub
2018-04-25 15:51:43 -04:00
bunnei baca4ecfa1 Merge pull request #397 from lioncash/core
core/memory: Move logging macros over to the new fmt-capable ones
2018-04-25 15:25:03 -04:00
Subv 0c04a308d1 GPU: Partially implemented the Fermi2D surface copy operation.
The hardware allows for some rather complicated operations to be performed on the data during the copy, this is not implemented.
Only same-format same-size raw copies are implemented for now.
2018-04-25 12:54:26 -05:00
Subv 1755d4bec3 Shaders: Added bit decodings for the I2I instruction. 2018-04-25 12:52:55 -05:00
Subv e02112db16 Shaders: Implemented the FSET instruction.
This instruction is similar to the FSETP instruction, but it doesn't set a predicate, it sets the destination register to 1.0 if the condition holds, and 0 otherwise.
2018-04-25 12:52:32 -05:00
Subv 6418127891 Memory: Added a missing shortcut for Memory::CopyBlock for the current process. 2018-04-25 11:55:30 -05:00
Subv 634620b502 GPU: Make the Textures::CopySwizzledData function accessible from the outside of the file. 2018-04-25 11:55:30 -05:00
Subv 284aad1420 GPU: Added a function to retrieve the bytes per pixel of the render target formats. 2018-04-25 11:55:29 -05:00
Subv bbb15541aa GPU: Added surface copy registers to Fermi2D 2018-04-25 11:55:29 -05:00
Subv b0b75e7ae4 GPU: Added boilerplate code for the Fermi2D engine 2018-04-25 11:55:29 -05:00
Subv 94d0d499c3 GPU: Reduce the number of registers of Maxwell3D to 0xE00.
The rest are just macro shim registers.
2018-04-25 11:55:28 -05:00
Subv 219b5d34e7 GPU: Move the Maxwell3D macro uploading code to the inside of the Maxwell3D processor.
It doesn't belong in the PFIFO handler.
2018-04-25 11:55:27 -05:00
Subv f42b93399f GPU: Corrected the upper bound of the PFIFO method ids in the command processor. 2018-04-25 11:53:54 -05:00
Lioncash 1cd301f2c0 file-sys: convert a StringFromFormat call into fmt::format in GetFullPath()
Lessens the amount to read and gets rid of the PRIX64 macro, allowing us to use a single string
for the whole path, making it easier to read.
2018-04-25 12:35:37 -04:00
Lioncash a1dc050bbf file-sys: Move logging macros over to the new fmt-capable ones 2018-04-25 12:35:33 -04:00
Lioncash 796b5c727d core/memory: Amend address widths in asserts
Addresses are 64-bit, these formatting specifiers are simply holdovers from citra. Adjust them to be the correct width.
2018-04-25 12:17:26 -04:00
Lioncash 62e427d98f core/memory: Move logging macros over to new fmt-capable ones
While we're at it, correct addresses to print all 64 bits where applicable, which were holdovers from citra.
2018-04-25 12:16:33 -04:00
Lioncash f5bd2617a8 video-core: Move logging macros over to new fmt-capable ones 2018-04-25 09:13:57 -04:00
mailwl cf607e7fca Service/PCTL: convert to module, add services, stub
PCTL::CreateServiceWithoutInitialize and IParentalControlService::Initialize, required by Kirby Star Allies
2018-04-25 09:02:27 +03:00
Subv 74c89df1c8 Shaders: Added decodings for the FSET instructions. 2018-04-24 22:42:54 -05:00
bunnei 9add4dba81 Merge pull request #388 from bunnei/refactor-rasterizer-cache
Refactor rasterizer cache
2018-04-24 23:22:24 -04:00
bunnei bfb435c994 renderer_opengl: Use correct byte order for framebuffer pixel format ABGR8. 2018-04-24 22:31:46 -04:00
bunnei 1f14d07952 gl_rasterizer_cache: Use CHAR_BIT for bpp conversions instead of 8. 2018-04-24 22:31:46 -04:00
bunnei 931c447c84 gl_rasterizer_cache: Use GPU PAGE_BITS/SIZE, not CPU. 2018-04-24 22:31:46 -04:00
bunnei 4713ba7d9c gl_rasterizer_cache: Use new logger. 2018-04-24 22:31:46 -04:00
bunnei 197ea35d95 gl_rasterizer_cache: Add a function for finding framebuffer GPU address. 2018-04-24 22:31:46 -04:00
bunnei 640c943d34 gl_rasterizer_cache: Handle compressed texture sizes. 2018-04-24 22:31:46 -04:00
bunnei 31748079de gl_rasterizer_cache: Update to be based on GPU addresses, not CPU addresses. 2018-04-24 22:31:45 -04:00
Lioncash ff63e4d3fc loader: Move old logging macros over to new fmt-capable ones 2018-04-24 20:22:32 -04:00
bunnei 995cbfc15f memory_manager: Add implement CpuToGpuAddress. 2018-04-24 17:49:20 -04:00
bunnei b6bed8fd74 memory_manager: Make GpuToCpuAddress return an optional. 2018-04-24 17:49:19 -04:00
bunnei ebef12f037 memory_manager: Use GPUVAdddr, not PAddr, for GPU addresses. 2018-04-24 17:40:43 -04:00
bunnei dcd72b36ca Merge pull request #386 from Subv/gpu_query
GPU: Added asserts to our code for handling the QUERY_GET GPU command.
2018-04-24 16:13:51 -04:00
bunnei 2dd49a5bb2 Merge pull request #392 from lioncash/log
service: Move logging macros over to the new fmt-compatible ones
2018-04-24 14:13:54 -04:00
Lioncash b736a731c0 service: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:32 -04:00
Lioncash 448c7ad796 vi: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:31 -04:00
Lioncash 7505ea2612 time: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:31 -04:00
Lioncash 5077580ee7 ssl: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:31 -04:00
Lioncash 418cb174a9 spl: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:31 -04:00
Lioncash e70f5cb603 sockets: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:31 -04:00
Lioncash 3cac963a7d sm: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:31 -04:00
Lioncash f8fa781c10 set: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:30 -04:00
Lioncash e39e914cd0 pctl: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:30 -04:00
Lioncash 38f90ec51a nvflinger: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:30 -04:00
Lioncash 7303c11edc nvdrv: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:27 -04:00
Lioncash accaa498ad ns: Move logging macros over to new fmt-compatible ones 2018-04-24 12:00:56 -04:00
Lioncash 3fdc96e690 nifm: Move logging macros over to new fmt-compatible ones 2018-04-24 12:00:56 -04:00
Lioncash 60efd72a51 nfp: Move logging macros over to new fmt-compatible ones 2018-04-24 12:00:56 -04:00
Lioncash afe7828f4b lm: Move logging macros over to new fmt-compatible ones 2018-04-24 12:00:56 -04:00
Lioncash 0cbbb1c130 hid: Move logging macros over to new fmt-compatible ones 2018-04-24 12:00:56 -04:00
Lioncash 8b8125ba51 friend: Move logging macros over to new fmt-compatible ones 2018-04-24 12:00:56 -04:00
Lioncash 7995e92e19 filesystem: Move logging macros over to new fmt-compatible ones 2018-04-24 12:00:52 -04:00
Lioncash f6b2c3485b renderer_opengl: Silence a -Wdangling-else warning in DrawScreenTriangles() 2018-04-24 11:13:08 -04:00
Lioncash f9bdeea787 fatal: Move logging macros over to new fmt-compatible ones 2018-04-24 10:18:58 -04:00
Lioncash fcda46cec0 audio: Move logging macros over to new fmt-compatible ones 2018-04-24 10:18:09 -04:00
Lioncash 4e32d65b32 apm: Move logging macros over to new fmt-compatible ones 2018-04-24 10:16:03 -04:00
Lioncash 5052b17f84 aoc: Move logging macros over to new fmt-compatible ones 2018-04-24 10:14:52 -04:00
Lioncash ee02a551c5 am: Move logging macros over to new fmt-compatible ones 2018-04-24 10:14:11 -04:00
Lioncash d1ef0f83d7 acc: Move logging macros over to new fmt-compatible ones 2018-04-24 10:04:22 -04:00
mailwl 8fffc0962c Service/FS: implement IFileSystem::RenameFile 2018-04-24 10:56:05 +03:00
bunnei efe7989c16 Merge pull request #379 from Subv/multi_buffers
GPU: Support multiple enabled vertex arrays.
2018-04-24 01:09:02 -04:00
Subv 1eca798d8b GPU: Added asserts to our code for handling the QUERY_GET GPU command.
This is based on research from nouveau. Many things are currently unknown and will require hwtests in the future.
This commit also stubs QueryMode::Write2 to do the same as Write. Nouveau code treats them interchangeably, it is currently unknown what the difference is.
2018-04-23 17:06:57 -05:00
bunnei 5ff201a288 Merge pull request #370 from Subv/sync_primitives
Kernel: Reworked the new kernel synchronization primitives.
2018-04-23 16:33:00 -04:00
bunnei ac7b1f4aed Merge pull request #384 from Subv/nvhost-remap
Nvdrv/nvhost-as-gpu: Implemented the ioctl REMAP command.
2018-04-23 15:23:55 -04:00
bunnei 65d0d7ea69 Merge pull request #385 from Subv/unimpl_ioctls
Nvdrv: Assert when receiving an unimplemented ioctl in the nv* handlers.
2018-04-23 15:22:49 -04:00
bunnei dc5549a9b1 Merge pull request #383 from Subv/gpu_mmu
GPU: Make the GPU virtual memory manager use 16 page bits and 10 pagetable bits.
2018-04-23 14:00:52 -04:00
Subv 6be45c562f GPU: Support multiple enabled vertex arrays.
The vertex arrays will be copied to the stream buffer one after the other, and the attributes will be set using the ARB_vertex_attrib_binding extension.

yuzu now thus requires OpenGL 4.3 or the ARB_vertex_attrib_binding extension.
2018-04-23 11:34:50 -05:00
Subv 329bec6dbd Kernel: Implemented mutex priority inheritance.
Verified with a hwtest and implemented based on reverse engineering.

Thread A's priority will get bumped to the highest priority among all the threads that are waiting for a mutex that A holds.
Once A releases the mutex and ownership is transferred to B, A's priority will return to normal and B's priority will be bumped.
2018-04-23 11:23:44 -05:00
Subv e56ef284bb NvDrv/nvhost-as-gpu: Ensure that the object passed to MapBufferEx has already been allocated.
Also added a consistency check and a comment for the case when the object id is different than its handle. The real nvservices doesn't make a distinction between ids and handles, each object gets an unique handle which doubles as its id.
2018-04-23 11:21:46 -05:00
Subv c4131e271f Nvdrv/nvhost-as-gpu: Implemented the ioctl REMAP command.
It takes a previously-reserved (AllocateSpace) GPU memory address and maps it to the address of the nvmap object passed to Remap.
2018-04-23 11:21:46 -05:00
Subv 3c2b29e5c2 Nvdrv: Assert when receiving an unimplemented ioctl in the nv* handlers. 2018-04-23 11:13:53 -05:00
Subv fbc480d611 GPU: Make the GPU virtual memory manager use 16 page bits and 10 page table bits.
Also removed some dead code and added memory map consistency asserts.
2018-04-23 10:57:12 -05:00
Subv fa6edc4412 GPU: Implement the RGB10_A2 RenderTarget format, it will use the same format as the A2BGR10 texture format. 2018-04-23 10:50:28 -05:00
David Marcec 9591689dbc GetIUserInterface->CreateUserInterface, Added todos and stub logs. Playreport->PlayReport. 2018-04-22 19:02:18 -07:00
David 471eafc162 lioncash proposed changes 2018-04-22 00:07:55 -07:00
David Marcec 48334d0d6a Implemented GetIUserInterface properly, Playreport and SSL::SetInterfaceVersion. Fixed ipc issues with IAudioDevice(wrong ids) 2018-04-21 22:04:24 -07:00
Subv abd66a9a33 GPU: Implement the A2BGR10 texture format. 2018-04-21 17:32:25 -05:00
bunnei 0aae96830a Merge pull request #377 from adityaruplaha/sdl2-fullscreen
SDL2: Implement fullscreen. (Original PR: citra-emu/citra#3607)
2018-04-21 13:53:55 -04:00
adityaruplaha cd2aeb1046 SDL2: Implement fullscreen. (Original PR: citra-emu/citra#3607) 2018-04-21 13:24:33 +05:30
bunnei 1fe68fa427 Merge pull request #376 from bunnei/shader-decoder
Shader opcode decoding
2018-04-21 00:04:51 -04:00
bunnei 83ea05b814 Merge pull request #375 from lioncash/header
opengl: Remove unnecessary header inclusions
2018-04-20 23:08:47 -04:00
bunnei ff1700e261 gl_shader_decompiler: Skip RRO instruction. 2018-04-20 22:30:56 -04:00
bunnei 54fbbc6f26 gl_shader_decompiler: Cleanup error logging. 2018-04-20 22:30:56 -04:00
bunnei f66098bd37 shader_bytecode: Add several more instruction decodings. 2018-04-20 22:30:56 -04:00
bunnei d2302ee79f shader_bytecode: Decode instructions based on bit strings. 2018-04-20 22:30:56 -04:00
bunnei 806b2133e4 Merge pull request #369 from Subv/shader_instr2
ShaderGen: Implemented fsetp/kil and predicated instruction execution.
2018-04-20 22:29:39 -04:00
bunnei b29507b551 Merge pull request #374 from lioncash/noexcept
gl_resource_manager: Add missing noexcept specifiers to move constructors and assignment operators
2018-04-20 22:28:47 -04:00
bunnei b79cec4040 Merge pull request #373 from lioncash/enum2
gl_rasterizer_cache: Make MatchFlags an enum class
2018-04-20 22:28:09 -04:00
Subv 79e7bb8896 ShaderGen: Implemented the KIL instruction, which is equivalent to 'discard'. 2018-04-20 21:09:34 -05:00
Subv 2fbb91a6b6 ShaderGen: Implemented predicated instruction execution.
Each predicated instruction will be wrapped in an `if (predicate) { instruction_body; }` in the GLSL, where `predicate` is one of the predicate boolean variables previously set by fsetp.
2018-04-20 21:09:33 -05:00
Subv 31de416fc0 ShaderGen: Implemented the fsetp instruction.
Predicate variables are now added to the generated shader code in the form of 'pX' where X is the predicate id.
These predicate variables are initialized to false on shader startup and are set via the fsetp instructions.

TODO:

* Not all the comparison types are implemented.
* Only the single-predicate version is implemented.
2018-04-20 21:09:33 -05:00
Subv 4be07d1090 Kernel: Use 0x2C as default main thread priority for homebrew and lone NRO/NSOs 2018-04-20 21:04:35 -05:00
Subv 106d31e8c3 Qt: Update the WaitTree widget to show info about the current mutex of each thread. 2018-04-20 21:04:34 -05:00
Subv f5a2b1920b Kernel: Remove unused ConditionVariable class. 2018-04-20 21:04:33 -05:00
Subv e499b48f97 Kernel: Remove old and unused Mutex code. 2018-04-20 21:04:32 -05:00
Subv fcd7cbe65a Kernel: Properly implemented svcWaitProcessWideKey and svcSignalProcessWideKey
They work in tandem with guest code to provide synchronization primitives along with svcArbitrateLock/Unlock
2018-04-20 21:04:27 -05:00
Subv 4e47dd5b59 Kernel: Corrected the implementation of svcArbitrateLock and svcArbitrateUnlock.
Switch mutexes are no longer kernel objects, they are managed in userland and only use the kernel to handle the contention case.
Mutex addresses store a special flag value (0x40000000) to notify the guest code that there are still some threads waiting for the mutex to be released. This flag is updated when a thread calls ArbitrateUnlock.

TODO:
* Fix svcWaitProcessWideKey
* Fix svcSignalProcessWideKey
* Remove the Mutex class.
2018-04-20 21:04:25 -05:00
bunnei 4a972207d6 Merge pull request #372 from lioncash/enum
resource_limit: Make ResourceTypes an enum class
2018-04-20 21:26:54 -04:00
Lioncash c3ade6d56d opengl: Remove unnecessary header inclusions 2018-04-20 20:19:37 -04:00
Lioncash 3768508edf gl_resource_manager: Add missing noexcept specifiers to move constructors and assignment operators
Standard library containers may use std::move_if_noexcept to perform
move operations. If a move cannot be performed under these
circumstances, then a copy is attempted. Given we only intend for these
types to be move-only this can be somewhat problematic. By defining
these to be noexcept we prevent cases where copies may be attempted.
2018-04-20 20:04:00 -04:00
Lioncash f7eb0e8f1b gl_rasterizer_cache: Make MatchFlags an enum class
Prevents implicit conversions and scope pollution.
2018-04-20 19:50:05 -04:00
Lioncash 4bd499d440 core: Relocate g_service_manager to the System class
Converts the service manager from a global into an instance-based
variable.
2018-04-20 19:44:32 -04:00
Lioncash 5860b9f4ce resource_limit: Make ResourceTypes an enum class
Prevents enum identifiers from leaking into the surrounding scope.
2018-04-20 19:41:45 -04:00
bunnei 18e541f7e2 Merge pull request #340 from mailwl/vi-update
Service/VI: stub SetLayerVisibility, fix GetDisplayResolution output
2018-04-20 16:23:15 -04:00
Subv 601c5d9d93 ShaderGen: Register id 255 is special and is hardcoded to return 0 (SR_ZERO). 2018-04-20 14:57:40 -05:00
Subv 8b8f55d8be ShaderGen: Ignore the 'sched' instruction when generating shaders.
The 'sched' instruction has a very convoluted encoding, but fortunately it seems to only appear on a fixed interval (once every 4 instructions).
2018-04-20 14:57:40 -05:00
bunnei c2adb07b55 Merge pull request #367 from lioncash/clamp
math_util: Remove the Clamp() function
2018-04-20 14:18:03 -04:00
bunnei c5438e898e Merge pull request #361 from lioncash/common
common_types: Minor changes
2018-04-20 10:27:17 -04:00
Lioncash 043546e4db math_util: Remove the Clamp() function
C++17 adds clamp() to the standard library, so we can remove ours in
favor of it.
2018-04-20 10:14:13 -04:00
bunnei c3236a3a37 Merge pull request #360 from lioncash/namespaces
service: Use nested namespace specifiers where applicable
2018-04-20 09:44:40 -04:00
bunnei 7108f2c331 Merge pull request #364 from lioncash/thread-local
common/thread: Remove unnecessary feature checking for thread_local
2018-04-20 09:43:52 -04:00
bunnei d7a69c96e4 Merge pull request #362 from lioncash/snprintf
common_funcs: Remove check for VS versions that we don't even support
2018-04-20 09:43:30 -04:00
bunnei e325ef7f09 Merge pull request #363 from lioncash/array-size
common_funcs: Remove ARRAY_SIZE macro
2018-04-20 09:43:02 -04:00
bunnei e0681a4da5 Merge pull request #366 from lioncash/vec
vector_math: Remove AsArray() and Write() functions from Vec[2,3,4]
2018-04-20 09:42:41 -04:00
bunnei 684f6619e5 Merge pull request #365 from lioncash/codeblock
common: Remove code_block.h
2018-04-20 09:42:15 -04:00
Lioncash bd4e50afb9 vector_math: Remove AsArray() and Write() functions from Vec[2,3,4]
These are all unused and the Write() ones should arguably not even be in the interface. There are better ways to provide this if we ever need it (like iterators).
2018-04-19 22:58:24 -04:00
Lioncash 4e99ac0553 common: Remove code_block.h
We use dynarmic, so this is unued. Anything else we need will likely use Xbyak, so
this header isn't necessary any more.
2018-04-19 22:47:02 -04:00
Lioncash 9d21769d88 common/thread: Remove unnecessary feature checking for thread_local
Every compiler we require already supports it.
2018-04-19 22:41:18 -04:00
Lioncash c9f5ae4fcc common_funcs: Remove ARRAY_SIZE macro
C++17 has non-member size() which we can just call where necessary.
2018-04-19 22:36:52 -04:00
Lioncash 4b0e4421f4 common_funcs: Remove check for VS versions that we don't even support
We don't support any VS versions that don't already have snprintf in the
standard library implementation.
2018-04-19 22:28:56 -04:00
Lioncash 0f07311af3 common_types: Convert typedefs to using aliases
May as well while we're making changes to this file.
2018-04-19 22:26:35 -04:00
Lioncash ad470a1478 common_types: Remove unnecessary check for whether or not__func__ is defined
VS has supported this for quite a while.
2018-04-19 22:25:19 -04:00
Lioncash 6d94dd21a5 service: Use nested namespace specifiers where applicable
Tidies up namespace declarations
2018-04-19 22:20:28 -04:00
bunnei c15d6f84c0 Merge pull request #357 from lioncash/guard
renderer_opengl: Add missing header guards
2018-04-19 22:17:25 -04:00
bunnei be3ab93feb Merge pull request #358 from lioncash/explicit
disk_filesystem: Minor changes
2018-04-19 22:16:55 -04:00
Lioncash 59a504d933 vi: Remove redundant initializers in the constructors 2018-04-19 21:34:36 -04:00
Lioncash 5b8891df28 disk_filesystem: Remove unused total_entries_in_directory member from Disk_Directory 2018-04-19 21:28:56 -04:00
Lioncash eb2bb5500e disk_filesystem: Remove redundant initializer in Disk_Directory's constructor 2018-04-19 21:28:07 -04:00
Lioncash 19fe9a92ec disk_filesystem: Make constructors explicit where applicable 2018-04-19 21:27:43 -04:00
Lioncash 8594945844 renderer_opengl: Add missing header guards 2018-04-19 21:13:59 -04:00
bunnei fd50308f39 Merge pull request #356 from lioncash/shader
glsl_shader_decompiler: Minor API changes to ShaderWriter
2018-04-19 21:09:25 -04:00
bunnei c0e412d97c Merge pull request #355 from Subv/shader_instr
ShaderGen: Fixed TEXS overriding its own texcoords and implemented fmul32i
2018-04-19 21:09:02 -04:00
Lioncash 2259f5d56b glsl_shader_decompiler: Use std::string_view instead of std::string for AddLine()
This function doesn't need to take ownership of the string data being
given to it, considering all we do is append the characters to the
internal string instance.

Instead, use a string view to simply reference the string data without
any potential heap allocation.

Now anything that is a raw const char* won't need to be converted to a
std::string before appending.
2018-04-19 20:12:58 -04:00
Lioncash 55fef54f2e glsl_shader_decompiler: Add AddNewLine() function to ShaderWriter
Avoids constructing a std::string just to append a newline character
2018-04-19 20:09:27 -04:00
Lioncash 5a3da4f1a1 glsl_shader_decompiler: Add char overload for ShaderWriter's AddLine()
Avoids constructing a std::string just to append a character.
2018-04-19 20:04:09 -04:00
Lioncash 21fa39b4f6 glsl_shader_decompiler: Append indentation without constructing a separate std::string
The interface of std::string already lets us append N copies of a
character to an existing string.
2018-04-19 19:59:25 -04:00
Subv 4ca65f10b1 ShaderGen: Implemented the fmul32i shader instruction. 2018-04-19 13:46:32 -05:00
Subv 887db586be ShaderGen: Fixed a case where the TEXS instruction would use the same registers for the input and the output.
It will now save the coords before writing the outputs in a subscope.
2018-04-19 13:33:17 -05:00
N00byKing f2001a33cc Implement Pull #3528 from citra: use nvidia graphics automatically on laptops with optimus (with AMD support) (#271)
* Port 3528: use nvidia graphics automatically on laptops with optimus

* Force dedicated AMD Card for switchable Graphics

* Ran clang-format
2018-04-19 12:22:26 -06:00
James Rowe 60024d54b0 Merge pull request #352 from bunnei/fix-microprofile
nvflinger: Call MicroProfileFlip on NVFlinger::Compose.
2018-04-19 12:18:47 -06:00
Subv 37f782e1b7 GPU: Add support for the DXT23 and DXT45 compressed texture formats. 2018-04-18 20:48:53 -05:00
bunnei b17664dfa9 nvflinger: Call MicroProfileFlip on NVFlinger::Compose. 2018-04-18 20:28:50 -04:00
bunnei 0cdd457b01 Merge pull request #351 from Subv/tex_formats
GPU: Implemented the B5G6R5 format.
2018-04-18 20:20:51 -04:00
Subv e9f62cb1bb GPU: Implemented the B5G6R5 format. 2018-04-18 18:16:45 -05:00
bunnei e8cc5900a6 gl_shader_gen: Support vertical/horizontal viewport flipping. (#347)
* gl_shader_gen: Support vertical/horizontal viewport flipping.

* fixup! gl_shader_gen: Support vertical/horizontal viewport flipping.
2018-04-18 16:42:40 -04:00
Subv d98275cde1 GLCache: Added boilerplate code to make supporting configurable texture component types.
For now only the UNORM type is supported.
2018-04-18 14:17:28 -05:00
Subv e6991c57e5 GLCache: Unify texture and framebuffer formats when converting to OpenGL. 2018-04-18 14:17:28 -05:00
Subv d088a95097 GPU: Texture format 8 and framebuffer format 0xD5 are actually ABGR8. 2018-04-18 14:17:27 -05:00
Subv 19a0e7e141 GPU: Pitch textures are now supported, don't assert when encountering them. 2018-04-18 12:52:53 -05:00
Subv fecaeb8ae6 GLCache: Take into account the texture's block height when caching and unswizzling. 2018-04-18 12:52:53 -05:00
Subv 19e0d8ca24 GLCache: Added a function to convert cached PixelFormats back to texture formats.
TODO: The way we handle cached formats must change, framebuffer and texture formats are too different to keep them in the same place.
2018-04-18 12:52:52 -05:00
Subv 102251cb37 GPU: Allow using a configurable block height when unswizzling textures. 2018-04-18 12:52:51 -05:00
Subv 67c9964675 GPU/TIC: Added the pitch and block height fields to the TIC structure. 2018-04-18 11:38:39 -05:00
bunnei b651578582 Merge pull request #346 from bunnei/misc-gpu-improvements
Misc gpu improvements
2018-04-17 22:17:07 -04:00
bunnei 0a119bf39b Merge pull request #344 from bunnei/shader-decompiler-p2
Shader decompiler changes part 2
2018-04-17 22:10:53 -04:00
bunnei ed447c8786 gl_rasterizer_cache: Add missing LOG statements. 2018-04-17 21:44:36 -04:00
bunnei d4dcd3e720 texture: Add missing formats. 2018-04-17 21:41:36 -04:00
bunnei 848ade06d5 gpu: Add several framebuffer formats to RenderTargetFormat. 2018-04-17 21:40:38 -04:00
bunnei de84b74dd4 maxwell3d: Allow Texture2DNoMipmap as Texture2D. 2018-04-17 21:39:15 -04:00
bunnei 797267eb58 shader_bytecode: Make ctor's constexpr and explicit. 2018-04-17 21:27:07 -04:00
bunnei 4d9c441bef renderer_opengl: Implement BlendEquation and BlendFunc. 2018-04-17 18:11:48 -04:00
bunnei 33a0dddf78 bit_field: Remove is_pod check, add is_trivially_copyable_v. 2018-04-17 18:00:18 -04:00
bunnei 48ab22ff76 gl_shader_decompiler: Fix warnings with MarkAsUsed. 2018-04-17 16:36:44 -04:00
bunnei 7ad31d2667 gl_shader_decompiler: Cleanup logging, updating to NGLOG_*. 2018-04-17 16:36:44 -04:00
bunnei 29ab89054d gl_shader_decompiler: Implement several MUFU subops and abs_d. 2018-04-17 16:36:43 -04:00
bunnei 93388e3c6b gl_shader_decompiler: Fix swizzle in GetRegister. 2018-04-17 16:36:42 -04:00
bunnei c1408040a6 gl_shader_decompiler: Implement FMUL/FADD/FFMA immediate instructions. 2018-04-17 16:36:42 -04:00
bunnei dbf1fb7e61 gl_shader_decompiler: Allow vertex position to be used in fragment shader. 2018-04-17 16:36:40 -04:00
bunnei 7fe43996de gl_shader_decompiler: Implement IPA instruction. 2018-04-17 16:36:39 -04:00
bunnei 05305422e1 gl_shader_decompiler: Add support for TEXS instruction. 2018-04-17 16:36:38 -04:00
bunnei 69f5eadc2b gl_shader_decompiler: Use fragment output color for GPR 0-3. 2018-04-17 15:25:54 -04:00
bunnei fdca99c4fb gl_shader_decompiler: Partially implement MUFU. 2018-04-17 15:25:54 -04:00
bunnei 0f02c41f18 Merge pull request #341 from shinyquagsire23/pfs-hfs-impl
file_sys: Add HFS/PFS helper component
2018-04-17 14:39:20 -04:00
mailwl 59077b7d07 Service/VI: stub SetLayerVisibility, fix GetDisplayResolution output
both SetLayerVisibility() functions used in Lego games, GetDisplayResolution()
fixed according switchbrew.org
2018-04-17 19:42:14 +03:00
bunnei 09122ee37d Merge pull request #343 from Subv/tex_wrap_4
GPU: Implement some wrap modes
2018-04-17 12:25:24 -04:00
shinyquagsire23 5634f49b60 file_sys: Use NGLOG 2018-04-17 09:55:29 -06:00
Hexagon12 4c462c91bd Various service name fixes - part 2 (rebased) (#322)
* Updated ACC with more service names

* Updated SVC with more service names

* Updated set with more service names

* Updated sockets with more service names

* Updated SPL with more service names

* Updated time with more service names

* Updated vi with more service names
2018-04-17 11:37:43 -04:00
Subv d388e8e8f9 MaxwellToGL: Implemented tex wrap mode 1 (Wrap, GL_REPEAT). 2018-04-17 10:17:18 -05:00
Subv b5fdd197b2 MaxwellToGL: Added a TODO and partial implementation of maxwell wrap mode 4 (Clamp, GL_CLAMP).
This clamp mode was removed from OpenGL as of 3.1, we can emulate it by using GL_CLAMP_TO_BORDER to get the border color of the texture, and then manually sampling the edge to mix them in the fragment shader.
2018-04-17 10:16:50 -05:00
bunnei ad8a27a7b3 gl_rendering: Use NGLOG* for changed code. 2018-04-16 21:23:28 -04:00
bunnei 65092bf8d8 gl_rasterizer: Implement indexed vertex mode. 2018-04-16 21:10:15 -04:00
shinyquagsire23 13ab489cb7 file_sys: tweaks 2018-04-16 06:51:59 -06:00
shinyquagsire23 bba0a351e7 file_sys: Add HFS/PFS helper component 2018-04-16 04:36:25 -06:00
bunnei 03ee087c5e Merge pull request #338 from bunnei/unrequire-shared-font
pl_u: Use empty shared font if none is available.
2018-04-15 16:54:36 -04:00
bunnei 2ff824c992 Merge pull request #337 from Subv/used_buffers
GPU: Don't use explicit binding points when uploading the constbuffers to opengl
2018-04-15 16:30:57 -04:00
bunnei f6ba44429e pl_u: Use empty shared font if none is available.
- Makes games work in lieu of shared_font.bin.
2018-04-15 16:15:34 -04:00
Subv ea9f5538c2 GPU: Use the same buffer names in the generated GLSL and the buffer uploading code. 2018-04-15 15:02:50 -05:00
Subv d8fdbefef6 GPU: Don't use explicit binding points when uploading the constbuffers to opengl.
The bindpoints will now be dynamically calculated based on the number of buffers used by the previous shader stage.
2018-04-15 14:14:57 -05:00
bunnei 3a6dc1e0e4 Merge pull request #335 from bunnei/delete-file
fsp_srv: Implement DeleteFile.
2018-04-15 15:13:02 -04:00
bunnei dc852fda3b fsp_srv: Implement DeleteFile.
- Used by Binding of Isaac.
2018-04-15 13:15:18 -04:00
Subv 1a31997264 GPU: Don't use GetPointer when uploading the constbuffer data to the GPU. 2018-04-15 11:18:09 -05:00
Subv ffdc9e716d GPU: Use the buffer hints from the shader decompiler to upload only the necessary const buffers for each shader stage. 2018-04-15 11:15:54 -05:00
bunnei 595d37d69a shaders: Expose hints about used const buffers. 2018-04-15 11:50:10 -04:00
Subv 03cbd8f20f GPU: Upload the entirety of each constbuffer for each shader stage as SSBOs.
We're going to need the shader generator to give us a mapping of the actual used const buffers to properly bind them to the shader.
2018-04-14 23:02:05 -05:00
Subv ea730b69d1 GPU: Allow configuring ssbos in the opengl state manager. 2018-04-14 22:54:23 -05:00
Subv e14e38fe0e GPU: Added a function to determine whether a shader stage is enabled or not. 2018-04-14 22:54:23 -05:00
bunnei 1a1008a642 Merge pull request #332 from bunnei/fix-total-mem-usage
vm_manager: Increase GetTotalMemoryUsage value.
2018-04-14 22:29:19 -04:00
bunnei 3260473ce8 vm_manager: Increase GetTotalMemoryUsage value.
- Gets Binding of Isaac running.
2018-04-14 22:04:10 -04:00
bunnei f23d61a709 Merge pull request #327 from adityaruplaha/fullscreen-fix
Fix the stuck in fullscreen bug
2018-04-14 21:24:36 -04:00
bunnei a2dcd3cbbc Merge pull request #331 from bunnei/fsp-flush
fsp_srv: Implement IFile::Flush.
2018-04-14 21:21:34 -04:00
bunnei 28c0641382 fsp_srv: Implement IFile::Flush. 2018-04-14 19:46:09 -04:00
bunnei 538322ec1f shaders: Add NumTextureSamplers const, remove unused #pragma. 2018-04-14 18:50:06 -04:00
bunnei f48c229f0e shaders: Address PR review feedback. 2018-04-14 16:01:41 -04:00
bunnei 2fcae0000f gl_shader_decompiler: Cleanup log statements. 2018-04-14 16:01:41 -04:00
bunnei 47bf0b0094 shaders: Fix GCC and clang build issues. 2018-04-14 16:01:40 -04:00
bunnei d166a50ded gl_shader_decompiler: Implement negate, abs, etc. and lots of cleanup. 2018-04-14 16:01:40 -04:00
bunnei a859a70da1 shader_bytecode: Add FSETP and KIL to GetInfo. 2018-04-14 16:01:40 -04:00
bunnei 6fe96737a1 shader_bytecode: Add SubOp decoding. 2018-04-14 16:01:40 -04:00
bunnei a5728bdd10 gl_shader_decompiler: Add shader stage hint. 2018-04-14 16:01:39 -04:00
bunnei e3628ec6fd renderer_opengl: Fix Morton copy byteswap, etc. 2018-04-14 16:01:39 -04:00
adityaruplaha 4716115c3d Fix the stuck in fullscreen bug (Original PR: citra-emu/citra#3611) 2018-04-14 16:41:56 +05:30
bunnei 1962aac7a0 gl_shader_manager: Implement SetShaderSamplerBindings. 2018-04-13 23:48:30 -04:00
bunnei 1a3dbd49ef gl_rasterizer: Generate shaders and upload uniforms. 2018-04-13 23:48:29 -04:00
bunnei 8df3222eb3 gl_shader_decompiler: Basic impl. for very simple vertex shaders.
- Tested with Puyo Puyo Tetris and Cave Story+
2018-04-13 23:48:28 -04:00
bunnei f11b2888c9 gl_shader_manager: Cleanup and consolidate uniform handling. 2018-04-13 23:48:28 -04:00
bunnei 7e7f053ea7 maxwell_3d: Make memory_manager public. 2018-04-13 23:48:27 -04:00
bunnei 4e961244a8 maxwell_3d: Fix shader_config decodings. 2018-04-13 23:48:26 -04:00
bunnei 2452d127dc gl_rasterizer: Use shader program manager, remove test shader. 2018-04-13 23:48:26 -04:00
bunnei f9c4e515d8 renderer_opengl: Add gl_shader_manager class. 2018-04-13 23:48:25 -04:00
bunnei 9e32fa6bb2 maxwell_to_gl: Add a few types, etc. 2018-04-13 23:48:24 -04:00
bunnei 7cebff07e4 gl_shader_gen: Add hashable setup/config structs. 2018-04-13 23:48:23 -04:00
bunnei 1aa7a9ae50 gl_shader_util: Add missing includes. 2018-04-13 23:48:23 -04:00
bunnei c30c48e052 common: Port cityhash code from Citra. 2018-04-13 23:48:22 -04:00
bunnei f1915d909e renderer_opengl: Use OGLProgram instead of OGLShader. 2018-04-13 23:48:21 -04:00
bunnei 56ee41ebe8 gl_shader_util: Grab latest upstream. 2018-04-13 23:48:21 -04:00
bunnei 83007952ea gl_resource_manager: Grab latest upstream. 2018-04-13 23:48:20 -04:00
bunnei f0f3990064 gl_shader_decompiler: Add skeleton code from Citra for shader analysis. 2018-04-13 23:48:20 -04:00
bunnei 0b49a74e19 shader_bytecode: Add initial module for shader decoding. 2018-04-13 23:48:19 -04:00
bunnei 7112683376 bit_field: Make all methods constexpr. 2018-04-13 23:48:18 -04:00
bunnei e42bbdddff Merge pull request #323 from Hexagon12/stub-hid
Service/HID: Stubbed out GetPlayerLedPattern
2018-04-13 10:58:03 -04:00
Hexagon12 433ccdebe5 Fixed normal params in GetDisplayResolution 2018-04-13 17:47:01 +03:00
Hexagon12 e6bb2d65f8 Stubbed out GetPlayerLedPattern 2018-04-13 17:05:03 +03:00
bunnei 219e3f4c45 Merge pull request #319 from Hexagon12/service-name-fix
Various service name fixes - part 1
2018-04-13 00:25:32 -04:00
mailwl b439691768 Service/SSL: update service according switchbrew 2018-04-11 19:17:18 +03:00
Hexagon12 8293ccc5ed Various fixes and clang 2018-04-11 14:48:56 +03:00
Hexagon12 6d6064d42e Decimal change 2018-04-10 21:21:00 +03:00
Hexagon12 f171ec8b29 Updated pctl:a with new service names. 2018-04-10 21:03:23 +03:00
Hexagon12 0bd95ef3be Updated nvmemp with new service names. 2018-04-10 20:28:15 +03:00
Hexagon12 2df3594b31 Updated nvdrv with more service names. 2018-04-10 20:26:49 +03:00
Hexagon12 837b8b5b80 Updated pl:u with more service names. 2018-04-10 20:23:21 +03:00
Hexagon12 e05e3c8a08 Updated hid with more service names. 2018-04-10 20:17:22 +03:00
Hexagon12 93b83a11b6 Updated friend:u with more service names. 2018-04-10 20:02:11 +03:00
Hexagon12 83479a3d19 Updated the unknown name 2018-04-10 20:01:33 +03:00
Hexagon12 251c576455 Updated friend:a with more service names. 2018-04-10 20:00:36 +03:00
Hexagon12 f8e0ce2cd0 Updated fsp-srv with more service names. 2018-04-10 19:30:27 +03:00
Hexagon12 82be79db10 Updated CodecCtl with more service names. 2018-04-10 18:58:14 +03:00
Hexagon12 a9239dbed8 Updated audren with more service names. 2018-04-10 18:56:57 +03:00
Hexagon12 95d5bf3aa1 Updated audrec with more service names. 2018-04-10 18:53:33 +03:00
Hexagon12 eff525cab3 Updated audout with more service names. 2018-04-10 18:51:50 +03:00
Hexagon12 ba73f4e0a4 Updated audin with more service names. 2018-04-10 18:47:52 +03:00
Hexagon12 3eab3da04c Updated AOC with more service names. 2018-04-10 18:42:28 +03:00
Hexagon12 22ef1d1cc5 Updated AppletOE with more service names. 2018-04-10 18:41:17 +03:00
Hexagon12 4a594aff08 Updated AppletAE with more service names. 2018-04-10 18:39:46 +03:00
Hexagon12 c823bbde93 Updated AM with more service names. 2018-04-10 18:36:00 +03:00
mailwl a6a6ffed7a Service/ACC: convert to module, add acc:aa, acc:su, acc:u1 services 2018-04-10 10:18:52 +03:00
bunnei 6101a3c9d7 Merge pull request #314 from jroweboy/tegra-progress-3b
GPU: Bind uploaded textures when drawing (Rebased)
2018-04-07 18:46:16 -04:00
bunnei e918570c6d Merge pull request #315 from jroweboy/spelling-fix
Fix spelling of Initialize
2018-04-07 16:49:09 -04:00
James Rowe 92254855e7 Prevent crash from uninitialized telemetry 2018-04-07 07:25:14 -06:00
James Rowe f6ae0f432b Fix spelling of Initialize 2018-04-07 07:23:21 -06:00
James Rowe d8502eb24a Fix clang format issues 2018-04-06 22:00:48 -06:00
Subv cb3ca1d4cf GPU: Assert when finding a texture with a format type other than UNORM. 2018-04-06 20:44:46 -06:00
Subv c63f7aa93b GL: Set up the textures used for each draw call.
Each Maxwell shader stage can have an arbitrary number of textures, but we're limited to a certain number in OpenGL. We try to only use the minimum amount of host textures by not keeping a 1:1 relation between guest texture ids and host texture ids, ie, guest texture id 8 can be host texture id 0 if it's the only texture used in the guest shader program.
This mapping will have to be passed to the shader decompiler so it can rewrite the texture accesses.
2018-04-06 20:44:46 -06:00
Subv 4f1665d365 GL: Bind the textures to the shaders used for drawing. 2018-04-06 20:44:46 -06:00
Subv 8bc63e89e4 GLCache: Specialize the MortonCopy function for the DXT1 texture format.
It will now use the UnswizzleTexture function instead of the MortonCopyPixels128, which doesn't seem to work for textures.
2018-04-06 20:44:46 -06:00
Subv 1e6faaf2b3 GLCache: Implemented GetTextureSurface. 2018-04-06 20:44:45 -06:00
Subv 2a5e90745c GLCache: Support uploading compressed textures to the GPU.
Compressed texture formats like DXT1, DXT2, DXT3, etc will use this to ease the load on the CPU.
2018-04-06 20:44:45 -06:00
Subv 34b212c6a8 GL: Remove remaining references to 3DS-specific pixel formats 2018-04-06 20:44:42 -06:00
Subv 6400a3bb35 RasterizerCache: Remove 3DS-specific pixel formats.
We're only left with RGB8 and DXT1 for now. More will be added as they are needed.
2018-04-06 20:40:24 -06:00
Subv ab6d7991f8 GL: Create the sampler objects when starting up the GL rasterizer. 2018-04-06 20:40:24 -06:00
Subv 232ffe85ad GL: Ported the SamplerInfo struct from citra. 2018-04-06 20:40:24 -06:00
Subv dc26ad9aec GL: Rename PicaTexture to MaxwellTexture. 2018-04-06 20:40:24 -06:00
Subv 3c9cbbca68 GL: Added functions to convert Maxwell tex filters and wrap modes to OpenGL. 2018-04-06 20:40:23 -06:00
Subv d9e067fad6 Textures: Added a helper function to know if a texture is blocklinear or pitch. 2018-04-06 20:40:23 -06:00
bunnei 990ca9b20d Merge pull request #310 from N00byKing/patch-1
Update multiple comments from citra to yuzu
2018-04-06 11:07:28 -04:00
N00byKing 6d5b25c136 core, main.h: Abort on 32Bit ROMs (#309)
* core, main.h: Abort on 32Bit ROMs

* main.cpp: Fix Grammar
2018-04-06 11:06:32 -04:00
James Rowe b957a3647a Update fmtlib to fix msvc warnings
Additionally, when updating fmtlib, there was a change in fmtlib broke
how the old logging macro was overloaded, so this works around that by
just naming the fmtlib macro impl something different
2018-04-05 22:42:09 -06:00
N00byKing 63b5de9c40 rasterizer_interface.h: Update from citra to yuzu 2018-04-04 23:07:58 +02:00
N00byKing 6263f437d7 default_ini.h: Update from citra to yuzu 2018-04-04 23:05:51 +02:00
N00byKing b84397745f gl_rasterizer_cache.cpp: Update from citra to yuzu 2018-04-04 23:05:10 +02:00
N00byKing 3ca8768d3a gl_rasterizer_cache.h: Update from citra to yuzu 2018-04-04 23:04:24 +02:00
N00byKing 2a2af539f3 renderer_opengl.h: Update from citra to yuzu 2018-04-04 23:03:02 +02:00
bunnei e71cfbce72 svc: Stub out SetThreadActivity, GetThreadContext. 2018-04-02 23:51:01 -04:00
bunnei 372b8dae46 audren_u: Stub out GetActiveAudioDeviceName. 2018-04-02 23:51:00 -04:00
bunnei 683de06263 audout_u: Implement GetAudioOutState. 2018-04-02 23:51:00 -04:00
bunnei 659fd3e9f8 nifm: GetResult does not return a data field. 2018-04-02 23:50:59 -04:00
bunnei c800619c1e vi: Implement GetDisplayResolution. 2018-04-02 23:50:59 -04:00
bunnei 1eeef530e5 shared_memory: Remove incorrect 3ds-specific check. 2018-04-02 23:50:58 -04:00
bunnei 3f82cee183 service: Add friend:u interface. 2018-04-02 23:50:57 -04:00
Daniel Lim Wee Soong 145a4c3c2a logging: Change FmtLogMessage to use variadic template instead of FMT_VARIADIC
Due to premature merging of #262 I think the build may be failing right now. Should merge this ASAP to fix it.
2018-04-03 10:31:54 +08:00
bunnei e39ea2fa8e Merge pull request #262 from daniellimws/fmtlib-macros
Logging: Add fmtlib-based macros
2018-04-02 21:19:20 -04:00
bunnei 2b51f19079 Merge pull request #267 from N00byKing/patch-1
Update Dialog from citra to yuzu
2018-04-02 18:33:52 -04:00
bunnei 8eea0f0805 Merge pull request #276 from N00byKing/acctoyuzu
Change Telemetry Names to yuzu and remove links to citra
2018-04-02 18:30:04 -04:00
bunnei 0ce3d76591 Merge pull request #304 from daniellimws/fix-openbsd
Fix build on OpenBSD
2018-04-02 18:27:19 -04:00
N00byKing ba7cd88412 deconstructed_rom_directory.cpp: Fix Typo 2018-04-03 00:20:35 +02:00
Daniel Lim Wee Soong 930a045d42 externals: Update fmt to 4d35f94
Versions prior to this didn't compile on OpenBSD due to unconditional
use of the non-standard strtod_l() function.

The fmt::MemoryWriter API has been removed in the intervening
versions, so replace its use with fmt::memory_buffer and fmt::format_to.

The library also no longer provides the fmt::fmt ALIAS, so define
it in externals/CMakeLists.txt.
2018-04-03 02:49:58 +08:00
Daniel Lim Wee Soong 96cb786cd1 common: fix swap functions on Bitrig and OpenBSD
swap{16,32,64} are defined as macros on the two, but client code
tries to invoke them as Common::swap{16,32,64}, which naturally
doesn't work. This hack redefines the macros as inline functions
in the Common namespace: the bodies of the functions are the
same as the original macros, but relying on OS-specific
implementation details like this is of course brittle.
2018-04-03 02:25:11 +08:00
bunnei bc629f2f9b Merge pull request #297 from bunnei/hid-touch-state
hid: Write empty touch screen state.
2018-04-02 13:05:34 -04:00
bunnei e5491924f7 Merge pull request #296 from bunnei/misc-mem-fsp-fixes
Fix stack region, implement FSP GetSize/SetSize, and some stubs
2018-04-02 13:05:25 -04:00
bunnei 98bd0df9a3 Merge pull request #288 from Subv/macro_interpreter
GPU: Implemented a gpu macro interpreter
2018-04-02 10:04:19 -04:00
Subv 84c9824895 GPU: Use the MacroInterpreter class to execute the GPU macros instead of HLEing them. 2018-04-01 12:07:26 -05:00
Subv 7fe4f9491e GPU: Implemented a gpu macro interpreter.
The Ryujinx macro interpreter and envydis were used as reference.

Macros are programs that are uploaded by the games during boot and can later be called by writing to their method id in a GPU command buffer.
2018-04-01 12:07:26 -05:00
bunnei c7a4327471 hid: Write empty touch screen state. 2018-04-01 00:12:07 -04:00
bunnei 52c5bc4642 hle_ipc, fsp_srv: Cleanup logging. 2018-03-31 23:30:00 -04:00
bunnei 699d84abda hid: Stub out GetSupportedNpadStyleSet. 2018-03-31 16:06:46 -04:00
bunnei 6d21b8cdea hle_ipc: Do not ensure write buffer size. 2018-03-31 16:06:46 -04:00
bunnei db8fc2ea57 fsp_srv: Implement GetSize and SetSize. 2018-03-31 16:06:45 -04:00
bunnei 36cdd5a39c memory: Fix stack region. 2018-03-31 16:06:45 -04:00
bunnei 7d4a23db4e Merge pull request #293 from N00byKing/drkthm
Add Dark Theme (And Theming in General + Icon Theming)
2018-03-31 00:46:18 -04:00
N00byKing 6386f0910c Port citra-emu/citra#3610 to yuzu 2018-03-30 17:38:34 +02:00
N00byKing 7555b881e8 Remove whitespaces 2018-03-30 14:18:35 +02:00
N00byKing 675b525fb8 Add Dark theme, Icon theming
configure_general.ui: Add UI Option for Themes

config.cpp: Save Theme Settings
2018-03-30 14:14:37 +02:00
bunnei 038c8d284b audren_u: Stub QueryAudioDeviceSystemEvent and GetActiveChannelCount. 2018-03-29 21:23:24 -04:00
bunnei 86f0e841d8 svc: Stub GetThreadCoreMask. 2018-03-29 21:23:15 -04:00
bunnei f5c2d62b3a service: Add NFP module interface.
service: Initialize NFP service.

Log: Add NFP service as a log subtype.
2018-03-29 21:22:44 -04:00
Lioncash e6375771e2 result: Check against self-assignment in ResultVal's copy assignment operator
Avoids doing work that doesn't need to be done.
2018-03-28 18:02:44 -04:00
bunnei 9d3baff255 Merge pull request #286 from N00byKing/citratoyuzuagain
main.h: Add pragma once, remove ifndef
2018-03-27 19:57:58 -04:00
N00byKing a037c8914a main.h: Add pragma once, remove ifndef 2018-03-27 16:32:41 +02:00
bunnei fcb09e7bb3 Merge pull request #284 from bunnei/docked-config
Add config for "Docked" mode and various settings cleanup
2018-03-27 10:22:08 -04:00
N00byKing dfa21f372b telemetry.h: Reword comment from citra to yuzu 2018-03-27 11:16:59 +02:00
N00byKing a14420e351 telemetry_session.h: Reword Documentation Comment from citra to yuzu 2018-03-27 11:16:59 +02:00
N00byKing a97c186684 Remove Links to citra Services 2018-03-27 11:16:59 +02:00
N00byKing b411bdb76e Change Telemetry Names to yuzu 2018-03-27 11:16:59 +02:00
bunnei 81d12e3466 Merge pull request #282 from N00byKing/patch-2
Change comments from citra to yuzu
2018-03-26 23:37:05 -04:00
bunnei 8c991d792e settings: Remove unused CpuCore class. 2018-03-26 23:14:44 -04:00
bunnei 32181284be config: Use simplified checkbox (from Citra) for CPU JIT. 2018-03-26 23:02:37 -04:00
bunnei af6e1f8554 config: Rename is_docked to use_docked_mode to be consistent with other config bools. 2018-03-26 23:02:36 -04:00
bunnei b4fb85ff0f configure_general: Cleanup naming. 2018-03-26 23:02:36 -04:00
bunnei 534cee3d8b qt: Add config option for is_docked. 2018-03-26 23:02:35 -04:00
bunnei 679d29d9f8 config: Add setting for whether the system is docked or not. 2018-03-26 23:02:35 -04:00
bunnei 6333552a5d renderer_opengl: Use better naming for DrawScreens and DrawSingleScreen. 2018-03-26 21:17:07 -04:00
bunnei 9415aeb48f graphics_surface: Remove superfluous cast. 2018-03-26 21:17:05 -04:00
bunnei 12a6c7b11b gl_rasterizer: Move code to bind framebuffer surfaces before draw to its own function. 2018-03-26 21:17:05 -04:00
bunnei b9eae6e652 gl_rasterizer: Add a SyncViewport method. 2018-03-26 21:17:04 -04:00
bunnei 2666b52264 gl_rasterizer: Move PrimitiveTopology check to MaxwellToGL. 2018-03-26 21:17:03 -04:00
bunnei 74c4739713 graphics_surface: Fix merge conflicts. 2018-03-26 21:17:03 -04:00
bunnei 7c376760c0 gl_rasterizer: Use ReadBlock instead of GetPointer for SetupVertexArray. 2018-03-26 21:17:02 -04:00
bunnei 95d56cac29 gl_rasterizer: Normalize vertex array data as appropriate. 2018-03-26 21:17:02 -04:00
bunnei ad1af61685 memory: Fix cast for ReadBlock/WriteBlock/ZeroBlock/CopyBlock. 2018-03-26 21:17:01 -04:00
bunnei 0e59fbd73f maxwel_to_gl: Fix string formatting in log statements. 2018-03-26 21:17:01 -04:00
bunnei b601155fb0 rasterizer: Rename DrawTriangles to DrawArrays. 2018-03-26 21:17:00 -04:00
bunnei ec13680b3e gl_rasterizer: Use passthrough shader for SetupVertexShader. 2018-03-26 21:17:00 -04:00
bunnei 71a932291f renderer_opengl: Logging, etc. cleanup. 2018-03-26 21:16:59 -04:00
bunnei be645eece3 renderer_opengl: Remove framebuffer RasterizerFlushVirtualRegion hack. 2018-03-26 21:16:58 -04:00
bunnei 36a3a82135 gl_rasterizer_cache: Implement UpdatePagesCachedCount. 2018-03-26 21:16:58 -04:00
bunnei 49b3b519fc memory: Add RasterizerMarkRegionCached code and cleanup. 2018-03-26 21:16:57 -04:00
bunnei 4c36e92bf4 gl_rasterizer: Implement SetupVertexArray. 2018-03-26 21:16:56 -04:00
bunnei 4c0ed161a8 gl_rasterizer_cache: Fix an ASSERT_MSG. 2018-03-26 21:16:56 -04:00
bunnei 9e146ba2db maxwell_to_gl: Add module and function for decoding VertexType. 2018-03-26 21:16:55 -04:00
bunnei ded4139447 maxwell_3d: Use names that match envytools for VertexType. 2018-03-26 21:16:55 -04:00
bunnei d37f03d0fe maxwell_3d: Add VertexAttribute struct and cleanup. 2018-03-26 21:16:54 -04:00
bunnei 5f3f68e064 gl_rasterizer: Use 32 texture units instead of 3. 2018-03-26 21:16:53 -04:00
bunnei b1a3858e30 gl_rasterizer: Implement DrawTriangles. 2018-03-26 21:16:53 -04:00
bunnei e04a5dec60 Maxwell3D: Call AccelerateDrawBatch on DrawArrays. 2018-03-26 21:16:52 -04:00
bunnei 5ae2fe6c69 gl_rasterizer: Implement AnalyzeVertexArray. 2018-03-26 21:16:52 -04:00
bunnei e285a5d6da gl_rasterizer_cache: MortonCopy Switch-style. 2018-03-26 21:16:51 -04:00
bunnei 25e901ec1e gl_rasterizer_cache: Implement GetFramebufferSurfaces. 2018-03-26 21:16:51 -04:00
bunnei bf282aa01f maxwell: Add RenderTargetFormat enum. 2018-03-26 21:16:49 -04:00
bunnei 33b4c486f3 renderer_opengl: Only draw the screen if a framebuffer is specified. 2018-03-26 21:16:49 -04:00
Subv 3707231f5d GPU: Load the sampler info (TSC) when retrieving active textures. 2018-03-26 15:46:49 -05:00
Subv c8425b1af4 GPU: Added the TSC structure. It contains information about the sampler. 2018-03-26 15:45:05 -05:00
Subv 0255cad30c GPU: Added more fields to the TIC structure. 2018-03-26 15:44:20 -05:00
N00byKing e57ba11168 log.h: Change comment from citra to yuzu 2018-03-26 21:52:59 +02:00
N00byKing 770ee77982 file_util.h: Update Comment from citra to yuzu 2018-03-26 21:51:04 +02:00
N00byKing 33c1780755 yuzu.cpp: Update Link from citra to yuzu 2018-03-26 21:48:18 +02:00
N00byKing 6b5f41b812 cpu_detect.cpp: Change comment from citra to yuzu 2018-03-26 21:43:39 +02:00
bunnei db7005ca05 Merge pull request #280 from bunnei/misc-service-fixes
Minor changes to VI, PL, HID, and AUDREN
2018-03-25 17:07:06 -04:00
bunnei feff74c433 Merge pull request #273 from Subv/textures
GPU: Added code to unswizzle textures and ported the surface viewer from citra
2018-03-25 16:28:24 -04:00
N00byKing 05d777b122 main.cpp: Replace Citra with yuzu Wiki Links 2018-03-25 11:44:04 +02:00
N00byKing 357e97cc2c main.cpp: Update Dialog from citra to yuzu 2018-03-25 11:42:46 +02:00
mailwl cfbce8c977 Service/sockets: add bsd:s, nsd:a, nsd:u services 2018-03-25 12:41:00 +03:00
bunnei 09f5837d6b audren_u: Fix GetAudioDevice. 2018-03-25 03:24:20 -04:00
bunnei dd7c34a978 hid: Stub out SetNpadJoyAssignmentModeDual. 2018-03-25 03:24:05 -04:00
bunnei a4435604c9 pl_u: Add RequestLoad. 2018-03-25 03:23:52 -04:00
Subv 18a9536efa GPU: Make the debug_context variable a member of the frontend instead of a global. 2018-03-24 23:35:06 -05:00
Subv f73fb9de9d GPU: Added a function to retrieve the active textures for a shader stage.
TODO: A shader may not use all of these textures at the same time, shader analysis should be performed to determine which textures are actually sampled.
2018-03-24 11:31:53 -05:00
Subv 0892143af9 Frontend: Updated the surface view debug widget to work with Maxwell surfaces. 2018-03-24 11:31:53 -05:00
Subv b143430809 Frontend: Allow opening the Surface View widget in the Qt frontend. 2018-03-24 11:31:50 -05:00
Subv b9b5b1e740 GPU: Implement the Incoming/FinishedPrimitiveBatch debug breakpoints. 2018-03-24 11:31:50 -05:00
Subv 10b10a14af GPU: Implement the MaxwellCommandLoaded/Processed debug breakpoints. 2018-03-24 11:31:50 -05:00
Subv 19bf501723 Frontend: Ported the GPU breakpoints and surface viewer widgets from citra. 2018-03-24 11:31:49 -05:00
Subv bc03dc4793 GPU: Added a method to unswizzle a texture without decoding it.
Allow unswizzling of DXT1 textures.
2018-03-24 11:30:56 -05:00
Subv d09097276f GPU: Preliminary work for texture decoding. 2018-03-24 11:30:56 -05:00
MerryMage f8426bcf94 arm_dynarmic: Fix timing 2018-03-24 09:02:19 +00:00
Subv 6234ec112b GPU: Added viewport registers to Maxwell3D's reg structure. 2018-03-24 01:22:19 -05:00
bunnei 79b3adba8e Merge pull request #265 from bunnei/tegra-progress-2
Tegra progress 2
2018-03-23 23:30:48 -04:00
bunnei 2920684a44 gl_rasterizer: Fake render in green, because it's cooler. 2018-03-23 22:27:53 -04:00
bunnei 454759e2a5 gl_rasterizer: Log warning instead of sync'ing unimplemented funcs. 2018-03-23 22:24:16 -04:00
bunnei 0a28179632 Merge pull request #255 from Subv/sd_card
FS: Implemented access to the SD card
2018-03-23 20:48:26 -04:00
bunnei 490014c459 gl_rasterizer_cache: Add missing include for vm_manager. 2018-03-23 16:54:20 -04:00
bunnei bea2582807 renderer_opengl: Only invalidate the framebuffer region, not flush. 2018-03-23 15:52:14 -04:00
bunnei 9b2bfb9e9d renderer_opengl: Fixes for properly flushing & rendering the framebuffer. 2018-03-23 15:49:04 -04:00
bunnei c13802819b memory: Fix typo in RasterizerFlushVirtualRegion. 2018-03-23 15:46:21 -04:00
bunnei c30e02cd0c Merge pull request #268 from mailwl/ssl
Service/SSL: add ssl service
2018-03-23 15:30:17 -04:00
bunnei 454e413491 Merge pull request #270 from N00byKing/patch-2
Remove Option for N/3DS from default.ini
2018-03-23 15:29:35 -04:00
Subv 6610bee69e FS: Move the file open mode calculation to a separate function. 2018-03-23 14:27:07 -05:00
bunnei ca08e1edee RasterizerCacheOpenGL: FlushAll should flush full memory region. 2018-03-23 15:25:16 -04:00
bunnei 4d5c052f34 memory: RasterizerFlushVirtualRegion should also check process image region. 2018-03-23 15:10:02 -04:00
bunnei 6131f96f6a rasterizer: Flush and invalidate regions should be 64-bit. 2018-03-23 15:01:45 -04:00
bunnei cc17ea04c4 renderer_opengl: Add framebuffer_transform_flags member variable. 2018-03-23 14:59:14 -04:00
bunnei c2a48352ad renderer_opengl: Better handling of framebuffer transform flags. 2018-03-23 14:58:27 -04:00
N00byKing 3aeeaeaf2b Remove Option for N/3DS from default.ini 2018-03-23 18:06:55 +01:00
N00byKing 4023ee09fc CITRA_ICON -> YUZU_ICON 2018-03-23 16:56:59 +01:00
mailwl 96164de3a0 Service/SSL: add ssl service 2018-03-23 09:32:50 +03:00
bunnei fce77a1fb1 renderer_opengl: Use accelerated framebuffer load with LoadFBToScreenInfo. 2018-03-22 23:28:37 -04:00
bunnei aa667e6afa nvdisp_disp0: Always flush and invalidate framebuffer region.
- Workaround for texture forwarding until we have a better place.
2018-03-22 23:18:04 -04:00
bunnei 855aadf055 gl_rasterizer: Implement AccelerateDisplay method from Citra. 2018-03-22 23:06:54 -04:00
bunnei 95dec6140b LoadGLBuffer: Use bytes_per_pixel, not bits. 2018-03-22 23:01:57 -04:00
bunnei c9c232727c memory: Port RasterizerFlushVirtualRegion from Citra. 2018-03-22 22:56:41 -04:00
bunnei 7b167a12ad gl_rasterizer_cache: LoadGLBuffer should do a morton copy. 2018-03-22 22:54:04 -04:00
bunnei 875215fae4 video_core: Move MortonCopyPixels128 to utils header. 2018-03-22 22:52:40 -04:00
Valentin Vanelslande 96b4fc4206 yuzu_cmd: change default cpu core to dynarmic 2018-03-22 19:44:34 -06:00
Valentin Vanelslande a105e0f72d default_ini: change default cpu core to dynarmic 2018-03-22 19:43:59 -06:00
bunnei 4e4e999c4a video_core: Remove usage of PAddr and replace with VAddr. 2018-03-22 21:13:46 -04:00
bunnei 6babc57354 video_core: Move FramebufferInfo to FramebufferConfig in GPU. 2018-03-22 21:04:30 -04:00
bunnei 8c5ed9de77 gl_rasterizer: Replace a bunch of UNIMPLEMENTED with ASSERT. 2018-03-22 20:19:34 -04:00
bunnei 3ea48b01d3 gl_rasterizer: Add a simple passthrough shader in lieu of shader generation. 2018-03-22 20:00:41 -04:00
bunnei 8286b237cc gpu: Expose Maxwell3D engine. 2018-03-22 19:48:20 -04:00
bunnei fcddbe6027 maxwell_3d: Add some format decodings and string helper functions. 2018-03-22 19:47:28 -04:00
bunnei c388741f12 renderer: Create rasterizer and cleanup. 2018-03-22 19:46:37 -04:00
N00byKing 35d617d342 Remove more N3DS References 2018-03-22 21:25:06 +01:00
Daniel Lim Wee Soong df93e4f9b0 Remove dependency chrono
Earlier chrono was included but after some code changed it was no longer needed

Forgot to remove it so I'm removing it now
2018-03-22 21:53:51 +08:00
Daniel Lim Wee Soong 81eaba792e Change "yuzu starting..." to be logged with the new macro
Just as a proof that it works
2018-03-22 18:26:43 +08:00
Daniel Lim Wee Soong a0298a552c Logging: Create logging macros based on fmtlib
Add a new set of logging macros based on fmtlib
Similar but not exactly the same as https://github.com/citra-emu/citra/pull/3533

Citra currently uses a different version of fmt, which does not support FMT_VARIADIC so
make_args is used instead. On the other hand, yuzu uses fmt 4.1.0 which doesn't have make_args yet
so FMT_VARIADIC is used.
2018-03-22 18:21:29 +08:00
mailwl e0d1e257a8 Service/spl: add module and services 2018-03-22 09:55:14 +03:00
bunnei 3a37f55067 Merge pull request #258 from Subv/gpu_attribs
GPU: Added vertex attrib format and triangle topology registers
2018-03-21 19:36:06 -04:00
N00byKing 9b619405e9 CMake: Set EMU_ARCH_BITS in CMakeLists.txt 2018-03-21 19:03:20 +01:00
Subv 43295efd0e FS: Implemented IFileSystem::CreateDirectory. 2018-03-21 09:55:59 -05:00
Subv f3a5328f09 GPU: Added vertex attribute format registers. 2018-03-21 09:26:47 -05:00
mailwl eaf65829ca Service/vi: convert services to module 2018-03-21 13:09:40 +03:00
Subv a569ee8a58 GPU: Added registers for the number of vertices to render. 2018-03-20 23:28:06 -05:00
bunnei 766c6de88d Merge pull request #254 from bunnei/port-citra-renderer
Port Citra OpenGL rasterizer code
2018-03-20 21:37:43 -04:00
mailwl ce7e0e503b Service: add fatal:u, fatal:p services 2018-03-20 16:59:02 +03:00
bunnei 188a685e73 renderer_gl: Port boilerplate rasterizer code over from Citra. 2018-03-20 00:07:32 -04:00
bunnei e0f3facd01 gl_shader_util: Sync latest version with Citra. 2018-03-20 00:07:31 -04:00
bunnei 756e14027a renderer_gl: Port over gl_shader_gen module from Citra. 2018-03-20 00:07:30 -04:00
Subv ddafc857c7 FS: Implemented IFileSystem's OpenDirectory function.
Note that the filter parameter is not yet implemented.
2018-03-19 23:02:30 -05:00
Subv fce3825edf FS: Added the IDirectory IPC interface and implemented its two functions. 2018-03-19 23:01:47 -05:00
Subv bf1c4bf16c FS: Implement DiskFileSystem's OpenDirectory interface. 2018-03-19 23:00:37 -05:00
Subv 7de15c22f3 FS: Implement DiskFileSystem::GetEntryType for existing files/directories. 2018-03-19 22:59:38 -05:00
Subv e4b4b765b6 FS: Updated the Directory Entry structure to match the Switch. 2018-03-19 22:58:55 -05:00
Subv 8144364cc2 FS: Support the file Append open mode. 2018-03-19 22:57:34 -05:00
Mat M 9b5ae0daf5 Merge pull request #253 from Subv/rt_depth
GPU: Added registers for color and Z buffers.
2018-03-19 23:37:47 -04:00
bunnei f1e9d5404d renderer_gl: Port over gl_shader_decompiler module from Citra. 2018-03-19 23:14:03 -04:00
bunnei a533c3398c renderer_gl: Port over gl_rasterizer_cache module from Citra. 2018-03-19 23:14:03 -04:00
bunnei ac51a39abf gl_resource_manager: Sync latest version with Citra. 2018-03-19 23:14:02 -04:00
bunnei 52bfc102bc renderer_gl: Port over gl_stream_buffer module from Citra. 2018-03-19 23:14:02 -04:00
bunnei b1ceeb5c42 gl_state: Sync latest version with Citra. 2018-03-19 23:13:49 -04:00
Subv b15d0a65c4 FS: Implement MountSdCard. 2018-03-19 21:21:49 -05:00
Subv a079723254 FS: Added an SDMC archive factory and registered it to the SDMC archive on startup. 2018-03-19 21:17:15 -05:00
Subv 3e645f5595 GPU: Added Z buffer registers to Maxwell3D's reg structure. 2018-03-19 16:55:33 -05:00
Subv b942bfbb13 GPU: Added the render target (RT) registers to Maxwell3D's reg structure. 2018-03-19 16:46:29 -05:00
N00byKing d3bdad2aaa Clang Fixes 2018-03-19 17:53:35 +01:00
N00byKing f69c369cfb oops 2018-03-19 17:43:04 +01:00
N00byKing 8d34c0d2a0 More Warning cleanups 2018-03-19 17:27:04 +01:00
N00byKing 1212e9e231 Clean Warnings (?) 2018-03-19 17:07:08 +01:00
Subv c0f954906c GPU: Added the TSC registers to the Maxwell3D register structure. 2018-03-19 00:36:25 -05:00
Subv f6e3d3aa1a GPU: Added the TIC registers to the Maxwell3D register structure. 2018-03-19 00:32:57 -05:00
bunnei 8d9b2cb438 Merge pull request #193 from N00byKing/3184_2_robotic_boogaloo
Implement Pull #3184 from citra: core/arm: Improve timing accuracy before service calls in JIT (Rebased)
2018-03-18 22:35:47 -04:00
bunnei 341925e40a Merge pull request #250 from bunnei/buffer-dequeue-wait
vi: TransactParcel DequeueBuffer should wait current thread
2018-03-18 22:25:09 -04:00
bunnei bae5ccd6d2 vi: Remove DequeueBuffer and wait until next available buffer. 2018-03-18 20:56:35 -04:00
bunnei 7750edae39 hle_ipc: Add SleepClientThread to block current thread within HLE routines. 2018-03-18 20:56:34 -04:00
bunnei 01d72e813e hle_ipc: Use shared_ptr instead of unique_ptr to allow copies. 2018-03-18 20:56:33 -04:00
bunnei 479400acc8 hle_ipc: Remove GetPointer(..) usage with WriteToOutgoingCommandBuffer. 2018-03-18 20:56:33 -04:00
bunnei d6c27e6b28 thread: Add THREADSTATUS_WAIT_HLE_EVENT, remove THREADSTATUS_WAIT_ARB. 2018-03-18 20:56:32 -04:00
Subv 36c527131f GPU: Implement macro 0xE1A BindTextureInfoBuffer in HLE.
This macro simply sets the current CB_ADDRESS to the texture buffer address for the input shader stage.
2018-03-18 19:03:40 -05:00
Subv 80b0f4d681 GPU: Implement the BindStorageBuffer macro method in HLE.
This macro binds the SSBO Info Buffer as the current ConstBuffer.
This buffer is usually bound to c0 during shader execution.
Games seem to use this macro instead of directly writing the address for some reason.
2018-03-18 16:50:42 -05:00
Subv 845415cc3d GPU: Handle writes to the CB_DATA method.
Writing to this method will cause the written value to be stored in the currently-set ConstBuffer plus CB_POS.

This method is usually used to upload uniforms or other shader-visible data.
2018-03-18 15:23:24 -05:00
Subv 46bbeeb54a GPU: Move the GPU's class constructor and destructors to a cpp file.
This should reduce recompile times when editing the Maxwell3D register structure.
2018-03-18 15:23:24 -05:00
Subv a8cb6ba213 GPU: Store uploaded GPU macros and keep track of the number of method parameters. 2018-03-18 11:51:46 -05:00
Subv 29c026fae1 GPU: Macros are specific to the Maxwell3D engine, so handle them internally. 2018-03-18 11:51:45 -05:00
Subv 5979796df8 GPU: Renamed ShaderType to ShaderStage as that is less confusing. 2018-03-17 18:32:57 -05:00
Subv 7b48098c60 GPU: Store shader constbuffer bindings in the GPU state. 2018-03-17 18:32:57 -05:00
Subv 5f181aec24 GPU: Corrected some register offsets and removed superfluous macro registers. 2018-03-17 18:32:56 -05:00
Subv 8a5c0e873b GPU: Make the SetShader macro call do the same as the real macro's code.
It'll now set the CB_SIZE, CB_ADDRESS and CB_BIND registers when it's called.

Presumably this SetShader function is binding the constant shader uniforms to buffer 1 (c1[]).
2018-03-17 18:32:55 -05:00
Subv e3e0625ff7 GPU: Corrected the parameter documentation for the SetShader macro call.
Register 0xE24 is actually a macro that sets some shader parameters in the register structure.

Macros are uploaded to the GPU at startup and have their own ISA, we'll probably write an interpreter for this in the future.
2018-03-17 13:55:42 -05:00
bunnei bed06310f2 Merge pull request #242 from Subv/set_shader
GPU: Handle the SetShader method call (0xE24) and store the shader config.
2018-03-17 00:34:17 -04:00
Subv c9850b0d3a GPU: Handle the SetShader method call (0xE24) and store the shader config. 2018-03-16 22:51:06 -05:00
Subv dbade2db3e GPU: Added the vertex array registers. 2018-03-16 22:47:45 -05:00
bunnei b849a04b2f Merge pull request #241 from Subv/gpu_method_call
GPU: Process command mode 5 (IncreaseOnce) differently from other commands
2018-03-16 22:28:22 -04:00
Subv 6796e37911 GPU: Process command mode 5 (IncreaseOnce) differently from other commands.
Accumulate all arguments before calling the desired method.

Note: Maybe we should do the same for the NonIncreasing mode?
2018-03-16 20:32:44 -05:00
bunnei 2c2acce091 Merge pull request #239 from Subv/shaders
GPU: Added some shader-related registers.
2018-03-16 21:09:35 -04:00
Subv 3247b8f9dd GPU: Assert that we get a 0 CODE_ADDRESS register in the 3D engine.
Shader address calculation depends on this value to some extent, we do not currently know what it being 0 entails.
2018-03-16 19:24:41 -05:00
Subv d468c046f9 GPU: Added Maxwell registers for Shader Program control. 2018-03-16 19:23:11 -05:00
bunnei b437a08a21 nvflinger: Remove superfluous buffer format check. 2018-03-16 20:11:50 -04:00
bunnei dd2e72f1aa process: MirrorMemory should use MemoryState::Mapped. 2018-03-16 19:24:54 -04:00
bunnei d7bb09afe7 process: Unmap previously allocated heap. 2018-03-16 18:32:25 -04:00
bunnei 256153c50c arm_interface: Support unmapping previously mapped memory. 2018-03-16 18:32:24 -04:00
bunnei a0b00fe2d1 svc: Use more correct values for GetInfo MapRegion and NewMapRegion. 2018-03-16 18:32:23 -04:00
bunnei a26561ce20 kernel: Move stack region outside of application heap. 2018-03-16 18:32:23 -04:00
bunnei 89312134f6 memory: Add regions for map region, "new" map region, etc. 2018-03-16 18:32:22 -04:00
bunnei 67bac363d8 process: Fix stack memory state. 2018-03-16 18:32:21 -04:00
bunnei 29bda49fc0 MemoryState: Add additional memory states and improve naming. 2018-03-16 18:32:21 -04:00
mailwl f5fbe99e28 IGeneralService: fix function list 2018-03-16 16:34:12 +03:00
mailwl 44739126a5 Service/NIFM: stub cancel function 2018-03-16 11:08:22 +03:00
mailwl db6c7e714c Service/NIFM: convert to module 2018-03-16 11:00:29 +03:00
bunnei f16763ed52 core: Move process creation out of global state. 2018-03-14 18:42:19 -04:00
bunnei b2b51850a1 Merge pull request #213 from Hexagon12/dynarmic-default
Make Dynarmic the default CPU core
2018-03-07 18:21:13 -05:00
Subv 083e494083 GPU: Intercept writes to the VERTEX_END_GL register.
This is the register that gets written after a game calls DrawArrays().

We should collect all GPU state and draw using our graphics API here.
2018-03-04 19:14:04 -05:00
bunnei 7dd960f543 Merge pull request #229 from Subv/ensuresavedata_impl
FS: Make EnsureSaveData create the save data if it doesn't already exist.
2018-03-04 15:49:42 -05:00
Subv cb738dedb2 FS: Use the correct error code when trying to open files that don't exist. 2018-03-04 14:34:48 -05:00
Subv 4a8b2154d7 FS: Stubbed CreateSaveData. It currently does nothing. 2018-03-04 14:31:57 -05:00
Subv 9702f6c2ed FS: Make EnsureSaveData create the savedata folder when called for the first time. 2018-03-04 14:30:07 -05:00
Subv 6ac79e3a43 CoreTiming: Unschedule the pending events when an Interface is destroyed. 2018-03-04 10:34:25 -05:00
bunnei 64bf9f8cdf Merge pull request #226 from Subv/buffer_queue_event
Vi: Signal the BufferQueue's Native Handle right after ReleaseBuffer is called
2018-03-03 12:38:18 -05:00
Subv 1fddc7fe43 Vi: Signal the BufferQueue's Native Handle right after ReleaseBuffer is called.
This prevents a thread starvation issue in Puyo Puyo Tetris.
We should hwtest this behavior and figure out where exactly this event is signaled.
2018-03-03 11:51:36 -05:00
mailwl 481a083593 Service/Set: add more services 2018-03-03 09:03:49 +03:00
bunnei 32f3523ce1 Merge pull request #216 from Subv/savedata
Implemented the SaveData archive and MountSaveData.
2018-03-01 22:14:31 -05:00
Subv b874d4f2b0 SaveData: Use the current titleid when opening the savedata archive. 2018-03-01 19:03:54 -05:00
Subv a9c51be95e Kernel: Store the program id in the Process class instead of the CodeSet class.
There may be many CodeSets per Process, so it's wasteful and overcomplicated to store the program id in each of them.
2018-03-01 19:03:53 -05:00
Subv 77e64ac9b2 FS: Implement MountSaveData and some of the IFile interface. 2018-03-01 19:03:53 -05:00
Subv dfdc72efa7 Filesystem: Added a SaveData Factory and associated Disk_FileSystem. 2018-03-01 19:03:52 -05:00
Jules Blok 29a5203a2a thread: Clear the process list on shutdown. 2018-02-27 17:13:39 +01:00
Subv 585a145f31 ResultCode: Mark any error code that isn't 0 as an error. 2018-02-27 09:44:35 -05:00
Vishal Sharma 3ec2bf49cf Removes the use of QKeySequence::Cancel (#186)
* Removes the use of QKeySequence::Cancel to remove issues while running make

* Corrects characters in a line for travis failure

* Corrects space in a line for travis failure
2018-02-26 21:03:02 -08:00
bunnei e1866e69e2 Merge pull request #207 from mailwl/duplicatesession
IPC: add domain header to response if only it exists in request
2018-02-26 20:52:56 -08:00
bunnei 1f73bf3fb0 Merge pull request #215 from N00byKing/umapsharedmmry
UnmapSharedMemory
2018-02-25 21:04:24 -08:00
shinyquagsire23 b48d598627 file_sys: Style tweaks
Asdf
2018-02-25 16:34:29 -07:00
shinyquagsire23 d5e38de1ec loader: Check error on NPDM load, use TID for CodeSet 2018-02-25 07:41:36 -07:00
shinyquagsire23 013d8828a3 loader: Use NPDM information when loading NSOs 2018-02-25 07:02:47 -07:00
shinyquagsire23 e3c753a14c file_sys: Add support for parsing NPDM files 2018-02-25 07:02:39 -07:00
N00byKing ac2232b9cf (Hopefully) Fix MinGW Build 2018-02-25 13:40:22 +01:00
N00byKing 3660aa9318 Implements citra-emu/citra#3184 2018-02-25 11:44:21 +01:00
N00byKing 11cef9ba72 Add UnmapSharedMemory
C++11 requires spaces on the Identifier

Add inttypes include

clang
2018-02-25 11:38:06 +01:00
bunnei da58d923a5 Merge pull request #212 from mailwl/stubs
Stub some functions
2018-02-23 21:09:56 -08:00
bunnei 83e5cafb3a Merge pull request #217 from shinyquagsire23/time-s-missing
time: Add missing time:s functions, used for libnx
2018-02-23 08:52:37 -08:00
bunnei ba51791f13 Merge pull request #210 from MerryMage/f/dynarmic/sysreg
arm_dynarmic: Implement system registers and provide more hooks
2018-02-23 08:51:52 -08:00
shinyquagsire23 2391d009c4 time: Add missing time:s functions, used for libnx 2018-02-23 00:34:15 -07:00
mailwl 8f256914fc Stub more functions 2018-02-22 17:28:15 +03:00
mailwl 9d6a03e6a3 Stub am::SetScreenShotPermission, and bsd::StartMonitoring functions 2018-02-22 13:04:23 +03:00
bunnei 2578d20154 Merge pull request #211 from shinyquagsire23/time_local
time: Add GetStandardLocalSystemClock, used by libnx
2018-02-22 01:09:01 -05:00
shinyquagsire23 d589b1baf2 time: Add GetStandardLocalSystemClock, used by libnx 2018-02-21 18:43:05 -07:00
MerryMage 2598b3d893 dynarmic: Update to 6b4c6b0
6b4c6b0 impl: Update PC when raising exception
7a1313a A64: Implement FDIV (vector)
b2d781d system: Raise exception for YIELD, WFE, WFI, SEV, SEVL
b277bf5 Correct FPSR and FPCR
7673933 A64: Implement USHL
8d0e558 A64: Implement UCVTF (vector, integer), scalar variant
da9a4f8 A64: Partially implement FCVTZU (scalar, fixed-point) and FCVTZS (scalar, fixed-point)
7479684 A64: Implement system register TPIDR_EL0
0fd75fd A64: Implement system registers FPCR and FPSR
31e370c A64: Implement system register CNTPCT_EL0
9a88fd3 A64: Implement system register CTR_EL0
1d16896 A64: Implement NEG (vector)
3184edf IR: Add IR instruction ZeroVector
31f8fbc emit_x64_floating_point: Add maybe_unused to preprocess parameter
567eb1a A64: Implement FMINNM (scalar)
c6d8fa1 A64: Implement FMAXNM (scalar)
616056d constant_pool: Add frame parameter
a3747cb A64: Implement ADDP (scalar)
5cd5d9f reg_alloc: Only exchange GPRs
dd0452a A64: Implement DUP (element), scalar variant
e5732ea emit_x64_floating_point: Correct FP{Max,Min}{32,64} implementations for -0/+0
40eb9c3 A64: Implement FMAX (scalar), FMIN (scalar)
7cef39b fuzz_with_unicorn: QEMU's implementation of FCVT is incorrect
826dce2 travis: Switch unicorn repository
9605f28 a64/config: Allow NaN emulation accuracy to be set
e9435bc a64_emit_x64: Add conf to A64EmitContext
30b596d fuzz_with_unicorn: Explicitly test floating point instructions
be292a8 A64: Implement FSQRT (scalar)
3c42d48 backend_x64: Accurately handle NaNs
4aefed0 fuzz_with_unicorn: Print AArch64 disassembly
2018-02-21 21:39:07 +00:00
MerryMage 803436b709 arm_dynarmic: LOG_INFO on unicorn fallback 2018-02-21 21:39:07 +00:00
MerryMage 38a3a63ffd memory: LOG_ERROR when falling off end of page table 2018-02-21 21:39:07 +00:00
MerryMage 8c64261d9a core: Fix scheduler-shutdown related crash 2018-02-21 16:38:18 +00:00
mailwl dadb6c6e50 Add warning if Domain request has no domain message header 2018-02-20 22:51:54 +03:00
mailwl 2ba8b89864 Fix: change check for domain order and existance of domain message header 2018-02-20 21:59:58 +03:00
mailwl e05f10cae8 IPC: add domain header to response if only it exists in request 2018-02-20 19:27:49 +03:00
bunnei 3dc5a6ea30 Merge pull request #206 from mailwl/aoc-listaddoncontent
Service/AOC: stub ListAddOnContent function
2018-02-20 10:45:50 -05:00
mailwl 4f067f83a7 Service/AOC: stub ListAddOnContent function 2018-02-20 10:30:12 +03:00
bunnei d305e5bed8 acc_u0: Stub ListOpenUsers service function. 2018-02-19 17:39:41 -05:00
bunnei 55537f1f02 service: Add Friend service interface. 2018-02-19 17:34:02 -05:00
bunnei b43fef19d4 logging: Add category for Friend service. 2018-02-19 17:31:54 -05:00
bunnei 1c89e285ae Merge pull request #202 from bunnei/scheduler-cleanup
Scheduler cleanup
2018-02-19 17:23:05 -05:00
bunnei 87335e8404 scheduler: Cleanup based on PR feedback. 2018-02-19 16:46:42 -05:00
Subv 9a235eec55 AM: Corrected the response in EnsureSaveData.
The values are still unknown and the function is still considered a stub.
Puyo Puyo Tetris now tries to call fsp-srv:MountSaveData.
2018-02-18 18:09:52 -05:00
bunnei 539977f39b kernel: Use Scheduler class for threading. 2018-02-18 15:17:16 -05:00
bunnei 650f49fab2 kernel: Add Scheduler, which encapsulates the scheduling loading from Thread module. 2018-02-18 14:58:40 -05:00
bunnei f75cee6a24 core: Use shared_ptr for cpu_core. 2018-02-18 14:52:09 -05:00
bunnei 0b8907958f kernel: Remove unused address_arbiter code. 2018-02-18 14:46:11 -05:00
bunnei fd4afc5bc5 Merge pull request #201 from Subv/ipc_delay_
Kernel/IPC: Add a small delay after each SyncRequest to prevent thread starvation.
2018-02-18 14:11:34 -05:00
bunnei cccd72a8a9 Merge pull request #200 from Subv/bufferproducerfence
Make the fence handling in Vi a little less of a hack.
2018-02-18 14:11:04 -05:00
Subv fbb0ef851c Kernel/IPC: Add a small delay after each SyncRequest to prevent thread starvation.
Ported from citra PR #3091

The delay specified here is from a Nintendo 3DS, and should be measured in a Nintendo Switch.

This change is enough to prevent Puyo Puyo Tetris's main thread starvation.
2018-02-18 13:25:48 -05:00
Subv c6e56d6e54 nvmap: Make IocFromId return the same existing handle instead of creating a new one.
Games like Puyo Puyo Tetris and BOTW seem to depend on the buffer always having the same handle
2018-02-17 14:01:01 -05:00
Subv 26797bd41c Parcel: Ensure we don't read past the end of the parcels in Vi. 2018-02-17 14:00:44 -05:00
Subv 34f6578f62 Vi: Mark all fences as NO_FENCE in the DequeueBuffer response parcel. 2018-02-17 14:00:30 -05:00
Subv 5172ce6d8f Vi: Always write the IGBPBuffer in the RequestBuffer response parcel.
This may break libnx homebrew due to a bug in libnx but is required by official games since they always assume that the buffer will be there.
2018-02-17 13:59:45 -05:00
mailwl e86ec16ee7 Service/hid: stub some functions 2018-02-16 06:15:05 +03:00
Subv 7a12e4bd1a nvhost-ctrl: Stub NVHOST_IOCTL_CTRL_EVENT_WAIT. 2018-02-14 22:57:57 -05:00
Subv d3f8e79fc5 Vi: Mark the fences as valid in the DequeueBuffer response parcel. 2018-02-14 22:57:56 -05:00
Subv 9ec8dcff8a Vi: Added a missing u32 in the DequeueBuffer response parcel. 2018-02-14 22:57:56 -05:00
Subv f449136900 Vi: Don't write the IGBPBuffer in the IGBPRequestBufferResponseParcel. 2018-02-14 22:57:55 -05:00
Subv b4be5d2e65 Vi: Properly write the BufferProducerFence object in the DequeueBuffer response parcel. 2018-02-14 22:57:54 -05:00
bunnei 287bcf18e6 shared_memory: Remove some checks. 2018-02-14 22:24:06 -05:00
bunnei d9053aa8d4 pl_u: Implement basic shared font loading from RAM dump. 2018-02-14 22:22:41 -05:00
bunnei 201a04b951 log: Add logging category for NS services. 2018-02-14 21:43:11 -05:00
bunnei 69ab774ea3 hid: Stub GetVibrationDeviceInfo and SendVibrationValues. 2018-02-14 21:16:27 -05:00
bunnei 030b763b5d Merge pull request #188 from bunnei/refactor-buffer-descriptor
Refactor IPC buffer descriptor interface
2018-02-14 18:31:53 -05:00
bunnei 9bd160723a hle_ipc: Remove const from WriteBuffer size. 2018-02-14 14:21:10 -05:00
Hexagon12 5eb5f5ac9a pls, that was easy 2018-02-14 19:47:51 +02:00
James Rowe e027d1b40c Fix fps counter to correctly measure frame end when there was no frame to draw 2018-02-14 10:16:39 -07:00
bunnei 54d453835e Merge pull request #190 from bunnei/fix-qt-waittree
debugger: Fix wait_tree crash.
2018-02-14 10:18:56 -05:00
bunnei 901521dc86 Merge pull request #191 from lioncash/log
core: Silence formatting specifier warnings
2018-02-14 10:07:03 -05:00
Lioncash af7ddaf0e2 memory: Silence formatting sepecifier warnings 2018-02-14 01:54:54 -05:00
Lioncash 0dc7699bf2 nso: Silence formatting specifier warnings 2018-02-14 01:52:55 -05:00
Lioncash bf863bdb34 deconstructed_rom_directory: Silence formatting specifier warnings 2018-02-14 01:52:55 -05:00
Lioncash d2a3270adc nvdrv/interface: Silence formatting specifier warnings 2018-02-14 01:52:55 -05:00
Lioncash ad5c80a958 nvmap: Silence formatting specifier warnings 2018-02-14 01:52:55 -05:00
Lioncash 7076556833 nvhost_gpu: Silence formatting specifier warnings 2018-02-14 01:52:55 -05:00
Lioncash 25fc20c3d7 nvhost_ctrl: Silence formatting specifier warnings 2018-02-14 01:52:54 -05:00
Lioncash d6b7071e5e nvhost_ctrl_gpu: Silence formatting specifier warnings 2018-02-14 01:52:54 -05:00
Lioncash c2f9bbfc0d nvhost_as_gpu: Silence formatting specifier warnings 2018-02-14 01:52:49 -05:00
Lioncash 321765d0b4 thread: Silence formatting specifier warnings 2018-02-14 01:50:14 -05:00
Lioncash a708fd7a6d vm_manager: Silence formatting specifier warnings 2018-02-14 01:50:14 -05:00
Lioncash fbe2507693 gdbstub: Silence formatting specifier warnings 2018-02-14 01:50:01 -05:00
bunnei 289e29163b hle_ipc: Add GetReadBufferSize and check write buffer size. 2018-02-14 00:14:17 -05:00
bunnei 1cbf186f63 debugger: Fix wait_tree crash. 2018-02-14 00:02:14 -05:00
bunnei 6fe712735f service: Remove remaining uses of BufferDescriptor*. 2018-02-13 23:54:13 -05:00
bunnei f09dbaee17 audio: Use WriteBuffer instead of BufferDescriptorB. 2018-02-13 23:54:12 -05:00
bunnei d64dfffda6 vi: Eliminate direct usage of BufferDescriptorB. 2018-02-13 23:54:12 -05:00
bunnei e7d93b3cb2 nvdrv: Use ReadBuffer/WriteBuffer functions for Ioctl. 2018-02-13 23:54:12 -05:00
bunnei acdbc95583 vi: Use ReadBuffer/WriteBuffer functions for TransactParcel. 2018-02-13 23:54:11 -05:00
bunnei f0e350f3bb hle_ipc: Add helper functions for reading and writing buffers. 2018-02-13 23:54:07 -05:00
Lioncash c1583210dd maxwell_3d: Make constructor explicit 2018-02-13 23:47:51 -05:00
bunnei ac83b7c57f hle_ipc: Add helper functions for reading and writing buffers. 2018-02-13 23:26:03 -05:00
bunnei a92ac370cf vi: Fix TransactParcelAuto to support both buffer formats. 2018-02-13 23:26:01 -05:00
bunnei f87cb38361 Merge pull request #187 from Subv/maxwell3d_query
GPU: Partially implemented the QUERY_* registers in the Maxwell3D engine.
2018-02-13 23:25:07 -05:00
bunnei 0ad8d2ceff audren_u: Schedule reoccuring event. (#183)
* audren_u: Schedule reoccuring event.

* audren_u: Stub GetAudioRenderersProcessMasterVolume, and misc. changes.
2018-02-13 20:47:33 -05:00
bunnei cc30177df6 Merge pull request #181 from bunnei/vi-fixes-2
VI cleanup and add a hack for booting games
2018-02-13 19:17:27 -05:00
bunnei 6578b76809 Merge pull request #184 from mailwl/lm
Service/lm: add support to multiline logs
2018-02-13 10:29:33 -05:00
mailwl f22a8923cc Service/lm: add support to multiline logs 2018-02-13 09:44:53 +03:00
bunnei 72da0a304c vi: Add FENCE_HACK, which is useful for booting BOTW. 2018-02-12 21:24:40 -05:00
bunnei bfc7ad5ef7 vi: Stub TransactParcel CancelBuffer. 2018-02-12 21:24:39 -05:00
bunnei b11fd075b9 TransactParcel: Move WriteBlock to narrowest scope. 2018-02-12 21:24:38 -05:00
MerryMage 2a0362fe5d arm_dynarmic: Support direct page table access 2018-02-12 21:53:32 +00:00
bunnei a699c231ca Merge pull request #179 from gdkchan/audren_stubs
Stub RequestUpdateAudioRenderer, StartAudioRenderer and StopAudioRenderer
2018-02-12 16:33:30 -05:00
gdkchan bc194d7a4a Add RequestUpdateAudioRenderer, StartAudioRenderer and StopAudioRenderer stubs to audren:u 2018-02-12 17:44:55 -03:00
bunnei f8ab7992d0 Merge pull request #178 from Subv/command_buffers
GPU: Added a command processor to decode the GPU pushbuffers and forward the commands to their respective engines
2018-02-12 13:51:52 -05:00
Subv 9cf3a6cc00 GPU: Partially implemented the QUERY_* registers in the Maxwell3D engine.
Only QueryMode::Write is supported at the moment.
2018-02-12 12:34:41 -05:00
Subv 0088b3128b Make a GPU class in VideoCore to contain the GPU state.
Also moved the GPU MemoryManager class to video_core since it makes more sense for it to be there.
2018-02-11 23:44:12 -05:00
Subv 35176a0f73 GPU: Added a command processor to decode the GPU pushbuffers and forward the commands to their respective engines. 2018-02-11 22:42:48 -05:00
Subv f7ac88184d nvdrv: Make the GPU memory manager available to nvhost-gpu. 2018-02-11 21:30:23 -05:00
bunnei 1926a0d478 renderer_opengl: Support framebuffer flip vertical. 2018-02-11 21:03:55 -05:00
bunnei b3ac6d5f45 vi: Parse IGBPQueueBufferRequestParcel params and expose buffer flip vertical. 2018-02-11 21:00:41 -05:00
bunnei 74a9748176 vi: Fix OpenLayer and CreateStrayLayer. 2018-02-11 17:28:07 -05:00
bunnei e552a191a4 fsp_srv: Stub MountSdCard. 2018-02-09 23:33:50 -05:00
bunnei 95f967e1ab apm: Refactor service impl. to support multiple ports. 2018-02-09 23:33:49 -05:00
bunnei 51d611d186 vi: Implement TransactParcelAuto. 2018-02-09 23:33:49 -05:00
bunnei 5d35b4908e nvflinger: (Hack) Use first available buffer if none are found. 2018-02-09 23:33:49 -05:00
bunnei 7b6423defd IGBPQueueBufferRequestParcel: Don't enforce buffer length.
- Another fix for libnx.
2018-02-09 23:33:49 -05:00
bunnei 057dca7d64 IGBPRequestBufferResponseParcel: Fix response for libnx. 2018-02-09 23:33:43 -05:00
bunnei 0571220d0f Merge pull request #171 from bunnei/libnx-fixes
Various fixes for libnx, etc.
2018-02-09 15:51:43 -05:00
bunnei 5633e8a8a0 nvdrv: Fix QueryEvent for libnx. 2018-02-09 00:56:45 -05:00
bunnei 1967ed0f07 IApplicationDisplayService::CloseDisplay: Fix response params size. 2018-02-08 23:20:23 -05:00
bunnei 5ddf8bf804 nvhost_ctrl_gpu: Implement ZCullGetInfo. 2018-02-08 23:17:59 -05:00
MerryMage 9eb03cb8ef dynarmic: Update to 41ae12263
Changes: Primarily implementing more A64 instructions
2018-02-09 00:29:36 +00:00
bunnei 22194783e4 acc_u0: Implement ListAllUsers. 2018-02-08 18:59:23 -05:00
bunnei b331711c95 nvhost_as_gpu: Implement AllocateSpace and MapBufferEx. 2018-02-07 23:31:28 -05:00
bunnei 0fb50d9aa1 nvdrv: Add MemoryManager class to track GPU memory. 2018-02-07 23:31:26 -05:00
bunnei cfc2e2170a nvmap: Refactor to expose nvmap objects. 2018-02-07 22:55:12 -05:00
bunnei 49929e4a6b nvhost_as_gpu: Add nvmap as a class member. 2018-02-07 22:55:09 -05:00
mailwl ff9d0996a8 Service: stub some functions in am, audio, time, vi services 2018-02-07 15:11:17 +03:00
mailwl 4cfd3502de Service/hid: stub SetNpadHandheldActivationMode 2018-02-06 10:47:00 +03:00
bunnei 329a4f10e5 Merge pull request #165 from bunnei/puyo-fixes
Stubs for HID, AM, and a mutex fix
2018-02-05 20:14:40 -08:00
bunnei 41042e7b81 mutex: Update hasWaiters on release. 2018-02-05 21:54:10 -05:00
bunnei 6499c8eed6 hid: Stub ActivateTouchScreen and SetNpadJoyHoldType. 2018-02-05 21:53:11 -05:00
David bf7ed82620 Extra nvdrv support (#162)
* FinishInitalize needed for 3.0.1+ games

* nvdrv:s and nvdrv:t both use NVDRV

* Most settings return 0 on hardware, disabled NV_MEMORY_PROFILER for now.

NVN_THROUGH_OPENGL & NVRM_GPU_PREVENT_USE are a few interesting settings to look at. Carefully choosing settings can help with drawing graphics later on

* Initial /dev/nvhost-gpu support

* ZCullBind

* Stubbed SetErrorNotifier

* Fixed SetErrorNotifier log, Added SetChannelPriority

* Allocate GPFIFO Ex2, Allocate Obj Ctx, Submit GPFIFO

* oops

* Fixed up naming/structs/enums. Used vector instead of array for "gpfifo_entry"

* Added missing fixes

* /dev/nvhost-ctrl-gpu

* unneeded struct

* Forgot u32 in enum class

* Automatic descriptor swapping for ioctls, fixed nvgpu_gpu_get_tpc_masks_args being incorrect size

* nvdrv#QueryEvent

* Renamed logs for nvdrv

* Refactor ioctl so nv_result isn't needed

* /dev/nvhost-as-gpu

* Fixed Log service naming, CtxObjects now u32, renamed all structs, added static_asserts to structs, used INSERT_PADDING_WORDS instead of u32s

* nvdevices now uses "Ioctl" union,

* IoctlGpfifoEntry now uses bit field

* final changes
2018-02-05 18:19:31 -08:00
bunnei de6bb17846 IApplicationFunctions: Stub out EnsureSaveData. 2018-02-05 20:58:11 -05:00
bunnei 96c82f3cf8 Merge pull request #164 from ogniK5377/libnx_sm_fix
Don't call UNIMPLEMENTED for 'empty services', just return error code
2018-02-05 14:01:46 -08:00
David Marcec 6a19c31308 Dont call UNIMPLEMENTED for 'empty services', just return error code 2018-02-05 02:03:22 -08:00
David Marcec a6eb36e548 Changed .istorage to .romfs 2018-02-05 00:01:10 -08:00
bunnei 67baceaff0 set: GetAvailableLanguageCodes should not return lang_codes size. 2018-02-04 23:42:43 -05:00
bunnei c114abb301 nvflinger: Signal BufferQueue native handle event.
- This gets BOTW booting.
2018-02-04 23:00:35 -05:00
bunnei 2b621bc1d4 logger: Add Time service logging category. 2018-02-04 22:59:52 -05:00
bunnei 99ff0f523f logger: Add SET service logging category. 2018-02-04 22:55:45 -05:00
bunnei 18ce7f89f9 logger: Add PCTL service logging category. 2018-02-04 22:44:00 -05:00
bunnei 9f14ebbd89 logger: Add LM service logging category. 2018-02-04 22:41:55 -05:00
bunnei 3aeeee5ae3 logger: Add APM service logging category. 2018-02-04 22:39:47 -05:00
bunnei e7bad17a87 lm: Ensure log string is non-empty before checking back(). 2018-02-04 22:36:57 -05:00
bunnei aa91ad0445 logger: Add NIFM service logging category. 2018-02-04 22:35:42 -05:00
bunnei 951526d8b8 logger: Add VI service logging category. 2018-02-04 22:26:44 -05:00
bunnei 93ffd1fc30 hid: Stub out several functions. 2018-02-04 22:24:20 -05:00
bunnei aa035aa7f9 hid: Implement CreateActiveVibrationDeviceList. 2018-02-04 17:06:14 -05:00
bunnei fac2babc85 logger: Use Service_HID category where applicable. 2018-02-04 17:02:39 -05:00
bunnei 65868fffb2 logger: Use Service_NVDRV category where applicable. 2018-02-04 17:00:33 -05:00
bunnei ad816bab00 logger: Add AM service logging category. 2018-02-04 16:58:12 -05:00
bunnei 02a31a0771 logger: Add "account" service logging category. 2018-02-04 16:40:12 -05:00
bunnei fafea3b5fd acc_u0: Stub out GetLastOpenedUser. 2018-02-04 16:32:01 -05:00
bunnei 25cb7a5792 Merge pull request #160 from bunnei/svc-improvements
Several SVC fixes and improvements
2018-02-04 13:25:05 -08:00
bunnei 23c46db6f7 GetInfo: Implement IsCurrentProcessBeingDebugged. 2018-02-04 12:34:45 -05:00
bunnei 37967da1f2 WaitProcessWideKeyAtomic: Handle case where condition variable was already created. 2018-02-04 12:30:51 -05:00
mailwl 451d4c4336 acc:u0 : stub GetAccountId 2018-02-04 09:55:25 +03:00
bunnei 4a19b608fd svc: SharedMemory size should be 64-bits and cleanup. 2018-02-03 13:36:54 -05:00
bunnei 9892a119da ArbitrateLock: Assert that requesting_thread is current_thread. 2018-02-03 13:29:18 -05:00
bunnei 62f2f54459 Merge pull request #157 from bunnei/fix-duplicate-session
controller: DuplicateSession should return a ClientSession.
2018-02-03 10:25:01 -08:00
bunnei eb3be60fc2 controller: DuplicateSession should return a ClientSession. 2018-02-03 12:09:33 -05:00
mailwl 41ca591e11 Service:nifm: add nifm:a, nifm:s and nifm:u services 2018-02-03 18:09:51 +03:00
mailwl e974ad29c7 Service/am: Add AppletAE service (#153)
* Add AppletAE, step 1: move common interfaces to am.h

* Add AppletAE, step 2
2018-02-02 13:03:40 -08:00
bunnei e6a83e2024 Merge pull request #154 from mailwl/vi_create_stray_array
vi::CreateStrayLayer : add padding to request
2018-02-02 09:01:21 -08:00
bunnei 9ebcfa1bd2 Merge pull request #155 from mailwl/vi-services
Services/vi: add vi:s and vi:u services
2018-02-02 09:00:31 -08:00
bunnei b5846ac67d Merge pull request #152 from shinyquagsire23/sharedmem-valid-bounds
shared_memory: Only mark addresses as invalid if they are within the heap
2018-02-02 08:59:45 -08:00
mailwl be7ef9498d Services/vi: add vi:s and vi:u services 2018-02-02 12:59:50 +03:00
mailwl 9b3b9fe930 vi::CreateStrayLayer : add padding to request 2018-02-02 12:03:02 +03:00
shinyquagsire23 cd0befbd05 shared_memory: Only mark addresses as invalid if they are within the heap 2018-01-29 23:38:56 -07:00
mailwl 3dbe629396 [WIP] sfdnsres: stub (#146)
sfdnsres: Add several stubs
2018-01-29 22:29:47 -08:00
bunnei a36f4860f9 Merge pull request #148 from MerryMage/feature/special-memory
memory: Replace all memory hooking with Special regions
2018-01-27 15:20:53 -05:00
MerryMage 7a23a53396 memory: Replace all memory hooking with Special regions 2018-01-27 15:16:39 +00:00
bunnei 9a0a22e596 time: Implement ISteadyClock::GetCurrentTimePoint. 2018-01-25 21:29:39 -05:00
bunnei 0c455925ed audout_u: Various cleanups. 2018-01-24 22:38:19 -05:00
bunnei ca93cbddcb ResponseBuilder: Use a bit field for customizing instead of always_move_handles. 2018-01-24 22:24:20 -05:00
bunnei 747ae39608 time: Stub GetSystemClockContext function. 2018-01-24 22:24:18 -05:00
bunnei c943b30b0a server_session: Fix scenario where all domain handlers are closed. 2018-01-24 22:24:16 -05:00
bunnei f328cb2c7c hle: Rename RequestBuilder to ResponseBuilder. 2018-01-24 22:24:10 -05:00
bunnei 427b97e60c service: Fix all incorrect IPC response headers. 2018-01-24 22:21:33 -05:00
bunnei 2b07c87f0c ipc_helpers: Make interface domain agnostic and add header validation. 2018-01-24 22:19:01 -05:00
bunnei a3aadaea60 hle: Integrate Domain handling into ServerSession. 2018-01-24 22:18:56 -05:00
bunnei 4fabdf77d7 hle: Remove Domain and SyncObject kernel objects. 2018-01-24 22:18:54 -05:00
bunnei 2ab0f638f0 handle_table: Remove ConvertSessionToDomain. 2018-01-24 22:18:51 -05:00
st4rk d37214f8a3 audout:u OpenAudioOut and IAudioOut (#138)
* Updated the audout:u and IAudioOut, now it might work with RetroArch without trigger an assert, however it's not the ideal implementation

* Updated the audout:u and IAudioOut, now it might work with RetroArch without trigger an assert, however it's not the ideal implementation

* audout:u OpenAudioOut implementation and IAudioOut cmd 1,2,3,4,5 implementation

* using an enum for audio_out_state as well as changing its initialize to member initializer list

* Minor fixes, added Service_Audio for LOG_*, changed PcmFormat enum to EnumClass

* Minor fixes, added Service_Audio for LOG_*, changed PcmFormat enum to EnumClass

* added missing Audio loggin subclass, minor fixes, clang comment breakline

* Solving backend logging conflict

* minor fix

* Fixed duplicated Service NVDRV in backend.cpp, my bad
2018-01-24 22:17:54 -05:00
gdkchan 7f7e83a76b Fix time returning epoch time in milliseconds rather than in seconds 2018-01-24 11:54:47 -03:00
Rozlette 82924195f8 logging: add missing NVDRV subclass to macro list 2018-01-23 22:18:23 -06:00
N00byKing eb8e4f17d3 Correct Spelling 2018-01-23 14:20:18 +01:00
bunnei da98d4dd03 Merge pull request #135 from Subv/no_ports
IPC: Don't create unnecessary ports when returning sub interfaces.
2018-01-22 21:37:15 -05:00
Subv aec193732c Services: Added a todo about returning interfaces as domain objects in lm, hid and time. 2018-01-22 20:40:43 -05:00
bunnei 40bd3918a2 Merge pull request #133 from Subv/nvflinger2
AppletOE: Stubbed CreateManagedDisplayLayer to create a new layer in the default display.
2018-01-22 17:52:47 -05:00
Subv fb5f2a653e Time: Don't create unnecessary ports when retrieving the clock service sessions. 2018-01-22 17:42:11 -05:00
Subv 98ff4642ff HID: Don't create an unnecessary port in CreateAppletResource. 2018-01-22 17:41:31 -05:00
Subv 3541a04d4d LM: Don't create an unnecessary port in Initialize. 2018-01-22 17:35:40 -05:00
Subv 196f1226c5 IPC: Don't create an unnecessary port when using PushIpcInterface outside of a domain. 2018-01-22 17:31:23 -05:00
bunnei 7dae21fe2d Merge pull request #134 from gdkchan/audout_hid_fix
Stub OpenAudioOut and fix a issue with HID IAppletResource
2018-01-22 17:09:09 -05:00
gdkchan 45f08a927c Stub OpenAudioOut and fix a issue with HID IAppletResource being created more than once 2018-01-22 17:27:55 -03:00
Subv dda6711a67 AppletOE: Stubbed CreateManagedDisplayLayer to create a new layer in the Default display.
This function is used by libnx to obtain a new layer.
2018-01-22 13:50:22 -05:00
Subv db5b2c0f0f AppletOE: Make ISelfController keep a reference to nvflinger.
It'll be needed when we implement CreateManagedDisplayLayer.
2018-01-22 13:46:36 -05:00
Subv 696b61b9c3 Services: Vi shouldn't be responsible for creating nvflinger.
It is now created during Service initialization and passed to all the services that need it.
2018-01-22 13:40:02 -05:00
Subv edb1c9589b VI: Move BufferQueue and NVFlinger to their own folder/namespace. 2018-01-22 11:54:58 -05:00
st4rk 564b91d219 Added stubs for audio services. (#116)
* stubs for audout:u, audin:u, audrec:u, audren:u, codecctl and decoding tables with nullptr for future implementations

* fixing the changes requested (remove private, explicit)
2018-01-21 22:03:36 -05:00
bunnei 961cfda2a4 Merge pull request #131 from lioncash/enum
nvmap: Make IoctlCommands an enum class
2018-01-21 22:01:27 -05:00
David e08fdd4101 Added nvmemp, Added /dev/nvhost-ctrl, SetClientPID now stores pid (#114)
* Added nvmemp, Added /dev/nvhost-ctrl, SetClientPID now stores pid

* used clang-format-3.9 instead

* lowercase pid

* Moved nvmemp handlers to cpp

* Removed unnecessary logging for NvOsGetConfigU32. Cleaned up log and changed to LOG_DEBUG

* using std::arrays instead of c arrays

* nvhost get config now uses std::array completely

* added pid logging back

* updated cmakelist

* missing includes

* added array, removed memcpy

* clang-format6.0
2018-01-21 17:59:50 -05:00
bunnei 173cd959e8 Merge pull request #128 from Subv/parcel_query
VI: Implement the Query transaction of IHOSBinderDriver, and stubbed some results.
2018-01-21 17:56:06 -05:00
Lioncash aa0cc8d3e9 nvmap: Add a return 0 underneath the UNIMPLEMENTED macro
This macro resolves to an empty macro in release builds.
2018-01-21 17:07:47 -05:00
Lioncash 5a05f7ef9f nvmap: Make IoctlCommands an enum class
Prevents the enum values from polluting the surrounding scope
2018-01-21 17:07:13 -05:00
bunnei a2c082be79 file_sys: Clang format fixes. 2018-01-21 15:51:45 -05:00
bunnei a94d5d1938 fsp_srv: Various improvements to IStorage:Read implementation. 2018-01-21 15:51:43 -05:00
bunnei 985c960e85 deconstructed_rom_directory: Implement istorage loading for RomFS. 2018-01-21 15:39:31 -05:00
David Marcec b609697364 filesystem: Implement basic IStorage functionality. 2018-01-21 15:39:28 -05:00
bunnei 0446482361 file_sys: Cleanup to better match Switch file system constructs.
file_sys: Add factory class for RomFS file system.
2018-01-21 15:39:26 -05:00
bunnei f3cfe5caac file_sys: Remove disk_archive, savedata_archive, and title_metadata. 2018-01-21 15:39:23 -05:00
bunnei 9d9038a32f archive_backend: Minor changes to match Switch IFileSystem. 2018-01-21 15:39:20 -05:00
bunnei bc4d08fe34 file_sys: Repurpose 3DS IVFC code for Switch ROMFS. 2018-01-21 15:39:18 -05:00
bunnei f8b5b28057 Merge pull request #129 from Rozelette/master
gdbstub: Update registers and sizes for aarch64
2018-01-21 15:32:15 -05:00
Rozlette 939be88b01 gdbstub: Update registers and sizes for aarch64
This gets gdbstub working at least to the point where clients can
communicate with it.

What works:
- Reading/writing GPRegs
- Reading/writing memory
- Interrupting the emulated program and continuing

What does NOT work:
- Breakpoints. Sizes have been updated to u64, but support will need to be
  added in the interpreter for them to work.
- VRegs. Mostly because my gdb was having issues with 128-bit regs for
  some reason. However, the current u128 representation is a bit
  awkward to use and should probably be updated first.
2018-01-21 11:12:49 -06:00
Subv bd76a7d7f7 VI: Implement the Query transaction of IHOSBinderDriver, and stubbed some results. 2018-01-21 11:13:47 -05:00
Matthew Brener 1117c87e68 Fix spelling error in CMakeLists
Minor spelling error of its --> it's
2018-01-21 17:40:47 +11:00
bunnei 4f20190c95 Merge pull request #72 from N00byKing/patch-2
Implement Pull #3275 from citra: core: Don't Shutdown before we've even Init-ed
2018-01-20 23:11:10 -05:00
bunnei f1f6d730a5 Merge pull request #92 from gdkchan/nro_refactor
Fix NRO entry point
2018-01-20 23:10:15 -05:00
bunnei cc0764ff06 Merge pull request #122 from tgsm/time-remove-pragma
service/time: remove accidental #pragmas
2018-01-20 22:27:10 -05:00
tgsm c68e6e267a service/time: remove accidental #pragmas 2018-01-20 21:34:37 -05:00
Rozlette 76b2dabd35 loader: Minor style fix in deconstructed_rom_directory 2018-01-20 20:13:53 -06:00
bunnei ca0fb0079c Merge pull request #117 from jroweboy/clang-format
Clang format as a build target
2018-01-20 19:12:21 -05:00
James Rowe ea88c44eb8 Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00
bunnei eea972611a Merge pull request #120 from Rozelette/master
memory: Return false for large VAddr in IsValidVirtualAddress
2018-01-20 17:37:55 -05:00
Rozlette ecc35e89e0 memory: Return false for large VAddr in IsValidVirtualAddress 2018-01-20 14:56:15 -06:00
bunnei 9b7e8a2e2b loader: Clean up ctors and includes. 2018-01-20 15:54:17 -05:00
bunnei b870202ad5 loader: Add DeconstructedRomDirectory for game dumps. 2018-01-20 15:54:15 -05:00
bunnei f2d6ec1404 loader: Refactor to also pass filepath into IdentifyType. 2018-01-20 14:59:44 -05:00
bunnei 965c2bddb2 nso: Remove code specific to directory loading. 2018-01-20 14:59:42 -05:00
River City Ransomware 3f3688db0b Port citra #3352 to yuzu (#103)
* Port citra #3352 to yuzu

This change allows non x86_64 architectures to compile yuzu by skipping the building of dynarmic

* Fixed clang-format errors

* fixes more clang-format errors
2018-01-19 19:36:09 -05:00
David 61a92c7347 Added CreateSharedMemory & UNIMPLEMENTED() for non existent services. (#113)
* Added svcCreateSharedMemory

* Services which are not implemented now throw UNIMPLEMENTED()

* clang-format

* changed perms to u32

* removed camelcase
2018-01-19 19:35:25 -05:00
River City Ransomware 39827d573a Fixes some cast warnings, partial port of citra #3064 (#106)
* Fixes some cast warnings, partially fixes citra #3064

* Converted casts to uint32_t to u32

* Ran clang-format
2018-01-19 18:01:41 -05:00
bunnei 1a1bb5810a Merge pull request #112 from Rozelette/master
ISelfController: Stub LockExit and UnlockExit
2018-01-19 17:54:05 -05:00
goaaats 559de2816f acc, set, applet_oe: stub various functions, add set service (#105)
* Stubs for various acc:u0 funcs needed

* Stub for GetDesiredLanguage in IApplicationFunctions

* Add set service + stubs needed for games

* Fix formatting

* Implement IProfile, IManagerForApplication, return bool in CheckAvailability, style fixes

* Remove IProfile::Get(needs more research), fix IPC response sizes
2018-01-19 15:44:58 -05:00
Rozlette 6e80f59506 ISelfController: Stub LockExit and UnlockExit 2018-01-19 14:09:50 -06:00
bunnei 55e4ecb443 Merge pull request #109 from bunnei/libnx-fixes
Fix svcGetInfo for libnx
2018-01-19 14:48:08 -05:00
bunnei aebd683962 Merge pull request #97 from bunnei/time-stub
time: Stub out GetTotalLocationNameCount and some cleanup.
2018-01-19 14:47:50 -05:00
bunnei 35f8a09953 time: Add new line to ends of files. 2018-01-19 00:39:04 -05:00
bunnei ac1c926aa9 applet_oe: Clang-format. 2018-01-19 00:37:36 -05:00
bunnei 43342640fe time: Stub out GetTotalLocationNameCount and some cleanup. 2018-01-19 00:32:52 -05:00
bunnei 01d3a7db93 nvdrv: Stub SetClientPID. 2018-01-18 23:50:18 -05:00
bunnei 94483465ad svc: Fix svcGetInfo MapRegionBaseAddr. 2018-01-18 23:44:15 -05:00
bunnei c268244812 svc: Add additional fields to MemoryInfo struct. 2018-01-18 23:37:54 -05:00
gdkchan c22db301b8 Fix dispdrv typo 2018-01-18 23:21:26 -03:00
bunnei 81dc03c510 Merge pull request #100 from Rozelette/master
time: Refactor time:* to use a single shared module
2018-01-18 21:10:55 -05:00
bunnei bf7b7d9f11 Merge pull request #104 from RiverCityRansomware/resizedConfigWindow
Port citra #3336
2018-01-18 21:08:54 -05:00
Lioncash e11285c9a8 qt: Migrate to Qt 5 signal/slot connection syntax where applicable 2018-01-18 20:09:40 -05:00
Evgeni Danailov 4e1e16ac61 ui: Rename almost all classes in configuration_input.ui (#99)
* Rename verticalLayout_25 to verticalLayout_23.

* Rename almost all classes.
2018-01-18 15:28:18 -05:00
River City Ransomware 1eb26ce5bd Port citra #3336 - Resizes the configuration window to not be so stretched out 2018-01-18 15:22:28 -05:00
gdkchan bb3209e8f1 Fix NRO Entry Point 2018-01-18 17:18:43 -03:00
gdkchan 90b697db30 Stub PopLaunchParameter and implement Buffer C Descriptors reading on hle_ipc (#96)
* Stub PopLaunchParameter and implement Buffer C Descriptors reading

* Address PR feedback

* Ensure we push a u64 not a size_t

* Fix formatting
2018-01-18 14:54:34 -05:00
flerovium^-^ 2c5658443e Start to implement/stub BSD:U and SFDNSRES services (#78)
* bsd: start stubbing bsd:u and sfdnsres

* bsd: stubbed RegisterClient

* bsd: attempt to get past socket()

* bsd: fix some wrong assumptions about IPC

* bsd: fix format specifiers

* bsd: stubbed Connect()

* bsd: stubbed SendTo()

* made requested changes

* sockets: respect alphabetical order at service installation

* run clang-format

* bsd: start stubbing bsd:u and sfdnsres

* bsd: stubbed RegisterClient

* bsd: attempt to get past socket()

* bsd: fix some wrong assumptions about IPC

* bsd: fix format specifiers

* bsd: stubbed Connect()

* bsd: stubbed SendTo()

* made requested changes

* sockets: respect alphabetical order at service installation

* run clang-format

* run clang-format (2)
2018-01-18 14:35:03 -05:00
Rozlette 778d3edb2d time: Fix use of CamelCase in ToCalendarTimeWithMyRule 2018-01-18 11:02:05 -06:00
Rozlette 00f121cb65 time: Refactor time:* to use a single shared module 2018-01-18 10:58:29 -06:00
bunnei 7d2ac45b9b Merge pull request #95 from bunnei/lm-skip-byte
lm: Minor logging fix to skip a byte.
2018-01-18 10:57:41 -05:00
bunnei 4ddfb2e881 Merge pull request #84 from lioncash/cmake
CMakeLists: Derive the source directory grouping from targets themselves
2018-01-18 01:37:17 -05:00
bunnei 79887def50 Merge pull request #91 from lioncash/svc
svc: Minor clarity changes
2018-01-18 00:27:41 -05:00
bunnei 93e711daf1 lm: Minor logging fix to skip a byte. 2018-01-18 00:08:38 -05:00
bunnei 99283876f5 Merge pull request #90 from lioncash/vi-override
vi: Minor clean up/correctness changes
2018-01-17 23:55:07 -05:00
bunnei 70721aaf92 Merge pull request #89 from lioncash/vi-vector
vi: Copy data directly into the std::vector within Parcel's ReadBlock function
2018-01-17 23:52:40 -05:00
bunnei c61e80a6ba Merge pull request #88 from lioncash/include
hotkeys: Add missing <QTreeWidgetItem> include
2018-01-17 23:04:44 -05:00
bunnei e66e809e4f Merge pull request #87 from lioncash/override
game_list: Add missing override specifier for KeyReleaseEater's eventFilter function
2018-01-17 22:44:03 -05:00
bunnei 300870e2b5 Merge pull request #86 from lioncash/doxygen
game_list: Amend doxygen parameter identifiers
2018-01-17 22:20:50 -05:00
bunnei df3d228aeb Merge pull request #85 from lioncash/warn
telemetry: Silence initialization order warnings
2018-01-17 21:59:20 -05:00
Lioncash 447c25646e CMakeLists: Derive the source directory grouping from targets themselves
Removes the need to store to separate SRC and HEADER variables, and then
construct the target in most cases.
2018-01-17 21:51:43 -05:00
bunnei eae8413876 controller: Use DuplicateSession for DuplicateSessionEx. 2018-01-17 21:48:17 -05:00
bunnei fc7efb9fb3 Merge pull request #83 from lioncash/pessimizing-move
input_common/sdl: Silence a -Wpessimizing-move warning
2018-01-17 21:08:01 -05:00
Lioncash e396daeb9d svc: Rename some entries to match their analogue on SwitchBrew
Makes the codebase a little more consistent with regards to available documentation. Also amends the duplicate case where there was a similar entry at 0x72 named ConnectToPort.
2018-01-17 20:38:23 -05:00
Lioncash 9453658987 svc: Add CreateJitMemory and MapJitMemory svc strings
Makes the table match SwitchBrew for these entries
2018-01-17 20:32:56 -05:00
bunnei 266e2967b2 Merge pull request #81 from lioncash/qt-bootmgr
bootmanager: Minor tidiness/correctness changes
2018-01-17 20:24:56 -05:00
Lioncash 88bfa0f287 vi: Make constructors explicit where applicable
Prevents implicit conversions.
2018-01-17 20:21:16 -05:00
Lioncash 077cbaa3da vi: Add missing override specifiers 2018-01-17 20:16:48 -05:00
Lioncash 62310a11ce vi: Copy data directly into the std::vector within Parcel's ReadBlock function
Previously this would unnecessarily zero-initialize the vector before
copying the actual data into the vector instance.
2018-01-17 20:09:41 -05:00
bunnei d61b0c7405 Merge pull request #80 from gdkchan/nro_fix
Fix NRO loading
2018-01-17 20:05:21 -05:00
Lioncash c4657be40d hotkeys: Add missing <QTreeWidgetItem> include 2018-01-17 20:00:25 -05:00
Lioncash 45af9a2e1f game_list: Add missing override specifier for KeyReleaseEater's eventFilter function 2018-01-17 19:54:06 -05:00
Lioncash f540adeef2 game_list: Amend doxygen parameter identifiers for containsAllWords() 2018-01-17 19:52:15 -05:00
Lioncash 21b10a8602 telemetry: Silence initialization order warnings 2018-01-17 19:43:24 -05:00
Lioncash 651b5153dc input_common/sdl: Silence a -Wpessimizing-move warning 2018-01-17 18:44:16 -05:00
Lioncash 656934e051 bootmanager: Minor tidiness/correctness changes
Moved over from #3266 in citra.
2018-01-17 18:35:02 -05:00
bunnei ed94fbd5a2 Merge pull request #73 from N00byKing/3093
Implement Pull #3093 from citra: Added missing headers to CMakeLists.txt and fixed includes.
2018-01-17 18:18:34 -05:00
gdkchan 89f7882ab4 Fix NRO loading 2018-01-17 20:16:09 -03:00
bunnei 98b2a4d549 Merge pull request #76 from Rozelette/master
TIME: consolidate time:* interfaces, stub functions and structs
2018-01-17 17:32:48 -05:00
N00byKing 0ea4e57990 Implement Pull #3306 from citra: citra_qt: Drop Qt 5 version checks in code (#41)
* Update bootmanager.cpp

* This *should* fix the clang error
2018-01-17 17:19:41 -05:00
Rozlette 44abbee4c3 TIME: consolidate time:* interfaces, stub functions and structs 2018-01-17 14:15:14 -06:00
gdkchan 1402e97994 Remove relocation on NSO/NRO 2018-01-17 17:01:10 -03:00
bunnei 3c43fdd01f Merge pull request #42 from N00byKing/3295
Implement Pull #3295 from citra: citra_qt: CMakeLists: Drop leftover handling code for Qt 4 UI files
2018-01-17 13:50:38 -05:00
bunnei 6c993f2e46 Merge pull request #57 from nkatz565/fix-tr
Fix non translated string (same as Citra PR 2949)
2018-01-17 13:46:39 -05:00
bunnei 7b7b852743 Merge pull request #64 from shinyquagsire23/hid-timing
hid: Adjust timing based on actual hardware
2018-01-17 12:30:46 -05:00
bunnei 7a2afe3b83 Merge pull request #70 from flerovii/nvdrv-close
nvdrv: stubbed Close(cmd 2)
2018-01-17 12:29:23 -05:00
N00byKing 0f1dcc9540 Update CMakeLists.txt 2018-01-17 18:21:49 +01:00
N00byKing a244896e75 Update title_metadata.h 2018-01-17 18:20:52 +01:00
bunnei 11c878023f svc: Clang-format fix. 2018-01-17 12:19:17 -05:00
N00byKing cdcfc19258 Update core.cpp 2018-01-17 18:12:06 +01:00
bunnei 6ee9e3a1dc Merge pull request #71 from N00byKing/patch-1
Implement Pull #3109 from citra: sdl2 default ini: fix framelimit
2018-01-17 12:09:47 -05:00
bunnei c6b7a3861c Merge pull request #62 from bunnei/domain-close-handle
Implement IPC domain command CloseVirtualHandle
2018-01-17 12:09:12 -05:00
N00byKing f28fd7a13b Update default_ini.h 2018-01-17 18:01:09 +01:00
bunnei 0d1c6f492e hle_ipc: Clang format. 2018-01-17 11:37:26 -05:00
noah katz 630e0825e8 Fixed formatting 2018-01-17 11:20:46 -05:00
Frederic Meyer 2a9b625cd7 nvdrv: stubbed Close(cmd 2) 2018-01-17 17:08:46 +01:00
River City Ransomware c365642bb8 Fix gdbstub typo, fixes Citra #3318
Core::System().GetInstance().IsPoweredOn() -> Core::System::GetInstance().IsPoweredOn()
2018-01-17 09:25:25 -05:00
shinyquagsire23 ebd7b8409e hid: Adjust timing based on actual hardware 2018-01-17 01:20:25 -07:00
bunnei c3330b0a08 Merge pull request #60 from jroweboy/game-frame
UI: Fix frame rate perf stats
2018-01-17 01:23:43 -05:00
bunnei ce1626b80e ipc: Implement domain command CloseVirtualHandle. 2018-01-17 01:20:10 -05:00
bunnei 4ef928f9b5 loggin: Add IPC logging category. 2018-01-17 01:20:02 -05:00
James Rowe 263386fe42 UI: Fix frame rate perf stats
Adds in a missing EndGameFrame when nvdrv swaps buffers
2018-01-16 20:44:02 -07:00
bunnei 6db358e905 Merge pull request #34 from shinyquagsire23/hid-sharedmem-layouts-circbufs-meta
hid: Write to all layouts, implement circular buffers, set up controller metadata.
2018-01-16 21:54:46 -05:00
bunnei d4e594651f acc_u0: Add IPC interface and stub InitializeApplicationInfo. 2018-01-16 21:34:27 -05:00
shinyquagsire23 6424b131db hid: clang-format 2018-01-16 19:22:58 -07:00
shinyquagsire23 63ab9293d4 hid: Adjust for style guide 2018-01-16 19:22:12 -07:00
bunnei 164c8e8bc7 applet_oe: Fix GetOperationMode and GetPerformanceMode. 2018-01-16 20:32:08 -05:00
noah katz 915bc24ba1 Fix non translated string (same as Citra PR 2949) 2018-01-16 19:56:41 -05:00
Subv 9eb6d67a12 NV: Implemented the nvdrv service, which uses the same interface as nvdrv:a 2018-01-16 19:04:09 -05:00
Subv fd950afe3a NV: Move the nvdrv classes into the Nvidia namespace, and move the functionality to a s single module that services call. 2018-01-16 19:03:49 -05:00
Subv d0477951b9 VI: Stubbed GetNativeHandle, Create/DestroyStrayLayer and CloseDisplay 2018-01-16 19:01:03 -05:00
Subv 02b6fc7330 Services: Stubbed APM::OpenSession and the ISession interface.
# Conflicts:
#	src/core/hle/service/am/applet_oe.cpp
#	src/core/hle/service/apm/apm.cpp
2018-01-16 19:00:32 -05:00
Subv 279e546493 AppletOE: Stub a bunch of functions required by libnx homebrew. 2018-01-16 18:58:06 -05:00
Subv 6b3510cca6 SVC: Correct some return values in svcGetInfo and added TitleId and PrivilegedProcessId stubs.
# Conflicts:
#	src/core/hle/kernel/svc.cpp
2018-01-16 18:50:23 -05:00
Subv 24a605cc10 SVC: Add 4.0.0+ comment to GetInfoType enum values. 2018-01-16 18:44:39 -05:00
Subv 911ea4451e IPC: Push domain objects as move handles when not in a domain. 2018-01-16 18:42:08 -05:00
bunnei 227f2f7664 Merge pull request #52 from ogniK5377/fsp
added more svcGetInfo pairs for 3.0.0+ support, Changed HEAP_SIZE and TLS_AREA_VADDR. changed mem usage & heap usage stub added, ISelfController, IApplication function stubs. Added SetThreadCoreMask
2018-01-16 18:27:48 -05:00
David f10082f410 Update memory.h 2018-01-16 15:27:13 -08:00
bunnei 952fa4670f Merge pull request #45 from FearlessTobi/patch-1
Implement Pull #3030 from Citra: Rename derivative class name
2018-01-16 17:59:14 -05:00
bunnei 64a8d977e2 Merge pull request #43 from N00byKing/3052
Implement Pull #3052 from citra: Correct spelling of searchfield in comment
2018-01-16 17:58:25 -05:00
bunnei 2af2310e1b Merge pull request #53 from nkatz565/nk-fixlabels
Implement Pull #3240 from Citra: Add button labels for sdl joystick mappings
2018-01-16 17:55:59 -05:00
bunnei 64eccfb72b Merge pull request #44 from Rozelette/master
nso: Modify .bss size calculation logic
2018-01-16 17:24:49 -05:00
David Marcec 18295b0325 SetThreadCoreMask stub, time to implement fsp 2018-01-16 14:23:53 -08:00
David Marcec 642c9062c0 implemented more of ISelfController and IApplicationFunctions 2018-01-16 14:18:18 -08:00
David Marcec eb1ddebb18 Added more svcGetInfo pairs 2018-01-16 14:06:45 -08:00
David Marcec 57523d6fab Increased heap size and changed tls area vaddr 2018-01-16 13:53:43 -08:00
muemart 48bb562f1d Use static functions instead of lambdas 2018-01-16 16:49:48 -05:00
muemart 40dc44228e Add translation support for button labels 2018-01-16 16:49:41 -05:00
muemart 4b0302de21 Add button labels for sdl joystick mappings 2018-01-16 16:49:29 -05:00
MerryMage 41bfd994f6 clang-format 2018-01-16 18:05:21 +00:00
Tobias e3fbbfa155 Implement Pull #3030 from Citra
citra-qt: Rename derivative class name
2018-01-16 18:50:04 +01:00
Rozlette 2e5806922f nso: Modify .bss size calculation logic 2018-01-16 11:14:36 -06:00
bunnei e1056d4648 Merge pull request #31 from jroweboy/fix-deploy
Build/Deploy Updates to Setup Nightly Builds
2018-01-16 11:56:14 -05:00
N00byKing 1a8a93a9a2 Update game_list.cpp 2018-01-16 17:55:06 +01:00
N00byKing 8ec88e7059 Update CMakeLists.txt 2018-01-16 17:51:08 +01:00
James Rowe 19fe8884ce Build: Automagically handle unicorn
On MSVC if unicorn isn't found, fallback to bundled unicorn
On everything else, fallback to building unicorn in externals

Also fixes loading unicorn in msvc
2018-01-16 09:39:07 -07:00
N00byKing b2228b3b2a Implement Pull #3333 from citra: citra_qt: Pause emulation on CoreError (#39) 2018-01-16 11:32:27 -05:00
bunnei 1efd0ca123 Merge pull request #24 from nkatz565/nk-inputs
Adding meumart's Citra SDL Joystick support. Citra PR #3116
2018-01-16 10:13:39 -05:00
goaaats 8244ccf2c0 Merge citra-emu PR#3159 by FearlessTobi(citra-qt : Fix a bug in our fullscreen implementation) 2018-01-16 15:59:30 +01:00
goaaats fe722aba41 Merge citra-emu PR#3001 by Styleoshin(citra-qt : Adding fullscreen mode) 2018-01-16 15:50:33 +01:00
shinyquagsire23 7d238badfb hid: Write to all layouts, implement circular buffers, set up controller metadata. 2018-01-16 03:14:27 -07:00
James Rowe 84a702e6c3 Build: Add unicorn as a submodule and build it if needed
Adds a cmake custom target that will build unicorn on first compile and
uses this in the build scripts as well. Updates Appveyor and Travis
build scripts to work with the new unicorn build, and updates the paths
to all of the different artifacts.
2018-01-16 01:15:52 -07:00
muemart a884f3d03e Adding meumart's Citra SDL Joystick support. Citra PR #3116 2018-01-15 20:02:30 -05:00
bunnei 7fe337b38d nso: Load subsdk4 if available. 2018-01-15 17:18:24 -05:00
bunnei f68b97960c pctl: Clang format. 2018-01-15 15:16:06 -05:00
bunnei c8359e72f5 pctl: GetService should return an IParentalControlService interface. 2018-01-15 15:10:18 -05:00
bunnei e2229c84ad applet_oe: Stub SetFocusHandlingMode, GetCurrentFocusState, SetTerminateResult. 2018-01-15 14:41:06 -05:00
bunnei 5ee2436934 settings: Fix button mappings array to have correct entries. 2018-01-15 13:09:14 -05:00
bunnei a5eab00ac7 Merge pull request #20 from Andrix44/fixes
Various fixes
2018-01-15 12:56:16 -05:00
bunnei 002a7474ba Merge pull request #16 from shinyquagsire23/hid-sharedmem-impl-start
HID Sharedmem Impl Start
2018-01-15 12:54:54 -05:00
unknown 535cfec8f7 Clanggit rebase -i fixes 2018-01-15 18:20:53 +01:00
unknown d3af215cbb Clang format 2018-01-15 17:55:16 +01:00
unknown c65510feb9 Change default log level to info 2018-01-15 17:15:10 +01:00
unknown b22d73d2af Update the internal resolution settings 2018-01-15 16:59:02 +01:00
shinyquagsire23 382e739799 yuzu_cmd: Fix default ini, add screenshot button 2018-01-15 02:30:58 -07:00
shinyquagsire23 2f5dbd0f43 hid: Bare-minimum sharedmem input 2018-01-15 02:30:58 -07:00
shinyquagsire23 5d387d9205 hid: Remove redundant HID prefix on structs/enums 2018-01-15 02:30:58 -07:00
shinyquagsire23 974f097bbd configure_input: update w/ Switch buttons 2018-01-15 02:30:53 -07:00
shinyquagsire23 0392340d75 settings: Screenshot button 2018-01-15 02:30:53 -07:00
shinyquagsire23 c4d48f291a yuzu_cmd: fix default ini 2018-01-15 02:30:53 -07:00
shinyquagsire23 611e78c378 settings: adjust button configs for Switch controllers 2018-01-15 02:30:53 -07:00
shinyquagsire23 65b9660a84 hid: Add sharedmem structs 2018-01-15 02:30:53 -07:00
bsaleil 2d46f08fa0 vi: Add IManagerDisplayService::CloseDisplay function 2018-01-15 01:29:00 -05:00
bunnei 91b36ef7e0 Merge pull request #14 from ogniK5377/master
Changed ICommonStateGetter::ReceiveMessage to allow further execution in games
2018-01-15 00:21:16 -05:00
bunnei 386ecbd433 renderer_gl: Clear screen to black before rendering framebuffer. 2018-01-15 00:20:19 -05:00
David Marcec 8e6ff4bd7b Games expect 15 for ICommonStateGetter::ReceiveMessage in order to continue execution 2018-01-14 21:06:34 -08:00
bunnei f0bccde0a0 renderer: Render previous frame when no new one is available. 2018-01-14 23:54:56 -05:00
bunnei 2d7ec3bbe0 lm: Fix IPC header for Initialize. 2018-01-14 21:45:06 -05:00
bunnei 1e778e2f70 time: Implement GetStandardUserSystemClock, GetCurrentTime. 2018-01-14 21:45:06 -05:00
bunnei 814a088f41 audio: Add files to CMake. 2018-01-14 21:45:06 -05:00
bunnei d5c25e7115 hid: Remove unused registered_loggers. 2018-01-14 21:45:06 -05:00
bunnei 3f3d08e5f4 audio: Stub out AudOutU::ListAudioOuts. 2018-01-14 21:45:06 -05:00
bunnei 951d762f1e hid: Implement IAppletResource::GetSharedMemoryHandle. 2018-01-14 21:45:06 -05:00
bunnei a3e006f01b qt: Update about dialog to show license for GPLv2 only.
Fixes #6.
2018-01-14 17:27:40 -05:00
bunnei e09f123ff7 shared_memory: Minor fixes and cleanup. 2018-01-14 17:20:55 -05:00
bunnei e9e51c7181 svc: Implement svcMapSharedMemory. 2018-01-14 17:20:55 -05:00
bunnei 99d1279753 kernel: Increase default stack size to 64K. 2018-01-14 17:20:55 -05:00
Jannik Vogel e5ecb86d23 Remove Surface Viewer stub 2018-01-14 20:12:03 +01:00
bunnei eeddfb7409 Merge pull request #4 from spycrab/aboutdialog
Implement "About" dialog
2018-01-14 13:21:12 -05:00
spycrab bb84db54a8 Implement "About" dialog 2018-01-14 19:15:45 +01:00
Thog 84ad54795f Add missing FileType declarations in GuessFromExtension and GetFileTypeString 2018-01-14 19:00:16 +01:00
James Rowe d34c058c6b yuzu qt copy windows deps renamed 2018-01-13 21:17:42 -07:00
MerryMage 2c057ef5df Minor cleanup 2018-01-13 23:56:18 +00:00
MerryMage 427c1ae8ac macOS: Update Info.plist 2018-01-13 23:11:51 +00:00
James Rowe 6827ed18bd Add new icons and fix up the linux paths for install 2018-01-13 15:40:57 -07:00
MerryMage d3b17a5e9b Update dynarmic to bc73004
bc73004 a64_merge_interpret_blocks: Remove debug output
4e656ed tests/A64: Randomize PSTATE.<NZCV>
fd9530b A64: Optimization: Merge interpret blocks
3c9eb04 testenv: Use format constants
324f3fc tests/A64: Unicorn interface fixes
98ecbe7 tests/A64: Fuzz against unicorn
b1d38e7 tests/A64: Move TestEnvironment to own header
5218ad9 A64/data_processing_pcrel: bug: ADR{,P} instructions sign extend their immediate
b1a8c39 A64/data_processing_addsub: bug: {ADD,SUB}S (extended register) instructions write to ZR when d = 31
64827fb a64_emit_x64: bug: A64CallSupervisor trampled callee-save registers
1bfa04d emit_x64: bug: OP m/r64, imm32 form instructions sign-extend their immediate on x64
edadeea A64 inferface: Use two argument static_assert
9ab1304 A64: Add ExceptionRaised IR instruction
6843eed Update readme
7438d07 A64/translate: Add TranslateSingleInstruction function
2018-01-13 22:38:57 +00:00
MerryMage d616b36e7b Fix build on macOS and linux 2018-01-13 22:38:52 +00:00
bunnei ed9ffbaf28 arm_unicorn: Log unmapped memory access address. 2018-01-13 16:24:05 -05:00
bunnei e443f7a301 config: Default log filter to trace. 2018-01-13 16:23:12 -05:00
bunnei 182548ec86 yuzu: Update license text to be consistent across project. 2018-01-13 16:22:39 -05:00
James Rowe d0588e52ab Remove settings issues in sdl and fix a few files that broke in mingw 2018-01-12 19:11:05 -07:00
James Rowe 31499ecb2e Removing unused settings and yuzu rebranding 2018-01-12 19:11:05 -07:00
James Rowe 41830b061a Get yuzu sdl to start compiling 2018-01-12 19:11:04 -07:00
James Rowe bd5740a721 Remove gpu debugger and get yuzu qt to compile 2018-01-12 19:11:04 -07:00
James Rowe a5b9cd4d18 Remove references to PICA and rasterizers in video_core 2018-01-12 19:11:03 -07:00
James Rowe 5dbd091a80 Massive removal of unused modules 2018-01-12 19:11:03 -07:00
bunnei 68c6e82dd9 config: Default CPU core to Unicorn. 2018-01-12 21:05:37 -05:00
bunnei 2817ec4da4 core: Gut out cryptop, since it doesn't compile with C++17. 2018-01-12 19:36:41 -05:00
MerryMage 6fe2dc0b15 configuration: Add cpu_core configuration option 2018-01-12 17:48:52 -05:00
MerryMage ced9768819 arm_dynarmic: Implement core 2018-01-12 17:48:29 -05:00
bunnei 7e02ba1ae3 core: Include <algorithm> where used. 2018-01-11 22:36:56 -05:00
bunnei 5203bf6799 renderer_opengl: Fix LOG_TRACE in LoadFBToScreenInfo. 2018-01-11 22:32:44 -05:00
bunnei 5a7a2eba0d nv: Fix more broken asserts. 2018-01-11 22:31:12 -05:00
bunnei d673462aa5 nvdisp_disp0: Fix broken assert. 2018-01-11 22:29:29 -05:00
bunnei 86a8e32471 core: Fix recent GCC build breaks. 2018-01-11 22:24:09 -05:00
bunnei e2db6b98fe svc: Implement GetSystemTick. 2018-01-11 21:59:31 -05:00
bunnei cfb9f39472 nvdisp_disp0: Call SwapBuffers to render framebuffer. 2018-01-10 23:29:03 -05:00
bunnei 0ffcc1190e renderer_opengl: Support rendering Switch framebuffer. 2018-01-10 23:28:59 -05:00
bunnei 14fe63772f render_base: Add a struct describing framebuffer metadata. 2018-01-10 23:28:56 -05:00
bunnei 7fac24c9e3 renderer_opengl: Add MortonCopyPixels function for Switch framebuffer. 2018-01-10 23:28:53 -05:00
bunnei 46d4d95274 renderer_opengl: Update DrawScreens for Switch. 2018-01-10 23:28:49 -05:00
bunnei 901a0f8ef4 CMakeLists: Add framebuffer_layout.cpp. 2018-01-10 23:28:46 -05:00
bunnei 6eda6ae6eb frontend: Update for undocked Switch screen layout. 2018-01-10 23:28:43 -05:00
Subv 81bcb331f8 NV: Move the nv device nodes to their own directory and namespace. 2018-01-10 23:28:40 -05:00
Subv 8c39b10e47 VI: Use a Pulse event instead of OneShot for the vblank events.
This prevents missing frames if the vblank fires between the DequeueBuffer and Wait(vsync) calls
2018-01-10 23:28:36 -05:00
bunnei 1401c44cf4 vi: Use new CoreTiming::EventType 2018-01-10 23:28:33 -05:00
Subv 2d5bf5a379 NV: Expose the nvdisp_disp0 device and a weak reference to the nvdrv:a service.
NVFlinger will call into the nvdisp_disp0 device to perform screen flips, bypassing the ioctl interface.

We now have the address of the framebuffer to draw, we just need to actually put it on the screen.
2018-01-10 23:28:29 -05:00
Subv 91a0d29466 NV: Determine what buffer to draw for each layer of each display.
Don't try to draw buffers that the guest application is using, only queued buffers are eligible for drawing.

Drawing actual pixels is still not implemented.
2018-01-10 23:28:25 -05:00
Subv 1b907ea655 NV: Signal all display's vsync event 60 times per second. 2018-01-10 23:28:22 -05:00
Subv 67222ea3a6 NV: Give each display its own vsync event. 2018-01-10 23:28:19 -05:00
Subv a7c31ad468 NV: Keep track of Displays, Layers and BufferQueues in nvflinger. 2018-01-10 23:28:16 -05:00
Subv da2990dbb7 IPC: Allow passing arguments to the Interfaces when using PushIpcInterface 2018-01-10 23:28:13 -05:00
Subv 2d06628c52 NV: Implemented (with stubs) the vi:m service and some of its subservices.
The homebrew display test application now properly writes graphics data to the graphics buffer but we still don't have a way to compose the display layers.
2018-01-10 23:28:09 -05:00
Subv 54650737a3 NV: Implemented the nvdrv:a service and the /dev/nvmap device. 2018-01-10 23:28:05 -05:00
Subv 8923c80127 IPC: Corrected some definitions for the buffer C descriptor flags. 2018-01-10 23:28:02 -05:00
Subv edeb55d78b svc: Stub ResetSignal and CreateTransferMemory 2018-01-10 23:27:59 -05:00
Subv 377e2a79b5 svc: Stub SetMemoryAttribute 2018-01-10 23:27:56 -05:00
Subv 9362706e1d Threads: Added enum values for the Switch's 4 cpu cores and implemented svcGetInfo(AllowedCpuIdBitmask) 2018-01-10 01:01:55 -05:00
Subv 9de1929da9 Services: Allow lm to log single-character messages. 2018-01-10 00:41:29 -05:00
Subv db71b23c80 SVC: Fixed WaitSynchronization with multiple handles when none is immediately ready. 2018-01-09 15:02:43 -05:00
Subv 607a46a662 SVC: Implemented CancelSynchronization. 2018-01-09 15:02:04 -05:00
Subv 5685c764e4 ErrorCodes: Updated the InvalidHandle and Timeout kernel error codes. 2018-01-09 12:05:10 -05:00
Subv 84d05d5b6c SVC: Fixed WaitSynchronization with multiple handles when at least one of them is ready. 2018-01-09 11:53:50 -05:00
bunnei 7a59da7834 kernel: Rename Semaphore to ConditionVariable. 2018-01-08 21:41:37 -05:00
bunnei a689a33995 mutex: Remove unused call to VerifyGuestState. 2018-01-08 21:12:56 -05:00
Subv 96e2acfa8f Kernel: Actually wake up the requested number of threads in Semaphore::Release.
Also properly keep track of data in guest memory, this fixes managing the semaphore from userland.

It was found that Semaphores are actually Condition Variables, with Release(1) and Release(-1) being equivalent to notify_one and notify_all. We should change the name of the class to reflect this.
2018-01-08 21:12:54 -05:00
Subv 2ca36ac394 Kernel: Properly keep track of mutex lock data in the guest memory. This fixes userland locking/unlocking. 2018-01-08 21:12:51 -05:00
Subv ac8f05943b Kernel: Allow chaining WaitSynchronization calls inside a wakeup callback. 2018-01-08 21:12:49 -05:00
MerryMage 66a015fe9a fix macos build 2018-01-08 19:20:10 -05:00
bunnei 75589269df core_timing: Use 1.020GHz for core clock rate. 2018-01-08 19:18:50 -05:00
B3n30 1b2aa3780d CoreTiming: Reworked CoreTiming (cherry-picked from Citra #3119)
* CoreTiming: New CoreTiming; Add Test for CoreTiming
2018-01-08 19:10:25 -05:00
Subv d3f259cd73 IPC: Make DuplicateSession return the Domain instead of the Session if the request was made on a Domain interface. 2018-01-07 17:12:07 -05:00
Subv f0a939c240 AppletOE: Fixed command buffer structure for ReceiveMessage. 2018-01-07 17:12:05 -05:00
Subv b01b7eea52 IPC: Corrected some command headers in the IPC Controller interface. 2018-01-07 17:12:03 -05:00
Subv 3dd00433fe IPC: Corrected some command header sizes in appletOE. 2018-01-07 17:12:01 -05:00
Subv f262afb38a IPC: Take the number of domain objects as a parameter in MakeBuilder. 2018-01-07 17:11:58 -05:00
Subv ed8e7b90cd SM: Fixed connecting to services with an 8-byte name, like appletOE. 2018-01-07 17:11:56 -05:00
Subv 7d966999d4 IPC: Fixed pushing ResultCodes into the command buffer.
They should have 32 bits of padding after the error code now.
2018-01-07 17:11:54 -05:00
Subv 347ab620b5 IPC: Add functions to read the input move/copy objects from an IPC request. 2018-01-07 17:11:51 -05:00
Subv eda468e4fb IPC: Don't attempt to read the command buffer if it holds a Close request. 2018-01-07 17:11:49 -05:00
Subv fd93b1e0ef IPC Cleanup: Remove 3DS-specific code and translate copy, move and domain objects in IPC requests.
Popping objects from the buffer is still not implemented.
2018-01-07 17:11:47 -05:00
Subv 6a6013d4c3 IPC: Skip the entire u64 of the command id when receiving an IPC request.
Service code now doesn't have to deal with this.
2018-01-07 17:11:45 -05:00
Subv d6a5e0b61b IPC: Use the correct size when pushing raw data to the command buffer and fixed pushing domain objects.
Domain object ids are always stored immediately after the raw data.
2018-01-07 17:11:43 -05:00
bunnei 1aac4945d2 svc: Implement svcSignalProcessWideKey. 2018-01-07 16:55:17 -05:00
bunnei 9b8fff5568 audio: Log dropping frames as trace to reduce spam. 2018-01-07 16:52:59 -05:00
bunnei d15b38d32c semaphore: More changes for Switch. 2018-01-07 16:52:23 -05:00
bunnei 0459eb07c9 wait_object: Refactor to allow waking up a single thread. 2018-01-07 16:33:41 -05:00
bunnei 02dba7283f nso: Always load the filepath specified by the user. 2018-01-07 12:44:36 -05:00
bunnei 1ae217c357 core_timing: Increase clock speed for Switch docked. 2018-01-07 00:58:06 -05:00
bunnei 2720d550b7 svc: Implement svcWaitProcessWideKeyAtomic. 2018-01-06 16:14:12 -05:00
bunnei 2f66f2210d semaphore: Updates for Switch. 2018-01-06 15:55:40 -05:00
bunnei 718c77f373 lm: Assert on unsupported multi-message. 2018-01-06 14:41:56 -05:00
bunnei 260149fc9b svc: Implement WaitSynchronization for a single handle. 2018-01-06 14:34:32 -05:00
bunnei 25c27e356e svc: Refactor LockMutex code to use WaitSynchronization1. 2018-01-06 14:19:28 -05:00
bunnei 1941e021bc lm: Improve Log() to format a useful string. 2018-01-05 00:45:13 -05:00
bunnei dc6b80d997 svc: Add missing string_util include. 2018-01-04 19:45:15 -05:00
bunnei 6545152acd cmake: Don't compile Dynarmic as it's unused. 2018-01-04 17:01:02 -05:00
bunnei 878239d05c core: Increase tight_loop 100x for speed. 2018-01-04 16:52:16 -05:00
bunnei fbbaca8fb7 citra_qt: Remove VFP registers, since this isn't used anyways and caused an assert. 2018-01-04 13:52:29 -05:00
bunnei 08991b82fe arm_unicorn: Load/release unicorn DLL. 2018-01-04 13:40:01 -05:00
bunnei 4b1c34c257 externals: Use unicorn DLL instead of static lib. 2018-01-04 13:15:29 -05:00
bunnei 3ff86cab2e unicorn: Use for arm interface on Windows. 2018-01-04 00:13:23 -05:00
bunnei c3ee3f9d76 arm_dynarmic: More cleanup. 2018-01-04 00:09:12 -05:00
bunnei 71eb1a30f0 core: Remove unicorn_dynload. 2018-01-03 22:10:31 -05:00
bunnei 20165180ea arm_dynarmic: Gut interface until dynarmic is ready for general use. 2018-01-03 22:10:11 -05:00
bunnei b055ea2699 arm: Remove SkyEye/Dyncom code that is ARMv6-only. 2018-01-02 22:24:12 -05:00
bunnei 5739484470 vm_manager: Use a more reasonable MAX_ADDRESS size. 2018-01-02 21:37:56 -05:00
bunnei 0d63f6dc66 svc: Remove unnecessary "svc" prefix to naming scheme. 2018-01-02 20:47:26 -05:00
bunnei 7d16a38e06 pctl: Remove duplicate InstallInterfaces function. 2018-01-02 20:41:20 -05:00
bunnei b328c577ef hle: Move SVC code to kernel namespace. 2018-01-02 20:40:30 -05:00
bunnei add5ad40ad svc: Improve svcGetInfo. 2018-01-01 16:01:06 -05:00
bunnei 6a6de01d43 vm_manager: Stub out a bunch of interfaces used by svcGetInfo. 2018-01-01 15:59:31 -05:00
bunnei 7a96dfa16f svc: Fix string formatting for CreateThread. 2018-01-01 15:48:08 -05:00
bunnei 2d6060a29a cmake: Add missing object_address_table. 2018-01-01 15:41:05 -05:00
bunnei 4728cc141a core/video_core: Fix a bunch of u64 -> u32 warnings. 2018-01-01 15:40:35 -05:00
bunnei 082be53aab svc: Stub out svcWaitSynchronization.
- This does not matter until we implement other kernel objects, mutexes use svcLockMutex for waiting.
2018-01-01 14:47:57 -05:00
bunnei 37d55a0317 svc: Implement svcExitProcess. 2018-01-01 14:38:34 -05:00
bunnei aec03c0e73 svc: Implement svcUnlockMutex. 2018-01-01 14:04:36 -05:00
bunnei 16c66e09cc svc: Implement svcLockMutex. 2018-01-01 14:02:26 -05:00
bunnei fba61b93c7 kernel: Add ObjectAddressTable class. 2018-01-01 13:25:37 -05:00
bunnei 57d3544f96 thread: Keep track of the initially created handle.
This is kinda crufty, but we need it for now to update guest state variables.
2017-12-31 17:23:36 -05:00
bunnei a373ba43e4 svc: Implement svcExitThread. 2017-12-31 16:11:27 -05:00
bunnei c943ab553f svc: Implement svcCreateThread. 2017-12-31 16:10:01 -05:00
bunnei 753ab82242 svc: Cleanup svcGetThreadPriority. 2017-12-31 16:06:11 -05:00
bunnei 647243bd78 svc: Stub out svcGetCurrentProcessorNumber. 2017-12-31 16:01:04 -05:00
bunnei 10022dc332 errors: Define missing kernel error codes. 2017-12-31 15:59:00 -05:00
bunnei 8c14a2704d svc: Implement svcSetThreadPriority. 2017-12-31 15:58:16 -05:00
bunnei 4564526c43 svc: Change SignalProcessWideKey to a stub. 2017-12-31 15:55:11 -05:00
bunnei 1629d02a54 function_wrappers: Cleanup, fix warnings, remove unused code. 2017-12-31 15:46:30 -05:00
bunnei 3af6ad6bb9 svc: Implement svcUnmapMemory. 2017-12-31 15:22:49 -05:00
bunnei f10d490c94 svc: Minor cleanups. 2017-12-30 13:40:28 -05:00
bunnei 7a612ba7dd svc: Implement svcStartThread. 2017-12-30 13:37:07 -05:00
bunnei 3fc608b040 thread: Main thread should set thread handle to reg 1. 2017-12-30 12:10:58 -05:00
bunnei da4bd90980 thread: Remove THUMB mode flag. 2017-12-30 12:08:26 -05:00
bunnei d8a3de102e thread: Main thread should be ready by default, all others dormant. 2017-12-30 12:05:10 -05:00
bunnei 78531342a4 kernel: Various 64-bit fixes in memory/process/thread 2017-12-29 13:27:58 -05:00
bunnei 7b3a56f0fb applet_oe: Stub out a bunch of interfaces necessary for boot. 2017-12-29 00:44:46 -05:00