1
0
Fork 0
Commit graph

8620 commits

Author SHA1 Message Date
bunnei
d08d4a366b
Merge pull request #1704 from DarkLordZach/oss-sysarchive
file_sys: Implement open source system archives
2018-12-04 19:59:52 -05:00
bunnei
af286294f9
Merge pull request #1837 from lioncash/map
yuzu/game_list_worker: Minor cleanup and code deduplication
2018-12-04 19:57:41 -05:00
Lioncash
a49fd7fd57 yuzu/game_list_worker: Move std::string construction after the termination check in callbacks
Avoids potentially allocating a std::string instance when it isn't
needed.
2018-12-04 18:39:35 -05:00
bunnei
e5dd4cb392
Merge pull request #1838 from lioncash/dedup
file_sys/registered_cache: Eliminate variable shadowing
2018-12-04 18:34:49 -05:00
bunnei
173073c722
Merge pull request #1836 from lioncash/unused
crypto/key_manager: Remove unused variable in GetTicketblob()
2018-12-04 18:28:15 -05:00
Lioncash
8ea1f28614 kernel/svc: Remove unused header inclusion 2018-12-04 15:48:20 -05:00
Lioncash
a543c35962 kernel/svc: Implement svcSignalEvent()
This function simply does a handle table lookup for a writable event
instance identified by the given handle value. If a writable event
cannot be found for the given handle, then an invalid handle error is
returned. If a writable event is found, then it simply signals the
event, as one would expect.
2018-12-04 15:47:59 -05:00
Lioncash
2a1f59b301 kernel/svc: Implement svcCreateEvent()
svcCreateEvent operates by creating both a readable and writable event
and then attempts to add both to the current process' handle table.

If adding either of the events to the handle table fails, then the
relevant error from the handle table is returned.

If adding the readable event after the writable event to the table
fails, then the writable event is removed from the handle table and the
relevant error from the handle table is returned.

Note that since we do not currently test resource limits, we don't check
the resource limit table yet.
2018-12-04 15:47:55 -05:00
bunnei
465f486160
Merge pull request #1845 from lioncash/nro
loader/{nro, nso}: Remove dependency on the System class
2018-12-04 12:26:12 -05:00
bunnei
d533767623
Merge pull request #1853 from lioncash/event
kernel/object: Amend handle types to distinguish between readable and writable events
2018-12-04 12:25:40 -05:00
Marcos
ab2108fb2a Rewrited TEX/TEXS (TEX Scalar). (#1826)
* Rewrited TEX/TEXS (TEX Scalar).

* Style fixes.

* Styles issues.
2018-12-04 12:24:35 -05:00
bunnei
da5659fb87
Merge pull request #1857 from lioncash/res-info
kernel/svc: Implement the resource limit svcGetInfo option
2018-12-04 12:23:19 -05:00
bunnei
7f6bc284e9
Merge pull request #1854 from Subv/old_command_processor
Don't try to route PFIFO methods (0-0x40) to the other engines.
2018-12-04 08:49:22 -05:00
Lioncash
5eb057f422 kernel/object: Amend handle types to distinguish between readable and writable events
Two kernel object should absolutely never have the same handle ID type.
This can cause incorrect behavior when it comes to retrieving object
types from the handle table. In this case it allows converting a
WritableEvent into a ReadableEvent and vice-versa, which is undefined
behavior, since the object types are not the same.

This also corrects ClearEvent() to check both kernel types like the
kernel itself does.
2018-12-04 02:20:47 -05:00
Lioncash
ac966e4213 kernel/handle_table: Amend reference to CTR-OS in Create()
Another hold-over from Citra.
2018-12-04 01:50:44 -05:00
Lioncash
312690b450 kernel/svc: Implement the resource limit svcGetInfo option
Allows a process to register the resource limit as part of its handle
table.
2018-12-04 01:50:30 -05:00
Subv
c4c19fa6c1 Removed unused file.
This is a leftover from #1792
2018-12-03 23:52:38 -05:00
Subv
b873253da1 GPU: Don't try to route PFIFO methods (0-0x40) to the other engines. 2018-12-03 23:52:18 -05:00
V.Kalyuzhny
b330b495dc [Kernel::CreateThread] Match format specifiers to LOG_TRACE's arguments 2018-12-04 05:13:50 +02:00
bunnei
9f1ac96afa
Merge pull request #1840 from lioncash/info
svc: Reorganize svcGetInfo, handle more error cases for existing implemented info categories
2018-12-03 18:46:22 -05:00
bunnei
76525013c0
Merge pull request #1842 from lioncash/slot
yuzu/configuration: Minor clean-up related changes
2018-12-03 17:12:01 -05:00
bunnei
f6b22d9251
Merge pull request #1835 from lioncash/cache-global
filesystem: De-globalize registered_cache_union
2018-12-03 17:11:26 -05:00
bunnei
8a12daac8c
Merge pull request #1822 from ReinUsesLisp/glsl-scope
gl_shader_decompiler: Introduce a scoped object and style changes
2018-12-03 17:10:02 -05:00
bunnei
ef69b4b830
Merge pull request #1803 from DarkLordZach/k-able-event
kernel: Divide Event into ReadableEvent and WritableEvent
2018-12-03 17:05:57 -05:00
bunnei
f7d5f72944
Merge pull request #1833 from lioncash/clean
service/fsp_srv: Implement CleanDirectoryRecursively
2018-12-03 17:04:05 -05:00
bunnei
118f402382
Merge pull request #1839 from lioncash/init
service/audio/audout_u: Amend constructor initialization list order
2018-12-03 17:03:00 -05:00
bunnei
a238cdb5ca
Merge pull request #1841 from ogniK5377/npad-mode-fix
Fixed crash with SetNpadMode
2018-12-03 17:02:40 -05:00
Lioncash
7695febfa1 loader/nso: Remove dependency on the System class
Similar to the NRO changes, we can also pass the process explicitly as a
parameter from Load instead of indirecting through the System class.
2018-12-02 23:39:03 -05:00
Lioncash
fc32d6256a loader/nro: Make the static LoadNro function internally linked
This simply acts as a forwarding function for the Load() function, so
this doesn't need to be directly exposed.
2018-12-02 23:38:58 -05:00
Lioncash
b110d2176c loader/nro: Remove dependency on the System class
Load() is already given the process instance as a parameter, so instead
of coupling the class to the System class, we can just forward that
parameter to LoadNro()
2018-12-02 22:18:52 -05:00
Lioncash
6306e54f45 service/usb: Update function table
Updates the function table for IClientEpSession based off information
provided by SwitchBrew.
2018-12-02 15:49:40 -05:00
Lioncash
f933b3370e service/erpt: Update function table
Updates the function table according to information provided by
SwitchBrew.
2018-12-02 15:46:44 -05:00
Lioncash
195cad9635 yuzu/configuration: Make slots private where applicable
These slots are only ever attached to event handling mechanisms within
the class itself, they're never used externally. Because of this, we can
make the functions private.

This also removes redundant usages of the private access specifier.
2018-12-02 14:18:36 -05:00
Lioncash
eabfb7730d yuzu/configuration: Add missing override specifiers to configuration-related classes
Resolves trivial compiler warnings.
2018-12-02 14:18:36 -05:00
Lioncash
f3253d0f14 yuzu/configuration/configure_input: Default destructor in the cpp file
The previous code could potentially be a compilation issue waiting to
occur, given we forward declare the type for a std::unique_ptr. If the
complete definition of the forward declared type isn't visible in a
translation unit that the class is used in, then it would fail to
compile.

Defaulting the destructor in a cpp file ensures the std::unique_ptr's
destructor is only invoked where its complete type is known.
2018-12-02 14:18:26 -05:00
David Marcec
a9223c8182 Fixed crash with SetNpadMode
fixed crash due to handheld
2018-12-03 02:45:08 +11:00
Lioncash
7fe27de26e svc: Use the current process' handle table for retrieving the process instance to act upon
The kernel uses the handle table of the current process to retrieve the
process that should be used to retrieve certain information. To someone
not familiar with the kernel, this might raise the question of "Ok,
sounds nice, but doesn't this make it impossible to retrieve information
about the current process?".

No, it doesn't, because HandleTable instances in the kernel have the
notion of a "pseudo-handle", where certain values allow the kernel to
lookup objects outside of a given handle table. Currently, there's only
a pseudo-handle for the current process (0xFFFF8001) and a pseudo-handle
for the current thread (0xFFFF8000), so to retrieve the current process,
one would just pass 0xFFFF8001 into svcGetInfo.

The lookup itself in the handle table would be something like:

template <typename T>
T* Lookup(Handle handle) {
    if (handle == PSEUDO_HANDLE_CURRENT_PROCESS) {
        return CurrentProcess();
    }

    if (handle == PSUEDO_HANDLE_CURRENT_THREAD) {
        return CurrentThread();
    }

    return static_cast<T*>(&objects[handle]);
}

which, as is shown, allows accessing the current process or current
thread, even if those two objects aren't actually within the HandleTable
instance.
2018-12-02 03:41:49 -05:00
Lioncash
6712e7402c svc: Reorganize svcGetInfo, handle more error cases for existing implemented info categories
Our implementation of svcGetInfo was slightly incorrect in that we
weren't doing proper error checking everywhere. Instead, reorganize it
to be similar to how the kernel seems to do it.
2018-12-02 03:40:10 -05:00
Lioncash
57ac068a23 service/audio/audout_u: Amend constructor initialization list order
Orders the constructor initializer list the same way the members of the
class are declared. Prevents -Wreorder warnings
2018-12-01 23:56:20 -05:00
bunnei
7ce17b2cf6
Merge pull request #1827 from ReinUsesLisp/clip-and-shader
gl_rasterizer: Enable clip distances when set in register and in shader
2018-12-01 23:51:47 -05:00
Lioncash
efbcff0af0 file_sys/registered_cache: Eliminate variable shadowing
Also inverts if statements where applicable to allow unindenting code a
little bit.
2018-12-01 23:50:13 -05:00
bunnei
80aa124b1d
Merge pull request #1825 from ReinUsesLisp/shader-pipeline-cache
gl_shader_manager: Update pipeline when programs have changed
2018-12-01 23:48:55 -05:00
bunnei
a6805e58ce
Merge pull request #1795 from ReinUsesLisp/vc-cleanup
video_core: Minor style changes
2018-12-01 23:46:18 -05:00
bunnei
0e9be7be37
Merge pull request #1823 from bunnei/fix-surface-copy
gl_rasterizer_cache: Fix several surface copy issues.
2018-12-01 23:44:32 -05:00
Lioncash
db4523f1ec filesystem: De-globalize registered_cache_union
We can just return a new instance of this when it's requested. This only
ever holds pointers to the existing registed caches, so it's not a large
object. Plus, this also gets rid of the need to keep around a separate
member function just to properly clear out the union.

Gets rid of one of five globals in the filesystem code.
2018-12-01 23:43:23 -05:00
Lioncash
8c108eaca7 yuzu/game_list_worker: Deduplicate game list entry creation
Avoids duplicating the same code twice verbatim.
2018-12-01 23:23:39 -05:00
Lioncash
f1ecfcb8bc yuzu/game_list_worker: Tidy up string handling in FillControlMap()
We don't need to call out to our own file handling functions when we're
going to construct a QFileInfo instance right after it. We also don't
need to convert to a std::string again just to compare the file
extension.
2018-12-01 22:49:00 -05:00
Lioncash
a8aca4306d crypto/key_manager: Remove unused variable in GetTicketblob() 2018-12-01 22:37:51 -05:00
bunnei
c5e781e72a
Merge pull request #1832 from Simek/remove-game-list-border
UI: Remove border from Game List
2018-12-01 22:26:34 -05:00
bunnei
97e73591e3
Merge pull request #1830 from Subv/vi_ub
Services/VI: Dereferencing an uninitialized std::optional is undefined behavior.
2018-12-01 22:25:10 -05:00
Lioncash
e88cdcc912 Fix debug build
A non-existent parameter was left in some formatting calls (the logging
macro for which only does anything meaningful on debug builds)
2018-12-01 02:11:42 -05:00
Lioncash
0ccaaafca3 file_sys: Override missing mutating functions to be stubbed out for ReadOnlyVfsDirectory by default
Ensures that read only indeed means read only.
2018-11-30 23:52:56 -05:00
Lioncash
a7d9fe993a service/fsp_srv: Implement CleanDirectoryRecursively
This is the same behavior-wise as DeleteDirectoryRecursively, with the
only difference being that it doesn't delete the top level directory in
the hierarchy, so given:

root_dir/
  - some_dir/
    - File.txt
  - OtherFile.txt

The end result is just:

root_dir/
2018-11-30 20:17:28 -05:00
Bartosz Kaszubowski
5f07ca3dce remove border from GameList 2018-11-30 23:35:08 +01:00
Subv
583bd20f02 Services/VI: Dereferencing an uninitialized std::optional is undefined behavior.
Assert that it is not empty before using it in the DequeueBuffer wait callback.
2018-11-30 16:06:49 -05:00
Lioncash
308bbba8b9 service/set: Convert GetLanguageCode over to using PushEnum()
This code was around prior to the introduction of PushEnum, so convert
it over so we don't need to cast here.
2018-11-30 09:08:07 -05:00
Lioncash
7c04fe22b4 service/set: Implement MakeLanguageCode
This function simply converts a given index into a language code.
2018-11-30 09:08:03 -05:00
Lioncash
4b950728fd configure_input: Amend clang-format discrepancies 2018-11-30 03:31:56 -05:00
bunnei
0f43564d09 gl_rasterizer_cache: Update AccurateCopySurface to flush complete source surface.
- Fixes issues with Breath of the Wild with use_accurate_gpu_emulation setting.
2018-11-29 20:10:11 -05:00
ReinUsesLisp
2908d30274 gl_rasterizer: Enable clip distances when set in register and in shader 2018-11-29 16:58:20 -03:00
ReinUsesLisp
1a2bb596db gl_rasterizer: Implement a framebuffer cache 2018-11-29 16:34:46 -03:00
ReinUsesLisp
e8620eaa9a gl_shader_manager: Update pipeline when programs have changed 2018-11-29 16:26:42 -03:00
Zach Hilman
170d707850 hle_ipc: Refactor SleepClientThread to avoid ReadableEvent 2018-11-29 09:14:20 -05:00
Zach Hilman
a342bcc9b1 kernel/event: Reference ReadableEvent from WritableEvent 2018-11-29 08:48:40 -05:00
Zach Hilman
ff610103b5 core: Port all current usages of Event to Readable/WritableEvent 2018-11-29 08:45:41 -05:00
Zach Hilman
a56fc84e7a hle_ipc: Use event pair for SleepClientThread 2018-11-29 08:42:26 -05:00
Zach Hilman
c61d2a2841 kernel: Add named event table
Used to store ReadableEvents of all events on the system.
2018-11-29 08:42:26 -05:00
Zach Hilman
c713383816 kernel: Divide Event into ReadableEvent and WritableEvent
More hardware accurate. On the actual system, there is a differentiation between the signaler and signalee, they form a client/server relationship much like ServerPort and ClientPort.
2018-11-29 08:42:26 -05:00
Zach Hilman
d92989e787 kernel/object: Add descriptions to ResetTypes 2018-11-29 08:42:26 -05:00
bunnei
7befe0134d
Merge pull request #1768 from greggameplayer/patch-2
Uncheck automatically joycons docked when docked mode is enable
2018-11-29 01:00:09 -05:00
bunnei
1e49a85106
Merge pull request #1801 from ogniK5377/log-before-execute
Changed logging to be "Log before execution", Added more error logging, all services/svc should now log on some level
2018-11-29 00:58:46 -05:00
bunnei
3d3cc35ee7 gl_rasterizer_cache: Remove BlitSurface and replace with more accurate copy.
- BlitSurface with different texture targets is inherently broken.
- When target is the same, we can just use FastCopySurface.
- Fixes rendering issues with Breath of the Wild.
2018-11-28 21:56:21 -05:00
ReinUsesLisp
eb700afcf0 gl_shader_decompiler: Remove texture temporal in TLD4 2018-11-28 23:46:16 -03:00
ReinUsesLisp
8d58e5da71 gl_shader_decompiler: Flip negated if else statement 2018-11-28 23:46:16 -03:00
ReinUsesLisp
f4abebd731 gl_shader_decompiler: Use GLSL scope on instructions unrelated to textures 2018-11-28 23:46:14 -03:00
ReinUsesLisp
78fc8f6b66 gl_shader_decompiler: Move texture code generation into lambdas 2018-11-28 23:45:53 -03:00
ReinUsesLisp
ab13b628d0 gl_shader_decompiler: Clean up texture instructions 2018-11-28 23:45:53 -03:00
ReinUsesLisp
6a642022dd gl_shader_decompiler: Scope GLSL variables with a scoped object 2018-11-28 23:45:51 -03:00
ReinUsesLisp
037449668e gl_rasterizer: Signal UNIMPLEMENTED when rt_separate_frag_data is not zero 2018-11-28 21:26:22 -03:00
ReinUsesLisp
653d7a3f0d gl_rasterizer_cache: Use brackets for two-line single-expresion blocks 2018-11-28 21:18:14 -03:00
ReinUsesLisp
432a9872ed gl_rasterizer: Remove unused struct declarations 2018-11-28 21:18:13 -03:00
ReinUsesLisp
22c7c710b4 gl_rasterizer: Remove extension booleans 2018-11-28 21:18:13 -03:00
bunnei
5a9a84994a
Merge pull request #1808 from Tinob/master
Fix clip distance and viewport
2018-11-28 17:47:28 -05:00
bunnei
3fe8ab0d99
Merge pull request #1786 from Tinob/DepthClamp
Add Depth Clamp Support
2018-11-28 17:46:55 -05:00
bunnei
c5ab648554
Merge pull request #1817 from DarkLordZach/npad-idx-fix
npad: Use NPadIdToIndex to prevent invalid array access
2018-11-28 17:46:17 -05:00
bunnei
6f849887c9
Merge pull request #1792 from bunnei/dma-pusher
gpu: Rewrite GPU command list processing with DmaPusher class.
2018-11-28 10:12:37 -05:00
Zach Hilman
299224790c npad: Use NPadIdToIndex to prevent invalid array access 2018-11-28 09:01:58 -05:00
bunnei
881f5ad70f
Merge pull request #1735 from FernandoS27/tex-spacing
Texture decoder: Implemented Tile Width Spacing
2018-11-27 19:21:17 -05:00
bunnei
adb882bf90
Merge pull request #1814 from lioncash/ptr
file_sys/registered_cache: Use regular const references instead of std::shared_ptr for InstallEntry()
2018-11-27 19:20:12 -05:00
bunnei
ac74b71d75 dma_pushbuffer: Optimize to avoid loop and copy on Push. 2018-11-27 19:17:33 -05:00
bunnei
c568f5cea7 gpu: Move command list profiling to DmaPusher::DispatchCalls. 2018-11-27 18:42:21 -05:00
bunnei
e89a3b9e59
Merge pull request #1811 from lioncash/input
yuzu/input: Minor changes
2018-11-27 18:38:12 -05:00
Zach Hilman
6df74ff579 npad: Fix copy/paste error with LED position assignments 2018-11-27 17:23:44 -05:00
Lioncash
2a22c1b27e yuzu/configure_input_player: Use std::size_t to represent the player index instead of u8
Prevents compiler warnings related to truncation when invoking the
dialog. It's also extremely suspect to use a u8 value here instead of a
more general type to begin with.
2018-11-27 16:37:21 -05:00
Lioncash
0782d3971b yuzu/configure_input: Make CallConfigureDialog a non-member template function
This doesn't depend on any part of the private interface, so it can be
made a non-member internal function.
2018-11-27 16:37:18 -05:00
bunnei
3cc204aff8
Merge pull request #1802 from DarkLordZach/user-data-storage
profile_manager: Save and load ProfileData from disk
2018-11-27 16:36:23 -05:00
Lioncash
7b1aaaa069 file_sys/registered_cache: Remove unused <map> include 2018-11-27 16:33:18 -05:00
Lioncash
d72c809030 file_sys/registered_cache: Use regular const references instead of std::shared_ptr for InstallEntry()
These parameters don't need to utilize a shared lifecycle directly in
the interface. Instead, the caller should provide a regular reference
for the function to use. This also allows the type system to flag
attempts to pass nullptr and makes it more generic, since it can now be
used in contexts where a shared_ptr isn't being used (in other words, we
don't constrain the usage of the interface to a particular mode of
memory management).
2018-11-27 16:33:14 -05:00
bunnei
bf055e14ab
Merge pull request #1812 from lioncash/nacp
control_metadata: Correct typo in language name (Portugese -> Portuguese)
2018-11-27 16:29:53 -05:00
ReinUsesLisp
2e9b90abad gl_shader_decompiler: Fixup clip distance index 2018-11-27 15:35:26 -03:00